/* Cape Town 2026 trip dossier. Dark theme, one accent, one radius scale. */

:root {
  --ink:        #0B0E12;
  --ink-2:      #12171E;
  --ink-3:      #1A212A;
  --line:       #26303B;
  --line-soft:  #1D252E;
  --fg:         #E9EDF1;
  --fg-dim:     #9AA7B4;
  --fg-faint:   #7D8B98;
  --accent:     #E2603A;
  --accent-dim: #8C3A22;
  --accent-wash:rgba(226, 96, 58, 0.12);
  --ok:         #4FB286;
  --warn:       #E0A93B;

  --r:      14px;
  --r-sm:   8px;
  --r-pill: 999px;

  --shell: 1240px;
  --ease:  cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "Unbounded", "Onest", system-ui, sans-serif;
  --font-body:    "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.shell { width: min(100% - 40px, var(--shell)); margin-inline: auto; }
@media (max-width: 680px) { .shell { width: calc(100% - 32px); } }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: clamp(19px, 2vw, 24px); letter-spacing: -0.01em; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dim  { color: var(--fg-dim); }
.faint{ color: var(--fg-faint); }

/* ---------- section frame ---------- */

section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.sec-head { max-width: 62ch; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head p { color: var(--fg-dim); font-size: 17px; margin-top: 14px; }
.kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- nav ---------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: 64px;
  display: flex; align-items: center;
  background: rgba(11, 14, 18, 0);
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
}
.nav.solid {
  background: rgba(11, 14, 18, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line-soft);
}
.nav .shell { display: flex; align-items: center; gap: 28px; }
.nav-mark { color: inherit; text-decoration: none; font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.nav-mark span { color: var(--accent); }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 13.5px; color: var(--fg-dim); }
.nav-links a { text-decoration: none; white-space: nowrap; transition: color .2s; }
.nav-links a:hover, .nav-links a.on { color: var(--fg); }
.nav-lang { flex: none; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--fg-dim); text-decoration: none; border: 1px solid var(--line-soft); border-radius: 999px; padding: 6px 11px; transition: color .2s, border-color .2s; }
.nav-lang:hover { color: var(--fg); border-color: var(--fg-faint); }
/* Phones get the same links as a swipeable row instead of a hidden menu. */
@media (max-width: 900px) {
  .nav .shell { gap: 16px; }
  .nav-links { overflow-x: auto; scrollbar-width: none; gap: 4px; margin-left: 0; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { padding: 12px 8px; }
  .nav-lang { padding: 9px 11px; }
  .nav { background: rgba(11, 14, 18, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
}

.nav-progress {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 61;
  background: var(--accent); width: 0;
}

/* ---------- hero ---------- */

.hero {
  position: relative; min-height: 100dvh; display: flex; align-items: flex-end;
  padding: 0 0 clamp(40px, 7vh, 80px); overflow: hidden;
}
.hero-bg { position: absolute; inset: -6% 0 0; z-index: 0; }
.hero-bg img { width: 100%; height: 106%; object-fit: cover; will-change: transform; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,14,18,.5) 0%, rgba(11,14,18,.15) 22%, rgba(11,14,18,.62) 42%, rgba(11,14,18,.86) 68%, var(--ink) 100%);
}
.hero .shell { position: relative; z-index: 1; }
.hero-dates {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(40px, 8.4vw, 104px); line-height: 0.94; letter-spacing: -0.035em;
  max-width: 14ch;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { margin-top: 20px; max-width: 58ch; font-size: clamp(15px, 1.6vw, 18px); color: #C9D2DA; }
.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 52px); margin-top: 40px; }
.hero-stat b {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 3.6vw, 40px); line-height: 1; letter-spacing: -0.02em;
}
.hero-stat span { font-size: 12px; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.1em; }

/* ---------- alert ---------- */

.alert {
  border: 1px solid var(--accent-dim); border-radius: var(--r);
  background: linear-gradient(180deg, rgba(226,96,58,.10), rgba(226,96,58,.03));
  padding: clamp(20px, 3vw, 30px);
  display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start;
}
.alert-num {
  font-family: var(--font-display); font-weight: 800; font-size: 40px; line-height: 1;
  color: var(--accent);
}
.alert h3 { margin-bottom: 8px; }
.alert p { color: #D4DCE3; font-size: 15.5px; }
@media (max-width: 560px) { .alert { grid-template-columns: 1fr; } }

/* ---------- blockers: secondary, compact two-column list ---------- */

.blockers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .blockers { grid-template-columns: 1fr; } }
.blockers .alert {
  padding: 18px 20px; gap: 14px;
  border-color: var(--line-soft); background: var(--ink-2);
}
.blockers .alert-num { font-size: 20px; color: var(--fg-faint); }
.blockers .alert h3 { font-size: 17px; margin-bottom: 6px; }
.blockers .alert p { font-size: 14px; color: var(--fg-dim); }
@media (max-width: 560px) { .blockers .alert { grid-template-columns: auto 1fr; } }

/* ---------- flights timeline ---------- */

.flights { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 940px) { .flights { grid-template-columns: 1fr; } }
.fly {
  border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--ink-2);
  padding: clamp(20px, 3vw, 28px);
}
.fly-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.fly-head span { font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); letter-spacing: .04em; }
.fly-total { font-family: var(--font-mono); font-size: 13px; color: var(--accent); margin-top: 4px; }
.tl { list-style: none; margin: 22px 0 0; padding: 0; }
.tl-stop { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: baseline; }
.tl-code { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.tl-stop b { font-weight: 600; font-size: 15px; }
.tl-stop small { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); }
.tl-times { font-family: var(--font-mono); font-size: 13.5px; color: var(--fg); }
.tl-times i { font-style: normal; color: var(--fg-faint); }
.tl-gap {
  margin: 6px 0 6px 22px; padding: 8px 0 8px 50px; border-left: 2px dotted var(--line);
  font-size: 13.5px; color: var(--fg-dim);
}
.tl-gap .mono { color: var(--fg); }
.tl-gap.wait { border-left-style: solid; }
.tl-gap.warn { border-left-color: var(--accent); }
.tl-gap.warn .mono { color: var(--accent); }
.tl-gap p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; }

/* ---------- shape cards (trip shapes) ---------- */

.shapes { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 18px; align-items: stretch; }
@media (max-width: 940px) { .shapes { grid-template-columns: 1fr; } }
.shape {
  border: 1px solid var(--line-soft); border-radius: var(--r); padding: 26px;
  background: var(--ink-2); display: flex; flex-direction: column; gap: 14px;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.shape:hover { border-color: var(--line); transform: translateY(-3px); }
.shape.picked { border-color: var(--accent); background: linear-gradient(180deg, rgba(226,96,58,.08), var(--ink-2) 60%); }
.shape-tag {
  align-self: flex-start; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .14em; text-transform: uppercase; padding: 5px 10px;
  border-radius: var(--r-pill); border: 1px solid var(--line);
  color: var(--fg-dim);
}
.shape.picked .shape-tag { color: var(--accent); border-color: var(--accent-dim); background: var(--accent-wash); }
.shape h3 { font-size: 20px; }
.shape ul { margin: 0; padding-left: 18px; color: var(--fg-dim); font-size: 14.5px; line-height: 1.65; }
.shape .km { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); font-family: var(--font-mono); font-size: 13px; color: var(--fg-dim); }
.shape .km b { color: var(--fg); }

/* ---------- map ---------- */

.map-wrap {
  display: grid; grid-template-columns: 1fr 340px; gap: 18px;
  border: 1px solid var(--line-soft); border-radius: var(--r); overflow: hidden;
  background: var(--ink-2);
}
@media (max-width: 940px) { .map-wrap { grid-template-columns: 1fr; } }
.map-box { position: relative; }
#map { height: clamp(420px, 66vh, 660px); background: var(--ink-3); }
@media (max-width: 940px) { #map { height: 48svh; min-height: 320px; } }
.map-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 500;
  pointer-events: none; white-space: nowrap; font-size: 12.5px; color: var(--fg);
  background: rgba(11,14,18,.8); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px 12px;
}
.map-hint[hidden] { display: none; }
.leaflet-touch .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; }
.map-side { padding: 22px; border-left: 1px solid var(--line-soft); overflow-y: auto; max-height: clamp(420px, 66vh, 660px); }
@media (max-width: 940px) { .map-side { border-left: 0; border-top: 1px solid var(--line-soft); max-height: none; } }
.leg { padding: 13px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: opacity .2s; }
.leg:last-child { border-bottom: 0; }
.leg:hover { opacity: .75; }
.leg:focus-visible, .tgl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.leg b::after { content: " →"; color: var(--fg-faint); font-weight: 400; }
.leg-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 9px; vertical-align: 1px; }
.leg b { font-size: 14.5px; font-weight: 600; }
.leg .meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-faint); margin-top: 3px; padding-left: 18px; }

.leaflet-container { background: #0F141A !important; font-family: var(--font-body) !important; }
/* Only the OSM fallback ships light tiles; invert those so the map stays dark. */
.tiles-invert .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.7); }
.leaflet-popup-content-wrapper {
  background: var(--ink-3); color: var(--fg); border-radius: var(--r-sm);
  border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.55);
}
.leaflet-popup-tip { background: var(--ink-3); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 12px 14px; font-size: 13.5px; line-height: 1.5; }
.leaflet-popup-content b { font-family: var(--font-display); font-size: 14px; }
/* Portrait photos would otherwise make the popup taller than the map and Leaflet could not pan it into view. */
.leaflet-popup-content img {
  border-radius: 6px; margin: 8px 0 6px;
  width: 100%; height: 160px; object-fit: cover;
}
.leaflet-control-zoom a { background: var(--ink-3) !important; color: var(--fg) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { background: rgba(11,14,18,.7) !important; color: var(--fg-faint) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--fg-dim) !important; }

.pin {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: #0B0E12;
  border: 2px solid rgba(11,14,18,.9); box-shadow: 0 3px 12px rgba(0,0,0,.6);
  transition: transform .18s var(--ease);
}
.leaflet-marker-icon:hover .pin { transform: scale(1.14); }
/* Waypoints we pass through but do not sleep in. */
.dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid rgba(11,14,18,.9); box-shadow: 0 2px 7px rgba(0,0,0,.55);
  transition: transform .18s var(--ease);
}
.leaflet-marker-icon:hover .dot { transform: scale(1.4); }
.pop-when {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); margin-top: 2px;
}

/* ---------- day timeline ---------- */

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 30px; }
.filter-count { font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); margin-left: 6px; }
.chip {
  font-family: var(--font-body); font-size: 13.5px; padding: 11px 16px;
  border-radius: var(--r-pill); border: 1px solid var(--line);
  background: transparent; color: var(--fg-dim); cursor: pointer;
  transition: all .22s var(--ease);
}
.chip:hover { color: var(--fg); border-color: var(--fg-faint); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #12070400; color: #170703; font-weight: 600; }
.chip:active { transform: scale(.97); }

.days { display: flex; flex-direction: column; gap: 16px; }
.day {
  display: grid; grid-template-columns: 220px 1fr; gap: 0;
  border: 1px solid var(--line-soft); border-radius: var(--r); overflow: hidden;
  background: var(--ink-2);
  transition: border-color .3s var(--ease), opacity .3s;
}
.day:hover { border-color: var(--line); }
.day.muted { display: none; }
.day { scroll-margin-top: 80px; }
@media (max-width: 800px) { .day { grid-template-columns: 1fr; } }

.day-photo { position: relative; min-height: 190px; overflow: hidden; }
.day-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.day:hover .day-photo img { transform: scale(1.05); }
.day-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,14,18,.25), rgba(18,23,30,.9)); }
@media (max-width: 800px) { .day-photo::after { background: linear-gradient(180deg, rgba(11,14,18,.2), rgba(18,23,30,.85)); } }
.day-badge {
  position: absolute; left: 16px; top: 14px; right: 16px; z-index: 2;
  width: fit-content; max-width: calc(100% - 32px);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; line-height: 1.4;
  background: rgba(11,14,18,.78); border: 1px solid var(--line);
  padding: 5px 10px; border-radius: var(--r-pill); backdrop-filter: blur(6px);
}
.day-date { position: absolute; left: 16px; bottom: 14px; z-index: 2; }
.day-date b { font-family: var(--font-display); font-size: 26px; display: block; line-height: 1; }
.day-date span { font-size: 12px; color: var(--fg-dim); text-transform: uppercase; letter-spacing: .08em; }

.day-body { padding: 24px 26px; }
.day-body h3 { margin-bottom: 6px; }
.day-route { font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin-bottom: 14px; letter-spacing: .02em; }
.acts { display: flex; flex-direction: column; gap: 9px; margin: 0 0 16px; padding: 0; list-style: none; }
.act { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: baseline; font-size: 14.5px; }
.act-t { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-faint); }
.act-x { color: var(--fg-dim); }
.act-cost { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-faint); white-space: nowrap; }
.act.hit .act-x { color: var(--fg); }
.act.hit .act-t { color: var(--accent); }
/* On a phone the cost column squeezes the text to a few words per line. */
@media (max-width: 520px) {
  .act { grid-template-columns: 44px 1fr; row-gap: 2px; }
  .act-cost { grid-column: 2; }
  .act-cost:empty { display: none; }
}

.day-foot { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--fg-dim); }
.day-foot b { color: var(--fg); font-weight: 600; }
.day-map { font: inherit; padding: 10px 0; margin: -10px 0; border: 0; background: none; color: var(--accent); cursor: pointer; }
.day-map:hover { text-decoration: underline; }
.day-map:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.tag { font-size: 10.5px; font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--fg-faint); }

/* ---------- booking table ---------- */

.book { display: grid; gap: 10px; }
.book-row {
  display: grid; grid-template-columns: 132px 1fr 150px; gap: 18px; align-items: center;
  padding: 16px 20px; border-radius: var(--r); border: 1px solid var(--line-soft); background: var(--ink-2);
}
@media (max-width: 760px) { .book-row { grid-template-columns: 1fr; gap: 8px; } }
.book-when { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; }
.book-row.hot { border-color: var(--accent-dim); background: linear-gradient(90deg, rgba(226,96,58,.09), var(--ink-2) 55%); }
.book-row.hot .book-when { color: var(--accent); }
.book-what b { display: block; font-size: 15px; font-weight: 600; }
.book-what span { font-size: 13.5px; color: var(--fg-dim); }
.book-price { font-family: var(--font-mono); font-size: 13px; color: var(--fg-dim); text-align: right; }
@media (max-width: 760px) { .book-price { text-align: left; } }

/* ---------- budget ---------- */

.budget { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
/* The options column is three times taller: the summary rides along beside it
   while it fits on screen. */
@media (min-width: 961px) { .budget > div:first-child { position: sticky; top: var(--stick-top, 88px); } }
@media (max-width: 960px) { .budget { grid-template-columns: 1fr; } }
.bar { display: flex; height: 44px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line-soft); margin-bottom: 22px; }
.bar div { transition: flex-grow .6s var(--ease); display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; color: rgba(11,14,18,.85); font-weight: 700; overflow: hidden; }
.blines { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--r-sm); overflow: hidden; }
.bline { display: grid; grid-template-columns: 12px 1fr auto; gap: 12px; align-items: center; padding: 14px 18px; background: var(--ink-2); font-size: 14.5px; }
.bline i { width: 10px; height: 10px; border-radius: 3px; display: block; }
.bline b { font-family: var(--font-mono); font-size: 14px; }
.bline small { display: block; color: var(--fg-faint); font-size: 12.5px; }
.btotal { margin-top: 18px; padding: 20px; border: 1px solid var(--accent-dim); border-radius: var(--r); background: var(--accent-wash); }
.btotal .n { font-family: var(--font-display); font-size: clamp(30px, 4vw, 42px); font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.btotal .n small { font-size: 15px; color: var(--fg-dim); font-family: var(--font-body); font-weight: 400; letter-spacing: 0; }

.toggles { display: grid; gap: 10px; }
.tgl {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: var(--r);
  background: var(--ink-2); cursor: pointer; transition: border-color .25s var(--ease);
}
.tgl:hover { border-color: var(--line); }
.tgl.on { border-color: var(--accent-dim); background: linear-gradient(90deg, rgba(226,96,58,.08), var(--ink-2) 60%); }
.sw { width: 40px; height: 23px; border-radius: var(--r-pill); background: var(--ink-3); border: 1px solid var(--line); position: relative; transition: background .25s; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: var(--fg-faint); transition: transform .25s var(--ease), background .25s; }
.tgl.on .sw { background: var(--accent-wash); border-color: var(--accent-dim); }
.tgl.on .sw::after { transform: translateX(17px); background: var(--accent); }
.tgl-txt b { display: block; font-size: 14.5px; font-weight: 600; }
.tgl-txt span { font-size: 12.5px; color: var(--fg-dim); }
.tgl-cost { font-family: var(--font-mono); font-size: 13px; color: var(--fg-dim); }

/* ---------- practical grid ---------- */

.prac { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.card {
  border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--ink-2);
  padding: 24px; transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.card:hover { border-color: var(--line); transform: translateY(-2px); }
.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p, .card li { font-size: 14.5px; color: var(--fg-dim); }
.card ul { margin: 0; padding-left: 17px; display: grid; gap: 7px; }
.card.photo { padding: 0; overflow: hidden; position: relative; min-height: 230px; display: flex; align-items: flex-end; }
.card.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,14,18,.15), rgba(11,14,18,.92)); }
.card.photo .inner { position: relative; z-index: 1; padding: 22px; }
.card.accent { background: linear-gradient(160deg, rgba(226,96,58,.14), var(--ink-2) 65%); border-color: var(--accent-dim); }
.c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; }
.c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
@media (max-width: 900px) { .c4, .c5, .c6, .c7, .c8 { grid-column: span 12; } }

/* ---------- cut list ---------- */

.cuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.cut { padding: 20px 22px; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--ink-2); }
.cut b { display: block; font-size: 15.5px; margin-bottom: 6px; }
.cut b s { color: var(--fg-faint); text-decoration-color: var(--accent-dim); }
.cut p { font-size: 13.5px; color: var(--fg-dim); margin: 0; }

/* ---------- footer ---------- */

footer { padding: 60px 0 80px; border-top: 1px solid var(--line-soft); color: var(--fg-faint); font-size: 13px; }
footer a { color: var(--fg-dim); }

/* ---------- reveal ---------- */

.rv { opacity: 0; transform: translateY(26px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .hero-bg img { transform: none !important; }
  .day-photo img, .shape, .card { transition: none; }
  * { animation-duration: .001ms !important; }
}

/* ---------- lightbox ---------- */

.day-photo { cursor: zoom-in; }
.day-photo:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }

/* How many frames sit behind this cover. Bottom right, because the day badge
   owns the top row and the date owns the bottom left. */
.shots {
  position: absolute; right: 12px; bottom: 14px; z-index: 2;
  display: flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 11px;
  background: rgba(11,14,18,.78); border: 1px solid var(--line);
  padding: 4px 9px; border-radius: var(--r-pill);
  backdrop-filter: blur(6px);
}
.shots svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.7; }

/* An author `display` beats the UA rule for [hidden], so state it explicitly. */
.lb[hidden] { display: none !important; }

.lb {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(6, 8, 11, .94);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: clamp(16px, 4vw, 52px);
  animation: lb-in .22s var(--ease);
}
@keyframes lb-in { from { opacity: 0 } to { opacity: 1 } }

.lb-fig { margin: 0; display: flex; flex-direction: column; gap: 14px; max-width: 100%; }
.lb-fig img {
  max-width: min(1200px, 100%); max-height: 76vh;
  width: auto; height: auto; margin-inline: auto;
  border-radius: var(--r); box-shadow: 0 30px 90px rgba(0,0,0,.6);
  animation: lb-pop .3s var(--ease);
}
@keyframes lb-pop { from { opacity: 0; transform: scale(.985) } to { opacity: 1; transform: none } }

.lb-fig figcaption {
  display: flex; gap: 18px; align-items: baseline; justify-content: center;
  flex-wrap: wrap; color: var(--fg-dim); font-size: 14.5px; text-align: center;
}
.lb-count { color: var(--fg-faint); font-size: 12px; }

.lb-x, .lb-nav {
  position: absolute; z-index: 2;
  display: grid; place-items: center;
  background: rgba(20,25,32,.85); color: var(--fg);
  border: 1px solid var(--line); border-radius: 50%;
  cursor: pointer; font-family: var(--font-body); line-height: 1;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.lb-x:hover, .lb-nav:hover { background: var(--accent); border-color: var(--accent); color: #170703; }
.lb-x:active, .lb-nav:active { transform: scale(.94); }
.lb-x { top: 18px; right: 18px; width: 42px; height: 42px; font-size: 24px; }
.lb-nav { top: 50%; margin-top: -26px; width: 52px; height: 52px; font-size: 30px; }
.lb-prev { left: clamp(8px, 2vw, 28px); }
.lb-next { right: clamp(8px, 2vw, 28px); }
.lb-nav[hidden] { display: none !important; }

.lb-dots { position: absolute; bottom: 20px; left: 0; right: 0; display: flex; gap: 7px; justify-content: center; }
.lb-dots button {
  width: 7px; height: 7px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--fg-faint); border: 0; opacity: .5;
  transition: opacity .2s, background .2s, transform .2s var(--ease);
}
.lb-dots button.on { background: var(--accent); opacity: 1; transform: scale(1.35); }

@media (max-width: 620px) {
  .lb-nav { width: 44px; height: 44px; font-size: 26px; margin-top: -22px; }
  .lb-fig img { max-height: 66vh; }
}
@media (prefers-reduced-motion: reduce) {
  .lb, .lb-fig img { animation: none; }
}

/* ---------- booked (факт) ---------- */

.book-row.done { border-color: rgba(79,178,134,.35); background: linear-gradient(90deg, rgba(79,178,134,.08), var(--ink-2) 55%); }
.book-row.done .book-when { color: var(--ok); }
.book-what a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--ok); }
.book-what a:hover { color: var(--ok); }
.book-price small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--fg-faint); }
.fact-total { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 18px; padding: 18px 20px;
  border: 1px solid rgba(79,178,134,.3); border-radius: var(--r); background: rgba(79,178,134,.06); }
.fact-total b { font-family: var(--font-mono); font-size: 18px; color: var(--ok); }
.fact-total span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--fg-dim); }

/* ---------- floating: budget toast, back to the day ---------- */

.toast {
  position: fixed; left: 50%; bottom: 18px; z-index: 70; transform: translate(-50%, 16px); opacity: 0; visibility: hidden;
  padding: 10px 18px; border-radius: var(--r-pill); background: var(--ink-3); border: 1px solid var(--accent-dim);
  font-size: 14px; color: var(--fg-dim); white-space: nowrap; box-shadow: 0 8px 30px rgba(0,0,0,.45);
  transition: transform .35s var(--ease), opacity .35s, visibility .35s; pointer-events: none;
}
.toast.on { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.toast b { color: var(--fg); font-family: var(--font-mono); }
.toast span { color: var(--accent); font-family: var(--font-mono); margin-left: 6px; }
.back-day {
  position: fixed; right: 16px; bottom: 18px; z-index: 70; min-height: 44px; padding: 0 18px;
  border-radius: var(--r-pill); border: 1px solid var(--accent-dim); background: var(--ink-3); color: var(--fg);
  font: 500 14px var(--font-body); cursor: pointer; box-shadow: 0 8px 30px rgba(0,0,0,.45);
}
.back-day[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
