/*
Theme Name: cpe.org.ua Editorial
Theme URI: https://cpe.org.ua
Author: CPE
Description: Тёплый средиземноморский editorial-журнал — терракота и крем. Для lifestyle/relationships блога 18+.
Version: 1.0
Text Domain: cpe-editorial
*/

/* ============ Google Fonts (Fraunces + Inter, cyrillic) ============ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,700;0,9..144,800;0,9..144,900;1,9..144,400;1,9..144,700&family=Inter:wght@400;500;600&display=swap&subset=cyrillic,latin');

/* ============ palette (terracotta mediterranean) ============ */
:root{
  --bg:#f7f1e8;
  --surface:#fffcf7;
  --ink:#2b1d12;
  --muted:#7a6254;
  --accent:#c8552f;          /* terracotta / burnt orange */
  --accent-ink:#ffffff;
  --accent-light:#f3e0d8;    /* light terracotta tint for chips */
  --dark:#3d2010;            /* deep espresso brown */
  --dark-ink:#f5ede4;
  --line:#e8ddd2;
  --chip:#f3e0d8;
  --radius:12px;
  --shadow:0 8px 28px rgba(200,85,47,.10),0 2px 8px rgba(43,29,18,.06);
  --shadow-hover:0 16px 42px rgba(200,85,47,.16),0 4px 12px rgba(43,29,18,.10);
  --serif:"Fraunces",Georgia,"Times New Roman",serif;
  --sans:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --maxw:1180px;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--sans);
  font-size:18px;line-height:1.72;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 22px}

/* ============ header ============ */
.site-head{position:sticky;top:0;z-index:50;background:var(--bg);
  border-bottom:1px solid var(--line)}
.site-head-in{display:flex;align-items:center;justify-content:space-between;gap:20px;
  padding:13px 22px;max-width:var(--maxw);margin:0 auto}

/* logo lockup */
.brand{display:inline-flex;align-items:center;gap:12px}
.brand:hover{text-decoration:none}
.logo-mark{display:inline-flex;flex:0 0 auto;line-height:0}
.logo-mark svg{display:block}
.logo-word{font-family:var(--serif);font-weight:800;font-size:28px;line-height:1;
  color:var(--ink);letter-spacing:-.015em}
.logo-word .wm-accent{color:var(--accent)}

.nav{display:flex;gap:4px;flex-wrap:wrap;align-items:center}
.nav a{color:var(--ink);font-size:14px;font-weight:500;padding:7px 14px;
  border-radius:999px;transition:background .18s,color .18s}
.nav a:hover{background:var(--chip);color:var(--accent);text-decoration:none}

/* mobile menu toggle */
.mnav-btn{display:none;flex:0 0 auto;cursor:pointer;user-select:none;
  font-size:28px;line-height:1;color:var(--ink);padding:2px 10px;border-radius:10px;
  border:1px solid var(--line);background:var(--surface)}
.mnav-btn:hover{color:var(--accent);border-color:var(--accent)}

/* ============ hero — асимметричная типографика + рамка-оффсет ============ */
.hero{padding:56px 0 28px}
.hero-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:48px;align-items:center}

/* hero copy side */
.hero-copy .kicker{color:var(--accent);font-weight:600;font-size:12.5px;
  text-transform:uppercase;letter-spacing:.18em;display:block;margin-bottom:12px}
.hero h1{font-family:var(--serif);font-weight:900;font-size:clamp(2.3rem,1.2rem+3.5vw,3.9rem);
  line-height:1.03;letter-spacing:-.025em;margin:.2em 0 .25em;
  /* акцентная подчёркивающая линия под последним словом — через border-bottom на span */
  position:relative}
.hero h1 em{font-style:normal;color:var(--accent)}
.hero p.lead{font-size:18.5px;color:var(--muted);max-width:34ch;margin:0 0 28px;line-height:1.62}

/* hero feat: тонкая двойная рамка (outline + box-shadow оффсет) */
.hero-feat{position:relative;border-radius:var(--radius);overflow:visible;
  display:block;aspect-ratio:4/3.2}
.hero-feat:hover{text-decoration:none}
/* inner image wrapper clips the image */
.hero-feat::before{content:'';position:absolute;inset:0;border-radius:var(--radius);
  border:1.5px solid var(--accent);z-index:2;pointer-events:none}
/* offset decorative shadow-frame */
.hero-feat::after{content:'';position:absolute;inset:0;border-radius:var(--radius);
  box-shadow:8px 8px 0 0 var(--accent-light),0 0 0 1.5px var(--line);
  transform:translate(9px,9px);z-index:-1;pointer-events:none}
.hero-feat img{width:100%;height:100%;object-fit:cover;border-radius:var(--radius);
  display:block;position:relative;z-index:1}
.hero-feat .cap{position:absolute;left:0;right:0;bottom:0;padding:24px 22px 20px;
  background:linear-gradient(transparent,rgba(61,32,16,.88));color:#fff;
  border-radius:0 0 var(--radius) var(--radius);z-index:3}
.hero-feat .cap .c{font-size:11.5px;text-transform:uppercase;letter-spacing:.14em;
  color:#f5d9cc;font-weight:600;display:block}
.hero-feat .cap .ht{font-family:var(--serif);font-weight:700;font-size:23px;
  margin:6px 0 0;line-height:1.15;display:block}

/* ============ section head — акцентная черта терракоты ============ */
.section{padding:36px 0}
.sec-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;
  margin:0 0 26px;border-bottom:2.5px solid var(--accent);padding-bottom:11px}
.sec-head h2{font-family:var(--serif);font-weight:800;font-size:27px;margin:0;
  letter-spacing:-.015em;color:var(--ink)}
.sec-head a{font-size:13.5px;font-weight:600;white-space:nowrap;color:var(--accent);
  transition:opacity .18s}
.sec-head a:hover{opacity:.72;text-decoration:none}

/* shared chip — таблетка с тонкой границей */
.chip{align-self:flex-start;font-size:11px;font-weight:600;text-transform:uppercase;
  letter-spacing:.09em;color:var(--accent);background:var(--chip);
  padding:4px 11px;border-radius:999px;margin-bottom:10px;display:inline-block;
  border:1px solid rgba(200,85,47,.25)}
.meta{font-size:13px;color:var(--muted);display:flex;gap:10px;align-items:center}
.meta .dot{width:3px;height:3px;border-radius:50%;background:var(--muted);opacity:.55}

/* ============ EDITORIAL SPLIT ============ */
.editorial-split{display:grid;grid-template-columns:1.15fr .85fr;gap:40px;align-items:start}
.lead-card{background:var(--surface);border:1px solid var(--line);
  border-radius:var(--radius);overflow:hidden;
  box-shadow:0 4px 18px rgba(200,85,47,.07);
  transition:box-shadow .22s}
.lead-card:hover{box-shadow:var(--shadow-hover)}
.lead-thumb{display:block;aspect-ratio:16/10;overflow:hidden;background:var(--chip)}
.lead-thumb img{width:100%;height:100%;object-fit:cover;
  transition:transform .38s ease}
.lead-thumb:hover img{transform:scale(1.03)}
.lead-body{padding:22px 24px 26px}
.lead-body h3{font-family:var(--serif);font-weight:800;font-size:25px;line-height:1.2;
  margin:0 0 10px;letter-spacing:-.01em}
.lead-body h3 a{color:var(--ink)}
.lead-body h3 a:hover{color:var(--accent);text-decoration:none}
.lead-body p{color:var(--muted);font-size:15.5px;line-height:1.6;margin:0 0 16px}

.index-list{list-style:none;margin:0;padding:0;counter-reset:none}
.index-list li{display:flex;gap:16px;padding:15px 0;border-top:1px solid var(--line)}
.index-list li:first-child{border-top:0;padding-top:2px}
.ix-num{font-family:var(--serif);font-weight:700;font-size:20px;color:var(--accent);
  line-height:1;min-width:34px;padding-top:2px;opacity:.80}
.ix-body{flex:1}
.ix-cat{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.1em;
  color:var(--muted);display:block;margin-bottom:4px}
.index-list h3{font-family:var(--serif);font-weight:700;font-size:19px;line-height:1.28;margin:0 0 6px}
.index-list h2{font-family:var(--serif);font-weight:700;font-size:21px;line-height:1.24;margin:0 0 8px}
.index-list h3 a,.index-list h2 a{color:var(--ink)}
.index-list h3 a:hover,.index-list h2 a:hover{color:var(--accent);text-decoration:none}
.ix-meta{font-size:12.5px;color:var(--muted)}

/* archive wide variant */
.index-list--wide li{gap:22px;padding:22px 0;align-items:center}
.ix-thumb{flex:0 0 190px;aspect-ratio:16/10;overflow:hidden;border-radius:10px;
  background:var(--chip);display:block}
.ix-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .36s ease}
.ix-thumb:hover img{transform:scale(1.04)}
.index-list--wide .ix-body p{color:var(--muted);font-size:15px;line-height:1.55;
  margin:6px 0 8px;max-width:62ch}

/* ============ BENTO ============ */
.bento{display:grid;grid-template-columns:repeat(3,1fr);grid-auto-rows:1fr;gap:20px}
.bento-tile{background:var(--surface);border:1px solid var(--line);
  border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;
  box-shadow:0 2px 10px rgba(200,85,47,.05);transition:box-shadow .22s,transform .22s}
.bento-tile:hover{box-shadow:var(--shadow-hover);transform:translateY(-2px)}
.bento-feature{grid-column:span 2;grid-row:span 2;flex-direction:column}
.bt-thumb{display:block;aspect-ratio:16/10;overflow:hidden;background:var(--chip)}
.bento-feature .bt-thumb{aspect-ratio:16/9}
.bt-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .38s ease}
.bt-thumb:hover img{transform:scale(1.03)}
.bt-body{padding:16px 18px 20px;display:flex;flex-direction:column;flex:1}
.bento-tile h3{font-family:var(--serif);font-weight:700;font-size:18px;line-height:1.25;margin:0 0 8px}
.bento-feature h3{font-size:26px;line-height:1.14}
.bento-tile h3 a{color:var(--ink)}
.bento-tile h3 a:hover{color:var(--accent);text-decoration:none}
.bento-tile p{color:var(--muted);font-size:15px;line-height:1.55;margin:0 0 12px}
.bt-meta{margin-top:auto;font-size:12.5px;color:var(--muted)}

/* ============ single article ============ */
.article{background:var(--surface);max-width:900px;margin:40px auto;
  border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.article .head{padding:44px 56px 8px}
.breadcrumb{font-size:13px;color:var(--muted);margin-bottom:18px}
.breadcrumb a{color:var(--muted)}
.breadcrumb a:hover{color:var(--accent)}
.article h1{font-family:var(--serif);font-weight:900;
  font-size:clamp(2rem,1.2rem+2.5vw,3.1rem);
  line-height:1.08;letter-spacing:-.018em;margin:.1em 0 .35em}
.art-meta{display:flex;align-items:center;gap:14px;color:var(--muted);font-size:14.5px;
  padding-bottom:22px;border-bottom:1px solid var(--line);margin-bottom:0}
.art-meta .av{width:38px;height:38px;border-radius:50%;object-fit:cover;background:var(--chip)}
.art-meta b{color:var(--ink);font-weight:600}
.article .lead-img{margin:26px 0 0;aspect-ratio:16/8;overflow:hidden}
.article .lead-img img{width:100%;height:100%;object-fit:cover}

/* prose */
.prose{padding:28px 56px 50px;font-size:18.5px;line-height:1.80;color:#2b1d12}
.prose p{margin:0 0 1.25em}
.prose h2{font-family:var(--serif);font-weight:800;font-size:28px;line-height:1.15;
  margin:1.7em 0 .5em;letter-spacing:-.015em;
  padding-bottom:8px;border-bottom:2px solid var(--accent-light)}
.prose h3{font-family:var(--serif);font-weight:700;font-size:22px;margin:1.4em 0 .4em}
.prose figure{margin:1.8em 0}
.prose figure img{border-radius:10px;width:100%;aspect-ratio:3/2;
  object-fit:cover;object-position:center 35%}
.prose figcaption{font-size:13.5px;color:var(--muted);text-align:center;margin-top:9px}
.prose a{border-bottom:1px solid rgba(200,85,47,.38)}
.prose a:hover{color:var(--accent);border-bottom-color:var(--accent)}
.prose blockquote{margin:1.7em 0;padding:8px 0 8px 26px;
  border-left:3px solid var(--accent);
  font-family:var(--serif);font-size:22px;line-height:1.42;color:var(--dark)}

/* ============ related ============ */
.related{max-width:900px;margin:14px auto 60px;padding:0 22px}
.rel-label{font-family:var(--serif);font-weight:800;font-size:22px;color:var(--ink);
  margin:0 0 18px;padding-bottom:11px;
  border-bottom:2.5px solid var(--accent)}
.rel-list{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.rel-item{background:var(--surface);border:1px solid var(--line);
  border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;
  transition:box-shadow .22s,transform .22s}
.rel-item:hover{box-shadow:var(--shadow-hover);transform:translateY(-2px)}
.rel-thumb{display:block;aspect-ratio:16/10;overflow:hidden;background:var(--chip)}
.rel-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .36s ease}
.rel-thumb:hover img{transform:scale(1.04)}
.rel-body{padding:14px 16px 16px;display:flex;flex-direction:column;gap:6px}
.rel-num{font-family:var(--serif);font-weight:700;font-size:14px;color:var(--accent);opacity:.82}
.rel-title{font-family:var(--serif);font-weight:700;font-size:18px;line-height:1.25;color:var(--ink)}
.rel-title:hover{color:var(--accent);text-decoration:none}
.rel-meta{font-size:12.5px;color:var(--muted)}

/* ============ page lead (archive / search) ============ */
.page-lead{padding:52px 0 6px}
.page-lead .kicker{color:var(--accent);font-weight:600;font-size:13px;
  text-transform:uppercase;letter-spacing:.16em}
.page-lead h1{font-family:var(--serif);font-weight:900;
  font-size:clamp(2rem,1.2rem+2.6vw,3.2rem);
  line-height:1.06;letter-spacing:-.018em;margin:.2em 0 .2em}
.page-lead .lead{font-size:18px;color:var(--muted);max-width:60ch}
.pager{margin-top:34px;text-align:center}
.pager .nav-links{display:inline-flex;gap:8px;flex-wrap:wrap;justify-content:center}
.pager .page-numbers{display:inline-flex;align-items:center;justify-content:center;
  min-width:38px;height:38px;padding:0 10px;border-radius:8px;
  border:1px solid var(--line);background:var(--surface);color:var(--ink);
  font-size:14px;font-weight:500;transition:background .18s,color .18s,border-color .18s}
.pager .page-numbers:hover,.pager .page-numbers.current{
  background:var(--accent);color:#fff;border-color:var(--accent);text-decoration:none}

/* ============ footer ============ */
.site-foot{background:var(--dark);color:var(--dark-ink);margin-top:44px;padding:52px 0 26px}
.foot-cols{display:flex !important;flex-wrap:wrap;gap:24px 48px;align-items:flex-start}
.foot-cols>*{flex:1 1 160px}
.foot-cols>*:first-child{flex:2 1 220px}
.foot-brandcol{display:flex;flex-direction:column;gap:14px}
.foot-brand{display:inline-flex;align-items:center;gap:12px}
.site-foot .foot-brand .name{font-family:var(--serif);font-weight:800;font-size:26px;color:#fff}
.site-foot p.foot-desc{color:#d9c2b3;font-size:16px;line-height:1.62;max-width:46ch;margin:0}
.foot-navcol{display:flex;flex-direction:column;gap:12px}
.foot-coltitle{margin:0;font-family:var(--serif);font-weight:700;
  text-transform:uppercase;letter-spacing:.12em;font-size:13px;color:#fff}
.foot-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}
.foot-list li{margin:0}
.site-foot a{color:#d9bfb2;font-size:15px;transition:color .18s}
.site-foot a:hover{color:#fff}
.foot-bottom{border-top:1px solid rgba(255,255,255,.12);margin-top:28px;padding-top:20px;
  display:flex;justify-content:center;align-items:center;text-align:center;
  gap:8px 18px;flex-wrap:wrap;color:#a08070;font-size:13.5px}

/* TZ partner logo */
.tz-plogo{max-height:40px;width:auto;display:block;background:#fff;
  padding:4px 7px;border-radius:6px}

/* ============ responsive ============ */
@media(max-width:960px){
  .hero-grid{grid-template-columns:1fr;gap:28px}
  .hero{padding:38px 0 12px}
  /* на мобиле убираем offset-frame чтобы не выходил за экран */
  .hero-feat::after{box-shadow:6px 6px 0 0 var(--accent-light),0 0 0 1.5px var(--line);
    transform:translate(6px,6px)}
  .editorial-split{grid-template-columns:1fr;gap:26px}
  .bento{grid-template-columns:repeat(2,1fr)}
  .bento-feature{grid-column:span 2;grid-row:auto}
  .rel-list{grid-template-columns:repeat(2,1fr)}
  .article .head{padding:32px 26px 4px}
  .prose{padding:22px 26px 38px;font-size:17.5px}
}

/* mobile menu */
@media(max-width:780px){
  .mnav-btn{display:inline-flex;align-items:center;justify-content:center}
  .site-head-in{flex-wrap:wrap;row-gap:0}
  .nav{display:none;order:3;flex-basis:100%;width:100%;flex-direction:column;
    gap:0;flex-wrap:nowrap;margin:0 -22px;padding:0;
    border-top:1px solid var(--line);background:var(--bg)}
  .mnav-cbx:checked ~ .nav{display:flex}
  .nav a{display:block;width:100%;font-size:16px;padding:14px 22px;border-radius:0;
    border-bottom:1px solid var(--line)}
  .nav a:hover{background:var(--chip)}
}

@media(max-width:600px){
  body{font-size:17px}
  .bento,.rel-list{grid-template-columns:1fr}
  .bento-feature{grid-column:auto}
  .hero-feat::after{display:none}
  .index-list--wide li{flex-wrap:wrap}
  .ix-thumb{flex:0 0 100%}
  .art-meta{flex-wrap:wrap;gap:8px}
  .logo-word{font-size:24px}
  .foot-cols{grid-template-columns:1fr;gap:30px}
}
