/* «Болота» · лендинг — стиль в тонах игры (см. src/styles/quest.css).
   Палитра и шрифты совпадают с приложением: бумага, дерево, ветер, золото. */

:root {
  --bg: #15110c;
  --bg2: #1d1710;
  --paper: #211a12;
  --paper2: #271e14;
  --ink: #d8c8a8;
  --ink-dim: #a08f74;
  --gold: #c9a24b;
  --gold-soft: #b9893f;
  --line: #3a2f20;
  --foe: #b9544a;
  --maxw: 1120px;
  --pad: clamp(1.1rem, 4vw, 2.2rem);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background:
    radial-gradient(120% 70% at 50% -8%, #2a2014 0%, var(--bg) 52%, #0d0a06 100%) fixed,
    var(--bg);
  color: var(--ink);
  font-family: 'PT Serif', Georgia, serif;
  font-size: 1.04rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* лёгкое зерно бумаги поверх всего — как в игре */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color .18s ease; }
a:hover { color: #e6c477; }

h1, h2, h3 { font-family: 'Playfair Display', serif; font-weight: 600; line-height: 1.15; margin: 0; }
.kicker {
  font-family: 'PT Sans', system-ui, sans-serif; text-transform: uppercase;
  letter-spacing: .22em; font-size: .74rem; color: var(--ink-dim);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); position: relative; z-index: 1; }
.section { padding-block: clamp(3rem, 8vw, 5.5rem); }
.section--tight { padding-block: clamp(2rem, 5vw, 3rem); }

/* ─────────── ШАПКА ─────────── */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(21, 17, 12, .72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.site-head .wrap { display: flex; align-items: center; gap: 1rem; height: 60px; }
.brand { display: flex; align-items: baseline; gap: .5rem; margin-right: auto; line-height: 1; }
.brand b { font-family: 'Playfair Display', serif; font-style: italic; font-weight: 600; font-size: 1.35rem; line-height: 1; color: var(--gold); }
.brand span { font-family: 'PT Sans', sans-serif; font-size: .72rem; line-height: 1; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); }
.nav-links { display: flex; gap: 1.4rem; }
.nav-links a { color: var(--ink-dim); font-family: 'PT Sans', sans-serif; font-size: .9rem; letter-spacing: .02em; }
.nav-links a:hover { color: var(--gold); }
@media (max-width: 760px) { .nav-links { display: none; } }

.langs { display: flex; gap: .35rem; }
.langs a {
  font-family: 'PT Sans', sans-serif; font-size: .82rem; letter-spacing: .04em;
  color: var(--ink-dim); border: 1px solid var(--line); border-radius: 999px;
  padding: .25rem .6rem; line-height: 1.4;
}
.langs a[aria-current="true"] { color: var(--gold); border-color: var(--gold); }
.langs a:hover { color: var(--gold); border-color: var(--gold); }

/* ─────────── HERO ─────────── */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background-image: image-set(url("/assets/img/banner.webp") 1x);
  background-size: cover;
  /* широкий баннер: фигуры в правой половине (~52–80% по ширине, центр ~66%).
     Центрируем кадр на группе фигур, чтобы при кропе на узких/коротких окнах
     людей не срезало; чуть выше — чтобы головы оставались в кадре. */
  background-position: 66% 40%;
  background-repeat: no-repeat;
}
.hero-slide::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(13,10,6,.55) 0%, rgba(13,10,6,.35) 35%, rgba(13,10,6,.82) 88%, var(--bg) 100%),
    radial-gradient(80% 60% at 30% 40%, transparent, rgba(13,10,6,.5));
}
.hero .wrap { min-height: min(86vh, 760px); display: flex; flex-direction: column; justify-content: center; padding-block: clamp(3.5rem, 12vh, 7rem); }
.hero-title {
  font-style: italic; font-size: clamp(3rem, 12vw, 6.2rem); color: var(--gold);
  text-shadow: 0 4px 40px rgba(0,0,0,.7); margin: .3rem 0 .1rem;
}
.hero-sub { font-size: clamp(1.05rem, 2.6vw, 1.5rem); color: #efe6d0; max-width: 30ch; margin: .4rem 0 0; }
.hero-lead { color: var(--ink); max-width: 46ch; margin: 1.1rem 0 0; font-size: 1.05rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }

/* ── Герой-слайдер (Часть 1 / Часть 2) ── */
.hero-slider { position: relative; overflow: hidden; }
.hero-track { display: flex; will-change: transform; transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
.hero-slide { position: relative; flex: 0 0 100%; min-width: 100%; isolation: isolate; overflow: hidden; }
/* Часть 2: баннер Google Play (зимняя гать, семья, горящий горизонт).
   Семья справа-от-центра (~66% по ширине); центрируем кадр на ней, чтобы
   на узких окнах фигуры не срезало. */
.hero-bg--p2 { background-image: image-set(url("/assets/img/p2/banner.webp") 1x); background-position: 66% 46%; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: clamp(1rem, 3.5vh, 2.2rem); z-index: 6; display: flex; justify-content: center; gap: .55rem; }
.hero-dot { width: 9px; height: 9px; padding: 0; border-radius: 50%; cursor: pointer; border: 1px solid var(--gold); background: transparent; transition: background .2s ease, transform .2s ease; }
.hero-dot.is-active { background: var(--gold); transform: scale(1.2); }
.hero-dot:hover { background: rgba(201, 162, 75, .4); }
@media (prefers-reduced-motion: reduce) { .hero-track { transition: none; } }

/* Акцент на карточках/плитках Части 2 */
.feature--p2 { border-color: rgba(201, 162, 75, .38); background: linear-gradient(180deg, rgba(201, 162, 75, .06), transparent); }
.tile--p2 { outline: 1px solid rgba(201, 162, 75, .35); outline-offset: -1px; }
.chip {
  font-family: 'PT Sans', sans-serif; font-size: .78rem; letter-spacing: .06em;
  color: var(--ink-dim); border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .75rem; background: rgba(21,17,12,.5);
}
@media (max-width: 620px) {
  /* и на мобильном — тот же баннер с семьёй; кадр под портрет, по фельдшеру с саквояжем */
  .hero-bg { background-position: 60% 48%; }
}
@media (max-width: 600px) {
  /* в шапке прячем «1941 · Полесье» — оставляем только название */
  .brand span { display: none; }
  /* меньше воздуха вокруг секций и картинок на телефоне */
  .section { padding-block: 2.5rem; }
  .section--tight { padding-block: 1.7rem; }
  .sec-head { margin-bottom: 1.3rem; }
  .gallery { gap: .6rem; }
  .shots { gap: .7rem; }
}

/* ─────────── КНОПКИ / CTA ─────────── */
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: .6rem;
  border: 1px solid var(--line); border-radius: 12px; padding: .6rem 1rem;
  background: linear-gradient(180deg, var(--paper2), var(--paper));
  color: var(--ink); font-family: 'PT Sans', sans-serif; min-width: 168px;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.badge:hover { border-color: var(--gold); color: var(--ink); transform: translateY(-1px); }
.badge svg { width: 22px; height: 22px; fill: var(--gold); flex: 0 0 auto; }
.badge i { font-style: normal; display: flex; flex-direction: column; line-height: 1.15; }
.badge i small { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); }
.badge i b { font-size: 1.02rem; font-weight: 600; }
.badge--live { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(201,162,75,.25), 0 8px 24px rgba(0,0,0,.35); }
.badge--live b { color: #efe6d0; }
.cta-row--center { justify-content: center; }
.badge--soon { position: relative; }
.badge--soon::after {
  content: attr(data-soon); position: absolute; top: -9px; right: -8px;
  background: var(--gold); color: #1a140a; font-family: 'PT Sans', sans-serif;
  font-size: .6rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .12rem .4rem; border-radius: 999px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: 'PT Sans', sans-serif; font-size: 1rem; cursor: pointer;
  border-radius: 10px; padding: .7rem 1.4rem; border: 1px solid var(--gold);
  background: var(--gold); color: #1a140a; font-weight: 600;
  transition: filter .18s ease, transform .18s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); color: #1a140a; }
.btn--ghost { background: transparent; color: var(--gold); }
.btn--ghost:hover { background: rgba(201,162,75,.1); color: var(--gold); }

/* ─────────── ОБЩИЕ СЕКЦИИ ─────────── */
.sec-head { max-width: 60ch; margin-bottom: 2rem; }
.sec-head h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); color: #efe6d0; margin-top: .4rem; }
.sec-head p { color: var(--ink-dim); margin: .6rem 0 0; }
.lead { font-size: 1.18rem; line-height: 1.8; color: var(--ink); max-width: 60ch; }
.lead em { color: var(--gold); font-style: italic; }

/* интро-блок */
.intro { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(29,23,16,.4); }
.intro .wrap { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }

/* фичи: ровно 3 колонки (6 карточек → 2×3 без пустых ячеек) */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
@media (max-width: 920px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { background: linear-gradient(180deg, var(--paper2), var(--bg2)); padding: 1.5rem 1.4rem; }
.feature h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--gold); margin-bottom: .4rem; display: flex; align-items: center; gap: .55rem; }
.feature h3 svg { width: 20px; height: 20px; stroke: var(--gold); fill: none; stroke-width: 1.6; flex: 0 0 auto; }
.feature p { margin: 0; color: var(--ink-dim); font-size: .98rem; line-height: 1.65; }

/* скриншоты — телефоны */
.shots { display: flex; gap: 1.1rem; overflow-x: auto; padding-bottom: 1rem; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.shots::-webkit-scrollbar { height: 6px; }
.shots::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.phone {
  flex: 0 0 auto; width: 232px; scroll-snap-align: center;
  border: 8px solid #0d0a06; border-radius: 30px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.55); background: #0d0a06;
}
.phone img { aspect-ratio: 9/19.5; object-fit: cover; }

/* галерея-истории */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; }
.tile { position: relative; margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.tile img { aspect-ratio: 3/2; object-fit: cover; filter: saturate(.86) brightness(.92); transition: transform .5s ease, filter .3s ease; }
.tile:hover img { transform: scale(1.04); filter: saturate(1) brightness(1); }
.tile figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1.4rem .9rem .8rem;
  font-family: 'PT Serif', serif; font-size: .92rem; color: #efe6d0;
  background: linear-gradient(180deg, transparent, rgba(13,10,6,.88));
}

/* цитата-тон */
.quote { text-align: center; max-width: 46ch; margin: 0 auto; }
.quote blockquote { font-family: 'Playfair Display', serif; font-style: italic; font-size: clamp(1.4rem, 4vw, 2.1rem); color: var(--gold); margin: 0; line-height: 1.4; }
.quote cite { display: block; margin-top: 1rem; font-style: normal; font-family: 'PT Sans', sans-serif; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-dim); }

/* часть вторая — тизер */
.part2 { border-top: 1px solid var(--line); background: rgba(29,23,16,.4); }
.part2 .wrap { max-width: 66ch; }
.part2 h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); color: #efe6d0; margin: .4rem 0 .9rem; }

/* Плашка-новость: «Часть вторая — уже на iOS» (над шапкой, скроллится) */
.p2-ribbon {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .55rem 1rem; text-decoration: none; text-align: center; position: relative; z-index: 21;
  background: linear-gradient(90deg, rgba(201,162,75,.14), rgba(201,162,75,.06));
  border-bottom: 1px solid var(--line);
  color: var(--gold); font-family: 'PT Sans', system-ui, sans-serif;
  font-size: .82rem; letter-spacing: .06em;
}
.p2-ribbon:hover { background: rgba(201,162,75,.2); color: #e6c477; }
.p2-ribbon-arrow { transition: transform .18s ease; }
.p2-ribbon:hover .p2-ribbon-arrow { transform: translateX(3px); }

/* Полный блок Части 2 (вышла на iOS): обложка + текст в две колонки */
.part2--out .wrap { max-width: var(--maxw); }
.p2-grid { display: grid; grid-template-columns: minmax(0, 42%) 1fr; gap: clamp(1.4rem, 4vw, 2.8rem); align-items: center; }
.p2-art { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.p2-art img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: saturate(.9) brightness(.96); }
.p2-body .kicker { color: var(--gold); }
.p2-body h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); color: #efe6d0; margin: .5rem 0 .8rem; }
.p2-body .cta-row { margin-top: 1.4rem; }
.p2-list { list-style: none; margin: 1.1rem 0 1.3rem; padding: 0; display: grid; gap: .55rem; }
.p2-list li { position: relative; padding-left: 1.5rem; color: var(--ink); line-height: 1.5; }
.p2-list li::before { content: "✦"; position: absolute; left: 0; top: .05em; color: var(--gold); font-size: .95em; }
@media (max-width: 760px) {
  .p2-grid { grid-template-columns: 1fr; }
}

/* Акцент в hero: карточка «Часть вторая» под чипами */
.hero-p2-card {
  margin: 1.8rem 0 0; padding: 1.1rem 1.2rem 1.2rem; max-width: 30rem;
  border: 1px solid rgba(201,162,75,.4); border-radius: 14px;
  background: linear-gradient(180deg, rgba(201,162,75,.10), rgba(29,23,16,.35));
  box-shadow: 0 12px 34px rgba(0,0,0,.35);
}
.hero-p2-card-tag {
  margin: 0 0 .3rem; color: var(--gold);
  font-family: 'PT Sans', system-ui, sans-serif;
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
}
.hero-p2-card h2 {
  font-family: 'Playfair Display', serif; font-size: 1.5rem;
  color: #efe6d0; margin: 0 0 .4rem; line-height: 1.15;
}
.hero-p2-card > p { margin: 0 0 .95rem; color: var(--ink); font-size: .98rem; line-height: 1.5; }
.hero-p2-card .cta-row { margin: 0; gap: .6rem; align-items: center; flex-wrap: wrap; }

/* CTA-полоса (скоро + почта) */
.band { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--bg2), var(--bg)); }
/* кинематографичный фон-баннер под CTA */
.band--banner { position: relative; isolation: isolate; background: var(--bg); }
.band--banner::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("/assets/img/hero.webp") 50% 58% / cover no-repeat;
}
.band--banner::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(13,10,6,.82) 0%, rgba(13,10,6,.7) 45%, rgba(13,10,6,.9) 100%);
}
.band--banner .cta-row { margin-bottom: 1.6rem; }
.band .wrap { text-align: center; }
.band h2 { font-size: clamp(1.7rem, 5vw, 2.6rem); color: #efe6d0; }
.band p { color: var(--ink-dim); max-width: 50ch; margin: .7rem auto 1.6rem; }
.notify { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; max-width: 460px; margin: 0 auto; }
.notify input[type="email"] {
  flex: 1 1 240px; min-width: 0; font: inherit; font-size: 1rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); padding: .7rem 1rem;
}
.notify input::placeholder { color: var(--ink-dim); }
.notify input:focus { outline: none; border-color: var(--gold); }
.form-note { font-size: .78rem; color: var(--ink-dim); margin-top: .9rem; }

/* EmailOctopus inline-виджет — переопределяем bootstrap-стили под тёмную тему.
   Их <style> инжектится JS после нашего CSS, поэтому !important. */
.eo-embed { max-width: 460px; margin: 0 auto; }
.eo-embed .inline-container,
.eo-embed .main-form,
.eo-embed .emailoctopus-form-row { padding: 0 !important; margin: 0 !important; background: transparent !important; }
.eo-embed .emailoctopus-form-row { margin-bottom: .6rem !important; }
/* одинаковая высота инпута и кнопки + выравнивание по центру */
.eo-embed input.form-control,
.eo-embed input.btn-primary, .eo-embed .btn-primary {
  height: 48px !important; box-sizing: border-box !important;
  line-height: 1.2 !important; vertical-align: middle !important; margin: 0 !important;
}
.eo-embed input.form-control {
  background: var(--paper) !important; border: 1px solid var(--line) !important;
  color: var(--ink) !important; border-radius: 10px !important;
  padding: 0 1rem !important; font: 1rem 'PT Serif', Georgia, serif !important;
  box-shadow: none !important; width: 100% !important;
}
.eo-embed input.form-control::placeholder { color: var(--ink-dim) !important; opacity: 1 !important; }
.eo-embed input.form-control:focus { border-color: var(--gold) !important; outline: none !important; box-shadow: 0 0 0 2px rgba(201,162,75,.25) !important; }
.eo-embed input.btn-primary, .eo-embed .btn-primary {
  background: var(--gold) !important; border: 1px solid var(--gold) !important;
  color: #1a140a !important; border-radius: 10px !important;
  font-family: 'PT Sans', system-ui, sans-serif !important; font-weight: 700 !important;
  letter-spacing: .02em !important; padding: 0 1.4rem !important; cursor: pointer !important;
}
.eo-embed input.btn-primary:hover, .eo-embed .btn-primary:hover { filter: brightness(1.08) !important; }
/* инпут и кнопка по одной линии, выровнены по центру (.main-form — их flex-контейнер) */
.eo-embed .main-form { align-items: center !important; }
.eo-embed .emailoctopus-form-row.form-group { margin-bottom: 0 !important; flex: 1 1 200px !important; }
.eo-embed input.btn-primary { margin-bottom: 0 !important; }
/* «Powered by EmailOctopus» оставляем (требование free-плана), просто приглушаем */
.eo-embed a[href*="emailoctopus"] { opacity: .55 !important; }
/* success: EO держит элемент пустым (height 0 → скрыт), наполняет текстом при
   успехе. Только красим/типографим — видимостью управляет EO (не форсим opacity). */
.eo-embed .emailoctopus-success-message {
  color: var(--gold) !important; font-family: 'Playfair Display', serif !important;
  font-style: italic !important; font-size: 1.2rem !important; line-height: 1.4 !important;
}
.eo-embed .emailoctopus-error-message { color: var(--foe) !important; font-family: 'PT Serif', serif !important; }

/* подвал */
.site-foot { border-top: 1px solid var(--line); padding-block: 2.4rem; color: var(--ink-dim); font-size: .88rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.site-foot a { color: var(--ink-dim); }
.site-foot a:hover { color: var(--gold); }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }

/* ─────────── СЛОВО АВТОРА ─────────── */
.author .wrap { max-width: 46rem; }
.author-body { color: var(--ink); font-size: 1.12rem; line-height: 1.78; margin: .3rem 0 0; }
.author-sign { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.15rem; color: var(--gold); margin: 1.3rem 0 0; }
.author-contact { color: var(--ink-dim); margin: .5rem 0 0; font-size: .95rem; }
.author-contact a { color: var(--gold); }

/* ─────────── FAQ (аккордеон) ─────────── */
.faq { display: grid; gap: .55rem; max-width: 48rem; }
.faq-item { border: 1px solid var(--line); border-radius: 10px; background: rgba(21,17,12,.4); overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 1rem 1.2rem; list-style: none;
  font-family: 'Playfair Display', serif; font-size: 1.08rem; color: #efe6d0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--gold); font-size: 1.4rem; line-height: 1; flex: 0 0 auto; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item[open] summary { color: var(--gold); }
.faq-item p { margin: 0; padding: 0 1.2rem 1.1rem; color: var(--ink-dim); line-height: 1.68; }

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

@media (prefers-reduced-motion: reduce) {
  .tile img, .badge, .btn { transition: none; }
}
