:root {
  --paper: #F7FBFE;
  --paper-soft: #E7F1F9;
  --ink: #182129;
  --ink-soft: #4A5560;
  --indigo: #014076;
  --indigo-deep: #013059;
  --teal: #308FD3;
  --teal-deep: #2672A9;
  --line: #D7E6F1;
  --white: #FFFFFF;
  --body-bg: linear-gradient(180deg, #E4F1FB 0px, #FBFDFF 480px, #FFFFFF 880px);
  --radius-s: 4px;
  --radius-m: 10px;
  --maxw: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12181D;
    --paper-soft: #182027;
    --ink: #EDE7D6;
    --ink-soft: #AAB3B9;
    --indigo: #6FB3E0;
    --indigo-deep: #013059;
    --teal: #308FD3;
    --teal-deep: #57A6DE;
    --line: #2A343C;
    --white: #1A2129;
    --body-bg: var(--paper);
  }
}
:root[data-theme="dark"] {
  --paper: #12181D;
  --paper-soft: #182027;
  --ink: #EDE7D6;
  --ink-soft: #AAB3B9;
  --indigo: #6FB3E0;
  --indigo-deep: #013059;
  --teal: #308FD3;
  --teal-deep: #57A6DE;
  --line: #2A343C;
  --white: #1A2129;
  --body-bg: var(--paper);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(76px + env(safe-area-inset-top, 0px));
}
body {
  margin: 0;
  background: var(--body-bg);
  color: var(--ink);
  font-family: 'PT Sans', 'Segoe UI', Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
h1, h2, h3 { font-family: 'PT Serif', Georgia, 'Times New Roman', serif; font-weight: 700; margin: 0; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } .wrap { padding: 0 20px; } }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 52px; width: auto; display: block; }
@media (max-width: 380px) { .brand img { height: 42px; } }
.nav-links { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links li { flex-shrink: 0; }
.nav-links a { text-decoration: none; font-size: 15px; color: var(--ink-soft); border-bottom: 1px solid transparent; padding-bottom: 3px; transition: color .15s, border-color .15s; white-space: nowrap; }
.nav-links a:hover { color: var(--indigo); border-color: var(--teal); }
.nav-cta { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.nav-phone { font-size: 15px; text-decoration: none; color: var(--ink); font-weight: 700; white-space: nowrap; }
.nav-toggle { display: none; }
@media (max-width: 1200px) {
  .nav-links { display: none; }
  .nav-phone { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: var(--radius-s);
    border: 1px solid var(--line); background: transparent; color: var(--ink);
    cursor: pointer;
  }
}
/* На телефонах даже дропдаун языка + CTA-кнопка рядом с гамбургером не
   помещаются нормально (а на самых узких экранах реально ломают вёрстку
   горизонтальным скроллом) — убираем их из шапки, оба остаются доступны
   в выпадающем меню (.mobile-menu) ниже. */
.mobile-menu-cta { display: none; }
@media (max-width: 480px) {
  .nav-cta .lang-dropdown, .nav-cta .nav-cta-btn { display: none; }
  .nav-cta { gap: 10px; }
  .mobile-menu-cta { display: block; }
}
.mobile-menu {
  display: none; flex-direction: column; gap: 2px; padding: 10px 0 20px;
  border-bottom: 1px solid var(--line); background: var(--paper);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { text-decoration: none; color: var(--ink); padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 16px; }
.mobile-menu .mobile-menu-cta { display: none; }
@media (max-width: 480px) { .mobile-menu .mobile-menu-cta { display: block; } }
.mobile-menu .mobile-menu-cta,
.mobile-menu .mobile-menu-cta:hover { color: #fff; text-align: center; border-bottom: none !important; margin: 6px 0 14px; padding: 14px !important; }
.mobile-menu a:last-child { border-bottom: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'PT Sans', sans-serif; font-weight: 700; font-size: 15.5px;
  padding: 15px 26px; border-radius: var(--radius-s); text-decoration: none;
  border: 1px solid transparent; cursor: pointer; line-height: 1;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 100px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 44px; } .hero { padding: 44px 0 60px; } }
.eyebrow-line { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--teal-deep); font-weight: 700; font-size: 14.5px; }
.eyebrow-line .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.hero h1 { font-size: 50px; line-height: 1.12; letter-spacing: -0.3px; color: var(--indigo-deep); }
:root[data-theme="dark"] .hero h1, :root:not([data-theme="light"]) .hero h1 { color: var(--ink); }
@media (max-width: 900px) { .hero h1 { font-size: 36px; } }
.hero-sub { margin-top: 22px; font-size: 19px; color: var(--ink-soft); max-width: 46ch; }
.hero-ctas { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: 20px; font-size: 14px; color: var(--ink-soft); }

.route-art { width: 100%; height: auto; }
/* В одноколоночном hero (см. .hero-grid ниже) SVG иначе растягивается на всю
   ширину контейнера и становится непропорционально огромным на планшетах —
   ограничиваем и центрируем. */
@media (max-width: 900px) { .route-art { max-width: 380px; margin: 0 auto; display: block; } }
.route-art .city-label { font-family: 'PT Sans', sans-serif; font-size: 14px; font-weight: 700; fill: var(--ink); }
.route-art .city-sub { font-family: 'PT Sans', sans-serif; font-size: 11px; fill: var(--ink-soft); }
.route-art .route-line { fill: none; stroke: var(--teal); stroke-width: 2; stroke-dasharray: 1 8; stroke-linecap: round; }
.route-art .route-dot-outer { fill: var(--paper); stroke: var(--teal); stroke-width: 2; }
.route-art .route-dot-inner { fill: var(--teal); }
.route-art .route-dot-outer.hub { stroke: var(--indigo); }
.route-art .route-dot-inner.hub { fill: var(--indigo); }

/* ---------- Trust strip ---------- */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 34px 28px; }
@media (max-width: 760px) { .trust .wrap { grid-template-columns: repeat(2, 1fr); } }
.trust-item { text-align: center; }
.trust-item strong { display: block; font-family: 'PT Serif', serif; font-size: 26px; color: var(--indigo); }
:root[data-theme="dark"] .trust-item strong, :root:not([data-theme="light"]) .trust-item strong { color: var(--teal); }
.trust-item span { font-size: 13.5px; color: var(--ink-soft); }

/* ---------- Section headers ---------- */
.section-head { max-width: 620px; margin-bottom: 52px; }
.section-head h2 { font-size: 34px; color: var(--indigo-deep); }
:root[data-theme="dark"] .section-head h2, :root:not([data-theme="light"]) .section-head h2 { color: var(--ink); }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 17px; }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }
.service { background: var(--paper); padding: 34px 28px; }
.service .num { font-family: 'PT Serif', serif; font-size: 15px; color: var(--teal); margin-bottom: 18px; }
.service h3 { font-size: 19px; margin-bottom: 10px; color: var(--ink); }
.service p { font-size: 15px; color: var(--ink-soft); }

/* ---------- Fleet ---------- */
.fleet-group { margin-bottom: 40px; }
.fleet-group:last-of-type { margin-bottom: 0; }
.fleet-group-title {
  font-family: 'PT Sans', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--teal-deep); margin-bottom: 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.fleet-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .fleet-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .fleet-cards { grid-template-columns: 1fr; } }
.fleet-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 22px 20px;
}
.fleet-card-top { display: flex; align-items: baseline; gap: 7px; margin-bottom: 14px; }
.fleet-seats-num { font-family: 'PT Serif', serif; font-size: 34px; color: var(--indigo); line-height: 1; }
.fleet-seats-num-range { font-size: 22px; }
:root[data-theme="dark"] .fleet-seats-num, :root:not([data-theme="light"]) .fleet-seats-num { color: var(--teal); }
.fleet-seats-label { font-size: 13px; color: var(--ink-soft); }
.fleet-card-name { font-weight: 700; font-size: 15.5px; margin-bottom: 4px; line-height: 1.3; }
.fleet-card-year { font-size: 13px; color: var(--ink-soft); }
.fleet-note { margin-top: 28px; font-size: 14.5px; color: var(--ink-soft); }

/* ---------- Routes / destinations ---------- */
.routes-band { background: var(--indigo-deep); color: #F3EFE2; }
.routes-band .section-head h2,
:root .routes-band .section-head h2,
:root:not([data-theme="light"]) .routes-band .section-head h2,
:root[data-theme="dark"] .routes-band .section-head h2,
.routes-band .section-head p { color: #F3EFE2; }
.routes-band .section-head p { opacity: .78; }
.ticket-row { display: flex; flex-wrap: wrap; gap: 14px; }
.ticket {
  flex: 1 1 200px; border: 1px dashed rgba(255,255,255,.35); border-radius: var(--radius-m);
  padding: 22px 20px; position: relative;
}
.ticket .from { font-size: 12.5px; letter-spacing: .5px; opacity: .65; margin-bottom: 10px; }
.ticket .to { font-family: 'PT Serif', serif; font-size: 22px; }
.ticket .to small { display: block; font-family: 'PT Sans', sans-serif; font-size: 12.5px; opacity: .65; margin-top: 6px; font-weight: 400; }
.routes-cta { margin-top: 44px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.routes-cta p { opacity: .8; font-size: 15px; max-width: 40ch; }

/* ---------- Process ---------- */
.process-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; }
@media (max-width: 900px) { .process-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process-list { grid-template-columns: 1fr; } }
.process-item .step-no { font-family: 'PT Serif', serif; font-size: 34px; color: var(--teal); line-height: 1; }
:root[data-theme="dark"] .process-item .step-no, :root:not([data-theme="light"]) .process-item .step-no { color: var(--teal); }
.process-item h3 { font-size: 18px; margin: 14px 0 8px; }
.process-item p { font-size: 15px; color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
.contact-info h2 { font-size: 32px; color: var(--indigo-deep); }
:root[data-theme="dark"] .contact-info h2, :root:not([data-theme="light"]) .contact-info h2 { color: var(--ink); }
.contact-info p { margin-top: 16px; color: var(--ink-soft); font-size: 16.5px; max-width: 42ch; }
.contact-methods { margin-top: 32px; display: flex; flex-direction: column; gap: 18px; }
.contact-method { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.contact-method .icon { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-method strong { display: block; font-size: 16px; }
.contact-method span { font-size: 13.5px; color: var(--ink-soft); }

.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 36px; }
@media (max-width: 480px) { .form-card { padding: 26px 22px; } }

/* ---------- Форма обратной связи в модалке (мобильные/планшеты) ---------- */
.contact-form-trigger { display: none; margin-top: 28px; }
.form-modal-close { display: none; }
@media (max-width: 860px) {
  .contact-form-trigger { display: inline-flex; }
  .form-card {
    position: fixed; inset: 0; z-index: 100; padding: 0; border: none; border-radius: 0;
    background: rgba(10, 24, 36, .55); display: none; align-items: flex-end; justify-content: center;
  }
  .form-card.open { display: flex; }
  .form-card #contactForm {
    position: relative; background: var(--white); width: 100%; max-width: 480px;
    border-radius: 18px 18px 0 0; padding: 30px 24px calc(24px + env(safe-area-inset-bottom, 0px));
    max-height: 88vh; overflow-y: auto; animation: sheet-up .22s ease;
  }
  .form-modal-close {
    display: flex; position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
    align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line);
    background: var(--paper); color: var(--ink-soft); cursor: pointer; z-index: 2;
  }
  .form-modal-close:hover { color: var(--teal); border-color: var(--teal); }
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 7px; color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%; font-family: 'PT Sans', sans-serif; font-size: 15.5px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--paper);
  color: var(--ink);
}
.field input { text-overflow: ellipsis; }
@media (max-width: 400px) { .field input, .field textarea { font-size: 14.5px; } }
.field input:focus, .field textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.field textarea { resize: vertical; min-height: 96px; font-family: inherit; }
.form-hint { margin-top: 14px; font-size: 13px; color: var(--ink-soft); text-align: center; }

/* ---------- Footer ---------- */
footer { background: var(--indigo-deep); color: #EDE7D6; padding: 56px 0 calc(30px + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px; }
.footer-brand { font-family: 'PT Serif', serif; font-size: 22px; }
.footer-brand + p { margin-top: 10px; opacity: .7; font-size: 14.5px; max-width: 32ch; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col h4 { font-size: 13px; letter-spacing: .4px; opacity: .6; margin-bottom: 14px; font-family: 'PT Sans', sans-serif; }
.footer-col a, .footer-col span { display: block; text-decoration: none; color: #EDE7D6; font-size: 14.5px; margin-bottom: 9px; opacity: .9; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(237,231,214,.15); font-size: 13px; opacity: .55; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ---------- Language dropdown ---------- */
.lang-dropdown { position: relative; flex-shrink: 0; }
.lang-current {
  display: flex; align-items: center; gap: 7px;
  font-family: 'PT Sans', sans-serif; font-size: 14px; font-weight: 700;
  padding: 8px 10px; border-radius: var(--radius-s); border: 1px solid var(--line);
  background: transparent; color: var(--ink); cursor: pointer;
}
.lang-current:hover { border-color: var(--teal); }
.lang-current .lang-caret { transition: transform .15s ease; flex-shrink: 0; }
.lang-dropdown.open .lang-current .lang-caret { transform: rotate(180deg); }
.lang-menu {
  list-style: none; margin: 0; padding: 6px; position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: 0 10px 28px rgba(1,48,89,.14); min-width: 168px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 70;
}
.lang-dropdown.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li { margin: 0; }
.lang-menu button {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  font-family: 'PT Sans', sans-serif; font-size: 14.5px; padding: 9px 10px; border-radius: 6px;
  border: none; background: transparent; color: var(--ink); cursor: pointer;
}
.lang-menu button:hover { background: var(--paper-soft); }
.lang-menu button.active { color: var(--teal); font-weight: 700; }
.mobile-menu .lang-dropdown { margin-top: 14px; display: none; }
@media (max-width: 480px) { .mobile-menu .lang-dropdown { display: block; } }
.mobile-menu .lang-menu { right: auto; left: 0; }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px;
  right: calc(22px + env(safe-area-inset-right, 0px));
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--teal); color: #fff; border: 2px solid #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(1,64,118,.35);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s, background .15s;
  z-index: 60;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--teal-deep); }

/* ---------- Per-field clear icon ---------- */
.field-input-wrap { position: relative; }
.field-input-wrap input, .field-input-wrap textarea { padding-right: 36px; }
.field-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border: none; background: transparent; color: var(--ink-soft);
  align-items: center; justify-content: center; cursor: pointer; border-radius: 4px; padding: 0;
  display: none;
}
.field-input-wrap.field-textarea .field-clear { top: 12px; transform: none; }
.field-input-wrap.has-value .field-clear { display: flex; }
.field-clear:hover { color: var(--teal); background: var(--paper-soft); }

.footer-about { max-width: 320px; }
body.modal-open { overflow: hidden; }


/* ---------- Доступность и мелочи ---------- */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.routes-band :focus-visible, footer :focus-visible { outline-color: #fff; }
@media (min-width: 1201px) { .mobile-menu, .mobile-menu.open { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
