/* Postmark — autumn gold, film stock, one continuous scroll.
   The page colour (--bg/--fg) shifts as each part of the journey comes into view; photos dissolve into it. */
:root {
  --bg: #E2A23C;
  --fg: #3A1F10;
  --leak: #FF8A3D;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
/* Type scales with the window: 16px on phones up to 21px on big screens; everything in rem follows. */
html { scroll-behavior: smooth; font-size: 18px; }
body { position: relative; margin: 0; background: var(--bg); color: var(--fg); font: 400 1.125rem/1.5 var(--serif);
  text-align: center; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
/* The painted backdrop: one tall, static gradient laid out by app.js — it scrolls with the page like an image. */
#paint { position: absolute; inset: 0; width: 100%; z-index: -1; pointer-events: none; overflow: hidden; background-size: 100% 100%; background-repeat: no-repeat; }
#paint svg { display: block; width: 100%; height: 100%; }
body::after { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none;
  background: url("/static/grain.svg"); opacity: .14; }
@keyframes grain { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); } 75% { transform: translate(-3%, -3%); } }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
img { display: block; }

/* ── Type: big and brief ── */
.giant { font: 900 clamp(3.2rem, 11vw, 9.5rem)/.9 var(--serif); font-variation-settings: "SOFT" 100, "opsz" 144; letter-spacing: -.02em; }
.big { font: 800 clamp(2.4rem, 6.5vw, 5.6rem)/.95 var(--serif); font-variation-settings: "SOFT" 100, "opsz" 144; letter-spacing: -.015em; }
.line { font: italic 400 clamp(1.25rem, 2.3vw, 1.8rem)/1.35 var(--serif); font-variation-settings: "SOFT" 100; }
.kicker { font: 600 .76rem/1 var(--sans); letter-spacing: .34em; text-transform: uppercase; margin-bottom: 1.4rem; }
.tip { font: italic 400 1.08rem/1.5 var(--serif); opacity: .78; max-width: 34ch; margin: 1.4rem auto 0; }
.begin { display: inline-block; margin-top: 2.4rem; font: 600 .78rem var(--sans); letter-spacing: .34em; text-transform: uppercase;
  text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 4px; }

/* ── Top bar ── */
.bar { position: fixed; inset: 0 0 auto; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 18px clamp(16px, 4vw, 48px) 28px; font: 600 .74rem var(--sans); letter-spacing: .28em; text-transform: uppercase;
  background: linear-gradient(var(--bg) 40%, transparent); }
.bar .l { text-align: left; } .bar .r { text-align: right; }
.bar a { text-decoration: none; }
.brand { font: 900 1.25rem var(--serif); font-variation-settings: "SOFT" 100; letter-spacing: .02em; text-transform: none; text-decoration: none; }
.brand-logo { display: block; width: clamp(125px, 14vw, 175px); height: auto; filter: drop-shadow(0 1px 2px rgba(58, 31, 16, .35)); }
.brand-stamp { display: block; width: 56px; height: 56px; object-fit: contain; }
.home-wordmark { margin: 0 auto; width: min(78vw, 720px); line-height: 0; }
.home-wordmark img { display: block; width: 100%; height: auto; filter: drop-shadow(0 1px 2px rgba(58, 31, 16, .35)); }
.site-bar { grid-template-areas: "nav brand version"; }
.site-nav { grid-area: nav; display: flex; gap: clamp(.8rem, 1.6vw, 1.6rem); align-items: center; }
.site-nav a { font-family: var(--sans); font-weight: 500; letter-spacing: .08em; }
.site-nav a[aria-current="page"] { font-weight: 800; text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 2px; }
.site-nav a:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.site-bar .brand { grid-area: brand; }
.site-version { grid-area: version; text-transform: none; }
@media (max-width: 700px) {
  .site-bar { grid-template-columns: 1fr auto 1fr; grid-template-areas: ". brand version" "nav nav nav"; row-gap: 12px; padding-top: 12px; }
  .site-nav { justify-content: center; gap: 1.4rem; }
}

/* ── Film frames ── */
.frame { position: relative; margin: 0; }
.frame img { width: 100%; height: 88vh; min-height: 420px; object-fit: cover; filter: url(#film);
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 78%, transparent);
          mask-image: linear-gradient(transparent, #000 18%, #000 78%, transparent); }
.frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: .5;
  background: radial-gradient(60% 45% at 92% 22%, var(--leak), transparent 70%),
              radial-gradient(40% 30% at 6% 70%, rgba(255, 120, 60, .5), transparent 70%);
  -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 70%, transparent);
          mask-image: linear-gradient(transparent, #000 25%, #000 70%, transparent); }
.frame a { display: block; cursor: alias; }
.edge { position: absolute; left: clamp(16px, 4vw, 48px); bottom: 24%; z-index: 1; font: 600 .66rem var(--sans);
  letter-spacing: .24em; text-transform: uppercase; color: #FFA24A; text-shadow: 0 0 6px rgba(255, 130, 40, .8); white-space: pre; }

/* ── Opening: title + itinerary on the first screen ── */
.opening { position: relative; }
.opening .frame { position: absolute; inset: 0; }
.opening .frame img { height: 100%; min-height: 0; }
.opening .over { position: relative; min-height: max(100svh, 720px); z-index: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: clamp(1.6rem, 4vh, 3rem); padding: 84px 16px 12vh; color: #FBEBC8;
  text-shadow: 0 2px 30px rgba(40, 18, 6, .55), 0 1px 2px rgba(40, 18, 6, .5); }
.opening .over::before { content: ""; position: absolute; inset: 8% 4% 10%; z-index: -1;
  background: radial-gradient(closest-side, rgba(46, 22, 8, .5), transparent); }
.opening .kicker, .opening .begin { text-shadow: 0 1px 3px rgba(40, 18, 6, .9); }
.opening .giant { font-size: clamp(2.6rem, 7.4vw, 6.4rem); max-width: 14ch; margin: 0 auto; }
.opening .line { margin-top: 1rem; font-size: clamp(1.05rem, 1.8vw, 1.4rem); }
.opening .begin { margin-top: 0; }

.itinerary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; width: min(1080px, 100%);
  background: rgba(36, 17, 6, .42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(251, 235, 200, .35); text-align: left; text-shadow: 0 1px 2px rgba(20, 8, 2, .6); }
.it-col { padding: clamp(14px, 2vw, 24px) clamp(16px, 2.2vw, 28px); }
.it-col + .it-col { border-left: 1px solid rgba(251, 235, 200, .25); }
.it-country { margin: 0 0 .8rem; font: 600 .68rem var(--sans); letter-spacing: .28em; text-transform: uppercase; opacity: .85; }
.it-country strong { font-weight: 700; opacity: 1; }
.it-stops { list-style: none; padding: 0; margin: 0; }
.it-stops a { display: grid; grid-template-columns: 2rem 1fr auto; align-items: baseline; gap: .5rem; padding: .42rem 0;
  border-bottom: 1px solid rgba(251, 235, 200, .18); text-decoration: none; transition: opacity .25s, padding .25s; }
.it-stops li:last-child a { border-bottom: 0; }
.it-stops a:hover { opacity: .75; padding-left: 4px; }
.it-stops .n { font: 600 .66rem var(--sans); letter-spacing: .1em; opacity: .7; }
.it-name { font: 700 clamp(1.05rem, 1.6vw, 1.35rem)/1.2 var(--serif); font-variation-settings: "SOFT" 100; }
.it-days { font: 600 .66rem var(--sans); letter-spacing: .14em; opacity: .75; white-space: nowrap; }

.block { padding: 14vh clamp(16px, 5vw, 64px); }

/* ── Parts & stops ── */
.part { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; padding: 10vh 16px; }
.stop { padding-bottom: 6vh; }
.stop .title { position: relative; z-index: 1; margin-top: -9vh; padding: 0 16px; }
.musts { list-style: none; padding: 0; margin: 2.6rem auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 0;
  font: 600 .86rem var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.musts li + li::before { content: "·"; margin: 0 1rem; }
.next { margin-top: 7vh; font: 600 .74rem var(--sans); letter-spacing: .3em; text-transform: uppercase; opacity: .7; }

/* ── Days, cost, pack ── */
.block .big { margin-bottom: 3.5rem; }
.days { list-style: none; padding: 0; margin: 0 auto; max-width: 1040px; columns: 3 260px; column-gap: 3rem; text-align: left; }
.days li { break-inside: avoid; display: grid; grid-template-columns: 2.2rem 1fr; padding: .45rem 0; }
.days .n { font: 600 .72rem/1.9 var(--sans); letter-spacing: .1em; opacity: .65; }
.days .where { grid-column: 2; font: 600 .62rem var(--sans); letter-spacing: .2em; text-transform: uppercase; opacity: .6; }
.toggle { display: inline-flex; gap: 2rem; margin-bottom: 2.4rem; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { font: 600 .78rem var(--sans); letter-spacing: .28em; text-transform: uppercase; opacity: .55; cursor: pointer;
  border-bottom: 2px solid transparent; padding-bottom: 4px; transition: opacity .3s; }
.toggle input:checked + span { opacity: 1; border-color: currentColor; }
.toggle input:focus-visible + span { outline: 2px solid currentColor; outline-offset: 4px; }
.packing { max-width: 30ch; margin: 0 auto; }
#cost .line { margin-top: .9rem; }

/* ── Catalogue ── */
.mast { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; padding-top: 10vh; }
/* Home: exactly one screen, button pinned near the bottom */
.catalogue.home, .catalogue.home .mast { height: 100svh; min-height: 0; overflow: hidden; }
.catalogue.home .mast { position: relative; padding: 0; }
.catalogue.home .mast > .home-go { position: absolute; width: max-content; left: 50%; bottom: 9vh; transform: translateX(-50%); margin: 0; white-space: nowrap; }
.home-go { display: flex; align-items: center; gap: clamp(1.5rem, 5vw, 4rem); }
.home-go .begin { margin-top: 0; }
html:has(.catalogue.home), body:has(.catalogue.home) { overflow: hidden; }
/* Itineraries: a title and small postcards, two to a row, all on one screen */
.catalogue.list { position: relative; height: 100svh; overflow: hidden; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: clamp(.8rem, 3vh, 2rem); padding: 72px 16px 24px; }
.catalogue.list > :not(.sky) { position: relative; z-index: 1; }
.catalogue.list .list-title { font-size: clamp(2.2rem, 6vw, 4.6rem); }
.catalogue.list .cards { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: clamp(.8rem, 3vh, 2rem) clamp(1rem, 3vw, 3rem); }
/* each card is sized so every row fits the screen: width follows the height left over, divided by the rows */
.catalogue.list .pc { display: block; text-decoration: none; margin: 0;
  --pc-w: min(777px, 36vw, calc((100svh - 15rem) / var(--rows) / 1)); }
/* the countries sit under the title on the paper strip, so the strip is a little deeper than a trip postcard's */
.pc-link .pc-front { padding-bottom: max(8.2cqw, 46px); }   /* 777px wide stays under 576px tall */
.pc-link .pc-caption { bottom: max(4.2cqw, 23px); }
.pc-link .pc-hint { bottom: max(4.6cqw, 26px); }   /* on the title's line, leaving the countries the full width */
.pc-countries { position: absolute; left: 3cqw; bottom: max(1.8cqw, 7px); margin: 0; font: 600 max(11px, 1.2cqw) var(--sans);
  letter-spacing: .18em; text-transform: uppercase; opacity: .6; }
@media (max-width: 700px) {
  .catalogue.list .cards { grid-template-columns: 1fr; }
  .catalogue.list .pc { --pc-w: min(90vw, calc((100svh - 14rem) / (var(--rows) * 2) / 1)); }
}
html:has(.catalogue.list), body:has(.catalogue.list) { overflow: hidden; }

/* ── End ── */
.foot { padding: 26vh 16px 12vh; }
.foot .begin { margin-top: 2rem; }
.credit { margin-top: 18vh; font: 500 .66rem var(--sans); letter-spacing: .14em; text-transform: uppercase; opacity: .55; }

/* ── First paint ──
   Tier 1: the page's own colour, at once (set by the server), with a small "Loading" mark.
   Tier 2: all the text, together and finished, as soon as the fonts are in (app.js adds .ready).
   Tier 3: photos, each one only when it has fully loaded (placeholders pulse until then). */
html.js:not(.ready) body > * { visibility: hidden; }
html.js:not(.ready)::after { content: "Loading"; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font: 600 13px "Courier New", monospace; letter-spacing: .3em; text-transform: uppercase; color: var(--fg); opacity: .6;
  animation: loading 1s steps(4, end) infinite; }
@keyframes loading { 0% { content: "Loading"; } 25% { content: "Loading ."; } 50% { content: "Loading . ."; } 75% { content: "Loading . . ."; } }
html.js:not(.ready) *, html.js:not(.ready) *::before, html.js:not(.ready) *::after { transition: none !important; }

/* ── Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media (max-width: 700px) {
  .itinerary { grid-template-columns: 1fr; }
  .it-col + .it-col { border-left: 0; border-top: 1px solid rgba(251, 235, 200, .25); }
  .frame img { height: 70vh; }
  .bar { letter-spacing: .18em; }
  .musts { flex-direction: column; gap: .7rem; }
  .musts li + li::before { content: none; }
  .toggle { gap: 1.2rem; }
}

@media (prefers-reduced-motion: no-preference) {
  main { animation: page-enter 180ms ease-out; }
  @keyframes page-enter { from { opacity: .65; } to { opacity: 1; } }
}

/* Reserve the scrollbar gutter, keeping the content width stable while the window changes. */
html { scrollbar-gutter: stable; }
body > footer { background: #3A1F10; color: #F6E3B4; }

@media (max-width: 999px) { html { font-size: 16px; } }

/* A small closing note, with room for the fixed dock. */
body > footer.foot { padding: 2rem 16px 6rem; }
.foot .giant { font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.1; }
.foot .begin { margin-top: .8rem; font-size: .7rem; }
.foot .credit { margin-top: 1rem; font-size: .65rem; max-width: 60ch; margin-left: auto; margin-right: auto; }
.catalogue.list .pc-coming-soon { --pc-w: min(720px, 85vw, calc((100svh - 16rem) / .82)); }
.pc-coming-soon .pc-photo { aspect-ratio: 4 / 3; }
.pc-coming-soon .pc-photo img { filter: none; }
.pc-coming-soon .pc-photo::after { display: block; background: #000; opacity: .5; }
.pc-coming-soon .pc-back { grid-template-columns: 1.25fr 1fr; padding: 3.4cqw 4cqw 4cqw; }
.pc-coming-soon .pc-side { display: flex; }
