:root {
  --navy: #181e2a;
  --blue: #1a8ad4;
  --blue-deep: #0a4f8c;
  --blue-soft: #e8f4ff;
  --paper: #f4f7fa;
  --surface: #ffffff;
  --ink: #181e2a;
  --muted: #3d4a5c;
  --line: #d5dee8;
  --hero-scrim: linear-gradient(90deg, rgba(24, 30, 42, 0.52) 0%, rgba(24, 30, 42, 0.16) 46%, rgba(24, 30, 42, 0.02) 70%, rgba(24, 30, 42, 0.2) 100%), linear-gradient(180deg, rgba(24, 30, 42, 0.04) 0%, rgba(24, 30, 42, 0.4) 100%);
  --shadow: 0 10px 28px rgba(24, 30, 42, 0.12);
  --header-h: 92px;
  --dock-h: 56px;
  --content: 1180px;
  --sans: "Golos Text", "Manrope", system-ui, sans-serif;
  --display: "Manrope", "Golos Text", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}

html[data-theme="dark"] {
  --paper: #12161f;
  --surface: #181e2a;
  --ink: #e8eef5;
  --muted: #b7c3d2;
  --line: #2c3544;
  --blue-soft: #10263a;
  --hero-scrim: linear-gradient(90deg, rgba(8, 12, 18, 0.78) 0%, rgba(8, 12, 18, 0.28) 48%, rgba(8, 12, 18, 0.05) 72%, rgba(8, 12, 18, 0.32) 100%), linear-gradient(180deg, rgba(8, 12, 18, 0.1) 0%, rgba(8, 12, 18, 0.42) 100%);
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body {
  margin: 0;
  min-width: 1280px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  padding-bottom: var(--dock-h);
}

img { max-width: 100%; display: block; }

button, input, textarea, select { font: inherit; color: inherit; }

a { color: var(--blue-deep); }
html[data-theme="dark"] a { color: #7ec8f0; }

::selection { background: #1a8ad4; color: #fff; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--navy);
  color: #fff;
  padding: 8px 12px;
  z-index: 80;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(var(--content), calc(100% - 80px));
  margin: 0 auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 32px;
}

.brand {
  position: relative;
  display: block;
  text-decoration: none;
}

.header .brand {
  width: 168px;
  height: 72px;
  flex: 0 0 168px;
  overflow: hidden;
}

.header .brand img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: left center;
  filter: none !important;
  image-rendering: auto;
  pointer-events: none;
}

.brand-img--light,
.brand-img--dark {
  display: block;
}

.brand-img--dark { opacity: 0; }
html[data-theme="dark"] .brand-img--light { opacity: 0; }
html[data-theme="dark"] .brand-img--dark { opacity: 1; }

.nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 28px;
  margin-left: 8px;
  flex: 1 1 auto;
  min-width: 0;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
}

.nav a:hover { color: var(--blue-deep); }
html[data-theme="dark"] .nav a:hover { color: var(--blue); }

.header-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex: 0 0 auto;
}

.theme-toggle {
  width: 92px;
  height: 40px;
  border: 0;
  padding: 3px;
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  background:
    linear-gradient(90deg, #f2c14e 0%, #f7e3a1 38%, #3b4a7a 62%, #121826 100%);
  box-shadow: inset 0 0 0 1px rgba(24, 30, 42, 0.18);
}

.theme-toggle__icons {
  position: absolute;
  inset: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.theme-toggle svg { display: block; }

.theme-toggle__knob {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(24, 30, 42, 0.28);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(0);
}

html[data-theme="dark"] .theme-toggle__knob {
  transform: translateX(52px);
  background: #1b2433;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 4px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.btn--primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); }

.btn--ghost {
  background: transparent;
  color: var(--blue-deep);
  border-color: var(--blue);
}
html[data-theme="dark"] .btn--ghost { color: #d7ecfa; }
.btn--ghost:hover { background: var(--blue-soft); }

.btn--hero {
  min-width: 200px;
  min-height: 52px;
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  font-size: 16px;
}
.btn--hero:hover { background: #0e6fb3; border-color: #0e6fb3; }

.btn--solid-navy {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn--solid-navy:hover { background: #0f141c; }

/* Hero */
.hero {
  position: relative;
  min-height: 640px;
  height: calc(100vh - var(--header-h) - 8px);
  max-height: 760px;
  overflow: hidden;
  color: #fff;
}

.hero__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 64% 52%;
  opacity: 0;
  transition: opacity 520ms ease;
  transform-origin: 68% 55%;
  animation: hero-drive 22s cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
  will-change: transform, opacity;
}

.hero__photo--summer { opacity: 1; }
html[data-theme="dark"] .hero__photo--summer { opacity: 0; }
html[data-theme="dark"] .hero__photo--winter { opacity: 1; }

@keyframes hero-drive {
  0% { transform: scale(1.04); }
  100% { transform: scale(1.09); }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: var(--hero-scrim);
}

.hero__content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 72px;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(42px, 4.6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 14px;
  max-width: 18ch;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.hero__lead {
  margin: 0 0 28px;
  max-width: 46ch;
  font-size: 18px;
  color: #e8eef5;
}

.hero__actions {
  display: flex;
  gap: 12px;
}

.icon { width: 18px; height: 18px; flex: 0 0 auto; }

/* Track band */
.track-band {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.track-band__inner {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr;
  gap: 40px;
  align-items: end;
  padding: 28px 0;
}

.track-band h2 {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}

.track-band p {
  margin: 0;
  color: var(--muted);
}

.track-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.field span,
.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  caret-color: var(--blue);
}

.input--mono { font-family: var(--mono); font-size: 15px; letter-spacing: 0.04em; }

.input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 0;
  border-color: var(--blue);
}

.demo-tracks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.chip {
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.chip:hover { border-color: var(--blue); color: var(--blue-deep); }

.note {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}

/* Ops: track / calc */
.ops-band {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.ops-anchor {
  display: block;
  height: 0;
  overflow: hidden;
}

#ops,
#calc,
#track {
  scroll-margin-top: calc(var(--header-h) + 10px);
}

.ops-tabs {
  display: flex;
  gap: 4px;
  padding-top: 6px;
  border-bottom: 1px solid var(--line);
}

.ops-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  min-height: 48px;
  padding: 0 22px;
  margin-bottom: -1px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.ops-tab:hover { color: var(--ink); }

.ops-tab[aria-selected="true"] {
  color: var(--blue-deep);
  border-bottom-color: var(--blue);
}
html[data-theme="dark"] .ops-tab[aria-selected="true"] { color: #d7ecfa; }

.ops-panel { padding-bottom: 8px; }

.calc-head {
  padding: 28px 0 8px;
}

.calc-head h2 {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}

.calc-head p {
  margin: 0;
  color: var(--muted);
}

.calc-form { padding: 0 0 28px; }

.calc-route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.swap-btn {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  cursor: pointer;
}

.swap-btn:hover {
  border-color: var(--blue);
  color: var(--blue-deep);
}

.calc-cargo {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.calc-cargo .btn { min-height: 52px; min-width: 160px; }

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%233d4a5c' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.calc-result {
  margin-top: 18px;
  padding: 18px 20px;
  background: var(--blue-soft);
  border-radius: 4px;
}

.calc-result__price {
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 6px;
}

.calc-result__meta {
  margin: 0 0 10px;
  color: var(--muted);
}

.calc-result .btn { margin-top: 8px; }

.calc-result.is-err {
  background: #fdecea;
  color: #7a1c16;
}
html[data-theme="dark"] .calc-result.is-err { background: #3a1c1a; color: #ffc9c2; }

/* Sections */
.section { padding: 72px 0 64px; }
.section--paper { background: var(--surface); }
.section h2 {
  font-family: var(--display);
  font-size: 34px;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.section .lede {
  margin: 0 0 36px;
  color: var(--muted);
  max-width: 62ch;
}

.services {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.service {
  padding: 0;
  background: none;
  border: 0;
}

.service svg {
  width: 36px;
  height: 36px;
  color: var(--blue);
  margin-bottom: 16px;
}

.service h3 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.service p {
  margin: 0;
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

.facts {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.facts dt {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

.facts dd {
  margin: 2px 0 10px;
  font-weight: 600;
}

.placeholder {
  color: var(--muted);
  font-weight: 500;
  font-style: normal;
  border-bottom: 1px dashed var(--line);
}

.request-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
}

.request-panel form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.request-panel form .field--full { grid-column: 1 / -1; }

textarea.input {
  min-height: 120px;
  padding: 12px 14px;
  resize: vertical;
}

.form-status {
  grid-column: 1 / -1;
  min-height: 1.4em;
  font-weight: 600;
}

.form-status.is-ok { color: #0e7a4a; }
html[data-theme="dark"] .form-status.is-ok { color: #7ddeb0; }
.form-status.is-err { color: #b42318; }

/* Footer */
.footer {
  position: relative;
  background: var(--navy);
  color: #d5dee8;
  padding: 48px 0 72px;
  overflow: hidden;
}

.footer a { color: #d7ecfa; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}

.footer .brand {
  width: 152px;
  height: 52px;
}
.footer .brand img { height: 52px; width: auto; max-width: 152px; }
.footer .brand-img--light { display: none; }
.footer .brand-img--dark { display: block; }

.footer h2, .footer h3 {
  color: #fff;
  font-size: 16px;
  margin: 0 0 12px;
}

.footer p { margin: 0 0 8px; }

.rule {
  height: 2px;
  width: 120px;
  background: var(--blue);
  margin: 24px 0 0;
}

.chevron {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-left: 88px solid transparent;
  border-bottom: 88px solid var(--blue);
}
.chevron::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  border-left: 54px solid transparent;
  border-bottom: 54px solid #0a4f8c;
}

/* Dock / сноска */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  height: var(--dock-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 -8px 24px rgba(24, 30, 42, 0.18);
}

.dock p { margin: 0; font-weight: 500; }
.dock .btn--primary { min-height: 36px; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.modal.is-open { display: block; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 20, 28, 0.55);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100% - 80px));
  margin: 8vh auto 0;
  background: var(--surface);
  color: var(--ink);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 28px 28px 24px;
  max-height: 82vh;
  overflow: auto;
}

.modal header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: -0.03em;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 4px;
}

.timeline { list-style: none; margin: 18px 0 0; padding: 0; }
.timeline li {
  position: relative;
  padding: 0 0 18px 22px;
  border-left: 2px solid var(--line);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}
.timeline li.is-done::before { background: var(--blue); }
.timeline li.is-now::before { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.timeline strong { display: block; }
.timeline span { color: var(--muted); font-size: 14px; }

.track-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.track-head code {
  font-family: var(--mono);
  font-size: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue-deep);
  font-weight: 700;
  font-size: 13px;
}
html[data-theme="dark"] .badge { color: #d7ecfa; }

.error-box {
  padding: 14px 16px;
  background: #fdecea;
  color: #7a1c16;
  border-radius: 4px;
}
html[data-theme="dark"] .error-box { background: #3a1c1a; color: #ffc9c2; }

body.modal-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .theme-toggle__knob,
  .btn,
  .hero__photo { transition: none; animation: none; }
}
