:root {
  --ink: #0b151d;
  --ink-soft: #23343f;
  --paper: #f5f7f7;
  --white: #ffffff;
  --ice: #bcecff;
  --ice-strong: #59c7ee;
  --line: #d7e0e4;
  --orange: #ff8a2a;
  --danger: #a63c2f;
  --good: #2d765d;
  --shell: min(1180px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.section-shell { width: var(--shell); margin-inline: auto; }

.hero {
  min-height: 760px;
  height: min(86vh, 920px);
  color: var(--white);
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background-image:
    linear-gradient(90deg, rgba(4,13,20,.86) 0%, rgba(4,13,20,.58) 35%, rgba(4,13,20,.08) 74%),
    linear-gradient(0deg, rgba(4,13,20,.72) 0%, transparent 42%),
    url("assets/hero.jpg");
  background-size: cover;
  background-position: center 46%;
}
.site-nav {
  width: var(--shell);
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.28);
  position: relative;
  z-index: 4;
}
.brand { font-size: 1.35rem; font-weight: 800; text-decoration: none; letter-spacing: -.04em; }
.brand span { color: var(--ice-strong); }
.site-links { display: flex; align-items: center; gap: 32px; }
.site-links a { color: rgba(255,255,255,.86); font-size: .84rem; font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: .08em; }
.site-links a:hover { color: var(--white); }
.menu-button { display: none; }
.hero-content { width: var(--shell); margin: auto; padding: 70px 0 84px; }
.eyebrow { margin: 0 0 14px; color: var(--ice); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.eyebrow.dark { color: #3d7186; }
h1, h2 { font-family: "Newsreader", Georgia, serif; font-weight: 600; letter-spacing: -.035em; }
h1 { max-width: 760px; margin: 0; font-size: clamp(4.7rem, 9.2vw, 8.8rem); line-height: .82; }
.hero-ru { margin: 22px 0 0; color: var(--ice); font-size: clamp(1.35rem, 2.5vw, 2.1rem); font-weight: 600; }
.hero-deck { max-width: 650px; margin: 18px 0 0; color: rgba(255,255,255,.82); font-size: 1.05rem; line-height: 1.55; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; }
.button { min-height: 48px; padding: 12px 20px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 800; letter-spacing: .02em; text-decoration: none; transition: transform .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--orange); color: #16130f; }
.button-quiet { border-color: rgba(255,255,255,.45); color: var(--white); background: rgba(5,14,20,.2); backdrop-filter: blur(8px); }
.hero-caption { position: absolute; right: max(24px, calc((100% - 1180px) / 2)); bottom: 118px; z-index: 2; max-width: 260px; margin: 0; padding: 9px 12px; border-left: 2px solid var(--ice); color: rgba(255,255,255,.84); background: rgba(5,14,20,.54); backdrop-filter: blur(8px); font-size: .7rem; line-height: 1.4; text-align: right; }
.hero-caption span { display: block; color: var(--ice); font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.hero-facts { width: var(--shell); margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgba(255,255,255,.28); }
.hero-facts div { padding: 24px 0 28px; border-right: 1px solid rgba(255,255,255,.22); }
.hero-facts div:not(:first-child) { padding-left: 28px; }
.hero-facts div:last-child { border: 0; }
.hero-facts strong, .hero-facts span { display: block; }
.hero-facts strong { font-size: 1.05rem; }
.hero-facts span { color: rgba(255,255,255,.62); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }

.intro { padding: 110px 0 90px; display: grid; grid-template-columns: .82fr 1.18fr; gap: 9vw; }
h2 { margin: 0; font-size: clamp(2.7rem, 5vw, 4.7rem); line-height: .98; }
.intro-copy { max-width: 680px; font-size: 1.08rem; color: var(--ink-soft); }
.intro-copy p:first-child { margin-top: 0; }
.route-jump { display: grid; grid-template-columns: repeat(6, 1fr); margin-bottom: 80px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.route-jump a { padding: 26px 22px; display: grid; gap: 2px; text-decoration: none; border-right: 1px solid var(--line); transition: background .2s ease; }
.route-jump a:last-child { border-right: 0; }
.route-jump a:hover { background: var(--white); }
.route-jump span, .route-number { color: #6f8792; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; }
.route-jump strong { font-size: .98rem; }
.route-jump em { color: #59707b; font-size: .78rem; font-style: normal; }

.routes { display: grid; gap: 120px; padding-bottom: 130px; }
.route-card { display: grid; grid-template-columns: minmax(320px, .88fr) minmax(440px, 1.12fr); gap: clamp(48px, 7vw, 100px); align-items: start; scroll-margin-top: 30px; }
.route-card.reverse .route-photo { grid-column: 2; }
.route-card.reverse .route-body { grid-column: 1; grid-row: 1; }
.route-photo { margin: 0; position: sticky; top: 24px; overflow: hidden; background: #d8e3e7; }
.route-photo img { width: 100%; height: min(70vh, 760px); min-height: 560px; object-fit: cover; }
.route-photo.landscape img { object-position: center; }
.route-photo figcaption { position: absolute; left: 18px; bottom: 16px; padding: 7px 10px; color: var(--white); background: rgba(5,15,22,.76); font-size: .7rem; font-weight: 700; letter-spacing: .04em; }
.route-body { padding-top: 10px; }
.route-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.route-heading h2 { font-size: clamp(3.1rem, 5.2vw, 5.2rem); }
.route-number { margin: 0 0 8px; }
.grade { flex: 0 0 auto; padding: 9px 12px; border: 1px solid #9db3bc; color: #294c5b; font-size: .78rem; font-weight: 800; letter-spacing: .06em; }
.facts { margin: 28px 0 34px; display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); }
.facts div { min-height: 90px; padding: 17px 18px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div:nth-child(2n) { border-right: 0; }
.facts div:nth-last-child(-n+2) { border-bottom: 0; }
.facts span, .location-row span { color: #6a808a; font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.facts strong { margin-top: 3px; font-size: .92rem; }
.route-body > p { color: #314650; }
.note { margin: 28px 0; padding: 19px 20px; display: grid; grid-template-columns: 130px 1fr; gap: 18px; background: #e7f1f4; border-left: 4px solid #5ca6bf; color: #29414c; font-style: normal; }
.note.warning { background: #f7e7df; border-left-color: var(--orange); }
.note.positive { background: #e4f1eb; border-left-color: #559276; }
.note strong { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; }
.note span { font-size: .88rem; }
.access-copy { margin-top: 32px; }
.access-copy h3 { margin-bottom: 8px; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.access-copy p { color: #314650; }
.location-row { margin-top: 30px; padding-top: 24px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 16px; border-top: 1px solid var(--line); }
.location-row.two-lines { grid-template-columns: 1fr 1fr; }
.location-row.two-lines a { grid-column: 1 / -1; justify-self: start; }
.location-row div { display: grid; }
.location-row code { margin-top: 3px; font-family: Consolas, monospace; font-size: .82rem; }
.location-row a, .text-link { color: #19617e; font-size: .8rem; font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.map-section { padding: 110px 0; color: var(--white); background: #0a1821; }
.map-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: 7vw; align-items: center; }
.map-copy h2 { max-width: 420px; }
.map-copy > p:not(.eyebrow) { max-width: 470px; color: #aac0ca; }
.map-copy .text-link { display: inline-block; margin-top: 16px; color: var(--ice); }
#route-map { min-height: 520px; background: #152630; isolation: isolate; }
.map-legend { margin-top: 30px; display: grid; gap: 9px; color: #c5d6dd; font-size: .78rem; }
.map-legend span { display: flex; align-items: center; gap: 10px; }
.legend-dot { width: 12px; height: 12px; flex: 0 0 auto; border: 2px solid white; border-radius: 50%; background: var(--ice-strong); }
.legend-dot.detailed { background: var(--orange); }
.legend-dot.mixed { background: #a64bb7; }
.map-links { margin-top: 22px; display: grid; justify-items: start; }
.map-links .text-link { margin-top: 9px; }
.route-pin { width: 30px; height: 30px; border: 3px solid white; border-radius: 50% 50% 50% 0; background: var(--orange); transform: rotate(-45deg); box-shadow: 0 5px 18px rgba(0,0,0,.35); }
.route-pin span { display: block; transform: rotate(45deg); text-align: center; line-height: 24px; color: #21170f; font-size: 11px; font-weight: 800; }
.route-pin.mapped { background: var(--ice-strong); }
.route-pin.mixed { background: #a64bb7; }
.route-pin.mapped span, .route-pin.mixed span { color: white; font-size: 17px; line-height: 22px; }
.marker-cluster { border-radius: 50%; background: rgba(89,199,238,.28); }
.marker-cluster div { width: 32px; height: 32px; margin: 4px; border: 2px solid white; border-radius: 50%; color: #081820; background: var(--ice-strong); text-align: center; font: 800 12px/28px "Manrope", Arial, sans-serif; box-shadow: 0 5px 18px rgba(0,0,0,.28); }
.leaflet-popup-content-wrapper { padding: 0; overflow: hidden; border-radius: 0; color: var(--ink); background: var(--paper); font-family: "Manrope", Arial, sans-serif; }
.leaflet-popup-content { width: auto !important; margin: 0; line-height: 1.45; }
.map-popup-photo { width: 100%; height: 150px; object-fit: cover; }
.map-popup-body { padding: 15px 16px 17px; }
.map-popup-kicker { margin: 0 0 4px; color: #58737f; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.map-popup h3 { margin: 0; font-family: "Newsreader", Georgia, serif; font-size: 1.55rem; line-height: 1.05; }
.map-popup-details { margin: 8px 0 0; color: #29414c; font-size: .78rem; font-weight: 700; }
.map-popup-note { margin: 8px 0 0; color: #60757e; font-size: .72rem; }
.map-popup-actions { margin-top: 13px; padding-top: 11px; display: flex; flex-wrap: wrap; gap: 8px 12px; border-top: 1px solid var(--line); }
.map-popup-link { color: #19617e; font-size: .68rem; font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.map-popup-link.primary { color: #8c4309; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }

.gallery-section { padding: 30px 0 130px; }
.gallery { margin-top: 50px; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 260px; gap: 14px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; background: #dce5e8; }
.gallery figure.wide { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery figure:hover img { transform: scale(1.025); }
.gallery figcaption { position: absolute; left: 14px; bottom: 12px; padding: 5px 8px; color: white; background: rgba(5,15,22,.72); font-size: .72rem; font-weight: 700; }

.contribute { padding: 100px 0; color: white; background: #163442; }
.contribute-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 9vw; align-items: center; }
.contribute p { color: #bdd0d8; }
.contribute-links { display: flex; gap: 12px; margin-top: 25px; }
footer { padding: 38px 0; color: #a9bec7; background: #071117; }
footer .section-shell { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
footer p { margin: 0; font-size: .78rem; }

@media (max-width: 900px) {
  :root { --shell: min(100% - 36px, 720px); }
  .hero { min-height: 700px; height: 82vh; }
  .site-links { display: none; position: absolute; top: 72px; right: 0; padding: 22px; flex-direction: column; align-items: flex-end; gap: 16px; background: rgba(4,13,20,.96); }
  .site-links.open { display: flex; }
  .menu-button { width: 44px; height: 44px; padding: 10px; display: grid; align-content: center; gap: 5px; color: white; border: 1px solid rgba(255,255,255,.35); background: rgba(4,13,20,.35); }
  .menu-button span:not(.sr-only) { width: 20px; height: 2px; display: block; background: currentColor; }
  .hero-content { padding: 42px 0 58px; }
  h1 { font-size: clamp(4rem, 13vw, 6.2rem); }
  .intro { grid-template-columns: 1fr; gap: 35px; }
  .route-jump { grid-template-columns: repeat(2, 1fr); }
  .route-jump a { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .route-jump a:nth-child(2n) { border-right: 0; }
  .route-jump a:nth-last-child(-n+2) { border-bottom: 0; }
  .route-jump a:last-child { grid-column: auto; border-right: 0; }
  .route-card, .map-grid, .contribute-inner { grid-template-columns: 1fr; }
  .route-card.reverse .route-photo, .route-card.reverse .route-body { grid-column: auto; grid-row: auto; }
  .route-photo { position: relative; top: auto; }
  .route-photo img { height: 70vw; min-height: 520px; max-height: 720px; }
  .map-grid { gap: 45px; }
  #route-map { min-height: 480px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
  :root { --shell: calc(100% - 28px); }
  body { font-size: 16px; }
  .hero {
    min-height: 680px;
    height: 100svh;
    max-height: 780px;
    background-size: auto 125%;
    background-position: 73% bottom;
  }
  .site-nav { min-height: 72px; }
  .hero-content { padding: 36px 0 42px; }
  h1 { font-size: clamp(3.4rem, 17vw, 5rem); line-height: .86; }
  .hero-ru { margin-top: 17px; font-size: 1.2rem; }
  .hero-deck { max-width: 94%; font-size: .92rem; }
  .hero-actions { align-items: stretch; }
  .hero-actions .button { flex: 1; padding-inline: 10px; }
  .hero-caption { right: 14px; bottom: 92px; max-width: 220px; padding: 7px 9px; font-size: .64rem; }
  .hero-facts div { padding: 17px 8px 20px 0; }
  .hero-facts div:not(:first-child) { padding-left: 12px; }
  .hero-facts strong { font-size: .82rem; }
  .hero-facts span { font-size: .58rem; letter-spacing: .07em; }
  .intro { padding: 75px 0 60px; }
  h2 { font-size: 2.7rem; }
  .route-jump { grid-template-columns: 1fr; margin-bottom: 70px; }
  .route-jump a, .route-jump a:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .route-jump a:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .route-jump a:last-child { grid-column: auto; border-bottom: 0; }
  .routes { gap: 90px; padding-bottom: 90px; }
  .route-card { gap: 34px; }
  .route-photo img { height: 118vw; min-height: 430px; max-height: 620px; }
  .route-heading { align-items: center; }
  .route-heading h2 { font-size: 3.4rem; }
  .grade { padding: 7px 9px; font-size: .7rem; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div { min-height: 82px; padding: 14px 12px; }
  .note { grid-template-columns: 1fr; gap: 6px; }
  .location-row, .location-row.two-lines { grid-template-columns: 1fr; align-items: start; }
  .location-row.two-lines a { grid-column: auto; }
  .map-section, .contribute { padding: 78px 0; }
  #route-map { min-height: 420px; }
  .section-heading { align-items: start; flex-direction: column; }
  .conditions-row, .conditions-row.head { grid-template-columns: 1fr; gap: 5px; padding: 16px 12px; }
  .conditions-row.head { display: none; }
  .conditions-row time::before { content: "Updated · "; }
  .gallery-section { padding-bottom: 80px; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 410px; }
  .gallery figure.wide { grid-column: auto; }
  .contribute-links { flex-direction: column; }
  footer .section-shell { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
