/* Палитра приложения: чёрный экран камеры, красный REC из иконки, подложки карточек
   в цветах кнопок событий. Тема одна, тёмная: светлой у камеры нет. */
:root {
  --red: #ff3b30;
  --red-text: #ff6259;     /* красный для текста: на чёрном #ff3b30 читается хуже */
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --bg: #000;
  --card: #1c1c1e;
  --line: rgba(255, 255, 255, .12);
  --bar: rgba(28, 28, 30, .8);
  --radius: 18px;
  --goal: #1b3a24;   --goal-b: #0a140d;
  --save: #16284a;   --save-b: #090f1b;
  --moment: #33194a; --moment-b: #12091b;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 17px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-text); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
/* Японский без пробелов рвётся посреди слова; auto-phrase переносит по словам (Chrome). */
:lang(ja) { word-break: auto-phrase; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 700; }
.lead { color: var(--muted); font-size: 1.15rem; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* Скриншот лежит точно под прозрачным экраном PNG-рамки. */
.shot {
  position: relative; width: 100%; aspect-ratio: 1009 / 2080;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .6));
}
.shot-screen {
  position: absolute; left: 4.1625%; top: 1.6827%;
  width: 91.5758%; height: 96.6346%; object-fit: cover;
  border-radius: 12% / 5.5%;
}
.shot-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ── Шапка: плашка плывёт островком поверх героя ─────────────── */

header.bar { position: sticky; top: 12px; z-index: 50; margin-bottom: -84px; padding: 0 12px; }
header.bar > .wrap {
  display: flex; align-items: center; gap: 16px; min-height: 60px;
  padding: 8px 10px 8px 20px; border-radius: 999px;
  background: var(--bar); border: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); font-size: 1.1rem; }
.brand img { border-radius: 9px; }
.brand:hover { text-decoration: none; }
header nav { margin-left: auto; display: flex; align-items: center; gap: 16px; }
header nav a { color: var(--text); font-weight: 550; }

/* Переключатель языка: нативный <details>, ни строчки JS. */
.lang { position: relative; }
.lang summary {
  cursor: pointer; list-style: none; font-weight: 550;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: " ▾"; color: var(--muted); }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px;
  list-style: none; padding: 6px; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px;
}
.lang li a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--text); }
.lang li a:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.lang li a[aria-current] { font-weight: 700; }

/* ── Кнопка App Store ───────────────────────────────────────── */

.cta {
  display: inline-flex; background: var(--red); color: #fff; font-weight: 650;
  padding: 15px 28px; border-radius: 999px; font-size: 1.05rem;
}
.cta:hover { text-decoration: none; opacity: .9; }
header nav a.cta { color: #fff; }
/* С официальным бейджем плашка не нужна: картинка сама себе кнопка. */
.cta:has(img) { background: none; padding: 0; }
.cta img { height: 54px; width: auto; }
.cta.small { padding: 9px 18px; font-size: .95rem; }

/* ── Герой ──────────────────────────────────────────────────── */

.hero {
  padding: 132px 0 72px;
  background: radial-gradient(ellipse 80% 60% at 75% 10%, rgba(255, 59, 48, .22), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-copy .lead { margin: 20px 0 28px; max-width: 34em; }
.hero-copy .price { color: var(--muted); margin-top: 16px; font-size: .95rem; }
.hero-shot .shot { width: min(310px, 100%); margin: 0 auto; }
.hero-shot img[data-swap] { cursor: pointer; }
/* Кадр переключают кликами: двойной клик не должен выделять картинку и текст рядом. */
.hero-shot { user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }

/* Три шага: номер в красном кружке, как кнопка REC. */
ol.steps {
  list-style: none; counter-reset: step;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px;
  margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line);
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: 14px; border-radius: 50%;
  background: var(--red); color: #fff; font-weight: 800; font-size: 1.2rem;
}
.steps h2 { font-size: 1.2rem; }
.steps p { color: var(--muted); margin-top: 6px; }

/* ── Карточки с кадрами ─────────────────────────────────────── */

section.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; }
.card {
  border-radius: 24px; padding: 28px 28px 32px;
  display: flex; flex-direction: column; gap: 8px;
}
.card:nth-child(3n + 1) { background: linear-gradient(180deg, var(--goal), var(--goal-b)); }
.card:nth-child(3n + 2) { background: linear-gradient(180deg, var(--save), var(--save-b)); }
.card:nth-child(3n + 3) { background: linear-gradient(180deg, var(--moment), var(--moment-b)); }
.card h2 { font-size: 1.35rem; }
.card p { color: var(--muted); margin-bottom: 20px; }
/* margin-top: auto прибивает телефоны к низу: заголовки у карточек разной длины. */
.card .shot { width: min(260px, 100%); margin: auto auto 0; }

/* ── Горизонтальные блоки, стороны чередуются ────────────────── */

.spotlight {
  display: grid; grid-template-columns: 300px minmax(0, 500px);
  gap: 72px; align-items: center; justify-content: center; margin-top: 120px;
}
.spotlight.flip { grid-template-columns: minmax(0, 500px) 300px; }
.spotlight.flip .shot { order: 2; }
.spotlight .lead { margin-top: 16px; }
.card .more { color: #d1d1d6; font-size: .95rem; margin-top: -12px; }
/* Пункты с заголовком; точки слева в цветах кнопок событий. */
.feats { list-style: none; margin-top: 28px; display: grid; gap: 18px; text-align: left; }
.feats li { position: relative; padding-left: 26px; }
.feats li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 12px; height: 12px; border-radius: 50%; background: var(--dot, #34c759);
}
.feats li:nth-child(5n + 2) { --dot: #0a84ff; }
.feats li:nth-child(5n + 3) { --dot: #ff9f0a; }
.feats li:nth-child(5n + 4) { --dot: #bf5af2; }
.feats li:nth-child(5n + 5) { --dot: #ff453a; }
.feats h3 { font-size: 1.05rem; }
.feats p { color: var(--muted); margin-top: 2px; }
.pro {
  display: inline-block; vertical-align: .15em; margin-left: 6px; padding: 1px 8px;
  border-radius: 99px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .02em;
}

/* ── Матч: четыре кадра одним разделом ──────────────────────── */

.match { margin-top: 120px; }
.match > h2, .match > .lead { text-align: center; max-width: 40em; margin-inline: auto; }
.match > .lead { margin-top: 16px; }
.match-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 48px; }
.match-grid .shot { width: min(240px, 100%); margin: 0 auto 24px; }
.match-grid p { color: var(--muted); margin-top: 6px; }
.match-grid .more { color: #d1d1d6; font-size: .95rem; margin-top: 10px; }

/* ── Вопросы ────────────────────────────────────────────────── */

.faq { margin-top: 120px; max-width: 860px; }
.faq > h2 { margin-bottom: 20px; }
.faq details { background: var(--card); border-radius: var(--radius); margin-bottom: 10px; }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--red-text); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > p { padding: 0 24px 22px; color: var(--muted); max-width: 68ch; }

/* ── Финальный призыв ───────────────────────────────────────── */

.cta-end {
  margin-top: 120px; padding: 88px 0; text-align: center;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(255, 59, 48, .25), transparent 70%);
}
.cta-end .lead { margin: 14px auto 28px; }

/* ── Подвал и текстовые страницы ────────────────────────────── */

.foot { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: .95rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot nav a { color: var(--muted); }

.page { padding-top: 124px; padding-bottom: 64px; max-width: 800px; }
.page h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page .lead { margin: 16px 0; }
.page .mailto { font-size: 1.2rem; font-weight: 650; margin-bottom: 36px; }
.page h2 { font-size: 1.35rem; margin: 36px 0 12px; }
.page > p { color: #d1d1d6; }
.page .faq { margin-top: 0; }
.prose p, .prose ul { margin-bottom: 14px; color: #d1d1d6; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 56px 0; }

/* ── Узкие экраны ───────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero-grid, .spotlight, .spotlight.flip { grid-template-columns: 1fr; gap: 32px; }
  .hero-copy { text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-shot .shot { width: min(252px, 100%); }
  ol.steps, section.grid { grid-template-columns: 1fr; }
  .spotlight { text-align: center; margin-top: 88px; }
  .spotlight .shot, .spotlight.flip .shot { order: 0; width: min(280px, 100%); margin: 0 auto; }
  .match { margin-top: 88px; }
  .match-grid { grid-template-columns: repeat(2, 1fr); gap: 48px 24px; }
}

@media (max-width: 600px) {
  .match-grid { grid-template-columns: 1fr; }
  .match-grid article { text-align: center; }
}

@media (max-width: 520px) {
  header.bar > .wrap { min-height: 54px; padding: 6px 8px 6px 14px; gap: 10px; }
  header nav { gap: 10px; }
  .brand span, header nav a.nav-support { display: none; }
}
