/* Origin Mocha 1451: the film
   The page is a dark cinema hall. One fixed screen (#film, drawn by film.js) shows the shot the scroll position
   calls for; the words sit on it like titles and subtitles, in tall sections whose stages stay pinned while
   their shot plays. Nothing between chapters is black: each shot hands over to the next on screen. */
:root {
  --night: #0b0907;      /* page ground: roasted black */
  --roast: #16100b;      /* raised surfaces */
  --husk: #2a1f16;       /* hairlines on dark */
  --parchment: #eee5d3;  /* primary text */
  --dust: #b9ad99;       /* secondary text */
  --dim: #8a7e70;        /* tertiary text */
  --gold: #cfa052;       /* the brand gold, from the emblem */
  --gold-hi: #e8c681;
  --gold-lo: #a8823a;    /* dim gold: borders, rail dots */
  --cherry: #b02a2e;     /* ripe cherry */
  --paper: #e6dac3;      /* archive paper */
  --ink: #2b2017;        /* ink on paper */

  --f-display: "Libre Caslon Display", "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --f-narr: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --f-ui: "Saira", "Helvetica Neue", Arial, sans-serif;
  --f-ar: "Amiri", "Noto Naskh Arabic", "Geeza Pro", "Times New Roman", serif;

  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --left: var(--gutter-l);            /* where the titles start */
  --wrap: 1180px;
  --stage-h: 100vh;
  --top-safe: calc(env(safe-area-inset-top, 0px) + 84px);
  color-scheme: dark;
}
@supports (height: 100svh) { :root { --stage-h: 100svh; } }
@media (min-width: 1100px) { :root { --left: max(var(--gutter-l), 200px); } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
body {
  margin: 0;
  background: var(--night);
  color: var(--parchment);
  font-family: var(--f-ui);
  font-weight: 330;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 40; background: var(--night); }
img, video, canvas, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--night); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- The screen ---------- */
#film { position: fixed; inset: 0 auto auto 0; z-index: 0; width: 100vw; height: 100vh; pointer-events: none; }
@supports (height: 100lvh) { #film { height: 100lvh; } }
.poster { position: fixed; inset: 0; z-index: 0; display: none; pointer-events: none; }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.no-gl #film { display: none; }
.no-gl .poster { display: block; }
.no-gl .poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(11, 9, 7, .78), rgba(11, 9, 7, .2) 60%), linear-gradient(to top, rgba(11, 9, 7, .7), rgba(11, 9, 7, 0) 50%); }

/* wherever the film jumps in time, the year rolls with the transition */
.rewind {
  position: fixed; z-index: 3; inset: 0; display: grid; place-content: center; justify-items: center; gap: .4rem;
  pointer-events: none; opacity: 0; text-align: center;
  background: radial-gradient(ellipse 65% 60% at 50% 50%, rgba(11, 9, 7, .8), rgba(11, 9, 7, .5) 55%, rgba(11, 9, 7, 0));
}
.rewind .lbl { font-size: .7rem; letter-spacing: .34em; text-transform: uppercase; font-stretch: 85%; color: var(--gold-hi); text-shadow: 0 1px 10px rgba(11, 9, 7, .9); }
.rewind .year {
  font-family: var(--f-display); font-size: clamp(5.5rem, 17vw, 14rem); line-height: 1; color: var(--gold-hi);
  font-variant-numeric: tabular-nums lining-nums; letter-spacing: .02em;
  text-shadow: 0 0 60px rgba(232, 198, 129, .35), 0 0 4px rgba(232, 198, 129, .4);
}

/* ---------- Type ---------- */
.eyebrow {
  margin: 0;
  font-family: var(--f-ui);
  font-weight: 500;
  font-stretch: 85%;
  font-size: .74rem;
  line-height: 1.3;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow .num { font-family: var(--f-narr); font-style: normal; letter-spacing: .12em; margin-right: .6em; color: var(--gold-hi); }
.display {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.3rem, 5.2vw, 5.1rem);
  line-height: 1.04;
  letter-spacing: -.012em;
  text-wrap: balance;
  color: var(--parchment);
}
.display.l { font-size: clamp(2rem, 3.9vw, 3.8rem); line-height: 1.08; }
.display.s { font-size: clamp(2rem, 3.6vw, 3.4rem); }
.display em { font-family: var(--f-narr); font-style: italic; color: var(--gold-hi); }
.narr {
  margin: 0;
  font-family: var(--f-narr);
  font-style: italic;
  font-size: clamp(1.12rem, 1.6vw, 1.42rem);
  line-height: 1.52;
  max-width: 31em;
  text-wrap: pretty;
  color: var(--parchment);
}
.narr i { font-style: normal; }
.body { margin: 0; max-width: 58ch; color: var(--dust); text-wrap: pretty; }
.fine { margin: 0; font-size: .82rem; line-height: 1.55; color: var(--dim); max-width: 60ch; }
.ar { font-family: var(--f-ar); direction: rtl; unicode-bidi: isolate; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--gutter-r) 14px var(--gutter-l);
  background: linear-gradient(to bottom, rgba(11, 9, 7, .72), rgba(11, 9, 7, 0));
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 26px; height: auto; }
.brand-word {
  font-weight: 600; font-stretch: 112%; font-size: .9rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold);
  display: flex; align-items: baseline; gap: .7em; white-space: nowrap;
}
.brand-year { font-weight: 500; font-size: .72rem; letter-spacing: .3em; color: var(--gold-lo); }
.topnav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 32px); }
.topnav a:not(.btn) {
  font-size: .76rem; font-weight: 450; font-stretch: 90%; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; color: var(--dust);
}
.topnav a:not(.btn):hover { color: var(--parchment); }
@media (max-width: 720px) { .topnav a:not(.btn), .brand-year { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  font-family: var(--f-ui); font-weight: 550; font-stretch: 92%; font-size: .76rem; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  padding: .95em 1.5em; border: 1px solid var(--gold); border-radius: 2px;
  color: var(--gold-hi); background: rgba(11, 9, 7, .35);
  transition: background .25s, color .25s;
}
.btn:hover { background: var(--gold); color: var(--night); }
.btn.solid { background: var(--gold); color: var(--night); }
.btn.solid:hover { background: var(--gold-hi); }
.topbar .btn { padding: .8em 1.2em; font-size: .7rem; }

/* ---------- Journey rail (desktop) ---------- */
.rail {
  position: fixed; z-index: 25; top: 50%; left: calc(var(--gutter-l) + 8px); transform: translateY(-50%);
  display: none; width: 160px; pointer-events: none; opacity: 0; transition: opacity .5s;
}
.rail.on { opacity: 1; }
.rail svg { width: 26px; height: auto; overflow: visible; }
.rail .track { fill: none; stroke: rgba(238, 229, 211, .16); stroke-width: 1.5; }
.rail .trail { fill: none; stroke: var(--gold); stroke-width: 1.5; }
.rail .dot { fill: var(--night); stroke: var(--gold-lo); stroke-width: 1.2; transition: fill .3s, stroke .3s; }
.rail .dot.done { fill: var(--gold-lo); }
.rail .dot.now { fill: var(--gold-hi); stroke: var(--gold-hi); }
.rail-label { margin-top: 14px; font-size: .66rem; letter-spacing: .26em; text-transform: uppercase; font-stretch: 85%; color: var(--dust); text-shadow: 0 1px 8px var(--night); }
.rail-label b { display: block; font-family: var(--f-narr); font-weight: 400; font-size: 1rem; letter-spacing: .08em; color: var(--gold-hi); text-transform: none; }
@media (min-width: 1100px) { .rail { display: block; } }
.progress-line { position: fixed; z-index: 31; top: env(safe-area-inset-top, 0px); left: 0; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--total, 0)); background: var(--gold); opacity: .8; }
@media (min-width: 1100px) { .progress-line { display: none; } }

.shot-tag {
  position: fixed; z-index: 26; right: calc(var(--gutter-r) + 4px); top: var(--top-safe); margin: 0;
  font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; font-stretch: 85%;
  color: var(--gold); padding: .45em .8em; border: 1px dashed rgba(207, 160, 82, .5); background: rgba(11, 9, 7, .55);
  pointer-events: none;
}
.shot-tag:empty, .labels-off .shot-tag { display: none; }
@media (max-width: 760px) { .shot-tag { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); right: var(--gutter-r); } }

/* ---------- Scenes ---------- */
main { position: relative; z-index: 1; }
.scene { position: relative; }
.stage { position: relative; min-height: var(--stage-h); overflow: hidden; }
.js .scene { height: calc(var(--len, 220) * 1vh); }
.js .stage { position: sticky; top: 0; height: var(--stage-h); min-height: 0; }
.stage { text-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 0 28px rgba(11, 9, 7, .5); }
.stage .narr, .facts span { text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 12px rgba(11, 9, 7, .65), 0 0 30px rgba(11, 9, 7, .5); }

.copy {
  position: relative; z-index: 2;
  min-height: var(--stage-h);
  display: grid; align-content: end; gap: 1.1rem;
  max-width: calc(var(--wrap) + 200px); margin: 0 auto;
  padding: 7rem var(--gutter-r) clamp(3.5rem, 12vh, 8rem) var(--left);
}
.js .copy { height: 100%; min-height: 0; }
.copy > .beats, .copy > .beat { max-width: 40rem; }
.copy.center { justify-items: center; text-align: center; padding-left: var(--gutter-l); }
.copy.center > .beats, .copy.center > .beat { max-width: 52rem; }
.copy.center .narr, .copy.center .body { margin-inline: auto; }
/* the cup scenes: the type sits in the dark above the cup */
.copy.upper { align-content: start; padding-top: max(8rem, 15vh); padding-bottom: 40vh; }

.beats { display: grid; gap: 2.5rem; }
.beat { position: relative; display: grid; gap: 1.05rem; align-content: end; justify-items: start; }
/* a soft shadow behind each block of words keeps them readable on bright pictures */
.beat::before { content: ""; position: absolute; z-index: -1; inset: -4rem -6rem -3rem -8rem; pointer-events: none;
  background: radial-gradient(closest-side, rgba(11, 9, 7, .5), rgba(11, 9, 7, .26) 55%, rgba(11, 9, 7, 0)); }
.copy.center .beat::before { inset: -3rem -5rem; background: radial-gradient(closest-side, rgba(11, 9, 7, .38), rgba(11, 9, 7, 0)); }
.copy.center .beat { justify-items: center; }
.copy.upper .beat { align-content: start; }
.js .beats { gap: 0; }
.js .beats > .beat { grid-area: 1 / 1; }

/* timing: film.js sets --in (0 → 1) and --out (0 → 1) from the scroll position */
.js [data-in], .js [data-out] { opacity: calc(var(--in, 1) * (1 - var(--out, 0))); }
.motion [data-in], .motion [data-out] { transform: translate3d(0, calc((1 - var(--in, 1)) * 22px - var(--out, 0) * 18px), 0); will-change: opacity, transform; }
.motion .beat[data-in] { opacity: calc(clamp(0, var(--in, 1) * 2.2, 1) * (1 - var(--out, 0))); }
/* titles arrive word by word, like a title sequence; narration follows a little behind */
.motion .split .w { display: inline-block; }
.motion .display.split .w {
  --k: clamp(0, (var(--in, 1) * (var(--n, 1) + 3) - var(--i, 0)) / 3, 1);
  opacity: var(--k);
  transform: translate3d(0, calc((1 - var(--k)) * .32em), 0);
  filter: blur(calc((1 - var(--k)) * 7px));
}
.motion .narr.split .w {
  --k: clamp(0, (var(--in, 1) * (var(--n, 1) + 7) - var(--i, 0)) / 7, 1);
  opacity: calc(.15 + .85 * var(--k));
  transform: translate3d(0, calc((1 - var(--k)) * .18em), 0);
}

/* place · time, like a location caption in a documentary */
.super {
  position: absolute; z-index: 3; left: var(--left); top: var(--top-safe); margin: 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .9rem;
  font-size: .72rem; line-height: 1.4; letter-spacing: .26em; text-transform: uppercase; font-stretch: 88%;
  padding-left: 2.6rem;
}
.super::before { content: ""; position: absolute; left: 0; top: .62em; width: 1.8rem; height: 1px; background: var(--gold); }
.super b { font-weight: 550; color: var(--gold-hi); }
.super span { color: var(--parchment); }
.js .super { opacity: calc(1 - var(--out, 0)); clip-path: inset(-1em calc((1 - var(--in, 1)) * 100%) -1em 0); transform: none; }
.still .super { clip-path: none; opacity: calc(var(--in, 1) * (1 - var(--out, 0))); }

/* ---------- Prologue ---------- */
.letterbox { position: absolute; left: 0; right: 0; z-index: 3; height: 10vh; background: #000; transform-origin: 50% 0; }
.letterbox.bottom { bottom: 0; transform-origin: 50% 100%; }
.letterbox.top { top: 0; }
.motion .letterbox { transform: scaleY(var(--lb, 1)); }
.hero .copy { align-content: center; justify-items: center; gap: clamp(1.2rem, 3.5vh, 2.4rem); padding-top: calc(10vh + 3.5rem); padding-bottom: calc(10vh + 2.5rem); }
.hero .beat { justify-items: center; }
.hero-emblem-wrap { position: relative; width: min(30vh, 46vw, 300px); }
.hero-emblem { width: 100%; height: auto; filter: drop-shadow(0 0 40px rgba(207, 160, 82, .2)); }
.motion .hero-emblem-wrap { transform: scale(calc(1 + var(--out, 0) * .12)); filter: blur(calc(var(--out, 0) * 6px)); }
.hero-emblem-wrap::after {
  content: ""; position: absolute; inset: 0;
  -webkit-mask: url("../brand/emblem.webp") center / contain no-repeat; mask: url("../brand/emblem.webp") center / contain no-repeat;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 240, 205, .55) 50%, transparent 65%) 0 0 / 300% 100% no-repeat;
  mix-blend-mode: screen;
}
.motion .hero-emblem-wrap::after { animation: glint 6.5s 1.2s ease-in-out infinite; }
@keyframes glint { 0% { background-position: 100% 0; } 45%, 100% { background-position: -50% 0; } }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 4.4rem); }
/* the opening titles: the emblem surfaces from the dark, then the words arrive one by one */
.motion .hero-emblem { animation: emblem-in 2.4s cubic-bezier(.2, .7, .2, 1) .2s both; }
.motion .hero .display .w { animation: word-in 1.4s cubic-bezier(.2, .7, .2, 1) calc(1.1s + var(--i, 0) * 95ms) both; }
.motion .hero .eyebrow, .motion .hero .lede { animation: rise-in 1.6s cubic-bezier(.2, .7, .2, 1) both; }
.motion .hero .eyebrow { animation-delay: .8s; }
.motion .hero .lede { animation-delay: 2s; }
@keyframes emblem-in { from { opacity: 0; transform: scale(.92); filter: blur(14px) drop-shadow(0 0 40px rgba(207, 160, 82, 0)); } }
@keyframes word-in { from { opacity: 0; transform: translate3d(0, .35em, 0); filter: blur(8px); } }
@keyframes rise-in { from { opacity: 0; transform: translate3d(0, 12px, 0); } }
.hero .lede { margin: 0; max-width: 40ch; color: var(--dust); font-size: clamp(1rem, 1.3vw, 1.12rem); }
.scroll-cue {
  position: absolute; z-index: 4; left: 50%; bottom: max(14px, calc(5vh - 1.1rem)); translate: -50% 0;
  display: flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap;
  font-size: .64rem; letter-spacing: .3em; text-transform: uppercase; color: var(--dust); font-stretch: 85%;
}
.scroll-cue::before, .scroll-cue::after { content: ""; width: 40px; height: 1px; background: linear-gradient(to right, transparent, var(--gold)); }
.scroll-cue::after { background: linear-gradient(to left, transparent, var(--gold)); }
.motion .scroll-cue span { animation: cue 2.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- I · The Name: Mocha becomes al-Mukha ---------- */
.morph { display: grid; place-items: center; min-height: 1.2em; font-size: clamp(4.6rem, 13vw, 10.5rem); line-height: 1.1; }
.morph > span { grid-area: 1 / 1; color: var(--gold-hi); text-shadow: 0 0 50px rgba(207, 160, 82, .3); }
.m-en { font-family: var(--f-narr); font-style: italic; }
.m-ar { font-family: var(--f-ar); font-weight: 700; color: var(--gold); }
.motion .morph > span { transform: scale(calc(.94 + .06 * var(--in, 1) + .05 * var(--out, 0))); filter: blur(calc((1 - var(--in, 1)) * 16px + var(--out, 0) * 16px)); }
.motion .m-en { letter-spacing: calc(var(--out, 0) * .18em); }

/* ---------- II–III ---------- */
.firsts .display { font-size: clamp(2rem, 3.5vw, 3.4rem); }
.manuscript {
  width: min(400px, 100%); padding: 1.4rem 1.5rem 1.1rem; color: var(--ink); text-shadow: none;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(255, 250, 235, .55), rgba(255, 250, 235, 0) 60%),
    radial-gradient(90% 70% at 85% 90%, rgba(120, 85, 40, .28), rgba(120, 85, 40, 0) 70%),
    var(--paper);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 0 60px rgba(110, 75, 35, .35);
  transform: rotate(-1.2deg);
}
.manuscript .ar { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.6; text-align: center; color: #3a2414; }
.manuscript hr { border: 0; height: 1px; background: rgba(43, 32, 23, .35); margin: .7rem 0; }
.manuscript p { margin: 0; font-size: .84rem; line-height: 1.55; color: #4a3828; font-family: var(--f-narr); }
.manuscript p i { color: #2b2017; }

/* ---------- IV ---------- */
.facts { display: flex; flex-wrap: wrap; gap: 0; margin: .4rem 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(207, 160, 82, .4); max-width: 40rem; }
.facts li { flex: 1 1 140px; padding: .9rem 1.1rem .2rem 0; min-width: 0; }
.facts b { display: block; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.2rem, 1.8vw, 1.55rem); line-height: 1.15; color: var(--gold-hi); }
.facts span { display: block; margin-top: .4rem; font-size: .7rem; line-height: 1.45; letter-spacing: .18em; text-transform: uppercase; font-stretch: 88%; color: var(--dust); }

/* ---------- VI: the day counter ---------- */
.daycount {
  position: absolute; z-index: 3; right: calc(var(--gutter-r) + 1rem); bottom: clamp(3.5rem, 12vh, 8rem);
  display: grid; justify-items: end; gap: .1rem;
}
.daycount .l { font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); font-stretch: 88%; }
.daycount .n { font-family: var(--f-display); font-size: clamp(4rem, 9vw, 7.5rem); line-height: .9; color: var(--gold-hi); font-variant-numeric: tabular-nums lining-nums; }
@media (max-width: 760px) { .daycount { bottom: auto; top: calc(var(--top-safe) + 2.6rem); right: var(--gutter-r); } .daycount .n { font-size: 3.6rem; } }

/* ---------- VII: the steps ---------- */
.step-n { margin: 0; font-family: var(--f-display); font-size: clamp(1.1rem, 1.6vw, 1.4rem); letter-spacing: .2em; color: var(--gold); }
.step .narr { max-width: 26em; }
.confirm { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); border: 1px dashed rgba(207, 160, 82, .55); padding: .2em .55em; justify-self: start; margin: 0; text-shadow: none; }
.labels-off .confirm { display: none; }

/* ---------- IX: the map ---------- */
.mapwrap { position: absolute; inset: 0; z-index: 0; }
.motion .mapwrap { transform: none; }
.tl-wrap { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.motion .tl-wrap { transform: none; }
.map { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .land { fill: rgba(9, 6, 3, .34); stroke: rgba(222, 178, 98, .62); stroke-width: .9; vector-effect: non-scaling-stroke; }
.map .rhumb { stroke: rgba(207, 160, 82, .12); stroke-width: .8; vector-effect: non-scaling-stroke; }
.map .route { fill: none; stroke: var(--gold-hi); stroke-width: calc(var(--ms, 1) * 2px); stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - var(--draw, 0)); }
.map .route.glow { stroke: rgba(232, 198, 129, .25); stroke-width: calc(var(--ms, 1) * 9px); }
.map .step.done .route:not(.glow) { stroke: var(--gold); }
.map .step.done .route.glow { opacity: .35; }
.map .city circle { fill: var(--gold-hi); }
.map .city text { fill: var(--parchment); font-family: var(--f-ui); font-size: calc(var(--ms, 1) * 13px); letter-spacing: .12em; text-transform: uppercase; paint-order: stroke; stroke: #120c07; stroke-width: calc(var(--ms, 1) * 3px); }
.map .city { opacity: var(--city, 0); transition: opacity .6s; }
.map .city.on { --city: 1; }
.map .rose path { fill: var(--gold); }
.map .rose circle { fill: none; stroke: var(--gold); stroke-width: 1; vector-effect: non-scaling-stroke; }
.map .rose text { fill: var(--gold-hi); font-family: var(--f-display); font-size: 22px; paint-order: stroke; stroke: #120c07; stroke-width: 4px; }
.map .ship { opacity: 0; }
.map .ship .hull { fill: #120c07; }
.map .ship .sail { fill: var(--gold-hi); }
.map .ship .wake { fill: none; stroke: rgba(232, 198, 129, .5); stroke-width: 1; }
@media (min-width: 901px) {
  .mapwrap::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to left, rgba(11, 9, 7, .9) 0, rgba(11, 9, 7, .78) min(420px, 36vw), rgba(11, 9, 7, 0) min(580px, 48vw)); }
}
.mapwrap::before { content: ""; position: absolute; inset: 0 0 auto; height: 260px; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, rgba(11, 9, 7, .85) 30%, rgba(11, 9, 7, 0)); }
.mapstage .super { z-index: 4; }
.timeline {
  position: absolute; z-index: 2; right: var(--gutter-r); top: 50%; transform: translateY(-50%);
  width: min(380px, 34vw); margin: 0; padding: 0; list-style: none; display: grid; gap: .2rem;
}
.timeline li { padding: .7rem 0 .7rem 1rem; border-left: 1px solid rgba(238, 229, 211, .14); color: var(--dim); transition: color .4s, border-color .4s; }
.timeline li b { display: block; font-family: var(--f-narr); font-weight: 400; font-size: 1rem; color: inherit; }
.timeline li span { display: block; font-size: .88rem; line-height: 1.5; }
.js .timeline li span { display: none; }
.js .timeline li.now span { display: block; margin-top: .3rem; }
.timeline li.now { border-color: var(--gold); color: var(--parchment); }
.timeline li.now b { color: var(--gold-hi); }
.timeline li.past { color: var(--dust); }
.map-head { position: absolute; z-index: 2; left: 0; right: 0; top: 0; padding: calc(var(--top-safe) + 2.4rem) var(--gutter-r) 0 var(--left); display: grid; gap: .6rem; justify-items: start; }
.map-head .display { font-size: clamp(1.8rem, 3.4vw, 3rem); max-width: 16ch; }
.map-finale { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; padding: 0 var(--gutter-r) clamp(2.5rem, 8vh, 5rem) var(--left); }
.map-finale .narr { max-width: 30em; }
@media (min-width: 901px) {   /* routes and ports fill the south and west: the closing line sits like a cartouche over empty northern Asia */
  .map-finale { left: auto; bottom: auto; top: max(8.5rem, 18vh); width: min(34rem, 42vw); padding: 0 var(--gutter-r) 0 0; }
  .map-finale::before { content: ''; position: absolute; z-index: -1; inset: -3rem -1rem -3rem -4rem; background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(11, 9, 7, .8), rgba(11, 9, 7, 0)); }
}
@media (max-width: 900px) {
  .timeline { top: auto; bottom: 0; transform: none; left: 0; right: 0; width: auto; padding: 0 var(--gutter-r) 2rem var(--gutter-l); background: linear-gradient(to top, var(--night) 55%, rgba(11, 9, 7, 0)); }
  .js .timeline li:not(.now) { display: none; }
  .mapstage.finale .timeline { opacity: 0; }
  .timeline { transition: opacity .4s; }
  .timeline li { border-left-color: var(--gold); padding-top: 2.5rem; }
}

/* ---------- Panels: the offer and the form scroll over a dimmed screen ---------- */
.panel { position: relative; z-index: 2; }
.offer { background: linear-gradient(to bottom, rgba(11, 9, 7, 0) 0, rgba(11, 9, 7, .9) 45vh, rgba(11, 9, 7, .93) calc(100% - 50vh), rgba(11, 9, 7, 0) 100%); padding-block: 40vh 50vh; }
.request { background: linear-gradient(to bottom, rgba(11, 9, 7, 0) 0, rgba(11, 9, 7, .88) 40vh, rgba(11, 9, 7, .96) 100%); padding-top: 30vh; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
@media (min-width: 1100px) { .wrap { padding-left: max(var(--gutter-l), 200px); max-width: calc(var(--wrap) + 200px); } }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--husk); }
.pillar { padding: 1.8rem 1.6rem 2rem 0; border-bottom: 1px solid var(--husk); display: grid; gap: .6rem; align-content: start; min-width: 0; }
.pillar h3 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.55rem; line-height: 1.15; color: var(--parchment); }
.pillar p { margin: 0; color: var(--dust); font-size: .98rem; }
.section-head { display: grid; gap: .8rem; padding-block: clamp(4rem, 10vh, 7rem) 2rem; }
.section-head .display { font-size: clamp(1.8rem, 3.4vw, 3rem); }
.lots { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.lot { position: relative; background: rgba(22, 16, 11, .92); border: 1px solid var(--husk); padding: 1.5rem 1.4rem 1.3rem; display: grid; gap: 1rem; min-width: 0; }
.lot header { display: grid; gap: .25rem; }
.lot h3 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.7rem; line-height: 1.1; }
.lot .ar { color: var(--gold); font-size: 1.05rem; }
.lot dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .45rem 1rem; font-size: .9rem; }
.lot dt { color: var(--dim); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; padding-top: .2rem; font-stretch: 88%; }
.lot dd { margin: 0; color: var(--parchment); }
.lot .score { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--husk); padding-top: .9rem; }
.lot .score b { font-family: var(--f-display); font-weight: 400; font-size: 2.2rem; line-height: 1; color: var(--gold-hi); }
.lot .score span { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.example-tag { position: absolute; top: 12px; right: 12px; }
.note-price { margin-top: 1.4rem; padding: 1rem 1.2rem; border: 1px solid var(--husk); color: var(--dust); font-size: .95rem; background: rgba(11, 9, 7, .6); }

.request .wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(3rem, 8vh, 6rem) clamp(4rem, 12vh, 8rem); }
@media (max-width: 900px) { .request .wrap { grid-template-columns: 1fr; } }
.request-copy { display: grid; gap: 1.1rem; align-content: start; }
.options { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: 0; }
.options li { padding: .95rem 0; border-top: 1px solid var(--husk); display: grid; gap: .15rem; }
.options b { font-weight: 550; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; font-stretch: 90%; }
.options span { color: var(--dust); font-size: .95rem; }
form.samples { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; background: rgba(22, 16, 11, .94); border: 1px solid var(--husk); padding: clamp(1.3rem, 3vw, 2.2rem); align-content: start; }
.field { display: grid; gap: .4rem; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--dust); font-stretch: 88%; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--parchment); background: var(--night);
  border: 1px solid #3b2d21; border-radius: 2px; padding: .75rem .85rem; min-width: 0;
}
.field textarea { min-height: 6.5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(207, 160, 82, .2); }
.field input:user-invalid { border-color: var(--cherry); }
form.samples .actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: .4rem; }
.form-status { margin: 0; font-size: .92rem; color: var(--gold-hi); }
.form-status.err { color: #e7797b; }
@media (max-width: 560px) { form.samples { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.foot { position: relative; z-index: 2; border-top: 1px solid var(--husk); background: #080605; }
.foot .wrap { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); gap: 2rem; padding-block: 3.5rem calc(2.5rem + env(safe-area-inset-bottom, 0px)); }
.foot img.word { width: min(280px, 70vw); height: auto; opacity: .95; }
.foot h4 { margin: 0 0 .8rem; font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: .92rem; color: var(--dust); }
.foot a { text-decoration: none; } .foot a:hover { color: var(--parchment); }
.foot .legal { grid-column: 1 / -1; border-top: 1px solid var(--husk); padding-top: 1.4rem; font-size: .8rem; color: var(--dim); display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: 1fr 1fr; } .foot .brandcol { grid-column: 1 / -1; } }

/* ---------- Draft toggle ---------- */
.draft-pill {
  position: fixed; z-index: 60; left: calc(var(--gutter-l)); bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  display: flex; align-items: center; gap: .6rem; padding: .45rem .5rem .45rem .8rem; border: 1px solid var(--husk); background: rgba(11, 9, 7, .85);
  font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dust); backdrop-filter: blur(6px);
}
.draft-pill button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--gold-hi); background: none; border: 1px solid var(--gold-lo); padding: .35em .7em; cursor: pointer; border-radius: 2px; }
@media (max-width: 760px) { .draft-pill { bottom: auto; top: calc(env(safe-area-inset-top, 0px) + 62px); } }

/* ---------- Phones held upright: type at the bottom, under the picture ---------- */
@media (max-aspect-ratio: 4/5) {
  .copy { padding-bottom: max(2.5rem, 7vh); }
  .copy > .beats, .copy > .beat { max-width: none; }
  .copy.upper { padding-top: max(10.5rem, 19vh); padding-bottom: 46vh; }
  .display { font-size: clamp(2.1rem, 9vw, 3.4rem); }
  .display.l, .display.s, .firsts .display { font-size: clamp(1.8rem, 7.4vw, 2.7rem); }
  .narr { font-size: clamp(1.06rem, 4.3vw, 1.25rem); }
  .manuscript { width: min(300px, 100%); padding: .85rem 1rem .75rem; }
  .manuscript .ar { font-size: 1.2rem; line-height: 1.5; }
  .manuscript hr { margin: .45rem 0; }
  .manuscript p { font-size: .72rem; line-height: 1.45; }
  .facts li { flex-basis: 45%; }
}
@media (max-width: 760px) {
  .super { font-size: .64rem; letter-spacing: .22em; padding-left: 2rem; right: var(--gutter-r); top: calc(env(safe-area-inset-top, 0px) + 112px); }
  .super::before { width: 1.3rem; }
  .scroll-cue::before, .scroll-cue::after { display: none; }
}

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