/* ============================================================
   Елена Щербинина — elenavasilevna.ru
   Дизайн-система «Берёста»
   ============================================================ */

/* --- 1. Токены --------------------------------------------- */
:root {
  /* Палитра */
  --paper:        #F4EFE6;  /* тёплая бумага — фон */
  --paper-lift:   #FBF8F2;  /* поднятая поверхность */
  --paper-deep:   #EAE2D4;  /* утопленная поверхность */
  --bark:         #2C2A26;  /* кора берёзы — основной текст */
  --bark-soft:    #5F594E;  /* вторичный текст (AA на всех фонах) */
  --bark-faint:   #6C6253;  /* третичный: метки, даты (AA на всех фонах) */
  --line:         #DDD2C0;  /* линии */
  --gold:         #835908;  /* осенний дуб — ссылки и акценты (AA на всех фонах) */
  --gold-bright:  #C9922E;  /* декоративное золото (не для мелкого текста) */
  --pine:         #4A5A42;  /* хвоя */
  --btn:          #3B2F1E;  /* тёплая умбра — заливка основной кнопки */
  --btn-hover:    #4C3D26;  /* умбра светлее — наведение */
  --btn-ink:      #FBF6EC;  /* текст на кнопке, контраст 12.1:1 */
  --clay:         #9C5B4A;  /* терракота — редкий второй акцент */

  /* Типографика */
  --serif: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
  --sans:  "Golos Text", "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  /* Ритм */
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 34rem;
  --radius: 2px;

  /* Движение */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --- 2. База ----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--bark);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.72;
  font-weight: 400;
  letter-spacing: 0.002em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Бумажное зерно — лёгкий SVG-шум поверх фона */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
}

main, header, footer { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--bark); }

::selection { background: rgba(201, 146, 46, 0.24); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.skip-link {
  position: absolute; left: -9999px;
  background: var(--bark); color: var(--paper);
  padding: 0.75rem 1.25rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* --- 3. Типографика ---------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0 0 0.6em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* Длинные русские слова в заголовках на узких экранах переносим, а не рвём макет */
@media (max-width: 30rem) {
  h1, h2 { hyphens: auto; }
}

h1 { font-size: clamp(2.15rem, 1.35rem + 4.4vw, 5.5rem); }
h2 { font-size: clamp(1.95rem, 1.4rem + 2.6vw, 3.4rem); }
h3 { font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.85rem); line-height: 1.2; }
h4 { font-size: clamp(1.1rem, 1.02rem + 0.4vw, 1.3rem); line-height: 1.3; }

p { margin: 0 0 1.15em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.45rem);
  line-height: 1.6;
  color: var(--bark);
  max-width: 38rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--bark-faint);
  margin: 0 0 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  max-width: 8rem;
}

.small { font-size: 0.86rem; color: var(--bark-soft); line-height: 1.6; }

/* Заметка на полях — «рукой Елены» */
.margin-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.45;
  color: var(--bark-soft);
  border-left: 1px solid var(--gold-bright);
  padding-left: 1.1rem;
  margin: 2.2rem 0;
  max-width: 22rem;
}

/* --- 4. Раскладка ------------------------------------------ */
.wrap {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 48rem; }

.section { padding-block: clamp(4rem, 9vw, 8.5rem); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--paper { background: var(--paper-lift); }
.section--deep  { background: var(--paper-deep); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.grid-2 {
  display: grid;
  gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: 1fr;
}
@media (min-width: 62rem) {
  .grid-2 { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
  .grid-2--even { grid-template-columns: 1fr 1fr; }
  .grid-2--sticky > :first-child { position: sticky; top: 7rem; }
}

.cards {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
  grid-template-columns: 1fr;
}
@media (min-width: 44rem) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 68rem) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--paper);
  padding: clamp(1.6rem, 3vw, 2.6rem);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
a.card { transition: background 0.3s var(--ease); }
a.card:hover { background: var(--paper-lift); }
a.card:hover h3 { color: var(--gold); }
.card__num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.card h3 { margin-bottom: 0.35em; }
.card p { font-size: 0.95rem; color: var(--bark-soft); }

/* --- 5. Шапка ---------------------------------------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-head.is-stuck { border-bottom-color: var(--line); }

.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.5rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.28rem;
  letter-spacing: 0.01em;
  color: var(--bark);
  text-decoration: none;
  white-space: nowrap;
}
.brand b { font-weight: 500; }
.brand span {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bark-faint);
}

.nav { display: none; }
@media (min-width: 62rem) {
  .nav { display: flex; align-items: center; gap: 1.75rem; }
}
.nav a {
  color: var(--bark-soft);
  text-decoration: none;
  font-size: 0.925rem;
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav a:hover { color: var(--bark); border-bottom-color: var(--gold-bright); }
.nav a[aria-current="page"] { color: var(--bark); border-bottom-color: var(--bark); }

/* Кнопка внутри шапки не должна наследовать цвет пункта меню:
   иначе на тёмной заливке остаётся серый текст (контраст 1.9:1). */
.nav a.btn,
.nav a.btn:hover {
  color: var(--btn-ink);
  border-bottom: 0;
  padding-block: 0.95rem;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem; height: 2.75rem;
  padding: 0 0.5rem;
  background: none; border: 0; cursor: pointer;
}
@media (min-width: 62rem) { .nav-toggle { display: none; } }
.nav-toggle i { display: block; height: 1px; background: var(--bark); transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding-block: 1rem 2rem;
}
.nav-mobile.is-open { display: block; }
@media (min-width: 62rem) { .nav-mobile { display: none !important; } }
.nav-mobile a {
  display: block;
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--bark);
  text-decoration: none;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.nav-mobile a:last-of-type { border-bottom: 0; }
/* Кнопка внутри мобильного меню не должна наследовать стиль пункта меню:
   иначе получаем тёмный текст на тёмном фоне */
.nav-mobile a.btn {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--btn-ink);
  border: 1px solid var(--btn);
  padding: 0.95rem 1.7rem;
  justify-content: center;
}

/* --- 6. Кнопки --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.7rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid var(--btn);
  border-radius: var(--radius);
  background: var(--btn);
  color: var(--btn-ink);
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(201, 146, 46, 0.35) inset;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn:hover {
  background: var(--btn-hover);
  border-color: var(--gold-bright);
  color: var(--btn-ink);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(59, 47, 30, 0.22), 0 1px 0 rgba(201, 146, 46, 0.5) inset;
}
.btn svg { width: 1.05em; height: 1.05em; flex: none; }

.btn--ghost {
  background: transparent;
  color: var(--btn);
  border-color: #C6B79C;
  box-shadow: none;
}
.btn--ghost:hover {
  background: rgba(59, 47, 30, 0.05);
  color: var(--btn);
  border-color: var(--btn);
  box-shadow: none;
}

.btn--light {
  background: #F7F1E4;
  color: #33291A;
  border-color: #F7F1E4;
  box-shadow: none;
}
.btn--light:hover {
  background: #FFFCF5;
  color: #33291A;
  border-color: var(--gold-bright);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; margin-top: 2rem; }

/* На узких экранах кнопки во всю ширину — иначе ряд выглядит рвано */
@media (max-width: 32rem) {
  .btn-row .btn { width: 100%; justify-content: center; }
}

/* --- 7. Первый экран --------------------------------------- */
.hero {
  position: relative;
  min-height: min(92vh, 54rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bark);
}
.hero__media {
  position: absolute;
  inset: 0;
}
.hero__media picture, .band__media picture { display: block; width: 100%; height: 100%; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 72% 50%;
}
/* Вертикальный кадр на телефоне: свет вверху, спокойная земля внизу */
@media (max-width: 768px) {
  .hero__media img { object-position: 50% 42%; }
}
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(28,26,23,0.86) 0%, rgba(28,26,23,0.62) 34%, rgba(28,26,23,0.12) 62%, rgba(28,26,23,0.28) 100%),
    linear-gradient(to top, rgba(28,26,23,0.55) 0%, transparent 42%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: clamp(3.5rem, 9vw, 7rem);
  color: var(--paper);
}
.hero h1 {
  color: #FFFDF8;
  max-width: 16ch;
  margin-bottom: 0.35em;
}
.hero .eyebrow { color: rgba(244,239,230,0.72); }
.hero .eyebrow::after { background: rgba(244,239,230,0.3); }
.hero__lead {
  font-size: clamp(1.1rem, 1rem + 0.55vw, 1.4rem);
  line-height: 1.55;
  color: rgba(250,246,238,0.9);
  max-width: 32rem;
  font-family: var(--serif);
  font-style: italic;
}
.hero__meta {
  margin-top: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244,239,230,0.62);
}

/* --- 8. Стихи ---------------------------------------------- */
.poem {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.02rem + 0.6vw, 1.5rem);
  line-height: 1.62;
  color: var(--bark);
  margin: 0;
}
.poem p { max-width: none; margin-bottom: 1.15em; }
.poem--lg { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.3rem); line-height: 1.42; }

.poem-line { display: block; }
.js .poem-line {
  opacity: 0;
  transform: translateY(0.6rem);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease);
}
.js .is-revealed .poem-line { opacity: 1; transform: none; }

.poem-card {
  background: var(--paper-lift);
  border: 1px solid var(--line);
  padding: clamp(1.75rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  break-inside: avoid;
}
.poem-card h3 { font-size: 1.4rem; margin: 0; }
.poem-sign {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bark-faint);
  margin-top: auto;
}

.poem-columns { columns: 1; column-gap: 2rem; }
@media (min-width: 62rem) { .poem-columns { columns: 2; } }
.poem-columns > * { margin-bottom: 2rem; }

/* --- 9. Колесо года ---------------------------------------- */
.wheel-layout {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 62rem) { .wheel-layout { grid-template-columns: 1.05fr 1fr; } }

.wheel { width: 100%; max-width: 32rem; margin-inline: auto; overflow: visible; }
.wheel__ring { fill: none; stroke: var(--line); stroke-width: 1; }
.wheel__spoke { stroke: var(--line); stroke-width: 1; }
.wheel__arc { fill: none; stroke: var(--gold-bright); stroke-width: 2; opacity: 0.9; }
.wheel__label {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  fill: var(--bark-faint);
}
.wheel__node { fill: var(--paper); stroke: var(--bark-faint); stroke-width: 1; cursor: pointer; transition: fill 0.3s, stroke 0.3s, r 0.3s; }
.wheel__node:hover { stroke: var(--gold); }
.wheel__node.is-now { fill: var(--gold-bright); stroke: var(--gold); }
.wheel__hub-title { font-family: var(--serif); font-size: 15px; fill: var(--bark); text-anchor: middle; }
.wheel__hub-sub { font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.16em; fill: var(--bark-faint); text-anchor: middle; text-transform: uppercase; }

.wheel-panel { min-height: 12rem; }
.wheel-panel h3 { margin-bottom: 0.3em; }
.wheel-panel .small { margin-bottom: 1rem; }

/* --- 10. Список практик / фактов --------------------------- */
.list-steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.list-steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 1rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.list-steps li::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  padding-top: 0.42rem;
}
.list-steps strong { font-weight: 500; display: block; margin-bottom: 0.2rem; }
.list-steps p { font-size: 0.95rem; color: var(--bark-soft); margin: 0; }

.list-plain { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.list-plain li {
  padding: 0.72rem 0 0.72rem 1.5rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: 0.98rem;
}
.list-plain li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.35rem;
  width: 6px; height: 1px;
  background: var(--gold-bright);
}
.list-plain li:last-child { border-bottom: 0; }

.facts { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: 1fr 1fr; }
@media (min-width: 44rem) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--paper); padding: 1.5rem 1.25rem; }
.fact b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.9rem);
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.35rem;
}
.fact span { font-size: 0.82rem; color: var(--bark-soft); line-height: 1.4; display: block; }

/* --- 11. Медиа-полоса -------------------------------------- */
.band {
  position: relative;
  overflow: hidden;
  background: var(--bark);
  color: var(--paper);
}
.band__media { position: absolute; inset: 0; }
.band__media img { width: 100%; height: 100%; object-fit: cover; }
.band__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(95deg, rgba(28,26,23,0.9) 0%, rgba(28,26,23,0.68) 45%, rgba(28,26,23,0.3) 100%);
}
.band__inner { position: relative; z-index: 2; padding-block: clamp(4rem, 9vw, 7.5rem); }
.band h2, .band h3 { color: #FFFDF8; }
.band p { color: rgba(250,246,238,0.86); }
.band .eyebrow { color: rgba(244,239,230,0.66); }
.band .eyebrow::after { background: rgba(244,239,230,0.28); }

/* --- 12. Цитата -------------------------------------------- */
.quote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.15rem + 1.7vw, 2.6rem);
  line-height: 1.32;
  font-style: italic;
  color: var(--bark);
  margin: 0;
  max-width: 24ch;
  text-wrap: balance;
}
.quote--wide { max-width: 34ch; }
.quote-src {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bark-faint);
  margin-top: 1.5rem;
  display: block;
}

/* --- 13. Хлебные крошки ------------------------------------ */
.crumbs {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bark-faint);
  padding-top: 2rem;
}
.crumbs a { color: var(--bark-faint); text-decoration: none; }
.crumbs a:hover { color: var(--bark); }
.crumbs span { margin-inline: 0.5rem; }

/* --- 14. Шапка внутренней страницы ------------------------- */
.page-head { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem); }
.page-head h1 { max-width: 18ch; }
.page-head .lead { margin-top: 1.5rem; }

/* --- 15. Финальный призыв ---------------------------------- */
.cta {
  background: var(--bark);
  color: var(--paper);
  text-align: center;
}
.cta .wrap { padding-block: clamp(4rem, 8vw, 7rem); }
.cta h2 { color: #FFFDF8; max-width: 18ch; margin-inline: auto; }
.cta p { color: rgba(250,246,238,0.82); margin-inline: auto; text-align: center; }
.cta .btn-row { justify-content: center; }
.cta__note {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244,239,230,0.5);
  margin-top: 2rem;
}

/* --- 16. Подвал -------------------------------------------- */
.site-foot {
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 5vw, 4.5rem) 2rem;
  font-size: 0.9rem;
}
.foot-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  margin-bottom: 3rem;
}
@media (min-width: 48rem) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 70rem) { .foot-grid { grid-template-columns: 1.5fr 1fr 1fr 1.3fr; } }
.foot-grid p { color: var(--bark-soft); font-size: 0.9rem; }
.foot-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bark-faint);
  margin-bottom: 1rem;
}
.foot-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.foot-links a { color: var(--bark-soft); text-decoration: none; }
.foot-links a:hover { color: var(--bark); text-decoration: underline; }
.foot-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--bark-faint);
}
.foot-bottom a { color: var(--bark-faint); }

/* --- 17. Cookie-баннер ------------------------------------- */
.cookie {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 90;
  max-width: 34rem;
  background: var(--bark);
  color: var(--paper);
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(28,26,23,0.28);
  display: none;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
  line-height: 1.5;
}
.cookie.is-visible { display: flex; }
.cookie p { margin: 0; color: rgba(250,246,238,0.86); flex: 1 1 16rem; max-width: none; font-size: 0.85rem; }
.cookie a { color: var(--paper); }
.cookie button {
  font-family: var(--sans);
  font-size: 0.9rem;
  min-height: 44px;
  padding: 0.7rem 1.4rem;
  background: var(--paper);
  color: var(--bark);
  border: 0; border-radius: var(--radius);
  cursor: pointer;
}

/* --- 18. Анимация появления -------------------------------- */
/* Прячем до появления ТОЛЬКО когда JS жив: без него контент обязан быть виден.
   Класс .js ставится инлайн-скриптом в <head> до загрузки этого файла. */
.js .reveal {
  opacity: 0;
  transform: translateY(1.1rem);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js .reveal.is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .poem-line, .js .reveal, .js .poem-line { opacity: 1; transform: none; }
}

/* --- 19. Проза (юр. страницы) ------------------------------ */
.prose h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin-top: 2.4em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { max-width: var(--measure); padding-left: 1.25rem; }
.prose li { margin-bottom: 0.5rem; }

/* ============================================================
   20. Фотографии Елены
   ============================================================ */
.photo {
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
  border-radius: var(--radius);
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo--tall { aspect-ratio: 3 / 4; }
.photo--square { aspect-ratio: 1 / 1; }
.photo--wide { aspect-ratio: 4 / 3; }

/* Подпись под фото — тонкая, как в журнале */
.photo-cap {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--bark-faint);
  margin-top: 0.85rem;
  display: block;
  line-height: 1.5;
}
figure { margin: 0; }

/* Портрет с рамкой-паспарту */
.portrait {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}
.portrait .photo { box-shadow: 0 18px 44px rgba(44, 42, 38, 0.13); }

/* Полоса из трёх кадров */
.photo-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
@media (min-width: 40rem) { .photo-strip { grid-template-columns: repeat(3, 1fr); } }
.photo-strip .photo { border-radius: 0; aspect-ratio: 3 / 4; }

/* Фото вплотную к тексту в две колонки */
.photo-text {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 54rem) {
  .photo-text { grid-template-columns: 0.85fr 1.15fr; }
  .photo-text--flip > figure { order: 2; }
}

/* ============================================================
   21. Врезки и выделения
   ============================================================ */
.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-bright);
  background: var(--paper-lift);
  padding: clamp(1.25rem, 3vw, 1.85rem);
  border-radius: var(--radius);
  margin: 2rem 0;
}
.callout > :last-child { margin-bottom: 0; }
.callout__title {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.7rem;
}
.callout--warn { border-left-color: var(--clay); }
.callout--warn .callout__title { color: var(--clay); }

/* Буквица — первый абзац крупной главы */
.dropcap::first-letter {
  font-family: var(--serif);
  font-size: 3.4em;
  line-height: 0.82;
  float: left;
  padding: 0.06em 0.12em 0 0;
  color: var(--gold);
  font-weight: 500;
}

/* Ключевая мысль крупно, между абзацами */
.pull {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.05rem + 1.1vw, 1.9rem);
  line-height: 1.3;
  color: var(--bark);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.4rem 0;
  margin: 2.2rem 0;
  max-width: 30rem;
}

/* Два столбца: что делаю / чего не делаю */
.versus {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  grid-template-columns: 1fr;
}
@media (min-width: 44rem) { .versus { grid-template-columns: 1fr 1fr; } }
.versus__col { background: var(--paper); padding: clamp(1.35rem, 3vw, 2rem); }
.versus__col--no { background: var(--paper-lift); }
.versus h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.versus--yes h4, .versus__col:not(.versus__col--no) h4 { color: var(--pine); }
.versus__col--no h4 { color: var(--clay); }
.versus ul { list-style: none; margin: 0; padding: 0; }
.versus li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  line-height: 1.55;
}
.versus li:last-child { margin-bottom: 0; }
.versus li::before {
  position: absolute; left: 0; top: 0.05em;
  font-family: var(--mono); font-size: 0.95rem;
}
.versus__col:not(.versus__col--no) li::before { content: "✓"; color: var(--pine); }
.versus__col--no li::before { content: "×"; color: var(--clay); font-size: 1.1rem; }

/* ============================================================
   22. Путь: вертикальный таймлайн
   ============================================================ */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 0.6rem; bottom: 0.6rem;
  width: 1px;
  background: linear-gradient(to bottom, var(--line), var(--gold-bright), var(--line));
}
.timeline li {
  position: relative;
  padding: 0 0 2.1rem 2.6rem;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55rem;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--bark-faint);
}
.timeline li.is-now::before { background: var(--gold-bright); border-color: var(--gold); }
.timeline__year {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  display: block;
  margin-bottom: 0.3rem;
}
.timeline strong { display: block; font-weight: 500; font-size: 1.08rem; margin-bottom: 0.25rem; }
.timeline p { font-size: 0.94rem; color: var(--bark-soft); margin: 0; }

/* ============================================================
   23. Шаги встречи — схема
   ============================================================ */
.flow {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  grid-template-columns: 1fr;
  counter-reset: flow;
}
@media (min-width: 44rem) { .flow { grid-template-columns: 1fr 1fr; } }
@media (min-width: 68rem) { .flow { grid-template-columns: repeat(3, 1fr); } }
.flow__step {
  counter-increment: flow;
  background: var(--paper);
  padding: clamp(1.4rem, 3vw, 2rem);
  position: relative;
}
.flow__step::before {
  content: counter(flow, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  display: block;
  margin-bottom: 0.9rem;
}
.flow__step h3 { font-size: 1.22rem; margin-bottom: 0.4rem; }
.flow__step p { font-size: 0.93rem; color: var(--bark-soft); margin: 0; }
.flow__icon { width: 34px; height: 34px; margin-bottom: 0.9rem; display: block; }
.flow__icon [stroke] { stroke: var(--gold); }

/* ============================================================
   24. Калькулятор «Точка координат»
   ============================================================ */
.calc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-lift);
  overflow: hidden;
}
.calc__head {
  padding: clamp(1.35rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}
.calc__head h3 { margin-bottom: 0.35em; }
.calc__head p { font-size: 0.94rem; color: var(--bark-soft); margin: 0; max-width: 42rem; }
.calc__body {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.35rem, 3vw, 2rem);
  grid-template-columns: 1fr;
}
@media (min-width: 56rem) { .calc__body { grid-template-columns: 1fr 1fr; align-items: start; } }

.calc__sliders { display: grid; gap: 1.05rem; }
.calc-row label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.94rem;
  margin-bottom: 0.35rem;
}
.calc-row label b {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--gold);
  min-width: 2ch;
  text-align: right;
}
.calc-row input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 34px; margin: 0;
  background: transparent; cursor: pointer; display: block;
}
.calc-row input[type="range"]::-webkit-slider-runnable-track {
  height: 3px; border-radius: 2px;
  background: linear-gradient(to right, var(--gold-bright) var(--fill, 50%), var(--line) var(--fill, 50%));
}
.calc-row input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: var(--line); }
.calc-row input[type="range"]::-moz-range-progress { height: 3px; border-radius: 2px; background: var(--gold-bright); }
.calc-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; margin-top: -11.5px;
  border-radius: 50%;
  background: var(--btn);
  border: 3px solid var(--paper-lift);
  box-shadow: 0 2px 8px rgba(44, 42, 38, 0.3);
}
.calc-row input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--btn); border: 3px solid var(--paper-lift);
  box-shadow: 0 2px 8px rgba(44, 42, 38, 0.3);
}
.calc-row input[type="range"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.calc__viz { display: grid; gap: 1.2rem; justify-items: center; }
.calc__radar { width: 100%; max-width: 22rem; overflow: visible; }
.radar__grid { fill: none; stroke: var(--line); stroke-width: 1; }
.radar__axis { stroke: var(--line); stroke-width: 1; }
.radar__shape { fill: rgba(201, 146, 46, 0.22); stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; }
.radar__dot { fill: var(--gold); }
.radar__label { font-family: var(--mono); font-size: 8px; letter-spacing: 0.08em; fill: var(--bark-soft); text-transform: uppercase; }

.calc__verdict {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.35rem;
  width: 100%;
}
.calc__score {
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1;
  display: block;
  margin-bottom: 0.35rem;
}
.calc__score small { font-size: 0.9rem; color: var(--bark-faint); font-family: var(--mono); }
.calc__verdict p { font-size: 0.94rem; color: var(--bark-soft); margin: 0.5rem 0 0; }
.calc__verdict b { color: var(--bark); font-weight: 500; }
.calc__foot {
  border-top: 1px solid var(--line);
  padding: clamp(1.2rem, 3vw, 1.75rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.calc__foot p { margin: 0; font-size: 0.9rem; color: var(--bark-soft); max-width: 32rem; }
.calc__foot .btn-row { margin-top: 0; }

/* ============================================================
   25. Круг года: точка «сейчас» и список
   ============================================================ */
.now-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-bright);
  background: var(--paper-lift);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.4rem);
}
.now-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.now-card__badge::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 4px rgba(201, 146, 46, 0.2);
}
.now-card h2, .now-card h3 { margin-bottom: 0.4em; }
.now-card__dates {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--bark-faint);
  margin-bottom: 1.2rem;
  display: block;
}

.year-list { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); grid-template-columns: 1fr; }
@media (min-width: 44rem) { .year-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 68rem) { .year-list { grid-template-columns: repeat(4, 1fr); } }
.year-item { background: var(--paper); padding: 1.5rem 1.35rem; }
.year-item.is-now { background: var(--paper-deep); }
.year-item__when {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--bark-faint); display: block; margin-bottom: 0.5rem;
}
.year-item.is-now .year-item__when { color: var(--gold); }
.year-item h3 { font-size: 1.2rem; margin-bottom: 0.3em; }
.year-item p { font-size: 0.9rem; color: var(--bark-soft); margin: 0; }

/* ============================================================
   26. Цифры и мелкая инфографика
   ============================================================ */
.stat-row {
  display: grid;
  gap: 1.5rem 1rem;
  grid-template-columns: repeat(2, 1fr);
  margin: 2rem 0;
}
@media (min-width: 44rem) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat b {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem);
  line-height: 1; display: block; margin-bottom: 0.3rem;
}
.stat span { font-size: 0.82rem; color: var(--bark-soft); line-height: 1.45; display: block; }

/* Полоска-шкала: доля, наглядно */
.bar { margin: 1.1rem 0; }
.bar__top { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 0.4rem; }
.bar__top b { font-family: var(--mono); font-size: 0.82rem; font-weight: 400; color: var(--gold); }
.bar__track { height: 6px; background: var(--paper-deep); border-radius: 3px; overflow: hidden; }
.bar__fill { height: 100%; background: var(--gold-bright); border-radius: 3px; }
