/*
Theme Name: YESTETIKA
Theme URI: https://yestetikamag.ru
Author: Profi.ru
Description: Кастомная тема диджитал-журнала YESTETIKA в стиле «old money». Собрана 1-в-1 по одобренному прототипу: 2 шрифта (Cormorant Garamond + Inter), 3 цвета, типографские SVG-обложки.
Version: 1.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: yestetika
*/

/* =========================================================================
   YESTETIKA — стиль «old money»: спокойно, чисто, без декоративного шума.
   ========================================================================= */

:root {
  --ivory:   #f4f1ea;
  --paper:   #faf8f3;
  --ink:     #20201c;
  --ink-soft:#56544c;
  --green:   #2e3a2e;
  --green-d: #1f291f;
  --brass:   #9a824f;
  --line:    #ddd7c9;
  --maxw:    1180px;
  --serif:  'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--green); color: #fff; padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ============================ ШАПКА ============================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 241, 234, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px;
  display: grid; grid-template-columns: 40px 1fr 40px; align-items: center;
}
.brand { text-align: center; line-height: 1; }
.brand__name {
  display: block; font-family: var(--serif); font-weight: 600;
  font-size: 30px; letter-spacing: 4px;
}
.brand__tag {
  display: block; font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--ink-soft); margin-top: 4px;
}
.search-toggle, .nav-toggle {
  background: none; border: none; cursor: pointer; color: var(--ink);
  display: flex; align-items: center; justify-content: center; padding: 8px;
}
.search-toggle { justify-self: end; }
.search-toggle:hover { color: var(--green); }

.nav-toggle { justify-self: start; flex-direction: column; gap: 4px; width: 38px; height: 38px; display: none; }
.nav-toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: .25s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.top-nav {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px 14px;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 26px;
}
.top-nav a {
  font-size: 12.5px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-soft); padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.top-nav a:hover { color: var(--ink); }
.top-nav a[aria-current="page"] { color: var(--green); border-bottom-color: var(--brass); }
.top-nav__about { color: var(--ink); }

/* ============================ ПОИСК ============================ */
.search-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(32, 32, 28, 0.55); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: 12vh 20px 20px;
}
.search-overlay[hidden] { display: none; }
.search-box {
  width: 100%; max-width: 640px; background: var(--paper);
  border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
.search-field { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.search-field svg { color: var(--ink-soft); flex: none; }
.search-input {
  flex: 1; border: none; background: none; font-family: var(--serif);
  font-size: 24px; color: var(--ink); outline: none;
}
.search-close { background: none; border: none; font-size: 18px; color: var(--ink-soft); cursor: pointer; }
.search-results { max-height: 50vh; overflow: auto; }
.search-hint { padding: 22px; color: var(--ink-soft); margin: 0; font-size: 15px; }
.search-result { display: flex; flex-direction: column; gap: 3px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.search-result:hover { background: var(--ivory); }
.search-result__cat { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--brass); }
.search-result__title { font-family: var(--serif); font-size: 20px; line-height: 1.25; }

/* ============================ MAIN ============================ */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px 64px; }
.btn-read {
  display: inline-block; margin-top: 14px;
  font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--green); border-bottom: 1px solid var(--brass); padding-bottom: 3px;
}
.btn-read:hover { color: var(--green-d); border-color: var(--green); }

/* ---------- HERO / главный материал ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center;
  padding: 56px 0; border-bottom: 1px solid var(--line); margin-bottom: 8px;
}
.hero__media img { width: 100%; aspect-ratio: 11/7; object-fit: cover; }
.hero__cat, .article__cat, .card__cat {
  display: inline-block; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--brass); margin-bottom: 14px;
}
.hero__title { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 5vw, 56px); line-height: 1.04; margin: 0 0 18px; }
.hero__title a:hover { color: var(--green); }
.hero__excerpt { font-family: var(--serif); font-size: 21px; line-height: 1.45; color: var(--ink-soft); margin: 0 0 18px; }
.hero__meta, .card__meta { font-size: 13px; color: var(--ink-soft); letter-spacing: .3px; }

/* ---------- блоки рубрик на главной ---------- */
.rubric-block { padding: 44px 0; border-bottom: 1px solid var(--line); }
.rubric-block:last-child { border-bottom: none; }
.rubric-block__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; gap: 16px; }
.rubric-block__title { font-family: var(--serif); font-weight: 600; font-size: 32px; margin: 0; }
.rubric-block__title a:hover { color: var(--green); }
.rubric-block__all { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
.rubric-block__all:hover { color: var(--green); }

/* ---------- сетка карточек ---------- */
.grid { display: grid; gap: 34px 30px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card { display: flex; flex-direction: column; }
.card__media img { width: 100%; aspect-ratio: 10/7; object-fit: cover; }
.card__body { padding-top: 14px; }
.card__cat { margin-bottom: 8px; }
.card__title { font-family: var(--serif); font-weight: 600; font-size: 23px; line-height: 1.18; margin: 0 0 8px; }
.card__title a:hover { color: var(--green); }
.card__excerpt { color: var(--ink-soft); font-size: 15px; line-height: 1.5; margin: 0 0 10px; }

/* ============================ СТРАНИЦА РУБРИКИ ============================ */
.page-head { padding: 48px 0 30px; border-bottom: 1px solid var(--line); margin-bottom: 36px; text-align: center; }
.page-head__title { font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 6vw, 64px); margin: 10px 0 12px; }
.page-head__blurb { font-family: var(--serif); font-size: 21px; color: var(--ink-soft); max-width: 620px; margin: 0 auto; }
.crumbs { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); }
.crumbs a:hover { color: var(--green); }
.crumbs span { margin: 0 6px; color: var(--line); }

.rubric-list { display: grid; gap: 40px; }
.rubric-list .card {
  display: grid; grid-template-columns: 320px 1fr; gap: 32px; align-items: center;
  padding-bottom: 40px; border-bottom: 1px solid var(--line);
}
.rubric-list .card:last-child { border-bottom: none; }
.rubric-list .card__media img { aspect-ratio: 4/3; }
.rubric-list .card__title { font-size: 30px; }
.rubric-list .card__excerpt { font-size: 17px; }

.empty { text-align: center; color: var(--ink-soft); padding: 60px 0; }

/* ============================ СТРАНИЦА СТАТЬИ ============================ */
.article { max-width: 760px; margin: 0 auto; padding-top: 40px; }
.article > .crumbs { display: block; text-align: center; margin-bottom: 20px; }
.article__cat { display: block; text-align: center; }
.article__title { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; text-align: center; margin: 0 auto 18px; }
.article__meta { display: flex; gap: 10px; justify-content: center; align-items: center; font-size: 14px; color: var(--ink-soft); margin-bottom: 34px; }
.article__meta .dot { color: var(--brass); }
.article__figure { margin: 0 0 36px; }
.article__figure img { width: 100%; aspect-ratio: 11/6.8; object-fit: cover; }
.article__figure figcaption { font-size: 12px; color: var(--ink-soft); text-align: center; margin-top: 8px; letter-spacing: .3px; }
.article__body p {
  font-family: var(--serif); font-size: 21px; line-height: 1.62; margin: 0 0 24px; color: #2c2b25;
}
.article__body p:first-child::first-letter {
  font-size: 64px; line-height: .8; float: left; padding: 6px 12px 0 0; color: var(--green); font-weight: 600;
}
.back-link { display: inline-block; margin-top: 18px; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-soft); }
.back-link:hover { color: var(--green); }

.read-more-block { max-width: var(--maxw); margin: 60px auto 0; padding-top: 44px; border-top: 1px solid var(--line); }

/* ============================ О НАС / КОНТАКТЫ ============================ */
.about { max-width: 760px; margin: 0 auto; padding-top: 48px; }
.about__title { font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 6vw, 60px); text-align: center; margin: 0 0 10px; }
.about__lead { font-family: var(--serif); font-size: 22px; color: var(--ink-soft); text-align: center; margin: 0 auto 40px; max-width: 600px; }
.about__body p { font-family: var(--serif); font-size: 20px; line-height: 1.6; margin: 0 0 22px; }
.about__contacts {
  margin-top: 40px; padding: 34px; background: var(--paper); border: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
}
.about__contacts h2 { grid-column: 1 / -1; font-family: var(--serif); font-weight: 600; font-size: 26px; margin: 0; }
.contact-item__label { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.contact-item a, .contact-item span { font-size: 18px; }
.contact-item a:hover { color: var(--green); }

.notfound { text-align: center; padding: 80px 0; }
.notfound h1 { font-family: var(--serif); font-weight: 600; font-size: 44px; margin: 0 0 12px; }

/* ============================ ПОДВАЛ ============================ */
.site-footer { background: var(--green); color: #e9e6dc; margin-top: 40px; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 54px 24px 34px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
}
.footer-brand__name { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: 4px; margin-bottom: 12px; }
.footer-brand p { color: #c3c8ba; max-width: 320px; margin: 0; font-size: 15px; }
.footer-nav { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a { color: #d7d9cd; font-size: 14px; letter-spacing: .5px; }
.footer-nav a:hover, .footer-contacts a:hover { color: #fff; }
.footer-contacts { display: flex; flex-direction: column; gap: 12px; }
.footer-contacts__title { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #aab09e; }
.footer-contacts a { color: #d7d9cd; font-size: 15px; }
.footer-bottom {
  max-width: var(--maxw); margin: 0 auto; padding: 20px 24px 34px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: #a7ac9c; letter-spacing: .3px;
}

/* ============================ АДАПТИВ ============================ */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 26px; padding: 36px 0; }
  .hero__media { order: -1; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .rubric-list .card { grid-template-columns: 240px 1fr; gap: 24px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: flex; }
  .header-inner { grid-template-columns: 40px 1fr 40px; padding: 12px 18px; }
  .brand__name { font-size: 24px; letter-spacing: 3px; }
  .top-nav {
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 0 14px; border-top: 1px solid var(--line);
  }
  .top-nav.is-open { display: flex; }
  .top-nav a { padding: 13px 24px; border-bottom: 1px solid var(--line); text-align: center; }
  .article__body p:first-child::first-letter { font-size: 52px; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; padding: 40px 24px 26px; }
}
@media (max-width: 560px) {
  main { padding: 0 18px 48px; }
  .grid--3 { grid-template-columns: 1fr; }
  .rubric-block__head { flex-direction: column; gap: 6px; }
  .rubric-list .card { grid-template-columns: 1fr; gap: 14px; }
  .rubric-list .card__media img { aspect-ratio: 16/10; }
  .about__contacts { grid-template-columns: 1fr; padding: 24px; }
  .article__body p { font-size: 19px; }
  .search-input { font-size: 20px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
}

/* ============================ WP-правки ============================ */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.aligncenter { margin: 0 auto; }
