:root {
  --ink: #111a2e;
  --ink-soft: #1c2942;
  --paper: #f4efe6;
  --paper-2: #ebe3d6;
  --mint: #9fe0ce;
  --coral: #ff7967;
  --amber: #f6b94a;
  --white: #fffdf8;
  --line: rgba(17, 26, 46, 0.17);
  --shadow: 0 30px 90px rgba(17, 26, 46, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
body::selection { color: var(--ink); background: var(--mint); }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { color: inherit; }
.skip-link {
  position: fixed; z-index: 1000; left: 12px; top: 12px; padding: 11px 16px;
  color: var(--white); background: var(--ink); border-radius: 999px; transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }

.site-header {
  position: absolute; z-index: 20; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px;
  width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding: 22px 0;
  color: var(--white); border-bottom: 1px solid rgba(255,255,255,.22);
}
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; color: inherit; text-decoration: none; font-weight: 800; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid currentColor; border-radius: 50%; font-family: Georgia, serif; font-style: italic; }
.site-header nav { display: flex; gap: 28px; }
.site-header nav a { color: rgba(255,255,255,.78); text-decoration: none; font-size: .8rem; font-weight: 650; }
.site-header nav a:hover { color: #fff; }
.header-cta { justify-self: end; color: var(--white); text-underline-offset: 5px; font-size: .82rem; font-weight: 700; }

.hero {
  position: relative; min-height: 800px; display: grid; align-items: end; overflow: hidden;
  color: var(--white); background: var(--ink);
}
.hero-image, .hero-scrim { position: absolute; inset: 0; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-scrim { background: linear-gradient(90deg, rgba(7,14,29,.94) 0%, rgba(10,18,36,.7) 43%, rgba(10,18,36,.16) 78%), linear-gradient(0deg, rgba(10,18,36,.76), transparent 52%); }
.hero-copy { position: relative; z-index: 2; width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding: 170px 470px 92px 0; }
.kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--mint); font-size: .72rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.kicker span { width: 30px; height: 1px; background: currentColor; }
.kicker.dark { color: #4e675f; }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.055em; line-height: .96; }
h1 { max-width: 900px; font-size: clamp(4.2rem, 8.7vw, 9.2rem); }
h1 em, h2 em { color: var(--mint); font-weight: 400; }
.hero-lead { max-width: 650px; margin: 32px 0 0; color: rgba(255,255,255,.76); font-size: clamp(1rem, 1.4vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 52px; padding: 0 24px; border: 1px solid transparent; border-radius: 999px; text-decoration: none; font-weight: 780; cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--ink); background: var(--mint); }
.button-ghost { color: var(--white); border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.07); backdrop-filter: blur(12px); }
.button-dark { width: 100%; color: var(--white); background: var(--ink); }
.hero-notes { display: flex; flex-wrap: wrap; gap: 24px; margin: 44px 0 0; padding: 0; list-style: none; color: rgba(255,255,255,.65); font-size: .74rem; }
.hero-notes li::before { content: "✦"; margin-right: 8px; color: var(--amber); }

.route-preview {
  position: absolute; z-index: 3; right: max(24px, calc((100vw - 1440px)/2)); bottom: 72px;
  width: min(390px, calc(100% - 48px)); padding: 22px; color: var(--ink);
  background: rgba(255,253,248,.9); border: 1px solid rgba(255,255,255,.6); border-radius: 24px;
  box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.preview-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.preview-head span { color: #657083; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.preview-head strong { font-size: 1.35rem; }
.route-preview ol { display: grid; gap: 16px; margin: 22px 0 0; padding: 0; list-style: none; }
.route-preview li { display: grid; grid-template-columns: 54px 1fr; gap: 14px; }
.route-preview time { color: #6d7688; font-size: .72rem; }
.route-preview li div { display: grid; }
.route-preview li strong { font-size: .88rem; }
.route-preview li span { color: #6d7688; font-size: .72rem; }
.preview-line { position: absolute; left: 87px; top: 79px; bottom: 27px; width: 1px; background: rgba(17,26,46,.14); }
.preview-line i { position: absolute; left: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(255,121,103,.13); }
.preview-line i:nth-child(1){top:3px}.preview-line i:nth-child(2){top:58px;background:var(--mint)}.preview-line i:nth-child(3){top:115px;background:var(--amber)}

.intro-band { display: grid; grid-template-columns: 1fr auto auto auto; gap: 38px; align-items: center; padding: 28px max(24px, calc((100vw - 1440px)/2)); color: rgba(255,255,255,.68); background: var(--ink); }
.intro-band p { margin: 0; color: var(--white); font-family: Georgia, serif; font-size: 1.2rem; }
.intro-band span { font-size: .67rem; letter-spacing: .12em; text-transform: uppercase; }
.section { padding: 120px max(24px, calc((100vw - 1440px)/2)); }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-bottom: 58px; }
.section-heading .kicker { grid-column: 1 / -1; margin-bottom: 0; }
.section-heading h2, .rhythm h2, .ai-lab h2, .closing h2 { font-size: clamp(3rem, 6vw, 6.5rem); }
.section-heading > p:last-child { max-width: 500px; align-self: end; margin: 0; color: #64706f; font-size: 1.04rem; }
.builder { background: var(--paper); }
.builder-layout { display: grid; grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr); gap: 28px; align-items: start; }
.control-panel, .itinerary { border: 1px solid var(--line); border-radius: 26px; background: rgba(255,253,248,.62); box-shadow: 0 18px 60px rgba(17,26,46,.07); }
.control-panel { display: grid; gap: 30px; padding: 28px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend, .range-control b { margin-bottom: 13px; font-size: .72rem; font-weight: 820; letter-spacing: .08em; text-transform: uppercase; }
.city-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.city-grid input, .segmented input, .interest-grid input { position: absolute; opacity: 0; pointer-events: none; }
.city-grid label span { display: grid; padding: 16px; border: 1px solid var(--line); border-radius: 15px; cursor: pointer; transition: .2s ease; }
.city-grid small { color: #778079; }
.city-grid input:checked + span { color: var(--white); background: var(--ink); border-color: var(--ink); }
.city-grid input:focus-visible + span, .segmented input:focus-visible + span, .interest-grid input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 3px; }
.control-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.range-control { display: grid; gap: 9px; }
.range-control > span { display: flex; justify-content: space-between; gap: 10px; }
.range-control output { color: #4e675f; font-weight: 800; }
input[type="range"] { width: 100%; accent-color: var(--coral); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; background: var(--paper-2); border-radius: 999px; }
.segmented span { display: grid; place-items: center; min-height: 42px; padding: 0 10px; border-radius: 999px; cursor: pointer; font-size: .8rem; font-weight: 700; }
.segmented input:checked + span { color: var(--white); background: var(--ink); }
.interest-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.interest-grid span { display: block; padding: 10px 13px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .78rem; font-weight: 650; }
.interest-grid input:checked + span { color: var(--ink); background: var(--mint); border-color: var(--mint); }
.itinerary { position: sticky; top: 24px; padding: 30px; overflow: hidden; }
.itinerary::before { content: ""; position: absolute; top: -130px; right: -120px; width: 320px; height: 320px; border-radius: 50%; background: rgba(159,224,206,.26); filter: blur(5px); pointer-events: none; }
.itinerary-head { position: relative; display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.itinerary-head span { color: #758077; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.itinerary h3 { margin: 5px 0 0; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 400; letter-spacing: -.04em; }
.plan-score { display: grid; place-items: center; width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.45); }
.plan-score strong { font-size: 1.4rem; line-height: 1; }
.plan-score span { font-size: .55rem; }
.day-tabs { display: flex; gap: 8px; margin: 28px 0 20px; overflow-x: auto; padding: 2px; }
.day-tabs button { flex: 0 0 auto; min-width: 66px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; font-size: .72rem; font-weight: 750; }
.day-tabs button[aria-selected="true"] { color: var(--white); background: var(--ink); border-color: var(--ink); }
.plan-content { min-height: 250px; }
.plan-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.plan-item { display: grid; grid-template-columns: 68px 1fr auto; gap: 14px; align-items: center; padding: 15px 0; border-top: 1px solid var(--line); }
.plan-item time { color: #758077; font-size: .75rem; }
.plan-item div { display: grid; }
.plan-item strong { font-size: .9rem; }
.plan-item span { color: #758077; font-size: .72rem; }
.pin-stop { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--paper-2); cursor: pointer; font-size: .7rem; }
.pin-stop[aria-pressed="true"] { color: var(--white); background: var(--ink); }
.plan-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.plan-actions button { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: transparent; cursor: pointer; font-size: .7rem; font-weight: 750; }
.plan-actions button:hover { background: var(--paper-2); }
.budget-strip { margin-top: 20px; padding: 20px; border-radius: 18px; background: var(--ink); color: var(--white); }
.budget-strip > div:first-child { display: flex; justify-content: space-between; align-items: baseline; }
.budget-strip span { color: rgba(255,255,255,.67); font-size: .7rem; }
.budget-strip strong { font-size: 1.25rem; }
.budget-bar { display: flex; height: 7px; margin: 15px 0 10px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.1); }
.budget-bar i { display: block; height: 100%; transition: width .3s ease; }
.budget-bar i:nth-child(1){background:var(--coral)}.budget-bar i:nth-child(2){background:var(--mint)}.budget-bar i:nth-child(3){background:var(--amber)}
.budget-strip p { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; }
.budget-strip p span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 6px; height: 6px; border-radius: 50%; }.dot.food{background:var(--coral)}.dot.culture{background:var(--mint)}.dot.move{background:var(--amber)}
.fine-print { margin: 15px 0 0; color: #7c837c; font-size: .67rem; }

.rhythm { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 80px; color: var(--white); background: var(--ink); overflow: hidden; }
.rhythm-copy > p:last-child { max-width: 620px; margin: 30px 0 0; color: rgba(255,255,255,.62); font-size: 1.05rem; }
.rhythm-orbit { position: relative; min-height: 520px; display: grid; place-items: center; }
.rhythm-orbit > b { display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; color: var(--ink); background: var(--mint); font: italic 3rem Georgia, serif; }
.orbit { position: absolute; display: grid; place-items: start center; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; animation: orbit 22s linear infinite; }
.orbit span { padding: 6px 12px; color: var(--ink); background: var(--paper); border-radius: 999px; font-size: .66rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; transform: translateY(-50%); }
.orbit-one { width: 250px; height: 250px; }.orbit-two { width: 370px; height: 370px; animation-duration: 31s; animation-direction: reverse; }.orbit-three { width: 490px; height: 490px; animation-duration: 40s; }
@keyframes orbit { to { transform: rotate(360deg); } }

.ai-lab { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: start; background: var(--coral); }
.ai-copy .kicker { color: var(--ink); }
.ai-copy h2 { max-width: 650px; }
.ai-copy > p:not(.kicker) { max-width: 590px; margin: 28px 0; }
.ai-copy ul { display: grid; gap: 10px; padding-left: 18px; font-size: .82rem; }
.ai-console { padding: 26px; color: var(--white); background: var(--ink); border: 1px solid rgba(255,255,255,.14); border-radius: 26px; box-shadow: var(--shadow); }
.console-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.14); }
.console-top > span { display: flex; gap: 5px; }.console-top i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.35); }.console-top i:nth-child(1){background:var(--coral)}.console-top i:nth-child(2){background:var(--amber)}.console-top i:nth-child(3){background:var(--mint)}
.console-top b { font-size: .75rem; }.console-top small { justify-self: end; color: var(--mint); text-transform: uppercase; letter-spacing: .1em; }
.ai-console > label[for] { display: block; margin: 25px 0 9px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.ai-console textarea { width: 100%; padding: 15px; resize: vertical; color: var(--white); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); border-radius: 13px; }
.ai-console textarea::placeholder { color: rgba(255,255,255,.36); }
.privacy-note { margin: 8px 0 20px; color: rgba(255,255,255,.5); font-size: .68rem; }
.consent-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 16px; background: rgba(255,255,255,.055); border-radius: 13px; cursor: pointer; }
.consent-row input { margin-top: 3px; accent-color: var(--mint); }
.consent-row span { color: rgba(255,255,255,.72); font-size: .72rem; }
.provider-links { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0 0; }
.provider-links a { color: var(--mint); font-size: .68rem; text-underline-offset: 3px; }
.ai-actions { margin-top: 18px; }
.button-ai, .button-ai-ready { width: 100%; color: var(--ink); background: var(--mint); }
.button-ai:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.button-ai-ready { background: var(--amber); }
.ai-status { margin: 14px 0 0; color: rgba(255,255,255,.58); font-size: .72rem; }
.ai-result { max-height: 440px; margin-top: 18px; padding: 18px; overflow: auto; white-space: pre-wrap; color: #dfeee9; background: #0a1223; border: 1px solid rgba(159,224,206,.28); border-radius: 14px; font: .82rem/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; }
.ai-result::before { content: "AI-МАРШРУТ / "; display: block; margin-bottom: 10px; color: var(--mint); font-weight: 800; letter-spacing: .1em; }

.closing { text-align: center; background: var(--paper-2); }
.closing .kicker { justify-content: center; }
.closing h2 { margin-bottom: 35px; }
.closing h2 em { color: #4e675f; }
.closing .button { width: auto; }
footer { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 30px; align-items: center; padding: 38px max(24px, calc((100vw - 1440px)/2)); color: rgba(255,255,255,.64); background: #0b1222; font-size: .74rem; }
footer p { margin: 0; text-align: center; } footer > a:last-child { justify-self: end; color: var(--mint); }
.footer-brand { color: var(--white); }

@media (max-width: 1040px) {
  .site-header { grid-template-columns: 1fr auto; }.site-header nav { display: none; }
  .hero-copy { padding-right: 0; padding-bottom: 430px; }.route-preview { left: 24px; right: auto; }
  .section-heading, .builder-layout, .rhythm, .ai-lab { grid-template-columns: 1fr; }
  .itinerary { position: relative; top: 0; }.rhythm-orbit { min-height: 500px; }
}
@media (max-width: 700px) {
  .site-header { width: calc(100% - 32px); padding-top: 16px; }.header-cta { display: none; }
  .hero { min-height: 930px; }.hero-copy { width: calc(100% - 32px); padding-top: 130px; padding-bottom: 420px; }
  h1 { font-size: clamp(3.3rem, 16vw, 5.7rem); }.hero-lead { font-size: .95rem; }.hero-notes { gap: 10px 18px; }
  .route-preview { bottom: 30px; left: 16px; width: calc(100% - 32px); }
  .intro-band { grid-template-columns: 1fr; gap: 8px; }.intro-band span { display: none; }
  .section { padding-top: 82px; padding-bottom: 82px; }.section-heading { margin-bottom: 36px; }.section-heading h2, .rhythm h2, .ai-lab h2, .closing h2 { font-size: clamp(2.7rem, 13vw, 4.8rem); }
  .control-panel, .itinerary, .ai-console { padding: 20px; border-radius: 20px; }.city-grid, .control-row { grid-template-columns: 1fr; }.segmented span { font-size: .7rem; }
  .plan-item { grid-template-columns: 54px 1fr auto; gap: 8px; }.rhythm { gap: 20px; }.rhythm-orbit { min-height: 350px; transform: scale(.72); }
  .ai-lab { gap: 35px; }.console-top { grid-template-columns: 1fr auto; }.console-top b { display: none; }
  footer { grid-template-columns: 1fr; } footer p { text-align: left; } footer > a:last-child { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .site-header, .hero, .intro-band, .section-heading, .control-panel, .rhythm, .ai-lab, .closing, footer, .plan-actions { display: none !important; }
  body, .builder { background: #fff; }
  .section { padding: 0; }
  .builder-layout { display: block; }
  .itinerary { position: static; border: 0; box-shadow: none; }
}
