/* ========================================
   Openly Committed — Travel itinerary template
   ----------------------------------------
   An editorial longform template for travel pages.
   EVERYTHING here is scoped under .tv (the <main> wrapper) or
   body.travel-page, so none of it can reach the shared nav,
   footer, or any other page on the site.
   ======================================== */

body.travel-page {
  /* NOTE: deliberately does not touch overflow. styles.css sets
     `body { overflow-x: hidden }`, which propagates to the viewport — so the
     body is not itself a scroll container and position:sticky below still
     works. Overriding it here (with `clip`) let horizontal overflow escape
     and widened the layout viewport on narrow screens. */

  /* Fallback until the page script measures the real nav height (it varies:
     ~81px on wide viewports, ~71px on narrow ones). */
  --tv-navh: 71px;
  /* Mirrors `body.has-banner .nav { top: … }` in styles.css. Kept in CSS
     rather than JS so it can't race against main.js injecting the banner. */
  --tv-bannerh: 0px;
}
body.travel-page.has-banner { --tv-bannerh: 42px; }
@media (max-width: 640px) {
  body.travel-page.has-banner { --tv-bannerh: 64px; }
}

.tv {
  --paper: #f1f3ed;
  --paper-2: #fbfbf7;
  --ink: #1b211d;
  --ink-soft: #4a544c;
  --jade: #256b54;
  --jade-deep: #173f31;
  --gold: #b0842f;
  --mist: #d8e0d6;
  --mist-2: #e7ece4;
  --line: #c4cec1;
  --tv-maxw: 820px;

  display: block;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Public Sans', var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  padding-top: var(--tv-navh);
}

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

/* ---------- Base resets ----------
   These undo styles.css's bare element rules (h1-h3 uppercase Oswald, the
   section padding, link colours) inside the travel template.

   They are wrapped in :where() ON PURPOSE. A plain `.tv section` selector has
   specificity (0,1,1), which silently outranks every single-class component
   below it — `.tv-stop`, `.tv-lede`, `.tv-cap` and friends are all (0,1,0) —
   so their padding and margins would be thrown away. :where() contributes
   zero specificity, leaving these at (0,1,0): they still beat styles.css's
   bare selectors, but any component rule later in this file wins over them. */

.tv :where(h1, h2, h3, h4) {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
  margin: 0;
}

.tv :where(p) { font-size: inherit; color: var(--ink); margin: 0 0 1.1em; }
.tv :where(img) { max-width: 100%; display: block; }
.tv :where(section) { padding: 8px 0; }

.tv :where(a) {
  color: var(--jade);
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 107, 84, 0.35);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.tv :where(a:hover) { color: var(--jade-deep); border-color: var(--jade); }
.tv :where(a:focus-visible) { outline: 2px solid var(--jade); outline-offset: 3px; border-radius: 2px; }

.tv-wrap { max-width: var(--tv-maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Sticky jump bar ---------- */
.tv-jump {
  position: sticky;
  top: calc(var(--tv-navh) + var(--tv-bannerh));
  z-index: 20;
  background: rgba(241, 243, 237, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.tv-jump .tv-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  gap: 12px;
}
.tv-jump__brand {
  font-family: 'Space Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border: none;
  white-space: nowrap;
}
/* min-width:0 is load-bearing: a flex item defaults to min-width:auto and so
   refuses to shrink below its content, which would push the whole page wider
   than the viewport instead of scrolling inside this bar. */
.tv-jump__nav { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.tv-jump__nav::-webkit-scrollbar { display: none; }
.tv-jump__nav a {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: none;
  white-space: nowrap;
}
.tv-jump__nav a:hover,
.tv-jump__nav a.is-active { color: var(--jade); }

@media (max-width: 640px) {
  /* On a page this long the jump links matter MORE on a phone, not less, so
     they scroll sideways here rather than being hidden. The brand label is
     dropped to give them the full width — the page title is right below it. */
  .tv-jump__brand { display: none; }
  .tv-jump .tv-wrap { padding: 0 0 0 20px; gap: 0; }
  .tv-jump__nav { flex: 1; gap: 20px; padding-right: 36px; }
  /* Fade the right edge so it reads as scrollable rather than cut off. */
  .tv-jump::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 36px;
    pointer-events: none;
    background: linear-gradient(to right, rgba(241, 243, 237, 0), rgba(241, 243, 237, 0.95));
  }
}

/* ---------- Hero ---------- */
.tv-hero { padding: 64px 0 40px; }
.tv-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 22px;
}
.tv-hero h1 { font-size: clamp(44px, 9vw, 84px); font-weight: 600; }
.tv-lede {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: clamp(20px, 3.2vw, 26px);
  color: var(--ink-soft);
  margin-top: 18px;
  max-width: 620px;
}
.tv-hero__photo { margin-top: 44px; }
.tv-hero__photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

/* ---------- Photos ---------- */
.tv-photo {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin: 16px 0;
}
.tv-photo--tall {
  margin: 16px auto;
  max-height: 620px;
  width: auto;
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.tv-photo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.tv-photo-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.tv-photo-row--tall img { aspect-ratio: 3 / 4; }
.tv-photo-row--wide img { aspect-ratio: 4 / 3; }
.tv-cap {
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-soft);
  margin: -4px 0 20px;
}

/* ---------- Video (9:16 portrait) ---------- */
.tv-videowrap { margin: 22px 0; }
.tv-video {
  display: block;
  margin: 20px auto;
  width: 100%;
  max-width: 330px;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: #000;
}
.tv-vcap {
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  color: var(--ink-soft);
  text-align: center;
  max-width: 330px;
  margin: 8px auto 22px;
}

/* Photo beside its video — both portrait, side by side on wide screens,
   stacked on mobile. Images keep their natural aspect (no cropping) and are
   centred against the taller 9:16 video. */
.tv-media-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: center;
  margin: 22px 0;
}
.tv-media-pair figure { margin: 0; }
.tv-media-pair .tv-video { width: 100%; max-width: none; margin: 0; }
.tv-media-pair__img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
}
/* For landscape photos that would otherwise sit far shorter than the 9:16
   video beside them: crop to the video's shape instead. object-position
   picks the part of the frame worth keeping. */
.tv-media-pair__img--fill {
  aspect-ratio: 9 / 16;
  object-fit: cover;
}
.tv-media-pair .tv-vcap { max-width: none; margin: 8px 0 0; }
@media (max-width: 640px) {
  .tv-media-pair { grid-template-columns: 1fr; gap: 8px; }
  .tv-media-pair .tv-video,
  .tv-media-pair__img { max-width: 330px; margin-left: auto; margin-right: auto; }
}

/* ---------- Intro ---------- */
.tv-intro { padding: 36px 0 20px; }
.tv-intro p { font-size: 19px; }
.tv-philosophy {
  border-left: 3px solid var(--gold);
  padding: 6px 0 6px 22px;
  margin: 28px 0 8px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-style: italic;
  color: var(--ink);
}

/* ---------- Route at a glance ---------- */
.tv-glance { padding: 20px 0 8px; }
.tv-glance h2 { font-size: 30px; margin-bottom: 6px; }
.tv-glance .tv-sub { color: var(--ink-soft); margin-bottom: 26px; }
.tv-stations {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 2px solid var(--jade);
  position: relative;
}
.tv-st { padding: 18px 14px 8px 0; position: relative; }
.tv-st::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--jade);
  border: 3px solid var(--paper);
}
.tv-st__n {
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--gold);
  text-transform: uppercase;
}
.tv-st__city { font-family: 'Fraunces', Georgia, serif; font-size: 19px; font-weight: 600; margin: 2px 0 3px; }
.tv-st__why { font-size: 13.5px; line-height: 1.4; color: var(--ink-soft); }
@media (max-width: 720px) {
  .tv-stations { grid-template-columns: 1fr; border-top: none; border-left: 2px solid var(--jade); }
  .tv-st { padding: 10px 0 14px 22px; }
  .tv-st::before { top: 14px; left: -7px; }
}
.tv-fly { margin-top: 26px; font-size: 16px; color: var(--ink-soft); }

/* ---------- The journey timeline ---------- */
.tv-journey { position: relative; margin-top: 20px; }
.tv-journey::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: 60px;
  width: 2px;
  background: linear-gradient(var(--jade), var(--mist));
}
.tv-stop { position: relative; padding: 44px 0 44px 44px; }
.tv-stop::before {
  content: '';
  position: absolute;
  left: 0;
  top: 52px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--jade);
}
.tv-stop::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 57px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
@media (max-width: 640px) {
  .tv-stop { padding-left: 30px; }
  .tv-journey::before { left: 6px; }
  .tv-stop::before { left: -1px; width: 14px; height: 14px; }
  .tv-stop::after { left: 3px; }
}
.tv-stop__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; margin-bottom: 4px; }
.tv-stop__head h2 { font-size: clamp(30px, 5vw, 42px); font-weight: 600; }
.tv-nights {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--jade-deep);
  background: var(--mist-2);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 100px;
  white-space: nowrap;
}
.tv-stop__intro { font-size: 18px; color: var(--ink-soft); max-width: 640px; margin-top: 8px; }

/* ---------- A single day ---------- */
.tv-day { margin: 30px 0; }
.tv-day__tag {
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.tv-day h3 { font-size: 24px; font-weight: 600; margin: 3px 0 8px; }
.tv-day p { font-size: 17px; }
.tv-day ul { margin: 0 0 1em; padding-left: 1.15em; }
.tv-day li { margin-bottom: 0.4em; font-size: 17px; }

/* ---------- Where we stayed ---------- */
.tv-stay {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--jade);
  border-radius: 6px;
  padding: 16px 20px;
  margin: 18px 0;
}
.tv-stay img { width: 100%; border-radius: 4px; border: 1px solid var(--line); margin-bottom: 12px; }
.tv-stay__lbl {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jade);
}
.tv-stay__name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  display: block;
  margin: 2px 0 6px;
}
.tv-stay p { font-size: 15.5px; color: var(--ink-soft); margin: 0; }

/* ---------- Aside / callout ---------- */
.tv-aside {
  background: linear-gradient(180deg, #fdf7ea, #fbf3e1);
  border: 1px solid #e6d6ae;
  border-radius: 6px;
  padding: 18px 22px;
  margin: 22px 0;
}
.tv-aside__lbl {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.tv-aside h4 { font-size: 20px; margin: 4px 0 8px; }
.tv-aside p { font-size: 16px; margin-bottom: 0; }
.tv-aside img { width: 100%; border-radius: 4px; border: 1px solid #e6d6ae; margin-top: 14px; }

.tv-credit {
  font-size: 15.5px;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  margin-top: 20px;
}

/* ---------- Dark app band ---------- */
.tv-band { background: var(--ink); color: var(--paper); margin-top: 20px; padding: 0; }
.tv-band .tv-wrap { padding: 56px 24px; }
.tv-band h2 { color: var(--paper); font-size: 32px; margin-bottom: 8px; }
.tv-band .tv-sub { color: #b9c2b7; max-width: 620px; margin-bottom: 30px; }
.tv-apps { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.tv-app {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #242a26;
  border: 1px solid #37423a;
  border-radius: 12px;
  padding: 18px;
}
.tv-app__name { font-family: 'Fraunces', Georgia, serif; font-size: 18px; font-weight: 600; color: var(--paper); }
.tv-app__desc { font-size: 13.5px; color: #aeb8ac; line-height: 1.4; flex: 1; }
.tv-app a {
  margin-top: 6px;
  align-self: flex-start;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--ink);
  background: var(--paper);
  padding: 7px 14px;
  border-radius: 100px;
  border: none;
}
.tv-app a:hover { background: var(--gold); color: #fff; }
@media (max-width: 640px) { .tv-apps { grid-template-columns: repeat(2, 1fr); } }
.tv-esim { font-size: 15.5px; color: #cbd3c9; border-left: 3px solid var(--gold); padding-left: 16px; max-width: 640px; }
.tv-esim a { color: #ead9a6; border-color: rgba(234, 217, 166, 0.4); }

/* ---------- Tip grids ---------- */
.tv-tips { padding: 56px 0 20px; }
.tv-tips h2 { font-size: 32px; margin-bottom: 26px; }
.tv-tipgrid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.tv-tip { background: var(--paper-2); border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px; }
.tv-tip h3 { font-size: 19px; font-weight: 600; margin-bottom: 7px; }
.tv-tip__k { font-family: 'Space Mono', monospace; color: var(--jade); font-size: 14px; margin-right: 8px; }
.tv-tip p { font-size: 15.5px; color: var(--ink-soft); margin: 0; }
@media (max-width: 640px) { .tv-tipgrid { grid-template-columns: 1fr; } }

/* ---------- Closing ---------- */
.tv-closing { padding: 56px 0; }
.tv-closing h2 { font-size: clamp(30px, 5vw, 40px); max-width: 640px; margin-bottom: 14px; }
.tv-closing p { font-size: 19px; max-width: 640px; color: var(--ink-soft); }

/* ---------- Disclosure strip ---------- */
.tv-disclosure {
  border-top: 1px solid var(--line);
  padding: 24px 0 48px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* ---------- Travel hub cards (travel/index.html) ---------- */
.travel-hub__meta {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid-gray);
  margin-top: 0.35rem;
}

/* ---------- Late overrides ----------
   `.tv-intro p` and `.tv-day p` are (0,2,0) and so outrank the single-class
   caption and pull-quote rules above, which left captions rendering at the
   surrounding body size instead of caption size. These are (0,2,0) too and
   come last, so they win on order. */
.tv .tv-cap { font-size: 11.5px; }
.tv .tv-philosophy { font-size: 22px; }

@media (prefers-reduced-motion: reduce) {
  .tv *, .tv *::before, .tv *::after { transition: none !important; }
}
