:root {
  --bg: #fffaf3;
  --bg2: #fff1e3;
  --card: #ffffff;
  --fg: #22201d;
  --muted: #6f655c;
  --line: rgba(80, 40, 0, 0.09);
  --accent: #ff6a3d;
  --accent-h: #ff7d55;
  --sky: #2bb3ff;
  --sun: #ffc23d;
  --ok: #1d9b55;
  --shadow: 0 20px 60px rgba(255, 106, 61, 0.12);
  --radius: 28px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #120d09;
    --bg2: #1c140e;
    --card: #221913;
    --fg: #f5f5f7;
    --muted: #a1a1a6;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #ff7a50;
    --accent-h: #ff8f6b;
    --sky: #4cc2ff;
    --sun: #ffcf5c;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* навигация — стеклянная полоска, как на apple.com */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 52px; }
.logo { font-weight: 700; font-size: 17px; color: var(--fg); letter-spacing: -0.02em; }
.logo:hover { text-decoration: none; }
.logo span { color: var(--accent); }
.nav nav { display: flex; gap: 22px; margin-left: auto; font-size: 13px; }
.nav nav a { color: var(--fg); opacity: 0.8; }
.nav nav a:hover { opacity: 1; text-decoration: none; }
.nav .cta { margin-left: 8px; }
@media (max-width: 720px) { .nav nav a:not(.cta) { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #ff6a3d, #ff9a3d); color: #fff; box-shadow: 0 8px 24px rgba(255, 106, 61, 0.35); font: 600 17px/1 inherit; letter-spacing: -0.01em;
  transition: background 0.2s, transform 0.15s;
}
.btn:hover { background: linear-gradient(135deg, #ff7d55, #ffab55); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn.small { height: 32px; padding: 0 16px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn:disabled { opacity: 0.5; cursor: default; }
.link { font-size: 17px; font-weight: 500; }
.link::after { content: " ›"; }

/* первый экран */
.hero { text-align: center; padding: 72px 0 0; overflow: hidden; }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--accent); margin: 0 0 10px; }
h1 {
  font-size: clamp(48px, 9vw, 96px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 700; margin: 0;
}
h1 .grad, h2 .grad {
  background: linear-gradient(90deg, #ff6a3d, #ffb02e 45%, #2bb3ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: clamp(19px, 2.4vw, 26px); line-height: 1.35; color: var(--muted); max-width: 720px; margin: 20px auto 0; font-weight: 500; letter-spacing: -0.02em; }
.hero .actions { display: flex; gap: 18px; justify-content: center; align-items: center; margin-top: 32px; flex-wrap: wrap; }
.hero-img { margin: 56px auto 0; max-width: 1240px; padding: 0 22px; }
.hero-img img { width: 100%; border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; box-shadow: var(--shadow); }

section { padding: 110px 0; }
.alt { background: var(--bg2); }
h2 { font-size: clamp(36px, 5.6vw, 64px); line-height: 1.05; letter-spacing: -0.04em; margin: 0; font-weight: 700; text-align: center; }
.sub { text-align: center; color: var(--muted); font-size: clamp(17px, 2vw, 21px); max-width: 640px; margin: 16px auto 0; }

/* города — горизонтальная лента с прокруткой */
.cities { display: grid; grid-auto-flow: column; grid-auto-columns: min(340px, 82vw); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 48px 22px 12px; scrollbar-width: none; }
.cities::-webkit-scrollbar { display: none; }
@media (min-width: 1100px) { .cities { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; max-width: 1080px; margin: 0 auto; overflow: visible; } }
.city { scroll-snap-align: center; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--fg); display: flex; flex-direction: column; transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1); }
.city:hover { transform: translateY(-6px) scale(1.01); text-decoration: none; }
.city img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.city .body { padding: 22px 24px 26px; }
.city h3 { font-size: 26px; margin: 0; letter-spacing: -0.03em; }
.city p { color: var(--muted); margin: 6px 0 14px; font-size: 15px; }
.stats { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.stats b { display: block; font-size: 21px; color: var(--fg); letter-spacing: -0.02em; }

/* квиз */
.quiz { max-width: 760px; margin: 48px auto 0; background: var(--card); border-radius: 36px; box-shadow: var(--shadow); padding: 40px 36px; min-height: 480px; position: relative; overflow: hidden; }
@media (max-width: 600px) { .quiz { padding: 28px 20px; border-radius: 28px; } }
.progress { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-bottom: 28px; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ff6a3d, #ffb02e, #2bb3ff); border-radius: 4px; transition: width 0.5s cubic-bezier(0.2, 0.9, 0.3, 1); }
.step-n { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.q { font-size: clamp(26px, 4vw, 36px); line-height: 1.12; letter-spacing: -0.035em; font-weight: 700; margin: 8px 0 24px; }
.opts { display: grid; gap: 12px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 18px 20px; border-radius: 18px; border: 1.5px solid var(--line); background: transparent; color: var(--fg); font: 500 17px/1.3 inherit; cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.15s; }
.opt:hover { border-color: var(--accent); }
.opt:active { transform: scale(0.985); }
.opt.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.opt .e { font-size: 26px; width: 34px; text-align: center; }
.back { margin-top: 22px; background: none; border: 0; color: var(--muted); font: 500 15px inherit; cursor: pointer; padding: 0; }
.back:hover { color: var(--fg); }
.pane { animation: in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.result img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; }
.result .city-name { font-size: clamp(40px, 7vw, 64px); letter-spacing: -0.045em; font-weight: 700; margin: 6px 0 0; line-height: 1; }
.result .why { color: var(--muted); font-size: 17px; margin: 12px 0 0; }
.result .stats { margin: 18px 0 26px; }
form { display: grid; gap: 12px; }
.field { width: 100%; height: 56px; padding: 0 18px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--bg); color: var(--fg); font: 17px inherit; outline: none; transition: border-color 0.2s; }
.field:focus { border-color: var(--accent); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 12px 6px; border-radius: 14px; border: 1.5px solid var(--line); font-size: 15px; font-weight: 500; cursor: pointer; }
.seg input:checked + span { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.45; }
.consent input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }
.err { color: #e5484d; font-size: 14px; min-height: 20px; }
.done { text-align: center; padding: 40px 0; }
.done .check { width: 84px; height: 84px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 42px; margin: 0 auto 22px; animation: pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* шаги и вопросы */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.stepcard { background: var(--card); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow); }
.stepcard .n { font-size: 48px; font-weight: 700; letter-spacing: -0.04em; background: linear-gradient(135deg, #ff6a3d, #ffb02e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stepcard h3 { margin: 6px 0 8px; font-size: 22px; letter-spacing: -0.02em; }
.stepcard p { margin: 0; color: var(--muted); font-size: 15px; }
.faq { max-width: 760px; margin: 40px auto 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 22px 4px; }
.faq summary { cursor: pointer; font-size: 19px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 24px; line-height: 1; transition: transform 0.3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); margin: 12px 0 0; }

/* страница города */
.prose { max-width: 720px; margin: 0 auto; font-size: 19px; }
.prose h2 { text-align: left; font-size: clamp(28px, 4vw, 40px); margin: 56px 0 14px; }
.prose p, .prose li { color: var(--muted); }
.prose li { margin: 6px 0; }
.crumbs { font-size: 13px; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--muted); }

footer { padding: 40px 0 60px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); background: var(--bg2); }
footer .cols { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-bottom: 14px; }
footer a { color: var(--muted); }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s cubic-bezier(0.2, 0.9, 0.3, 1), transform 0.9s cubic-bezier(0.2, 0.9, 0.3, 1); }
.reveal.vis { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .pane, .done .check { animation: none; } html { scroll-behavior: auto; } }

/* плашка о cookie — снизу, стеклянная, как навигация */
.cookie { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; width: min(620px, calc(100% - 24px));
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 18px; font-size: 13px; color: var(--muted);
  background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow); border: 1px solid var(--line); }
.cookie[hidden] { display: none; }
.cookie .btn { margin-left: auto; }

/* солнечный первый экран: мягкие цветные пятна, которые медленно плывут */
.hero { position: relative; isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: 0.55; pointer-events: none; }
.hero::before { width: 520px; height: 520px; left: -140px; top: -120px; background: radial-gradient(circle, var(--sun), transparent 70%); animation: float1 14s ease-in-out infinite alternate; }
.hero::after { width: 560px; height: 560px; right: -160px; top: 120px; background: radial-gradient(circle, var(--sky), transparent 70%); animation: float2 18s ease-in-out infinite alternate; }
@keyframes float1 { to { transform: translate(80px, 60px) scale(1.1); } }
@keyframes float2 { to { transform: translate(-70px, -40px) scale(0.95); } }
.eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--sun) 28%, transparent); color: #b5520f; }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--sun); } }
.alt { background: linear-gradient(180deg, var(--bg2), color-mix(in srgb, var(--sky) 10%, var(--bg)) ); }
.stats b { background: linear-gradient(90deg, #ff6a3d, #ffb02e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.opt:hover { border-color: var(--accent); background: color-mix(in srgb, var(--sun) 10%, transparent); }
.done .check { background: linear-gradient(135deg, #2bd47d, #2bb3ff); }
.logo span { background: linear-gradient(90deg, #ff6a3d, #ffb02e); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-reduced-motion: reduce) { .hero::before, .hero::after { animation: none; } }
@media (min-width: 640px) { .cookie { flex-wrap: nowrap; } }
