/* Два чая. Тёмная сцена, один акцент на главу: янтарь для чёрного, нефрит для зелёного.
   Скругления: кнопки и теги полные, карточки 22px. Слои: canvas 0, контент 2, зерно 3, шапка 4. */
:root {
  --bg: #0a0c0a;
  --ink: #edeae2;
  --dim: rgba(237, 234, 226, 0.68);
  --faint: rgba(237, 234, 226, 0.42);
  --line: rgba(237, 234, 226, 0.14);
  --amber: #e9a55c;
  --jade: #b9d67e;
  --accent: var(--ink);
  --r-card: 22px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(20px, 5vw, 76px);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.95rem + 0.22vw, 1.125rem);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

#scene {
  position: fixed; inset: 0; z-index: 0; display: block;
  width: 100%; height: 100vh; height: 100lvh;
  opacity: 0; transition: opacity 1.4s var(--ease);
}
.webgl #scene { opacity: 1; }
/* запасной фон, если WebGL или сеть недоступны */
.no-webgl body {
  background:
    radial-gradient(60vw 60vw at 78% 18%, rgba(179, 80, 26, 0.22), transparent 60%),
    radial-gradient(50vw 50vw at 12% 80%, rgba(116, 143, 38, 0.2), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.grain {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main { position: relative; z-index: 2; }

/* ---------- шапка ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 4; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: linear-gradient(rgba(10, 12, 10, 0.72), rgba(10, 12, 10, 0));
}
.brand { font-family: var(--display); font-weight: 500; font-size: 1rem; letter-spacing: -0.01em; text-decoration: none; }
.nav nav { display: flex; gap: clamp(16px, 2.4vw, 36px); }
.nav nav a {
  font-size: 0.95rem; color: var(--dim); text-decoration: none; padding: 8px 2px;
  transition: color 0.2s var(--ease);
}
.nav nav a:hover { color: var(--ink); }

/* ---------- типографика ---------- */
h1, h2, h3, .big, .stats dt, .brew-nums dt, .trio b { font-family: var(--display); font-weight: 500; }
.display { font-size: clamp(2.5rem, 6.3vw, 6.2rem); line-height: 1.04; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.9rem); line-height: 1.08; letter-spacing: -0.035em; text-wrap: balance; }
.mega { font-size: clamp(3.1rem, 8.4vw, 8rem); line-height: 1; color: var(--accent); }
h3 { font-size: clamp(1.05rem, 1.35vw, 1.3rem); line-height: 1.25; letter-spacing: -0.02em; }
.lead { font-size: clamp(1.08rem, 1.45vw, 1.38rem); line-height: 1.5; color: var(--dim); max-width: 36ch; text-wrap: pretty; }
.note { color: var(--dim); max-width: 46ch; }
.eyebrow { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }

.line { display: block; overflow: hidden; padding: 0.14em 0 0.1em; margin: -0.14em 0 -0.1em; }
.line > span { display: block; }

/* ---------- кнопки ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  height: 52px; padding: 0 26px; border-radius: 999px; font-weight: 500; text-decoration: none;
  transition: transform 0.18s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink); color: #10130f; }
.btn-primary:hover { background: #fffdf6; }
.btn-ghost { border: 1px solid var(--line); background: rgba(237, 234, 226, 0.04); }
.btn-ghost:hover { border-color: var(--faint); background: rgba(237, 234, 226, 0.09); }

/* ---------- якоря 3D ---------- */
.stage { position: relative; }
.a { position: absolute; display: block; pointer-events: none; }

/* ---------- 1. первый экран ---------- */
.hero {
  min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center; gap: 24px; padding: 88px var(--pad) 40px;
}
.hero .lead { margin-top: 26px; }
.hero-stage { height: min(78dvh, 780px); }
.hero-stage .a-b { left: -4%; top: 30%; width: 66%; height: 62%; }
.hero-stage .a-g { right: -6%; top: 2%; width: 56%; height: 52%; }

/* ---------- 2. один куст ---------- */
.origin { padding: 16vh var(--pad) 12vh; }
.origin-head { text-align: center; max-width: 880px; margin: 0 auto; }
.origin-head .lead { margin: 22px auto 0; max-width: 44ch; }
.paths {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 0.72fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 56px); align-items: end; margin-top: 5vh;
}
.path { max-width: 400px; }
.path-green { justify-self: end; }
.path .a { position: relative; height: clamp(150px, 24vh, 250px); margin-bottom: 22px; }
.path h3 { margin-bottom: 10px; }
.path p { color: var(--dim); }
.path-black h3 { color: var(--amber); }
.path-green h3 { color: var(--jade); }
.leafslot { position: relative; align-self: stretch; min-height: 58vh; }
.leafslot .a { inset: 0; }

/* ---------- 3-4. главы ---------- */
.chapter {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 64px);
  min-height: 150vh; padding: 0 var(--pad);
}
.chapter-black { --accent: var(--amber); }
.chapter-green { --accent: var(--jade); }
.chapter .copy { padding: 30vh 0 22vh; max-width: 580px; }
.chapter-green .copy { justify-self: end; }
.chapter .stage { position: sticky; top: 0; height: 100vh; height: 100dvh; }
.chapter .stage .a { inset: 16% 4% 12%; }
.chapter .lead { margin-top: 22px; }
.stats { display: flex; flex-wrap: wrap; gap: 26px clamp(24px, 3.4vw, 52px); margin: 40px 0 30px; }
.stats dt { font-size: clamp(1.35rem, 2.1vw, 2rem); letter-spacing: -0.03em; color: var(--accent); white-space: nowrap; }
.stats dd { font-size: 0.9rem; color: var(--dim); margin-top: 4px; max-width: 22ch; }

/* ---------- 5. польза ---------- */
.benefits, .limits { padding: 18vh var(--pad) 12vh; max-width: 1480px; margin: 0 auto; }
.section-head .lead { margin-top: 20px; max-width: 46ch; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.card {
  grid-column: span 6; display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: clamp(22px, 2.6vw, 38px); border-radius: var(--r-card);
  background: rgba(237, 234, 226, 0.05);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.c-7 { grid-column: span 7; }
.c-5 { grid-column: span 5; }
.t-warm { background: linear-gradient(140deg, rgba(237, 234, 226, 0.11), rgba(237, 234, 226, 0.03)); }
.t-black { background: linear-gradient(140deg, rgba(233, 165, 92, 0.2), rgba(233, 165, 92, 0.03)); --accent: var(--amber); }
.t-green { background: linear-gradient(140deg, rgba(185, 214, 126, 0.19), rgba(185, 214, 126, 0.03)); --accent: var(--jade); }
.card h3 { color: var(--accent); }
.card p { color: var(--dim); max-width: 58ch; }
.card .big { font-size: clamp(1.9rem, 3.5vw, 3.3rem); line-height: 1.05; letter-spacing: -0.04em; color: var(--ink); margin: 6px 0 2px; }
.tag { font-size: 0.78rem; color: var(--dim); padding: 4px 11px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.src { margin-top: auto; padding-top: 8px; font-size: 0.82rem; color: var(--faint); text-underline-offset: 3px; transition: color 0.2s var(--ease); }
.src:hover { color: var(--ink); }
.trio { list-style: none; padding: 0; display: flex; gap: clamp(18px, 2.4vw, 36px); margin: 4px 0; }
.trio b { display: block; font-size: clamp(1.2rem, 1.8vw, 1.7rem); letter-spacing: -0.03em; white-space: nowrap; }
.trio span { font-size: 0.85rem; color: var(--dim); }

/* ---------- 6. заваривание ---------- */
.brew {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(20px, 4vw, 64px);
  min-height: 100dvh; padding: 14vh var(--pad);
  --accent: var(--amber);
}
.brew[data-tone="green"] { --accent: var(--jade); }
.brew-copy { max-width: 600px; }
.seg {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; margin-top: 34px;
  padding: 5px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); background: rgba(237, 234, 226, 0.04);
}
.seg::before {
  content: ""; position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px);
  border-radius: 999px; background: var(--ink); transition: transform 0.45s var(--ease);
}
.seg[data-on="green"]::before { transform: translateX(100%); }
.seg button {
  position: relative; z-index: 1; height: 44px; padding: 0 28px; border: 0; background: none; border-radius: 999px;
  font: 500 1rem var(--body); color: var(--dim); cursor: pointer; transition: color 0.25s var(--ease);
}
.seg button[aria-pressed="true"] { color: #10130f; }
.brew-nums { display: flex; flex-wrap: wrap; gap: 24px clamp(26px, 3.6vw, 56px); margin: 44px 0 26px; }
.brew-nums dt {
  font-size: clamp(1.8rem, 3.3vw, 3.2rem); letter-spacing: -0.04em; color: var(--accent); white-space: nowrap;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), filter 0.22s var(--ease), color 0.4s var(--ease);
}
.brew-nums dd { font-size: 0.9rem; color: var(--dim); margin-top: 4px; }
.brew-tip { font-size: clamp(1.05rem, 1.3vw, 1.25rem); max-width: 40ch; margin-bottom: 18px; transition: opacity 0.22s var(--ease), filter 0.22s var(--ease); }
.brew .swap { opacity: 0; transform: translateY(6px); filter: blur(4px); }
.brew-stage { height: min(74dvh, 720px); }
.brew-stage .a-pot { right: -2%; top: 2%; width: 72%; height: 70%; }
.brew-stage .a-cup { left: 0; bottom: 4%; width: 50%; height: 46%; }

/* ---------- 7. границы ---------- */
.limits-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px clamp(32px, 6vw, 110px); margin-top: 56px; padding-top: 44px; border-top: 1px solid var(--line); }
.limits-grid h3 { margin-bottom: 10px; }
.limits-grid p { color: var(--dim); max-width: 52ch; }

/* ---------- 8. финал ---------- */
.outro { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12vh var(--pad) 48px; }
.outro-stage { width: min(760px, 100%); height: clamp(220px, 38vh, 400px); margin-bottom: 28px; }
.outro-stage .a-b { left: 4%; top: 6%; width: 46%; height: 88%; }
.outro-stage .a-g { right: 4%; top: 6%; width: 46%; height: 88%; }
.outro h2 { max-width: 18ch; }
.outro .lead { margin: 22px auto 0; }
.sources { margin-top: 56px; width: min(760px, 100%); text-align: left; border-top: 1px solid var(--line); padding-top: 18px; }
.sources summary { cursor: pointer; font-weight: 500; padding: 6px 0; }
.sources ul { list-style: none; padding: 8px 0 0; display: grid; gap: 10px; }
.sources a { font-size: 0.92rem; color: var(--dim); text-underline-offset: 3px; overflow-wrap: anywhere; }
.sources a:hover { color: var(--ink); }
.disclaimer { margin-top: 28px; font-size: 0.85rem; color: var(--faint); }

/* ---------- появление: прозрачность + сдвиг + расфокус ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(16px); filter: blur(6px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js [data-reveal].in { opacity: 1; transform: none; filter: none; }
.js .line > span { transform: translateY(108%); transition: transform 1.1s var(--ease); }
.js .line:nth-child(2) > span { transition-delay: 0.12s; }
.js.loaded .line > span { transform: none; }

/* ---------- планшеты и телефоны: одна колонка, сцена над текстом ---------- */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); align-content: end; gap: 8px; padding-top: 76px; padding-bottom: 36px; }
  .hero-stage { order: -1; height: 44dvh; }
  .hero-stage .a-b { left: 0; top: 26%; width: 62%; height: 70%; }
  .hero-stage .a-g { right: 0; top: 0; width: 52%; height: 58%; }
  .origin { padding-top: 12vh; }
  .paths { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .leafslot { order: -1; min-height: 40vh; }
  .path, .path-green { justify-self: start; max-width: 520px; }
  .path .a { height: 170px; }
  .chapter { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 0; }
  .chapter .stage { position: relative; order: -1; height: 54dvh; }
  .chapter .stage .a { inset: 18% 6% 4%; }
  .chapter .copy, .chapter-green .copy { padding: 12px 0 14vh; justify-self: start; }
  .benefits, .limits { padding-top: 12vh; }
  .card, .c-7, .c-5 { grid-column: 1 / -1; }
  .brew { grid-template-columns: minmax(0, 1fr); padding: 10vh var(--pad); }
  .brew-stage { order: -1; height: 46dvh; }
  .limits-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js .line > span { opacity: 1; transform: none; filter: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .card { -webkit-backdrop-filter: none; backdrop-filter: none; background: #171a16; }
}

/* режим ?still для снимков: без переходов */
.still *, .still *::before { transition: none !important; }
