/* ── Design tokens: aligned with the mobile app theme ── */
:root {
  --bg: #ffffff;
  --surface: #f4f4f6;
  --fg: #15151a;
  --fg-secondary: #8a8a8f;
  --fg-muted: #a0a0a6;
  --accent: #d6266e;
  --accent-soft: #fbe7f1;
  --accent-gradient: linear-gradient(135deg, #f58529 0%, #dd2a7b 52%, #8134af 100%);
  --border: #e8e8ec;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --font-head: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1024px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); margin: 0; letter-spacing: 0; }

/* ── Header ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 40px 0;
}

.nav__brand { font-family: var(--font-head); font-weight: 800; font-size: 40px; color: var(--fg); text-decoration: none; }
.nav__links { display: flex; gap: 24px; align-items: center; }
.nav__links a { color: var(--fg-secondary); text-decoration: none; font-weight: 600; font-size: 15px; transition: color 0.2s; }
.nav__links a:hover { color: var(--fg); }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ── Buttons ── */
.btn { cursor: pointer; text-decoration: none; font-family: var(--font-head); font-weight: 600; }
.btn--pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 8px 18px rgba(214, 38, 110, 0.24);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn--pill:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(214, 38, 110, 0.3); }

/* ── Hero ── */
.hero { text-align: center; padding: 176px 24px 104px; max-width: 1280px; margin: 0 auto; }
.hero__title {
  font-weight: 600;
  font-size: clamp(36px, 5.5vw, 78px);
  line-height: 1.04;
}
.hero__title .line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.18em;
}
.hero__title .ic {
  width: 0.78em;
  height: 0.78em;
  fill: none;
  stroke: var(--fg);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}
.hero__title .ic .fill { fill: var(--fg); stroke: none; }
.hero__title .ic--accent { fill: var(--accent); stroke: none; }

.hero__sub {
  max-width: 820px;
  margin: 48px auto 72px;
  font-size: clamp(14px, 1.4vw, 15px);
  color: var(--fg-secondary);
}

/* ── Store buttons ── */
.store { display: flex; flex-wrap: wrap; gap: 32px; justify-content: center; }
.store__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 260px;
  min-height: 88px;
  padding: 20px 32px;
  border-radius: 999px;
  background: var(--fg);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(21, 21, 26, 0.12);
  transition: transform 0.2s var(--ease), box-shadow 0.2s, opacity 0.2s;
}
.store__btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(21, 21, 26, 0.16); }
.store__logo { width: 36px; height: 36px; fill: #fff; flex: 0 0 auto; }
.store__text { display: flex; align-items: center; justify-content: center; line-height: 1; text-align: center; }
.store__text strong { font-family: var(--font-head); font-size: 27px; font-weight: 600; }
.store__btn--soon {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg-secondary);
  box-shadow: none;
  cursor: default;
}
.store__btn--soon:hover { transform: none; }
.store__btn--soon .store__logo { fill: var(--fg-secondary); }

/* ── Phone showcase ── */
.showcase {
  display: flex;
  justify-content: center;
  padding: 40px 24px 80px;
}
.phone {
  /* Соотношение экрана держим равным соотношению ролика, иначе object-fit: cover
     срежет кадр. Сейчас ролик 720×1280 → 9/16. Когда появится неурезанный исходник
     (запись экрана iPhone, 19.5:9) — поменять здесь на 9 / 19.5, и мокап станет
     пропорциями настоящего iPhone. */
  --screen-aspect: 9 / 16;

  position: relative;
  /* 46vh — страховка по высоте: при aspect 9/16 высота ≈ ширина × 1.78, поэтому
     ограничение ширины через vh не даёт телефону вылезти за невысокий экран. */
  width: min(460px, 88vw, 46vh);
  border-radius: 58px;
  /* Корпус: тонкая светлая грань по краю + тёмная рамка, как у современных iPhone. */
  background: linear-gradient(160deg, #3a3a42 0%, #15151a 18%, #15151a 82%, #3a3a42 100%);
  padding: 10px;
  box-shadow: 0 40px 80px -30px rgba(21, 21, 26, 0.45);
}
.phone__screen {
  position: relative;
  aspect-ratio: var(--screen-aspect);
  border-radius: 48px;
  background: #15151a;
  overflow: hidden;
}
/* Dynamic Island — поверх видео, по центру верхней кромки экрана.
   Держим компактной и прижатой к краю: у текущего ролика срезан верх, поэтому
   статус-бара под неё нет и она ложится прямо на контент. */
.phone__island {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 26%;
  max-width: 96px;
  height: 20px;
  border-radius: 999px;
  background: #0b0b0f;
  z-index: 2;
  pointer-events: none;
}
.phone__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Statements ── */
.statements { max-width: 900px; margin: 0 auto; padding: 40px 24px; display: flex; flex-direction: column; gap: 120px; }
.statement {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(30px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: 0;
  text-align: center;
  margin: 0;
}

/* ── AI script feature ── */
.script-feature {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 100px;
  text-align: center;
}
.script-feature__eyebrow {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}
.script-feature__title {
  max-width: 780px;
  margin: 0 auto;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 700;
}
.script-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  text-align: left;
}
.script-step {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.script-step__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}
.script-step__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.script-step__icon svg path:first-child:not(:only-child) {
  fill: none;
}
.script-step h3 {
  color: var(--fg);
  font-size: 21px;
  font-weight: 600;
  margin: 0 0 8px;
}
.script-step p {
  color: var(--fg-secondary);
  font-size: 15px;
  margin: 0;
}

/* ── How it works ── */
.how { max-width: var(--maxw); margin: 0 auto; padding: 100px 24px; }
.how__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.step__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.step__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.step h3 { font-size: 21px; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--fg-secondary); font-size: 15px; margin: 0; }

/* ── Final CTA ── */
.cta { text-align: center; padding: 80px 24px 120px; }
.cta__title { font-size: clamp(44px, 8vw, 84px); font-weight: 700; margin-bottom: 40px; }

/* ── Footer ── */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 40px 24px; text-align: center; }
.footer__links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; font-family: var(--font-head); font-weight: 500; font-size: 15px; }
.footer__links a { color: var(--fg-secondary); text-decoration: none; transition: color 0.2s; }
.footer__links a:hover { color: var(--fg); }
.footer__soon, .dot { color: var(--fg-muted); }
.footer__meta { margin: 20px 0 0; color: var(--fg-secondary); font-size: 14px; }

/* ── Scroll reveal ── */
[data-reveal], [data-stagger] > .line { opacity: 0; transform: translateY(40px); }
[data-reveal].in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-stagger].in > .line { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-stagger].in > .line:nth-child(2) { transition-delay: 0.12s; }
.statement { transition-delay: 0.05s; }

/* ── Responsive ── */
@media (max-width: 800px) {
  body { overflow-x: hidden; }
  .nav {
    gap: 12px;
    padding: 24px 18px 0;
  }
  .nav__brand {
    font-size: 32px;
    line-height: 1.05;
  }
  .nav__links { gap: 10px; }
  .nav__links a { font-size: 13px; }
  .lang-toggle { min-width: 36px; min-height: 28px; padding: 4px 9px; font-size: 12px; }
  .how__grid { grid-template-columns: 1fr; }
  .hero {
    padding: 96px 18px 68px;
  }
  .hero__title {
    font-size: clamp(28px, 7.4vw, 34px);
    line-height: 1.08;
  }
  .hero__title .line {
    flex-wrap: nowrap;
    white-space: nowrap;
  }
  .hero__sub {
    max-width: 340px;
    margin: 28px auto 42px;
    font-size: 14px;
    line-height: 1.45;
  }
  .store { gap: 14px; }
  .store__btn {
    width: min(100%, 300px);
    min-height: 76px;
    padding: 18px 24px;
    border-radius: 999px;
  }
  .store__logo { width: 30px; height: 30px; }
  .store__text strong { font-size: 22px; }
  .showcase {
    padding: 24px 18px 72px;
  }
  .phone {
    /* Соотношение наследуется от --screen-aspect: высоту диктует экран. */
    width: min(88vw, 400px);
    border-radius: 50px;
    padding: 8px;
  }
  .phone__screen {
    border-radius: 42px;
  }
  .phone__island {
    height: 18px;
    top: 6px;
  }
  .statements {
    gap: 72px;
    padding: 32px 20px;
  }
  .statement {
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.12;
  }
  .script-feature {
    padding: 64px 18px 72px;
  }
  .script-feature__eyebrow {
    margin-bottom: 12px;
    font-size: 13px;
  }
  .script-feature__title {
    font-size: clamp(30px, 9vw, 40px);
  }
  .script-flow {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 28px;
    text-align: left;
  }
  .script-step {
    padding: 20px;
  }
  .script-step h3 {
    font-size: 20px;
  }
  .script-step p {
    font-size: 14px;
    line-height: 1.45;
  }
  .how {
    padding: 72px 18px;
  }
  .how__grid {
    gap: 16px;
  }
  .step {
    padding: 20px;
  }
  .step h3 {
    font-size: 20px;
  }
  .step p {
    font-size: 14px;
    line-height: 1.45;
  }
  .cta {
    padding: 72px 18px 88px;
  }
  .cta__title {
    font-size: clamp(38px, 11vw, 48px);
    line-height: 1.08;
    margin-bottom: 32px;
  }
  .footer {
    padding: 32px 18px;
  }
  .footer__links {
    gap: 8px;
    font-size: 14px;
    line-height: 1.5;
  }
}

@media (max-width: 360px) {
  .nav {
    gap: 8px;
    padding: 22px 12px 0;
  }
  .nav__brand {
    font-size: 28px;
  }
  .nav__links {
    gap: 6px;
  }
  .nav__links a {
    font-size: 12px;
  }
  .lang-toggle {
    min-width: 32px;
    min-height: 26px;
    padding: 4px 7px;
    font-size: 11px;
  }
}

/* ── Accessibility: honour reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav { transform: none; opacity: 1; animation: none; }
  [data-reveal], [data-stagger] > .line { opacity: 1; transform: none; transition: none; }
}
