/* ============================================================
   Surfbreak landing — style.css

   Палитра взята из приложения (`Design/OceanPalette.swift`), чтобы сайт
   и экраны читались как одно целое: фон — глубина, карточки всплывают
   к поверхности, синий «current» на всём, что можно тронуть, бирюзовый
   «crest» — только на данных: цифрах, треках волн, галочках.

   Sections: tokens / base / nav / buttons / hero / phone / watch /
             section heads / features / split layouts / figures /
             steps / badges / faq / more apps / closing CTA /
             footer / legal / responsive
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #061118;
  --surface: #0C1D2E;
  --surface2: #142941;
  --surface3: #1D3852;
  --accent: #2E9BE6;
  --accent-dim: rgba(46, 155, 230, 0.15);
  --crest: #45E0C8;
  --crest-dim: rgba(69, 224, 200, 0.14);
  --tide: #FF9F0A;
  --text: #EAF2F8;
  --text2: #8AA4BC;
  --text3: #52708C;
  --on-accent: #04121C;
  --separator: rgba(255, 255, 255, 0.08);
  --radius: 20px;
  --radius-lg: 28px;
}

/* ---------- base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; line-height: 1.5;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.card.reveal {
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.25s ease;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .card.reveal, .step-card.reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 17, 24, 0.74);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--separator);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.nav-brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 14px; color: var(--text2); font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.nav-cta {
  font-size: 13px; font-weight: 600; color: var(--on-accent);
  background: var(--accent); padding: 8px 16px; border-radius: 100px;
  transition: opacity 0.2s ease;
}
.nav-links a.nav-cta:hover { color: var(--on-accent); opacity: 0.85; }

/* ---------- buttons ---------- */
.btn-store {
  display: inline-flex; align-items: center; gap: 11px;
  background: #000; border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 100px; padding: 12px 26px 12px 22px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.btn-store:hover { border-color: rgba(255, 255, 255, 0.4); transform: translateY(-1px); }
.btn-store svg { width: 26px; height: 26px; flex-shrink: 0; fill: var(--text); }
.btn-store-text { display: flex; flex-direction: column; text-align: left; line-height: 1.15; }
.btn-store-text small { font-size: 11px; font-weight: 400; color: var(--text2); letter-spacing: 0.01em; }
.btn-store-text strong { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 168px 0 40px; overflow: hidden; }
/* Копия шире картинки: заголовок в две строки, и каждая должна лечь целиком —
   «Know when to go.» переносится, если колонке дать меньше. */
.hero-grid {
  display: grid; grid-template-columns: 1.08fr 1fr;
  align-items: center; gap: 40px;
}
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--crest); margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(40px, 5.2vw, 58px); font-weight: 700;
  letter-spacing: -0.035em; line-height: 1.05; margin-bottom: 24px;
}
.hero h1 .accent { color: var(--crest); }
.hero-sub {
  font-size: 18px; color: var(--text2); line-height: 1.6;
  max-width: 44ch; margin-bottom: 36px;
}

.hero-visual { position: relative; display: flex; justify-content: center; }
.hero .container { position: relative; }

/* Фото за первым экраном.

   Не `cover`: при нём кадр ложится по ширине один в один, и сёрфер (он на 65%
   ширины снимка) оказывается ровно под левым телефоном — сюжета не видно.
   `150% auto` + позиция по правому краю растягивает кадр шире контейнера и
   уводит его влево ровно настолько, чтобы силуэт попал в просвет между текстом
   и телефонами. Исходник поэтому 2400px: при 150% на экране 1600 это 1:1.

   Две шторки поверх: горизонтальная гасит воду под текстом, вертикальная
   прячет стык с фиксированной шапкой сверху и уводит фото в цвет фона снизу,
   чтобы полоса не обрывалась линией. */
.hero-bg {
  position: absolute; inset: 0;
  background: url("../img/hero-bg.jpg") 100% 46% / 150% auto no-repeat;
  pointer-events: none;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg,
      var(--bg) 0%,
      rgba(6, 17, 24, 0.9) 24%,
      rgba(6, 17, 24, 0.42) 54%,
      rgba(6, 17, 24, 0.14) 100%),
    linear-gradient(180deg,
      var(--bg) 0%,
      rgba(6, 17, 24, 0.2) 20%,
      rgba(6, 17, 24, 0.24) 68%,
      var(--bg) 100%);
}

/* two phones side by side in the hero */
.hero-phones {
  display: flex; justify-content: center; align-items: center;
  gap: 16px; width: 100%;
}
.hero-phones .phone { width: auto; flex: 1 1 0; min-width: 0; max-width: 244px; }

/* ---------- phone ---------- */
.phone {
  position: relative; width: 300px;
  background: #0A1119;
  border: 10px solid var(--surface3);
  border-radius: 54px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 8px 24px rgba(0, 0, 0, 0.45);
}
.phone img, .phone video { display: block; width: 100%; border-radius: 44px; }
.phone::after {
  /* Dynamic Island */
  content: ""; position: absolute; top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 84px; height: 25px; border-radius: 100px;
  background: #03080C;
}

/* ---------- watch ----------
   Скриншот часов — голый экран без корпуса, поэтому корпус рисуется здесь:
   титановая рамка, колёсико и боковая кнопка справа. */
.watch {
  position: relative; width: 236px;
  background: #000;
  border: 11px solid var(--surface3);
  border-radius: 58px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 26px 64px rgba(0, 0, 0, 0.6);
}
.watch img { display: block; width: 100%; border-radius: 48px; }
/* `left: 100%` — это правый край padding-box, т.е. ПОД рамкой: без прибавки
   её толщины колёсико и кнопка просто не видны. */
.watch::before, .watch::after {
  content: ""; position: absolute; left: calc(100% + 11px);
  background: var(--surface3); border-radius: 0 3px 3px 0;
}
.watch::before { top: 24%; width: 7px; height: 46px; }
.watch::after { top: 48%; width: 5px; height: 30px; }

/* ---------- section heads ---------- */
.section-head { max-width: 620px; margin-bottom: 56px; }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head h2, .split-copy h2 {
  font-size: clamp(30px, 4.2vw, 44px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.08;
}
.section-sub {
  font-size: 17px; color: var(--text2); line-height: 1.6;
  margin-top: 16px; max-width: 52ch;
}

/* ---------- features ---------- */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.card {
  background: var(--surface); border: 1px solid var(--separator);
  border-radius: var(--radius-lg); padding: 28px;
}
.card:hover { border-color: rgba(255, 255, 255, 0.16); }
.features-grid .card:nth-child(2) { transition-delay: 0.06s; }
.features-grid .card:nth-child(3) { transition-delay: 0.12s; }
.features-grid .card:nth-child(5) { transition-delay: 0.06s; }
.features-grid .card:nth-child(6) { transition-delay: 0.12s; }
.card-icon {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--crest-dim); color: var(--crest); margin-bottom: 20px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--text2); line-height: 1.6; }

/* ---------- split layouts ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 64px;
}
.split-visual { display: flex; justify-content: center; }
.split-copy .eyebrow { margin-bottom: 14px; }
.split-sub {
  font-size: 16px; color: var(--text2); line-height: 1.65;
  margin-top: 18px; max-width: 46ch;
}
.check-list { list-style: none; margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }
.check-list li {
  position: relative; padding-left: 36px;
  font-size: 15px; color: var(--text2); line-height: 1.55;
}
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 1px;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--crest-dim);
}
.check-list li::after {
  content: ""; position: absolute; left: 6px; top: 7px;
  width: 8px; height: 4.5px;
  border-left: 1.8px solid var(--crest); border-bottom: 1.8px solid var(--crest);
  transform: rotate(-45deg);
}

/* ---------- figures (the numbers band under the forecast) ---------- */
.figures {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-top: 64px;
}
.figure {
  background: var(--surface); border: 1px solid var(--separator);
  border-radius: var(--radius); padding: 24px 22px;
}
.figures .figure:nth-child(2) { transition-delay: 0.05s; }
.figures .figure:nth-child(3) { transition-delay: 0.1s; }
.figures .figure:nth-child(4) { transition-delay: 0.15s; }
.figure b {
  display: block; font-size: 30px; font-weight: 700;
  letter-spacing: -0.03em; color: var(--crest); line-height: 1.1;
}
.figure span {
  display: block; margin-top: 8px;
  font-size: 13.5px; color: var(--text2); line-height: 1.45;
}

/* ---------- wave counting (accent section) ---------- */
.waves-section { position: relative; overflow: hidden; }
.waves-glow {
  position: absolute; top: -8%; left: 50%;
  width: 940px; height: 640px; transform: translateX(-50%);
  background: radial-gradient(ellipse,
    rgba(69, 224, 200, 0.13) 0%,
    rgba(46, 155, 230, 0.05) 44%,
    transparent 72%);
  pointer-events: none;
}
.waves-section .container { position: relative; }
.waves-split { margin-bottom: 56px; }
.waves-split .split-copy .check-list { margin-top: 0; }
.waves-notes .badge-row { margin-top: 34px; }

/* two phones side by side in a split column */
.split-pair { display: flex; align-items: center; gap: 16px; }
.split-pair .phone { width: auto; flex: 1 1 0; min-width: 0; max-width: 228px; }

.step-grid {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.step-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--separator);
  border-radius: var(--radius-lg); padding: 28px;
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.25s ease;
}
.step-card:hover { border-color: rgba(255, 255, 255, 0.16); }
.step-grid .step-card:nth-child(2) { transition-delay: 0.06s; }
.step-grid .step-card:nth-child(3) { transition-delay: 0.12s; }
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--crest); color: var(--on-accent);
  font-size: 15px; font-weight: 700; margin-bottom: 20px;
}
.step-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--text2); line-height: 1.6; }

/* ---------- badges ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.badge-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text);
  background: var(--surface2); border: 1px solid var(--separator);
  border-radius: 100px; padding: 9px 16px;
}
.badge-pill svg { width: 16px; height: 16px; color: var(--crest); }

/* ---------- faq ---------- */
.faq-list { max-width: 720px; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--separator);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}
.faq-item:hover, .faq-item[open] { border-color: rgba(255, 255, 255, 0.16); }
.faq-item summary {
  position: relative; cursor: pointer; list-style: none;
  padding: 19px 60px 19px 24px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; translate: 0 -50%;
  width: 26px; height: 26px; display: grid; place-items: center;
  font-size: 21px; font-weight: 300; color: var(--text2); line-height: 1;
  transition: rotate 0.25s ease, color 0.2s ease;
}
.faq-item[open] summary::after { rotate: 45deg; color: var(--crest); }
.faq-item p {
  padding: 0 56px 20px 24px; margin-top: -4px;
  font-size: 15px; color: var(--text2); line-height: 1.65; max-width: 62ch;
}

/* ---------- more apps (cross-promo) ---------- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.app-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--separator);
  border-radius: var(--radius);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.app-card:hover {
  background: var(--surface2);
  border-color: var(--surface3);
  transform: translateY(-2px);
}
.app-card img { width: 48px; height: 48px; border-radius: 11px; flex-shrink: 0; }
.app-card-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.app-card-info strong { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.app-card-info span { font-size: 13px; color: var(--text2); line-height: 1.45; }
.app-card .app-card-arrow {
  margin-left: auto; color: var(--text3); flex-shrink: 0;
  transition: color 0.25s ease;
}
.app-card:hover .app-card-arrow { color: var(--text); }

/* ---------- closing CTA ---------- */
.cta-final {
  position: relative; overflow: hidden; text-align: center;
  padding: 150px 0 130px;
}
/* Тот же приём на закрытии, но текст здесь по центру, поэтому шторка
   радиальная — гасит середину и отпускает края кадра.

   Кадр дронный и широкий, а полоса низкая: зумить в сёрфера бессмысленно —
   он утонет под заголовком, а вокруг останется пустая вода. Поэтому `cover`
   со сдвигом вверх (30%): поперёк полосы идёт разбивающаяся линия волны,
   справа — риф. Читается как место, а не как обои. */
.cta-bg {
  position: absolute; inset: 0;
  background: url("../img/cta-bg.jpg") center 30% / cover no-repeat;
  pointer-events: none;
}
.cta-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(58% 66% at 50% 44%,
      rgba(4, 12, 18, 0.8) 0%,
      rgba(4, 12, 18, 0.55) 58%,
      rgba(4, 12, 18, 0.32) 100%),
    linear-gradient(180deg,
      var(--bg) 0%,
      rgba(6, 17, 24, 0.15) 26%,
      rgba(6, 17, 24, 0.25) 74%,
      var(--bg) 100%);
}
.cta-final .container { position: relative; }
.cta-final h2 {
  font-size: clamp(38px, 5.4vw, 60px); font-weight: 700;
  letter-spacing: -0.035em; line-height: 1.05;
}
.cta-sub { font-size: 17px; color: var(--text2); margin: 18px 0 36px; }
.cta-final .btn-store { margin: 0 auto; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--separator); padding: 48px 0 56px; margin-top: 96px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.footer-top { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.footer-brand img { width: 26px; height: 26px; border-radius: 7px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--text2); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 8px;
  font-size: 12px; color: var(--text2);
}
.footer-bottom a { color: var(--text2); transition: color 0.2s ease; }
.footer-bottom a:hover { color: var(--text); }

/* ---------- legal & support pages ---------- */
.nav-back {
  font-size: 14px; font-weight: 500; color: var(--text2);
  transition: color 0.2s ease; white-space: nowrap;
}
.nav-back:hover { color: var(--text); }

.legal { max-width: 720px; margin: 0 auto; padding: 152px 24px 16px; }
.legal h1 {
  font-size: clamp(34px, 5vw, 48px); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.06;
}
.legal .last-updated,
.legal .page-tagline { font-size: 14px; color: var(--text2); margin-top: 14px; }
.legal .legal-intro { margin-top: 28px; }
.legal h2 {
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
  line-height: 1.25; margin: 46px 0 14px;
}
.legal p { font-size: 15px; color: var(--text2); line-height: 1.7; margin-bottom: 14px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.legal li { font-size: 15px; color: var(--text2); line-height: 1.7; }
.legal li::marker { color: var(--crest); }
.legal strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent); transition: opacity 0.2s ease; }
.legal a:hover { opacity: 0.8; }
.legal .faq-list { margin-top: 8px; }

.support-card {
  background: var(--surface); border: 1px solid var(--separator);
  border-radius: var(--radius-lg); padding: 34px 32px;
  margin: 36px 0 56px;
}
.support-card h2 { margin: 0 0 10px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.support-card p { margin-bottom: 0; }
a.btn-mail {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: var(--on-accent);
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  border-radius: 100px; padding: 13px 24px; margin-top: 22px;
  transition: opacity 0.2s ease, transform 0.25s ease;
}
a.btn-mail:hover { opacity: 0.85; transform: translateY(-1px); }
a.btn-mail svg { width: 18px; height: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .section { padding: 72px 0; }
  .nav-links a:not(.nav-cta) { display: none; }

  .hero { padding: 128px 0 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero .btn-store { margin: 0 auto; }
  .hero-visual { order: 2; }
  /* На узком экране колонки складываются в одну — кадр возвращается к cover. */
  .hero-bg { background: url("../img/hero-bg.jpg") 62% 42% / cover no-repeat; }
  .hero-bg::after { background: linear-gradient(180deg, var(--bg) 0%, rgba(6,17,24,0.72) 22%, rgba(6,17,24,0.8) 70%, var(--bg) 100%); }

  .phone { width: 264px; border-radius: 48px; }
  .phone img, .phone video { border-radius: 38px; }
  .hero-phones { gap: 12px; max-width: 460px; margin: 0 auto; }
  .hero-phones .phone { border-width: 7px; border-radius: 34px; }
  .hero-phones .phone img { border-radius: 28px; }
  .hero-phones .phone::after { width: 62px; height: 18px; top: 9px; }

  .section-head { margin-bottom: 40px; }
  .features-grid { grid-template-columns: 1fr; gap: 16px; }
  .features-grid .card { transition-delay: 0s; }

  .figures { grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 48px; }
  .figures .figure { transition-delay: 0s; }
  .figure { padding: 20px 18px; }
  .figure b { font-size: 26px; }

  .step-grid { grid-template-columns: 1fr; gap: 16px; }
  .step-grid .step-card { transition-delay: 0s; }
  .waves-glow { width: 640px; height: 500px; }

  .split { grid-template-columns: 1fr; gap: 48px; }
  .split-copy { order: 1; }
  .split-visual { order: 2; }
  .split .phone { width: 264px; }
  .split .phone img { border-radius: 38px; }

  .split-pair { gap: 12px; max-width: 440px; }
  .split-pair .phone { width: auto; border-width: 7px; border-radius: 34px; }
  .split-pair .phone img { border-radius: 28px; }
  .split-pair .phone::after { width: 62px; height: 18px; top: 9px; }

  .watch { width: 208px; border-radius: 52px; }
  .watch img { border-radius: 42px; }

  .cta-final { padding: 112px 0 96px; }
  .cta-bg::after { background: linear-gradient(180deg, var(--bg) 0%, rgba(4,12,18,0.82) 24%, rgba(4,12,18,0.86) 72%, var(--bg) 100%); }

  .footer-top, .footer-bottom { flex-direction: column; justify-content: center; }
  .footer-inner { align-items: center; text-align: center; }

  .legal { padding-top: 116px; }
  .legal h2 { margin-top: 38px; }
  .support-card { padding: 26px 24px; margin: 30px 0 44px; }
}

@media (max-width: 720px) {
  .apps-grid { grid-template-columns: 1fr; }
}
