/* GLD VIDEO — лендинг.
   Система из лендинга Yameenk (Cash App–style): плоские цветовые блоки, огромная
   жирная типографика, кнопки-таблетки, фон меняет цвет по секции в центре экрана.
   Цвета — наши: чёрный, лайм #c8f53c, светлый #f4f1ea. */

:root {
  --ink: #0b0b0b;
  --paper: #f4f1ea;
  --lime: #c8f53c;
  --grey: #eceae3;
}

.page {
  /* тема секции ставится из app.js по той, что пересекает середину экрана */
  --bg: var(--ink); --fg: var(--paper); --pill-bg: var(--lime); --pill-fg: var(--ink); --muted: rgba(244,241,234,.62);
  background-color: var(--bg);
  color: var(--fg);
  font-family: Manrope, -apple-system, "Segoe UI", sans-serif;
  transition: background-color 700ms ease, color 700ms ease;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.page[data-theme="base"],
.page[data-theme="black"] { --bg: var(--ink); --fg: var(--paper); --pill-bg: var(--lime); --pill-fg: var(--ink); --muted: rgba(244,241,234,.62); }
.page[data-theme="lime"]  { --bg: var(--lime); --fg: var(--ink); --pill-bg: var(--ink); --pill-fg: var(--paper); --muted: rgba(11,11,11,.66); }
.page[data-theme="white"] { --bg: var(--paper); --fg: var(--ink); --pill-bg: var(--ink); --pill-fg: var(--paper); --muted: rgba(11,11,11,.62); }

html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); }
*, *::before, *::after { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }

/* ---------- таблетки ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 15px 28px; font-size: 16px; font-weight: 800;
  white-space: nowrap; transition: transform 150ms ease, background-color 700ms ease, color 700ms ease;
}
.pill:hover { transform: scale(1.03); }
.pill:active { transform: scale(0.98); }
.pillAccent { background: var(--lime); color: var(--ink); }
.pillDark { background: var(--pill-bg); color: var(--pill-fg); }
.pillLight { background: var(--paper); color: var(--ink); }
.pillGhost { box-shadow: inset 0 0 0 2px currentColor; }

/* ---------- шапка ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 56px);
  background: var(--ink); color: var(--paper);
}
.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; display: block; }
.links { display: none; gap: 32px; font-size: 15px; font-weight: 700; }
.links a:hover { color: var(--lime); }
.nav .pill { padding: 10px 20px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { padding: 0 clamp(16px, 4vw, 56px); overflow: hidden; }
.heroBody { text-align: center; padding-top: clamp(32px, 7vh, 80px); }
.eyebrow {
  display: inline-block; margin: 0 0 24px; padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: .01em;
  color: var(--lime); box-shadow: inset 0 0 0 1px rgba(200,245,60,.45);
}
.h1 {
  margin: 0 auto; max-width: 14ch;
  font-size: clamp(48px, 9.6vw, 150px); font-weight: 800; line-height: .9; letter-spacing: -.055em;
}
.accent { color: var(--lime); }
.sub { max-width: 36rem; margin: 28px auto 0; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.45; font-weight: 500; color: var(--muted); }
.heroCtas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.stage { display: flex; justify-content: center; margin-top: clamp(32px, 6vh, 72px); }

/* ---------- телефон ---------- */
.phone {
  width: min(360px, 90vw); background: #fff; color: var(--ink);
  border: 10px solid #1e1e1e; border-bottom: 0; border-radius: 46px 46px 0 0;
  padding: 18px 14px 20px; box-shadow: 0 -24px 80px rgba(200,245,60,.18);
}
.phoneBar { display: flex; align-items: center; gap: 10px; padding: 4px 6px 14px; border-bottom: 1px solid #eee; }
.phoneBar img { width: 38px; height: 38px; border-radius: 50%; }
.phoneBar strong { display: block; font-size: 15px; }
.phoneBar span { font-size: 12px; color: #888; }
.chat {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  height: 470px; overflow: hidden; padding-top: 14px; font-size: 14px; line-height: 1.35;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 40px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 40px);
}
.chat > * { flex-shrink: 0; animation: msgIn 320ms cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.me, .bot { max-width: 86%; padding: 10px 14px; border-radius: 20px; }
.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; font-weight: 700; }
.bot { align-self: flex-start; background: var(--grey); border-bottom-left-radius: 6px; }
.bot b { font-weight: 800; }
.muted { color: #777; font-size: 12px; }

.typing { display: flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #999; animation: dot 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { position: relative; padding: 6px 12px; border-radius: 999px; background: #fff; font-weight: 700; font-size: 13px; transition: background 200ms, color 200ms; }
.chip.picked { background: var(--ink); color: var(--lime); animation: press 450ms ease both; }
.chip.picked::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid var(--ink); animation: ring 600ms ease-out both; pointer-events: none; }
@keyframes press { 0% { transform: scale(1); } 35% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes ring { from { opacity: .6; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }

.progress { height: 6px; margin-top: 8px; border-radius: 99px; background: #fff; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--lime); transition: width 120ms linear; }

/* ролик и файл в чате */
.vid { align-self: flex-start; width: 58%; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; position: relative; background: #111; }
.vid video, .vid .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid .badge { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-weight: 700; }
.file { align-self: flex-start; display: flex; align-items: center; gap: 10px; background: var(--grey); padding: 10px 14px; border-radius: 16px; border-bottom-left-radius: 6px; }
.file i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--lime); font-style: normal; font-weight: 800; }
.file b { display: block; font-size: 13px; }

.inputBar { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--grey); }
.inputPlaceholder { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; color: #999; }
.inputPlaceholder.typed { color: var(--ink); }
.sendBtn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #ddd; color: #fff; font-weight: 800; transition: background 200ms, transform 200ms; }
.sendBtn.on { background: var(--ink); color: var(--lime); transform: scale(1.05); }

/* плейсхолдер, пока нет клипа: мягкий лаймовый градиент. Тот же фон у самого
   <video>, чтобы до загрузки не мелькал чёрный прямоугольник. */
.ph, .reel video, .vid video { background: radial-gradient(120% 70% at 50% 85%, rgba(200,245,60,.55), transparent 60%), linear-gradient(160deg, #1b1b1b, #0b0b0b); }

/* ---------- секции ---------- */
.h2 { margin: 0; font-size: clamp(42px, 6.2vw, 94px); font-weight: 800; line-height: .92; letter-spacing: -.05em; }
.kicker { font-size: 14px; font-weight: 800; letter-spacing: .02em; color: var(--muted); }
.feature {
  display: flex; flex-direction: column; align-items: center; gap: 40px;
  padding: clamp(72px, 12vh, 130px) clamp(16px, 4vw, 56px);
}
.featureText { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; max-width: 34rem; }
.featureBody { margin: 0; max-width: 36rem; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; font-weight: 500; color: var(--muted); }

.reel { margin: 0; width: min(320px, 78vw); text-align: center; }
.reel video, .reel .ph {
  display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 28px;
  background: #111; box-shadow: 0 30px 80px rgba(0,0,0,.28);
}
.reel figcaption { margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--muted); }

/* модели */
.models, .pricing, .faq, .band, .foot { padding: clamp(72px, 12vh, 130px) clamp(16px, 4vw, 56px); }
.models { display: flex; flex-direction: column; gap: 22px; }
.modelGrid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
.modelGrid li { display: flex; flex-direction: column; gap: 4px; padding: 22px 24px; border-radius: 22px; background: var(--grey); }
.modelGrid b { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.modelGrid span { font-size: 15px; color: rgba(11,11,11,.6); font-weight: 600; }

/* тарифы */
.pricing { display: flex; flex-direction: column; gap: 22px; }
.plans { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 18px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 28px; background: #171717; }
.plan h3 { margin: 0; font-size: 22px; font-weight: 800; }
.price { margin: 0; font-size: clamp(38px, 4vw, 52px); font-weight: 800; letter-spacing: -.04em; }
.price span { font-size: 16px; font-weight: 600; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.plan ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 16px; font-weight: 600; color: var(--muted); }
.plan ul b { color: var(--paper); font-weight: 800; }
.plan .pill { align-self: flex-start; }
.planHot { background: var(--lime); color: var(--ink); }
.planHot ul, .planHot .price span { color: rgba(11,11,11,.65); }
.planHot ul b { color: var(--ink); }
.planHot .pillDark { background: var(--ink); color: var(--paper); }
.tag { position: absolute; top: 20px; right: 20px; padding: 5px 11px; border-radius: 99px; background: var(--ink); color: var(--lime); font-size: 12px; font-weight: 800; }
.fine { margin: 6px 0 0; font-size: 14px; color: var(--muted); max-width: 44rem; line-height: 1.5; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 18px; }
.faq .h2 { margin-bottom: 14px; }
.faq details { max-width: 52rem; border-top: 2px solid rgba(11,11,11,.12); padding: 20px 0; }
.faq summary { cursor: pointer; list-style: none; font-size: clamp(19px, 1.8vw, 24px); font-weight: 800; letter-spacing: -.02em; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 800; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 12px 0 0; font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 44rem; }

/* CTA и подвал */
.band { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
/* подвал всегда чёрный, как шапка: иначе на лаймовой теме светлые ссылки теряются */
.foot { display: flex; flex-direction: column; gap: 14px; font-size: 13px; line-height: 1.5; background: var(--ink); color: rgba(244,241,234,.62); padding-top: 48px; padding-bottom: 48px; }
.foot img { height: 36px; width: auto; }
.foot p { margin: 0; max-width: 46rem; }
.footLinks a { color: var(--paper); font-weight: 700; }
/* Правовая строка про Higgsfield — в одну строку на широком экране.
   На узком переносится: 150 символов в строку на телефоне дали бы горизонтальную прокрутку. */
.foot .legal { max-width: none; }
@media (min-width: 1180px) { .foot .legal { white-space: nowrap; } }  /* строке нужно ~1030px + поля */

/* ---------- адаптив ---------- */
@media (min-width: 720px) {
  .links { display: flex; }
  .band { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .modelGrid { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1080px) {
  .feature { flex-direction: row; justify-content: space-between; gap: 64px; padding-inline: max(56px, calc((100% - 1200px) / 2)); }
  .flip { flex-direction: row-reverse; }
  .featureText { flex: 1 1 0; }
  .reel { flex: 0 0 340px; width: 340px; }
  .models, .pricing, .faq, .band { padding-inline: max(56px, calc((100% - 1200px) / 2)); }
  .modelGrid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 719px) { .phone { zoom: .86; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .page, .pill { transition: none; }
  .chat > *, .typing i, .chip.picked, .chip.picked::after { animation: none; }
}

/* Незаполненный реквизит — видно сразу (заполняется docs/build_legal.py из docs/legal.json). */
mark.todo { background: #ffd84d; color: #0b0b0b; padding: 0 4px; border-radius: 4px; font-weight: 700; }
