/* ==========================================================================
   MKM Student — «карта маршрутов»
   Палитра: чернильный синий, кобальт, шафран на холодной бумаге
   ========================================================================== */

:root {
  --ink: #0B1B3F;
  --ink-2: #13285A;
  --ink-3: #1D3672;
  --cobalt: #2442D6;
  --cobalt-soft: #7F95F0;
  --saffron: #F4B42A;
  --paper: #F3F5F8;
  --paper-2: #E7ECF4;
  --white: #FFFFFF;
  --slate: #4B5878;
  --line: #D3DBE8;
  --on-ink: #EEF2FA;
  --on-ink-muted: #9AABD0;
  --on-ink-line: rgba(238, 242, 250, .14);

  --f-display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 22px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

::selection { background: var(--saffron); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--on-ink);
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
  transition: top .2s;
}
.skip:focus { top: 16px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.accent { color: var(--saffron); }

/* --- Типографика ------------------------------------------------------- */

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cobalt);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
}
.eyebrow-light { color: var(--saffron); }

.h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  margin-bottom: 26px;
}

.muted { color: var(--slate); max-width: 46ch; }

/* --- Кнопки ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn span { transition: transform .3s var(--ease); }
.btn:hover span { transform: translate(2px, -2px); }

.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--cobalt); }

.btn-ghost { border-color: var(--line); background: rgba(255,255,255,.6); }
.btn-ghost:hover { border-color: var(--ink); background: var(--white); }

.btn-text { padding: 0 6px; }
.btn-text:hover span { transform: translateY(3px); }
.btn-text:hover { color: var(--cobalt); }

/* --- Шапка ------------------------------------------------------------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.site-header.is-scrolled {
  background: rgba(243, 245, 248, .82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.logo-mark {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -.06em;
  line-height: 1;
}
.logo-mark i { font-style: normal; color: var(--saffron); }
.logo-sub {
  font-size: 10.5px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--slate);
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.nav {
  margin-left: auto;
  display: flex; gap: 6px;
}
.nav a {
  text-decoration: none;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background .2s;
}
.nav a:hover { background: var(--paper-2); }

.header-cta { min-height: 42px; padding: 0 18px; }

/* --- Hero -------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(28px, 6vh, 72px));
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(36, 66, 214, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(36, 66, 214, .07) 1px, transparent 1px);
  background-size: 96px 96px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, #000 30%, transparent 80%);
  pointer-events: none;
}

.hero-meta {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: clamp(24px, 4vh, 44px);
}
.hero-meta > span:nth-child(2) { flex: 1 1 0; min-width: 0; }
.hero-coords { margin-left: auto; opacity: .75; }

.dot-live {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--saffron);
  box-shadow: 0 0 0 0 rgba(244, 180, 42, .6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(244, 180, 42, .55); }
  70% { box-shadow: 0 0 0 10px rgba(244, 180, 42, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 180, 42, 0); }
}

.hero-title {
  position: relative;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.6vw, 5.1rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.hero-title .line { display: block; }
.line-board {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: .25em .4em;
  margin-top: .14em;
}
.hero-lead { white-space: nowrap; }

/* --- Табло с перекидными буквами --------------------------------------- */

.board {
  --tw: clamp(27px, 4.3vw, 64px);
  --th: calc(var(--tw) * 1.34);
  --gap: clamp(3px, .45vw, 6px);
  display: inline-flex;
  gap: var(--gap);
  padding: calc(var(--gap) * 1.4);
  background: #071230;
  border-radius: calc(var(--tw) * .2);
  box-shadow: 0 30px 60px -30px rgba(11, 27, 63, .55), inset 0 0 0 1px rgba(255,255,255,.04);
  letter-spacing: 0;
}

.tile {
  position: relative;
  width: var(--tw);
  height: var(--th);
  border-radius: calc(var(--tw) * .1);
  perspective: calc(var(--tw) * 8);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: calc(var(--tw) * .78);
  color: var(--on-ink);
}
.tile.is-blank { color: transparent; }

.half,
.flap {
  position: absolute; left: 0; right: 0;
  height: 50%;
  overflow: hidden;
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
}
.half.top, .flap.top {
  top: 0;
  border-radius: calc(var(--tw) * .1) calc(var(--tw) * .1) 0 0;
}
.half.bottom, .flap.bottom {
  bottom: 0;
  border-radius: 0 0 calc(var(--tw) * .1) calc(var(--tw) * .1);
  background: linear-gradient(180deg, var(--ink-2), #102352);
}
.half span,
.flap span {
  display: block;
  height: var(--th);
  line-height: var(--th);
  text-align: center;
}
.half.bottom span,
.flap.bottom span { transform: translateY(-50%); }

.tile::after { /* шарнир */
  content: "";
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px;
  background: #050d24;
  z-index: 3;
}

.flap { z-index: 2; backface-visibility: hidden; }
.flap.top { transform-origin: 50% 100%; }
.flap.bottom { transform-origin: 50% 0; transform: rotateX(90deg); }

.tile.is-flipping .flap.top { animation: flapTop var(--flip, 90ms) ease-in forwards; }
.tile.is-flipping .flap.bottom { animation: flapBottom var(--flip, 90ms) ease-out var(--flip, 90ms) forwards; }

@keyframes flapTop {
  to { transform: rotateX(-90deg); filter: brightness(.6); }
}
@keyframes flapBottom {
  from { transform: rotateX(90deg); filter: brightness(1.4); }
  to { transform: rotateX(0); filter: brightness(1); }
}

.tile.is-blank .half,
.tile.is-blank .flap { background: linear-gradient(180deg, #172c62, #11234f); }

/* --- Тело hero --------------------------------------------------------- */

.hero-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
  margin-top: clamp(36px, 6vh, 64px);
  padding-bottom: clamp(36px, 6vh, 64px);
}

.lede {
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.6;
  color: var(--slate);
  max-width: 44ch;
  margin-bottom: 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }

.hero-photo { position: relative; }
.photo-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 30%, rgba(244, 180, 42, .35), transparent 40%),
    linear-gradient(135deg, var(--cobalt), var(--ink));
}
.photo-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 1.6s var(--ease);
}
.is-loaded .photo-frame img { transform: scale(1); }

.ticket {
  position: absolute;
  left: clamp(-36px, -2.4vw, -12px);
  bottom: -28px;
  display: grid;
  grid-template-columns: auto auto;
  gap: 6px 26px;
  align-items: end;
  padding: 16px 22px 16px 22px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 24px 50px -24px rgba(11, 27, 63, .45);
  max-width: min(420px, 90%);
  /* перфорация */
  -webkit-mask: radial-gradient(circle 7px at calc(100% - 92px) 0, transparent 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 7px at calc(100% - 92px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle 7px at calc(100% - 92px) 0, transparent 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 7px at calc(100% - 92px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}
.ticket-label {
  grid-column: 1 / -1;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--slate);
}
.ticket-text {
  font-family: var(--f-display);
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.ticket-route {
  font-family: var(--f-mono);
  font-size: 13px;
  white-space: nowrap;
  padding-left: 18px;
  border-left: 1px dashed var(--line);
  color: var(--slate);
}
.ticket-route b { color: var(--ink); font-weight: 500; }

/* --- Строка кодов ------------------------------------------------------ */

.codes {
  position: relative;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .5);
}
.codes-inner {
  display: flex; align-items: stretch;
  gap: 18px;
}
.codes-label {
  flex: none;
  display: flex; align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--slate);
  padding-right: 18px;
  border-right: 1px solid var(--line);
}
.codes-list {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
}
.codes-list li {
  position: relative;
  padding: 16px 8px 14px;
  display: flex; flex-direction: column; gap: 2px;
  transition: color .4s;
  color: var(--slate);
}
.codes-list li::before {
  content: "";
  position: absolute; left: 8px; right: 8px; top: -1px;
  height: 2px;
  background: var(--saffron);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.codes-list b {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .04em;
}
.codes-list span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.codes-list li.is-active { color: var(--ink); }
.codes-list li.is-active::before { transform: scaleX(1); }

/* --- Секции ------------------------------------------------------------ */

.section { padding: clamp(80px, 12vw, 150px) 0; }

/* Ценность */
.value-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}
.value-head { position: sticky; top: calc(var(--header-h) + 32px); }

.note {
  display: flex; gap: 14px;
  margin-top: 36px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--slate);
  max-width: 46ch;
}
.note-mark {
  flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--saffron); color: var(--ink);
  font-family: var(--f-mono); font-weight: 500; font-size: 13px;
}

.value-list { border-top: 1px solid var(--line); }
.value-list li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 14px 40px;
  padding: 30px 8px 30px 0;
  border-bottom: 1px solid var(--line);
}
.value-list li::before {
  content: "";
  position: absolute; left: 0; bottom: -1px;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease);
}
.value-list li:hover::before { transform: scaleX(1); }
.value-list h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.2;
  letter-spacing: -.03em;
  transition: color .3s;
}
.value-list li:hover h3 { color: var(--cobalt); }
.value-list p { color: var(--slate); font-size: 15.5px; }

/* О нас */
.about { background: var(--white); }
.statement {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.6vw, 2.25rem);
  line-height: 1.22;
  margin-top: clamp(28px, 4vw, 48px);
  letter-spacing: -.035em;
  max-width: 1100px;
}
.statement .w { transition: color .35s; color: #C5CEDF; }
.statement .w.is-on { color: var(--ink); }

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
  margin-top: clamp(56px, 8vw, 110px);
}
.principles > div { padding-top: 22px; border-top: 2px solid var(--ink); }
.principles h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}
.principles p { color: var(--slate); font-size: 15.5px; }

/* --- География --------------------------------------------------------- */

.geo {
  background: var(--ink);
  color: var(--on-ink);
  position: relative;
  overflow: hidden;
}
.geo::before {
  content: "";
  position: absolute; inset: auto -10% -40% auto;
  width: 70vw; height: 70vw;
  background: radial-gradient(circle, rgba(36, 66, 214, .35), transparent 60%);
  pointer-events: none;
}
.geo .wrap { position: relative; }

.geo-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px;
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.geo-intro { color: var(--on-ink-muted); max-width: 42ch; }

.geo-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

.chart {
  border: 1px solid var(--on-ink-line);
  border-radius: var(--radius);
  background: rgba(7, 18, 48, .55);
  padding: clamp(10px, 1.6vw, 20px);
}
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-caption {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--on-ink-muted);
  padding: 10px 6px 2px;
}

.graticule line { stroke: rgba(238, 242, 250, .07); stroke-width: 1; }
.graticule text {
  font-family: var(--f-mono);
  font-size: 14px;
  fill: rgba(238, 242, 250, .3);
}
.regions text {
  font-family: var(--f-display);
  font-size: 19px;
  letter-spacing: .16em;
  text-transform: uppercase;
  fill: rgba(238, 242, 250, .09);
}

.route {
  fill: none;
  stroke: var(--cobalt-soft);
  stroke-width: 1.4;
  stroke-opacity: .42;
  stroke-linecap: round;
  transition: stroke .3s, stroke-opacity .3s, stroke-width .3s;
}
.route.is-active {
  stroke: var(--saffron);
  stroke-opacity: 1;
  stroke-width: 2.4;
}
.route-dash {
  fill: none;
  stroke: var(--saffron);
  stroke-width: 2.4;
  stroke-dasharray: 2 12;
  stroke-linecap: round;
  opacity: 0;
}
.route-dash.is-active { opacity: 1; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -28; } }

.city { cursor: pointer; }
.city circle.dot { fill: var(--on-ink); transition: fill .3s, r .3s; }
.city circle.ring { fill: none; stroke: var(--saffron); stroke-width: 1.5; opacity: 0; transition: opacity .3s; }
.city text {
  font-family: var(--f-mono);
  font-size: 18px;
  font-weight: 500;
  fill: var(--on-ink-muted);
  transition: fill .3s;
}
.city:hover text, .city:focus-visible text { fill: var(--on-ink); }
.city.is-active circle.dot { fill: var(--saffron); }
.city.is-active circle.ring { opacity: 1; animation: ring 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.city.is-active text { fill: var(--saffron); }
.city:focus { outline: none; }
.city:focus-visible circle.dot { stroke: var(--white); stroke-width: 2; }
@keyframes ring {
  from { transform: scale(.6); opacity: 1; }
  to { transform: scale(2.2); opacity: 0; }
}

.hub circle.core { fill: var(--saffron); }
.hub circle.halo { fill: rgba(244, 180, 42, .14); stroke: rgba(244, 180, 42, .5); stroke-width: 1; }
.hub text { font-family: var(--f-mono); font-size: 18px; font-weight: 500; fill: var(--saffron); }
.hub text.sub { font-family: var(--f-body); font-size: 16px; font-weight: 400; fill: var(--on-ink-muted); }

/* Отрисовка маршрутов при появлении */
.chart:not(.is-drawn) .route { stroke-dashoffset: var(--len); stroke-dasharray: var(--len); }
.chart.is-drawn .route {
  stroke-dasharray: var(--len);
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.6s var(--ease) var(--delay, 0s), stroke .3s, stroke-opacity .3s, stroke-width .3s;
}

.geo-side { display: flex; flex-direction: column; gap: 16px; }

.country-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.country-btn {
  display: flex; align-items: baseline; gap: 10px;
  text-align: left;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--on-ink-line);
  background: transparent;
  cursor: pointer;
  transition: background .25s, border-color .25s, color .25s;
  color: var(--on-ink);
}
.country-btn b {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--on-ink-muted);
  min-width: 2.2em;
}
.country-btn span { font-size: 15px; }
.country-btn:hover { background: rgba(238, 242, 250, .06); }
.country-btn[aria-selected="true"] {
  background: var(--saffron);
  border-color: var(--saffron);
  color: var(--ink);
}
.country-btn[aria-selected="true"] b { color: var(--ink); }

.country-card {
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  padding: clamp(20px, 2.2vw, 28px);
}
.cc-top {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--slate);
}
.cc-code {
  font-size: 13px; font-weight: 500;
  color: var(--cobalt);
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: 6px;
}
.cc-name {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  letter-spacing: -.04em;
  line-height: 1.1;
  margin: 18px 0 16px;
}
.cc-facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  margin-bottom: 16px;
}
.cc-facts div {
  display: grid; grid-template-columns: 9.5em 1fr; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.cc-facts dt { color: var(--slate); }
.cc-facts dd { margin: 0; }
.cc-text { font-size: 15px; color: var(--slate); }
.cc-flag {
  margin-top: 12px;
  font-size: 13px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(244, 180, 42, .25);
}
.cc-flag[hidden] { display: none; }
.cc-flag { margin: 0 0 12px; }
.cc-visa {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.55;
}
.cc-visa-label {
  display: block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: 4px;
}
.cc-visa a { color: var(--cobalt); text-underline-offset: 3px; white-space: nowrap; }
.cc-checked { margin-top: 12px; font-size: 12.5px; color: var(--slate); }

/* Hero: подзаголовок и направления работы */
.hero-kicker {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  letter-spacing: -.025em;
  line-height: 1.3;
  margin-bottom: 14px;
}
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 8px; }
.hero-tags span {
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
}
.hero-tags-note { font-size: 13px; color: var(--slate); margin-bottom: 26px; }

/* О нас */
.about-title { max-width: 26ch; }
.about-title-2 { color: var(--cobalt); }
.about-text {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
  margin-top: clamp(32px, 4vw, 48px);
  max-width: 1000px;
  color: var(--slate);
}

/* Контакты */
.contacts-topics {
  margin: calc(clamp(48px, 7vw, 96px) * -0.55) 0 clamp(48px, 7vw, 96px);
  font-family: var(--f-display);
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  letter-spacing: -.025em;
  line-height: 1.45;
  color: var(--on-ink-muted);
}
.contact-hint { font-size: 13.5px; color: var(--on-ink-muted); }
.footer-brand small { font-size: 12px; color: var(--on-ink-muted); }
.country-card.is-swapping > * { animation: swap .45s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(6px); } }

.geo-disclaimer {
  margin-top: clamp(32px, 4vw, 48px);
  padding-left: 18px;
  border-left: 2px solid var(--saffron);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--on-ink-muted);
  max-width: 90ch;
}

/* --- Фото-полоса ------------------------------------------------------- */

.band-section { padding: clamp(80px, 12vw, 150px) 0 0; }
.band {
  position: relative;
  min-height: clamp(460px, 62vw, 700px);
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  display: flex; align-items: flex-end;
  background:
    radial-gradient(circle at 80% 20%, rgba(244, 180, 42, .25), transparent 35%),
    linear-gradient(to right, rgba(238, 242, 250, .06) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(to bottom, rgba(238, 242, 250, .06) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(160deg, var(--cobalt), var(--ink) 70%);
  color: var(--on-ink);
}
.band img {
  position: absolute; inset: 0;
  width: 100%; height: 115%;
  object-fit: cover;
  will-change: transform;
}
.band-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11, 27, 63, .92) 0%, rgba(11, 27, 63, .7) 40%, rgba(11, 27, 63, .05) 80%);
}
.band-copy {
  position: relative;
  padding: clamp(28px, 5vw, 64px);
  max-width: 640px;
}
.band-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -.045em;
  margin-bottom: 22px;
}
.band-text { color: rgba(238, 242, 250, .8); max-width: 42ch; }
.band-credit {
  position: absolute; right: 20px; bottom: 16px;
  font-size: 11px;
  color: rgba(238, 242, 250, .8);
  text-shadow: 0 1px 6px rgba(11, 27, 63, .9);
}

/* --- Шаги -------------------------------------------------------------- */

.start-head { max-width: 640px; margin-bottom: clamp(48px, 6vw, 80px); }

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 44px);
}
.steps::before { /* линия маршрута */
  content: "";
  position: absolute; left: 0; right: 0; top: 22px;
  border-top: 1.5px dashed var(--cobalt-soft);
}
.steps li { position: relative; }
.step-n {
  position: relative;
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--cobalt);
  color: var(--cobalt);
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 13px;
  margin-bottom: 26px;
}
.steps li:last-child .step-n { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
.steps h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  line-height: 1.2;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.steps p { color: var(--slate); font-size: 15.5px; max-width: 34ch; }

/* --- Формат ------------------------------------------------------------ */

.format { padding-top: 0; }
.format-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
  padding-top: clamp(64px, 9vw, 120px);
  border-top: 1px solid var(--line);
}
.absent {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 40px);
}
.absent-label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 12px;
}
.absent li {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.3vw, 1.8rem);
  letter-spacing: -.035em;
  line-height: 1.2;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.absent s {
  text-decoration: none;
  position: relative;
  color: var(--ink);
}
.absent s::after {
  content: "";
  position: absolute; left: -2px; right: -4px; top: 55%;
  height: 3px;
  background: var(--saffron);
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s var(--ease);
}
.absent.is-in s::after { transform: scaleX(1); }
.absent.is-in li:nth-child(2) s::after { transition-delay: .12s; }
.absent.is-in li:nth-child(3) s::after { transition-delay: .24s; }
.absent.is-in li:nth-child(4) s::after { transition-delay: .36s; }
.absent.is-in li:nth-child(5) s::after { transition-delay: .48s; }
.absent-foot { margin-top: 18px; font-size: 13.5px; color: var(--slate); }

/* --- Контакты ---------------------------------------------------------- */

.contacts {
  background: var(--ink);
  color: var(--on-ink);
  padding-top: clamp(80px, 12vw, 150px);
  border-radius: calc(var(--radius) + 10px) calc(var(--radius) + 10px) 0 0;
}
.contacts-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 7vw, 6.4rem);
  line-height: .98;
  letter-spacing: -.05em;
  margin-bottom: clamp(48px, 7vw, 96px);
}
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px clamp(24px, 4vw, 64px);
  border-top: 1px solid var(--on-ink-line);
  padding-top: 32px;
}
.contact { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.contact-label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-ink-muted);
}
.contact-big {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  letter-spacing: -.04em;
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--saffron), var(--saffron)) left bottom / 0 2px no-repeat;
  transition: background-size .5s var(--ease), color .3s;
  justify-self: start;
  align-self: flex-start;
}
.contact-big:hover { background-size: 100% 2px; color: var(--saffron); }

.messengers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip {
  display: inline-flex; align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--on-ink-line);
  background: transparent;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.chip:hover { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }

.contacts-note { margin-top: 36px; font-size: 13.5px; color: var(--on-ink-muted); max-width: 60ch; }

.footer { margin-top: clamp(64px, 9vw, 120px); border-top: 1px solid var(--on-ink-line); }
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px 48px;
  align-items: start;
  padding-top: 28px;
  padding-bottom: 36px;
  font-size: 13px;
  color: var(--on-ink-muted);
}
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--on-ink); }
.footer-brand .logo-mark { font-size: 22px; }
.footer-legal p + p { margin-top: 6px; }
.to-top { text-decoration: none; color: var(--on-ink); white-space: nowrap; }
.to-top:hover { color: var(--saffron); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 20px);
  background: var(--saffron); color: var(--ink);
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* --- Появление --------------------------------------------------------- */

.js [data-load] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js.is-loaded [data-load] { opacity: 1; transform: none; }
.js.is-loaded .hero-title .line:nth-child(1) { transition-delay: .08s; }
.js.is-loaded .hero-title .line:nth-child(2) { transition-delay: .2s; }
.js.is-loaded .hero-copy { transition-delay: .34s; }
.js.is-loaded .hero-photo { transition-delay: .44s; }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* --- Адаптив ----------------------------------------------------------- */

@media (max-width: 1080px) {
  .nav { display: none; }
  .header-cta { margin-left: auto; }
  .geo-body { grid-template-columns: 1fr; }
  .geo-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (max-width: 860px) {
  .hero-body,
  .value-grid,
  .geo-head,
  .format-grid { grid-template-columns: 1fr; }
  .hero-coords { display: none; }
  .hero-photo { margin-bottom: 28px; }
  .ticket { left: 12px; }
  .value-head { position: static; }
  .value-list li { grid-template-columns: 1fr; padding: 24px 0; }
  .principles,
  .about-text { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .steps::before { left: 22px; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 1.5px dashed var(--cobalt-soft); }
  .steps li { padding-left: 72px; }
  .step-n { position: absolute; left: 0; top: -6px; margin: 0; }
  .geo-side { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .codes-inner { overflow-x: auto; scrollbar-width: none; }
  .codes-inner::-webkit-scrollbar { display: none; }
  .codes-list { grid-template-columns: repeat(10, minmax(88px, 1fr)); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .logo-sub { display: none; }
  .header-cta { padding: 0 14px; }
  .line-board { gap: .3em; }
  .board { --tw: calc((100vw - 2 * var(--gutter) - 9 * var(--gap) - 2.8 * var(--gap)) / 10); }
  .ticket { position: relative; left: 0; bottom: 0; margin: -36px 12px 0; max-width: none; }
  .codes-label { display: none; }
  .country-list { grid-template-columns: 1fr 1fr; }
  .band { min-height: 560px; }
  .band-shade { background: linear-gradient(0deg, rgba(11, 27, 63, .95) 10%, rgba(11, 27, 63, .55) 60%, rgba(11, 27, 63, .2)); }
  .band-credit { left: 20px; right: auto; top: 16px; bottom: auto; }
  .cc-facts div { grid-template-columns: 8em 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
}
