/* Алиф — сайт. Цвета и шрифты те же, что в приложении */
:root {
  --bg: #EDF3EF;
  --surface: #FFFFFF;
  --soft: #D6EAE3;
  --ink: #10302A;
  --muted: #4F6B64;
  --line: #CBDBD4;
  --accent: #0B6E5F;
  --accent-ink: #FFFFFF;
  --accent-deep: #08594D;
  --gold: #F2B53B;
  --gold-ink: #7A5200;
  --gold-soft: #F7E7BC;
  --shadow: 0 1px 2px rgba(16, 48, 42, .06), 0 8px 24px rgba(16, 48, 42, .08);
  --plan-bg: #10302A; --plan-ink: #EDF3EF;
  --sans: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ar: 'Scheherazade New', 'Noto Naskh Arabic', serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1C19; --surface: #132925; --soft: #17362F; --ink: #E8F2EE; --muted: #9DB6AF;
    --line: #27463F; --accent: #4CC2A9; --accent-ink: #06231E; --accent-deep: #0E4A40;
    --gold: #F1B93A; --gold-ink: #F1B93A; --gold-soft: #3A2F12; --plan-bg: #0F4F45; --plan-ink: #E8F2EE;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1C19; --surface: #132925; --soft: #17362F; --ink: #E8F2EE; --muted: #9DB6AF;
  --line: #27463F; --accent: #4CC2A9; --accent-ink: #06231E; --accent-deep: #0E4A40;
  --gold: #F1B93A; --gold-ink: #F1B93A; --gold-soft: #3A2F12; --plan-bg: #0F4F45; --plan-ink: #E8F2EE;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
[lang="ar"] { font-family: var(--ar); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 600; letter-spacing: -.015em; text-wrap: balance; }
h2 { font-size: clamp(28px, 4.2vw, 42px); }
h3 { font-size: 20px; line-height: 1.3; }
p { margin: 0; }
.lead { font-size: clamp(18px, 2vw, 20px); color: var(--muted); max-width: 34em; }
.muted { color: var(--muted); }
section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { display: grid; gap: 14px; max-width: 40em; margin-bottom: clamp(32px, 5vw, 52px); }

/* Шапка */
.top { padding: 18px 0; }
.top .wrap { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 20px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .top nav { display: none; } }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: 16px;
  font: 600 17px/1 var(--sans); text-decoration: none; border: 0; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-main { background: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 var(--accent-deep); }
.btn-main:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.btn-quiet { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-quiet:hover { border-color: var(--accent); }
.btn[aria-disabled="true"] { background: var(--soft); color: var(--muted); box-shadow: none; cursor: default; }
.btn svg { width: 20px; height: 20px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.note { font-size: 14px; color: var(--muted); }

/* Первый экран */
.hero { padding: clamp(24px, 5vw, 56px) 0 clamp(56px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(42px, 6.6vw, 76px); line-height: 1.02; letter-spacing: -.03em; margin-bottom: 22px; }
.hero .lead { margin-bottom: 30px; }
.hero .note { margin-top: 14px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Слово собирается из букв */
.stage {
  position: relative; overflow: hidden;
  border-radius: 32px; background-color: var(--accent);
  color: #fff; padding: 28px; min-height: 380px;
  display: grid; grid-template-rows: auto 1fr auto; gap: 8px;
}
:root[data-theme="dark"] .stage { background-color: #0F4F45; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stage { background-color: #0F4F45; } }
.stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.5'%3E%3Crect x='22' y='22' width='28' height='28'/%3E%3Crect x='22' y='22' width='28' height='28' transform='rotate(45 36 36)'/%3E%3Cpath d='M0 36h8M64 36h8M36 0v8M36 64v8'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
}
.stage > * { position: relative; }
.stage-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; color: rgba(255,255,255,.82); }
.word-box { position: relative; display: grid; place-items: center; min-height: 190px; }
.letters, .joined { grid-area: 1 / 1; font-family: var(--ar); line-height: 1.9; }
.letters { display: flex; direction: rtl; gap: .32em; font-size: clamp(64px, 9vw, 96px); }
.letters span { display: inline-block; }
.joined { font-size: clamp(84px, 12vw, 128px); opacity: 0; }
.meaning { font-size: 22px; font-weight: 500; opacity: 0; min-height: 1.5em; }
.stage .again {
  appearance: none; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.1); color: #fff;
  min-height: 40px; padding: 0 16px; border-radius: 12px; font: 500 15px var(--sans); cursor: pointer;
}
.stage .again:hover { background: rgba(255,255,255,.18); }
.stage-bottom { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }

.play .letters { animation: join 1.1s cubic-bezier(.6, 0, .2, 1) .5s forwards, fade-out .35s ease 1.5s forwards; }
.play .letters span { animation: drop .45s cubic-bezier(.2, .8, .3, 1.2) backwards; }
.play .letters span:nth-child(2) { animation-delay: .08s; }
.play .letters span:nth-child(3) { animation-delay: .16s; }
.play .letters span:nth-child(4) { animation-delay: .24s; }
.play .letters span:nth-child(5) { animation-delay: .32s; }
.play .joined { animation: fade-in .45s ease 1.55s forwards; }
.play .meaning { animation: fade-in .4s ease 1.9s forwards; }
@keyframes join { to { gap: 0; } }
@keyframes drop { from { opacity: 0; transform: translateY(-18px); } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { to { opacity: 1; } }
.done .letters { opacity: 0; }
.done .joined, .done .meaning { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .play .letters, .play .letters span, .play .joined, .play .meaning { animation: none; }
  .play .letters { opacity: 0; }
  .play .joined, .play .meaning { opacity: 1; }
}

/* Путь из пяти этапов */
.course .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .course .wrap { grid-template-columns: 1fr; } .course .phone { display: none; } }
.path { list-style: none; margin: 0; padding: 0; display: grid; }
.path li { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding-bottom: 30px; }
.path li:last-child { padding-bottom: 0; }
.path li::before {
  content: ""; position: absolute; left: 31px; top: 60px; bottom: 4px; width: 2px;
  background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 12px);
}
.path li:last-child::before { display: none; }
.star {
  width: 64px; height: 64px; display: grid; place-items: center;
  clip-path: polygon(50% 0%, 64.6% 14.6%, 85.4% 14.6%, 85.4% 35.4%, 100% 50%, 85.4% 64.6%, 85.4% 85.4%, 64.6% 85.4%, 50% 100%, 35.4% 85.4%, 14.6% 85.4%, 14.6% 64.6%, 0% 50%, 14.6% 35.4%, 14.6% 14.6%, 35.4% 14.6%);
  background: var(--soft); color: var(--accent);
  font: 400 30px/1 var(--ar);
}
.path li.free .star { background: var(--accent); color: var(--accent-ink); }
.path h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 8px; }
.path .weeks { font-size: 15px; font-weight: 400; color: var(--muted); }
.path p { color: var(--muted); margin-top: 4px; max-width: 32em; }
.tag { display: inline-block; font-size: 13px; font-weight: 600; line-height: 1; padding: 6px 9px; border-radius: 8px; background: var(--gold-soft); color: var(--gold-ink); }
.path .ar-title { font-family: var(--ar); font-size: 22px; font-weight: 400; color: var(--muted); }

.phone {
  border-radius: 36px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  aspect-ratio: 390 / 844;
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.course .phone { max-width: 330px; justify-self: end; position: sticky; top: 24px; }

/* Что внутри */
.inside { background: var(--surface); border-block: 1px solid var(--line); }
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.shots figure { margin: 0; display: grid; gap: 18px; align-content: start; }
.shots figcaption { display: grid; gap: 6px; }
.shots figcaption p { color: var(--muted); font-size: 16px; }
.shots .phone { box-shadow: none; border-radius: 30px; }
@media (max-width: 960px) {
  .shots { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: min(72vw, 280px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin: 0 -20px; padding-inline: 20px; scroll-padding-inline: 20px; }
  .shots figure { scroll-snap-align: start; }
}

/* Цены */
.prices { display: grid; grid-template-columns: .9fr 1.1fr; gap: 20px; align-items: stretch; }
@media (max-width: 760px) { .prices { grid-template-columns: 1fr; } }
.plan { border-radius: 28px; padding: clamp(24px, 4vw, 36px); display: grid; gap: 18px; align-content: start; }
.plan-free { border: 1.5px solid var(--line); }
.plan-premium { background: var(--plan-bg); color: var(--plan-ink); }
.plan-premium .muted, .plan-premium li { color: color-mix(in srgb, var(--plan-ink) 82%, transparent); }
.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price b { font-size: 46px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plan li { position: relative; padding-left: 30px; }
.plan li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px;
  clip-path: polygon(50% 0%, 64.6% 14.6%, 85.4% 14.6%, 85.4% 35.4%, 100% 50%, 85.4% 64.6%, 85.4% 85.4%, 64.6% 85.4%, 50% 100%, 35.4% 85.4%, 14.6% 85.4%, 14.6% 64.6%, 0% 50%, 14.6% 35.4%, 14.6% 14.6%, 35.4% 14.6%);
  background: var(--accent);
}
.plan-premium li::before { background: var(--gold); }
.yearly { display: grid; gap: 4px; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--plan-ink) 10%, transparent); }
.yearly b { color: var(--gold); font-weight: 600; }
.btn-gold { background: var(--gold); color: #10302A; justify-self: start; }
.btn-gold:hover { background: color-mix(in srgb, var(--gold) 88%, white); }
.small { font-size: 14px; }

/* Вопросы */
.faq { display: grid; gap: 10px; max-width: 780px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 56px 18px 20px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 20px 20px; color: var(--muted); display: grid; gap: 10px; }

/* Скачать */
.get .box {
  border-radius: 32px; background: var(--soft); padding: clamp(28px, 5vw, 56px);
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
}
.get .box img { width: 112px; height: 112px; border-radius: 28px; }
.get .box > div { display: grid; gap: 16px; }
@media (max-width: 640px) { .get .box { grid-template-columns: 1fr; } .get .box img { width: 84px; height: 84px; border-radius: 22px; } }

.howto { background: var(--surface); border-radius: 16px; border: 1px solid var(--line); max-width: 560px; }
.howto summary { cursor: pointer; padding: 14px 16px; font-weight: 500; font-size: 16px; }
.howto > div { padding: 0 16px 16px; color: var(--muted); font-size: 16px; display: grid; gap: 8px; }
.howto ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; }

/* Английская часть для проверяющих и иностранных гостей */
.en { background: var(--surface); border-top: 1px solid var(--line); }
.en-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; }
.en-cols > div { display: grid; gap: 10px; align-content: start; }
.en-cols p { color: var(--muted); }
.en-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 32px; font-size: 16px; }
@media (max-width: 760px) { .en-cols { grid-template-columns: 1fr; } }

/* Подвал */
footer { padding: 36px 0 48px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }
footer .copy { margin-left: auto; }
@media (max-width: 640px) { footer .copy { margin-left: 0; } }

/* Страницы условий */
.doc { padding: 24px 0 72px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); margin: 16px 0 20px; }
.doc h2 { font-size: 24px; margin: 36px 0 12px; }
.doc p, .doc li { color: var(--ink); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; display: grid; gap: 6px; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0 24px; }
.doc .back { font-size: 15px; }
