/* ── From The Seed — landing ──────────────────────────────────────
   Ночь, лунный свет, зелёный росток. Одна фиксированная тёмная тема:
   лендинг — постер, а не документ, светлого варианта у него нет.   */

:root {
  --bg:          #0b0a08;
  --bg-soft:     #14120e;
  --ink:         #e8e4da;
  --ink-dim:     #a39d90;
  --sprout:      #7fc242;
  --sprout-dark: #5a9430;
  --moon:        #d9d7ce;
  --amber:       #e8b84b;
  --panel:       #1a1712;
  --radius:      14px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Хром браузера в той же гамме, что игра: фон за пределами страницы
   (резиновая прокрутка, поля адресной строки), полосы прокрутки и
   системные элементы формы. Без этого при оттягивании страницы и на
   тёмной теме телефона вылезала белая подложка. */
html {
  scroll-behavior: smooth;
  background: var(--bg);
  color-scheme: dark;
  scrollbar-color: #3c3629 var(--bg);
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: #3c3629;
  border-radius: 6px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--sprout-dark); }
::selection { background: rgba(127, 194, 66, 0.3); color: var(--ink); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1.5rem;
  background: linear-gradient(to bottom, rgba(11,10,8,.85), rgba(11,10,8,0));
  transition: background .3s;
}
.nav.nav--solid {
  background: rgba(11,10,8,.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.nav__logo {
  display: flex; align-items: center; gap: .55rem;
  color: var(--ink); text-decoration: none;
  font-weight: 900; letter-spacing: .03em;
}
.nav__logo img { border-radius: 6px; }
.nav__right { display: flex; align-items: center; gap: 1.2rem; }
.nav__right a {
  color: var(--ink-dim); text-decoration: none; font-weight: 700;
  transition: color .2s;
}
.nav__right a:hover { color: var(--ink); }
.nav__right a.nav__cta {
  color: var(--sprout);
  border: 1.5px solid var(--sprout-dark);
  padding: .25rem .9rem; border-radius: 999px;
}
.nav__right a.nav__cta:hover { background: rgba(127,194,66,.12); }

.lang-toggle {
  background: none;
  border: 1.5px solid rgba(232,228,218,.25);
  color: var(--ink-dim);
  font: inherit; font-weight: 700;
  padding: .2rem .7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.lang-toggle:hover { color: var(--ink); border-color: rgba(232,228,218,.5); }

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  /* Не flex-end: у hero-кадра герой стоит внизу по центру, и текст,
     прижатый к низу, ложился ровно на него (проверено кадром 1440×900).
     Текст живёт в пустом небе между луной и семечком. */
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero__media {
  position: absolute;
  inset: -12% 0;                 /* запас сверху/снизу под параллакс-сдвиг */
  z-index: 0;
  /* фолбэк: если видео нет/не загрузилось — стоит постер */
  background: url('../assets/img/hero_bg.webp') center / cover no-repeat;
}
.hero__video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero__vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(11,10,8,0) 35%, rgba(11,10,8,.55) 100%),
    linear-gradient(to bottom, rgba(11,10,8,.35) 0%, rgba(11,10,8,0) 30%,
                    rgba(11,10,8,.15) 65%, var(--bg) 98%);
}
.hero__content {
  position: relative; z-index: 2;
  text-align: center;
  /* Нижний отступ смещает блок чуть выше центра — освобождает семечко. */
  padding: 0 1.5rem 12svh;
  max-width: 780px;
}
.hero__title {
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--moon);
  text-shadow: 0 0 60px rgba(217,215,206,.35), 0 4px 24px rgba(0,0,0,.8);
  animation: rise 1.1s cubic-bezier(.2,.7,.3,1) both;
}
.hero__tagline {
  margin: .8rem 0 1.6rem;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  color: var(--ink);
  text-shadow: 0 2px 12px rgba(0,0,0,.9);
  animation: rise 1.1s .15s cubic-bezier(.2,.7,.3,1) both;
}
.hero__actions {
  display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap;
  animation: rise 1.1s .3s cubic-bezier(.2,.7,.3,1) both;
}
.hero__hint {
  margin-top: .8rem;
  font-size: .85rem;
  color: var(--ink-dim);
  animation: rise 1.1s .45s cubic-bezier(.2,.7,.3,1) both;
}
.hero__scroll {
  position: absolute; bottom: 1.2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--ink-dim);
  font-size: 1.4rem;
  animation: bob 2s ease-in-out infinite;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); opacity: .5; }
  50%      { transform: translate(-50%, 8px); opacity: 1; }
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: .8rem 1.7rem;
  border-radius: 999px;
  font-weight: 900;
  font-size: 1.02rem;
  text-decoration: none;
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn--primary {
  background: linear-gradient(160deg, var(--sprout), var(--sprout-dark));
  color: #10210a;
  box-shadow: 0 6px 24px rgba(127,194,66,.35);
}
/* Росток на кнопке — СВОЙ контур, а не эмодзи 🌱.
   Системный эмодзи-шрифт на телефоне рисует росток тёмно-зелёным, и на
   зелёной кнопке его просто не видно; вдобавок каждая платформа рисует
   его по-своему. Кружок цвета бумаги даёт контраст на любом экране.

   Псевдоэлемент, а НЕ вложенный span: переключатель языка подменяет
   textContent кнопки целиком и стёр бы любую разметку внутри. */
.btn--primary {
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.btn--primary::before {
  content: "";
  flex: 0 0 auto;
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  /* Лепестки — полные эллипсы, а не узкие линзы: на 20 пикселях линзы
     сливались в тонкие штрихи и росток читался как буква «Y». */
  background: #f1eee2 url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 21.5V10.5' stroke='%2310210a' stroke-width='2.2' stroke-linecap='round' fill='none'/><ellipse cx='7.3' cy='8.6' rx='4.7' ry='2.7' transform='rotate(-34 7.3 8.6)' fill='%2310210a'/><ellipse cx='16.7' cy='8.6' rx='4.7' ry='2.7' transform='rotate(34 16.7 8.6)' fill='%2310210a'/></svg>") center / 74% no-repeat;
  box-shadow: inset 0 0 0 1px rgba(16,33,10,.18);
}
.btn--primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 32px rgba(127,194,66,.5);
}
.btn--ghost {
  color: var(--ink);
  border: 1.5px solid rgba(232,228,218,.3);
  background: rgba(11,10,8,.35);
  backdrop-filter: blur(4px);
}
.btn--ghost:hover { border-color: rgba(232,228,218,.65); transform: translateY(-2px); }
.btn--big { padding: 1rem 2.4rem; font-size: 1.15rem; }

/* ── Fireflies ── */
.fireflies { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fireflies span {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px 3px rgba(232,184,75,.55);
  opacity: 0;
  animation: fly var(--dur, 11s) var(--delay, 0s) linear infinite;
}
.fireflies span:nth-child(1)  { left: 8%;  top: 72%; --dur: 13s; --delay: 0s; }
.fireflies span:nth-child(2)  { left: 18%; top: 55%; --dur: 17s; --delay: 2s; }
.fireflies span:nth-child(3)  { left: 30%; top: 80%; --dur: 11s; --delay: 5s; }
.fireflies span:nth-child(4)  { left: 42%; top: 62%; --dur: 15s; --delay: 1s; }
.fireflies span:nth-child(5)  { left: 55%; top: 76%; --dur: 12s; --delay: 7s; }
.fireflies span:nth-child(6)  { left: 64%; top: 50%; --dur: 18s; --delay: 3s; }
.fireflies span:nth-child(7)  { left: 74%; top: 70%; --dur: 14s; --delay: 6s; }
.fireflies span:nth-child(8)  { left: 84%; top: 58%; --dur: 16s; --delay: 2.5s; }
.fireflies span:nth-child(9)  { left: 92%; top: 78%; --dur: 12s; --delay: 4s; }
.fireflies span:nth-child(10) { left: 48%; top: 42%; --dur: 19s; --delay: 8s; }

@keyframes fly {
  0%   { transform: translate(0, 0);        opacity: 0; }
  8%   { opacity: .9; }
  45%  { transform: translate(38px, -70px); opacity: .35; }
  55%  { opacity: .9; }
  92%  { opacity: .15; }
  100% { transform: translate(-24px, -140px); opacity: 0; }
}

/* ── Sections ── */
section { padding: 5.5rem 0; }

.section-title {
  text-align: center;
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  font-weight: 900;
  color: var(--moon);
  margin-bottom: 2.6rem;
}

/* ── Teaser ── */
.teaser { background: var(--bg-soft); }
.teaser__frame {
  max-width: 960px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0,0,0,.6);
  border: 1px solid rgba(232,228,218,.08);
}
.teaser__frame video { width: 100%; height: auto; background: #000; }

.about { background: var(--bg); }
.about__lead {
  max-width: 720px;
  margin: -1rem auto 3rem;
  text-align: center;
  font-size: 1.13rem;
  color: var(--ink-dim);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}
.feature {
  background: var(--panel);
  border: 1px solid rgba(232,228,218,.07);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  transition: transform .25s, border-color .25s;
}
.feature:hover {
  transform: translateY(-5px);
  border-color: rgba(127,194,66,.35);
}
.feature__icon { font-size: 2rem; margin-bottom: .6rem; }
.feature h3 { color: var(--sprout); font-size: 1.12rem; margin-bottom: .4rem; }
.feature p { color: var(--ink-dim); font-size: .95rem; }

/* ── World panels ── */
.world { background: var(--bg-soft); }

.panel {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 0 1.5rem;
}
.panel:last-child { margin-bottom: 0; }
.panel--right { flex-direction: row-reverse; }

.panel__img {
  flex: 1.25;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.panel__img img {
  width: 100%;
  transition: transform .6s cubic-bezier(.2,.7,.3,1);
}
.panel:hover .panel__img img { transform: scale(1.045); }

.panel__text { flex: 1; }
.panel__text h3 {
  font-size: 1.5rem;
  color: var(--moon);
  margin-bottom: .6rem;
}
.panel__text p { color: var(--ink-dim); }

/* ── Play CTA ── */
.play {
  background:
    radial-gradient(ellipse at 50% 120%, rgba(127,194,66,.13), transparent 60%),
    var(--bg);
  text-align: center;
}
.play__inner h2 {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  color: var(--moon);
  margin-bottom: .7rem;
}
.play__inner p { color: var(--ink-dim); margin-bottom: 1.8rem; }
.play__seed {
  width: 130px;
  margin: 0 auto 1.4rem;
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(127,194,66,.3);
  animation: seed-float 5s ease-in-out infinite;
}
@keyframes seed-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-12px) rotate(2deg); }
}

/* ── Гейт по коду доступа ── */
.gate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: rgba(6,5,4,.82);
  backdrop-filter: blur(6px);
}
.gate[hidden] { display: none; }
.gate__box {
  position: relative;
  width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid rgba(232,228,218,.12);
  border-radius: var(--radius);
  padding: 2rem 1.8rem 1.6rem;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.7);
}
.gate__box h3 { color: var(--moon); font-size: 1.35rem; margin-bottom: .5rem; }
.gate__box > p { color: var(--ink-dim); font-size: .95rem; margin-bottom: 1.2rem; }
.gate__close {
  position: absolute; top: .4rem; right: .7rem;
  background: none; border: none; cursor: pointer;
  color: var(--ink-dim); font-size: 1.7rem; line-height: 1;
}
.gate__close:hover { color: var(--ink); }
.gate__form { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.gate__input {
  flex: 1 1 200px;
  min-width: 0;
  padding: .8rem 1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(232,228,218,.22);
  background: rgba(11,10,8,.6);
  color: var(--ink);
  font: inherit;
  text-align: center;
}
.gate__input:focus { outline: none; border-color: var(--sprout-dark); }
.gate__error { color: #e2725b; font-size: .9rem; margin-top: .8rem; }
.gate__error[hidden] { display: none; }
.gate__ask {
  display: inline-block; margin-top: 1.1rem;
  color: var(--sprout); font-weight: 700; font-size: .92rem;
}

/* ── Footer ── */
.footer {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--ink-dim);
  font-size: .9rem;
  border-top: 1px solid rgba(232,228,218,.07);
}
.footer a { color: var(--sprout); text-decoration: none; font-weight: 700; }
.footer a:hover { text-decoration: underline; }
/* Правовая строка — тише основной: нужна, но внимание на себя не тянет */
.footer__rights {
  max-width: 620px;
  margin: .7rem auto 0;
  font-size: .8rem;
  opacity: .65;
}
.footer__legal { margin: .75rem auto 0; font-size: .82rem; }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.reveal--in { opacity: 1; transform: none; }

/* ── Mobile ── */
@media (max-width: 760px) {
  .nav__right a:not(.nav__cta) { display: none; }
  .panel, .panel--right {
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 3rem;
  }
  section { padding: 3.5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ── История одной идеи (секция «от автора») ── */
.story { padding: 90px 20px 70px; background: var(--bg-soft); }
.story__inner { max-width: 660px; margin: 0 auto; }
.story__inner .section-title { text-align: center; }
.story__inner p { color: var(--ink-dim); line-height: 1.75; margin: 0 0 18px; font-size: 17px; }
.story__sign { text-align: right; font-style: italic; color: var(--moon); opacity: 0.8; }
.story__photo {
  display: block; width: 132px; height: 132px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 26px;
  border: 3px solid var(--sprout-dark);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}
