/* Climb the mountain. Layout, type, cards, HUD and the page below the scene.
   Palettes per variation live in themes.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page-bg); color: var(--fg); font: 400 17px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
h1, h2, h3, p, ol, ul, dl, dd, blockquote, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 999px; background: var(--tide); color: #F8F7F4; text-decoration: none; font-size: 14px; }
.skip:focus { top: 14px; }
.noscript { position: relative; z-index: 5; padding: 120px var(--pad); }
.ico { flex: none; }
.no-anim *, .no-anim *::before, .no-anim *::after { transition: none !important; animation: none !important; }

.mono { font-family: var(--mono); font-size: 11px; line-height: 1.4; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 400; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }

/* ---- nav ---- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; height: var(--nav-h); padding: 0 var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--fg); transition: color 500ms ease; }
.lock { display: inline-flex; align-items: flex-end; gap: 5px; text-decoration: none; color: inherit; line-height: 1; }
.mark { display: block; width: 37px; height: 24px; background: currentColor; -webkit-mask: url('../assets/mark.svg') no-repeat center / contain; mask: url('../assets/mark.svg') no-repeat center / contain; }
.lock__ai { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; transform: translateY(1px); }
.lock__labs { font: 500 15px/1 var(--mono); letter-spacing: 0.1em; margin-left: 3px; }
.firedot { width: 6px; height: 6px; border-radius: 50%; background: var(--fire); margin: 0 1px 0 0; }
.nav::before { content: ''; position: absolute; inset: -20px 0 -28px 0; z-index: -1; background: linear-gradient(180deg, var(--g-bg) 0 74%, transparent); opacity: var(--nav-k, 0); pointer-events: none; }
.nav__links { display: flex; gap: 6px; margin-left: auto; }
.nav__links a { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; font-size: 14px; text-decoration: none; color: var(--fg-2); border-radius: 999px; transition: color 150ms ease; }
.nav__links a:hover { color: var(--fg); }
.nav__end { display: flex; align-items: center; gap: 8px; }
.nav__signin { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; font-size: 14px; text-decoration: none; color: var(--fg-2); border-radius: 999px; transition: color 150ms ease; }   /* quiet, like the section links (spec 44, F3) */
.nav__signin:hover { color: var(--fg); }
.nav .nav__read { display: none; }

.pill { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 40px; padding: 0 20px; border-radius: 999px; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background 150ms ease, border-color 150ms ease, color 150ms ease; }
.pill--go { background: var(--tide); color: #F8F7F4; }
.pill--go:hover { background: var(--tide-press); }
.pill--quiet { border: 1px solid var(--hair-2); color: var(--fg); }
.pill--quiet:hover { border-color: var(--fg); }
.pill--lg { height: 54px; padding: 0 28px; font-size: 16px; }
.textlink { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; text-decoration: underline; text-decoration-color: var(--g-hair, currentColor); text-underline-offset: 5px; }
.textlink:hover { text-decoration-color: currentColor; }

/* ---- the scene ---- */
.world { position: relative; z-index: 1; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: clip; }
/* a soft fall of shade under the nav, so lines in the scene never run through its links */
.stage::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 120px; z-index: 3; background: linear-gradient(180deg, var(--topfade), transparent); pointer-events: none; }
.grain { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: url('../assets/img/noise.png'); background-size: 150px; mix-blend-mode: soft-light; opacity: 0.028; }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; }
.lead { stroke: var(--fg); stroke-width: 1; opacity: 0; vector-effect: non-scaling-stroke; fill: none; stroke-linejoin: round; }
.lead__ring { fill: none; stroke: var(--fg); stroke-width: 1; opacity: 0; }
.lead__n { font: 500 12px var(--mono); fill: var(--fg); opacity: 0; }

.ch { position: absolute; inset: 0; z-index: 4; padding: calc(var(--nav-h) + 20px) var(--pad) 44px; opacity: 0; pointer-events: none; color: var(--fg); transition: color 500ms ease; }

.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--fg-2); }
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--dot); }
.display { font-weight: 600; font-size: clamp(56px, 10.4vw, 168px); line-height: 0.9; letter-spacing: -0.045em; }
.display--2 { font-size: clamp(52px, 9vw, 148px); }
.lede { font-size: clamp(18px, 1.55vw, 23px); line-height: 1.35; color: var(--fg-2); max-width: 30ch; text-wrap: balance; }
h2 { font-weight: 600; font-size: clamp(34px, 4.5vw, 64px); line-height: 1; letter-spacing: -0.036em; text-wrap: balance; }
h3 { font-weight: 600; letter-spacing: -0.028em; }

/* hero */
.ch-hero { display: grid; grid-template-columns: 1fr auto; grid-template-rows: 1fr auto auto auto; align-items: end; gap: 16px 32px; padding-bottom: 64px; }
.ch-hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 38%; z-index: -1; background: linear-gradient(180deg, transparent, var(--floor) 78%); opacity: 0.8; pointer-events: none; }
.ch-hero .eyebrow { grid-column: 1 / -1; grid-row: 2; }
.ch-hero .display { grid-column: 1 / -1; grid-row: 3; }
.ch-hero .lede { grid-column: 1; grid-row: 4; }
.cue { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; color: var(--fg-2); }
.cue__mouse { overflow: visible; animation: cue-bob 2.6s ease-in-out infinite; }
.cue__wheel { animation: cue-wheel 2.6s ease-in-out infinite; }
@keyframes cue-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
@keyframes cue-wheel { 0% { transform: translateY(0); opacity: 1; } 55% { transform: translateY(4px); opacity: 0; } 56% { transform: translateY(-1px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
/* A, wide screens: the headline stands in the scene behind the summit; the eyebrow and the line of copy are set around it */
@media (min-aspect-ratio: 11/10) { .immersive[data-variant='a'] .ch-hero .display { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
.ch-hero.is-anchored::after { display: none; }
.ch-hero.is-anchored .eyebrow, .ch-hero.is-anchored .lede { position: absolute; grid-area: auto; left: var(--hx); }   /* grid-area: auto so they are placed against the whole hero, not a grid cell */
.ch-hero.is-anchored .eyebrow { top: calc(var(--hyt) - 44px); }
.ch-hero.is-anchored .lede { top: calc(var(--hyb) + 30px); }

/* five stages */
.ch-stages { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; padding-top: calc(var(--nav-h) + 64px); padding-bottom: 84px; }
.ch-stages::after { content: ''; position: absolute; inset: auto 0 0 0; height: 46%; z-index: -1; background: linear-gradient(180deg, transparent, var(--floor) 62%); pointer-events: none; }
.ch__head { display: flex; flex-direction: column; gap: 16px; max-width: min(640px, 52vw); }
.ch__head h2 { max-width: 13ch; }
.profile { display: none; width: 100%; height: clamp(120px, 22vh, 220px); overflow: visible; margin-top: auto; color: var(--fg); }
.profile path { fill: none; stroke: currentColor; stroke-width: 1.5; }
.profile circle { fill: currentColor; }
.stagerow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(14px, 2vw, 32px); }
.stagecol { position: relative; padding-top: 16px; border-top: 1px solid var(--hair); display: flex; flex-direction: column; gap: 6px; transition: border-color 600ms ease; }
.stagecol.is-on { opacity: 1; }
.stagecol.is-current { border-top-color: var(--fg); }
.stagecol .mono { color: var(--fg-2); }
.stagecol h3 { font-size: clamp(20px, 1.9vw, 28px); line-height: 1.05; }
.stagecol .who { font-size: 15px; line-height: 1.35; color: var(--fg); }
.stagecol .stuck { font-size: 13.5px; line-height: 1.4; color: var(--fg-2); }

/* find your path */
.ch-intro { display: grid; align-content: center; }
.ch-intro .display { max-width: 4.6em; }   /* two lines in the left column; the trail and the summit hold the centre */

/* stops */
.stop { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr) minmax(0, 372px); align-items: center; gap: 24px; padding-bottom: 96px; }
.stop__text { position: relative; grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 14px; align-self: center; }
.stop__visual { grid-column: 3; grid-row: 1; justify-self: end; width: 100%; }
.stop[data-side='left'] .stop__text { grid-column: 3; }
.stop[data-side='left'] .stop__visual { grid-column: 1; justify-self: start; }
.stop__n { color: var(--fg-2); }
.stop__text h3 { font-size: clamp(30px, 3.3vw, 48px); line-height: 1.0; text-wrap: balance; }
.stop__text p:last-child { font-size: 17px; line-height: 1.5; color: var(--fg-2); max-width: 34ch; }
.stop__text, .stop__visual { transform: translateY(14px); transition: transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.stop.is-on .stop__text, .stop.is-on .stop__visual { transform: none; }
.stop[data-last] { align-items: end; padding-bottom: 12vh; }
.stop[data-last] .stop__text { align-self: end; }

/* ---- cards: two radii only (card, and the smaller things inside it) ---- */
.card { position: relative; background: var(--card-bg); color: var(--card-fg); border-radius: var(--card-r); padding: 20px 22px 22px; box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: 14px; font-size: 15px; line-height: 1.4; }
.card .mono { color: var(--card-muted); }
.card__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--card-rule); }
.card__t { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.card__k { margin-bottom: -6px; }
.card__foot { font-size: 13px; color: var(--card-muted); padding-top: 12px; border-top: 1px solid var(--card-rule); }
.words { font-size: 21px; line-height: 1.22; letter-spacing: -0.02em; font-weight: 500; text-wrap: balance; }
.moves li, .plan li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--card-rule); }
.moves li:first-child, .plan li:first-child { border-top: 0; padding-top: 2px; }
.plan em { font-style: normal; }
.hash { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; align-items: end; height: 22px; }
.hash i { display: block; height: 14px; border-radius: 1px; background: var(--card-rule-2); }
.hash i.on { background: var(--card-fg); }
.hash i.now { height: 22px; background: var(--now); }
.files li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--card-rule); }
.files li:first-child { border-top: 0; padding-top: 0; }
.files b { display: block; font-weight: 500; }
.files small { display: block; text-transform: none; letter-spacing: 0.02em; color: var(--card-muted); }
.files em { font-style: normal; color: var(--card-muted); }
.files .is-reading em { color: var(--tide); }
.dropzone { border: 1px dashed var(--card-rule-2); border-radius: var(--in-r); padding: 14px; text-align: center; font-size: 13.5px; color: var(--card-muted); }
.big { display: flex; align-items: flex-end; gap: 12px; }
.big__n { font-family: var(--mono); font-weight: 300; font-size: 84px; line-height: 0.8; letter-spacing: -0.05em; }
.big__u { font-size: 14px; line-height: 1.25; color: var(--card-muted); padding-bottom: 2px; }
.big__u b { color: var(--card-fg); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.mini { width: 100%; height: auto; color: var(--card-fg); overflow: visible; }
.read { display: grid; gap: 10px; }
.read div { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--card-rule); }
.overcome { font-size: 19px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 500; text-wrap: balance; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--card-rule); border: 1px solid var(--card-rule); border-radius: var(--in-r); overflow: hidden; }
.tools li { background: var(--card-bg); padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.tools .ico { margin-bottom: 14px; }
.tools b { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.tools span { font-size: 13px; color: var(--card-muted); line-height: 1.3; }

/* ---- HUD: one instrument per variation ---- */
.hud { position: absolute; inset: 0; z-index: 5; pointer-events: none; color: var(--fg); transition: color 500ms ease; }
.hud__read, .hud__days { position: absolute; left: var(--pad); bottom: 22px; color: var(--fg-2); font-variant-numeric: tabular-nums; transition: opacity 400ms ease; }
.hud__days { display: none; align-items: center; gap: 16px; }
.at-end .hud__read, .at-end .hud__days { opacity: 0; }
.hash--hud { width: 190px; height: 16px; }
.hash--hud i { height: 10px; background: var(--hair-2); }
.hash--hud i.on { background: var(--fg); }
.hash--hud i.now { height: 16px; background: var(--now); }
.hud__walk { display: none; }
.postlabel { position: absolute; left: 0; top: 0; z-index: 3; opacity: 0; pointer-events: none; display: flex; flex-direction: column; gap: 3px; color: var(--fg); white-space: nowrap; will-change: transform, opacity; transition: color 500ms ease; text-shadow: 0 0 10px var(--halo), 0 0 3px var(--halo); }
.postlabel b { font-weight: 500; }
.postlabel span { color: var(--fg-2); text-transform: none; letter-spacing: 0.02em; font-size: 12px; }

/* ---- B: the chalet. A lit wall, and one window with a deep reveal. As you scroll the
        window opens until its frame meets the edges of the page, and it stays there. ---- */
.chalet { position: absolute; inset: 0; z-index: 1; pointer-events: none; --k: 0;
  --fr: calc(46px - 16px * var(--k)); --sill: calc(52px - 14px * var(--k));
  --wx: calc(10.5% * (1 - var(--k))); --wt: calc(11vh * (1 - var(--k))); --wb: calc(46vh * (1 - var(--k))); }
.chalet__room { position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 82% 92% at -8% 114%, rgba(246, 138, 69, 0.5), rgba(232, 87, 42, 0.16) 40%, rgba(232, 87, 42, 0) 70%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 137px, rgba(0, 0, 0, 0.46) 137px 138.5px, rgba(255, 214, 170, 0.05) 138.5px 140px),
    repeating-linear-gradient(90deg, rgba(255, 220, 180, 0.016) 0 1px, rgba(0, 0, 0, 0) 1px 5px, rgba(0, 0, 0, 0.05) 5px 6px, rgba(0, 0, 0, 0) 6px 11px),
    linear-gradient(180deg, #0E0906 0%, #19110C 52%, #251911 100%);
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, var(--wx) var(--wt), calc(100% - var(--wx)) var(--wt), calc(100% - var(--wx)) calc(100% - var(--wb)), var(--wx) calc(100% - var(--wb)), var(--wx) var(--wt)); }
/* the reveal: head in shadow, jambs half lit, the sill catching the fire */
.chalet__frame { position: absolute; left: var(--wx); right: var(--wx); top: var(--wt); bottom: var(--wb);
  border-style: solid; border-width: var(--fr) var(--fr) var(--sill) var(--fr); border-color: #0D0806 #22160E #5E4028 #1A110B;
  box-shadow: 0 0 0 1px rgba(246, 167, 107, 0.2), 0 26px 70px rgba(0, 0, 0, 0.5); }
/* the glass: a cold spill onto the reveal, a faint reflection, shade under the head */
.chalet__frame::before { content: ''; position: absolute; inset: 0; box-shadow: 0 0 26px 3px rgba(118, 170, 186, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.7), inset 0 34px 64px -26px rgba(0, 0, 0, 0.62), inset 0 -12px 30px -20px rgba(246, 138, 69, 0.3); background: linear-gradient(112deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 34%); }
/* light across the reveal itself: corners fall away, the sill warms toward the fire */
.chalet__lit { position: absolute; left: calc(var(--fr) * -1); right: calc(var(--fr) * -1); top: calc(var(--fr) * -1); bottom: calc(var(--sill) * -1); pointer-events: none;
  background:
    radial-gradient(ellipse 55% 150% at 14% 100%, rgba(246, 150, 84, 0.34), rgba(246, 138, 69, 0) 62%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0) 14%, rgba(0, 0, 0, 0) 86%, rgba(0, 0, 0, 0.5)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0) 26%);
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, var(--fr) var(--fr), calc(100% - var(--fr)) var(--fr), calc(100% - var(--fr)) calc(100% - var(--sill)), var(--fr) calc(100% - var(--sill)), var(--fr) var(--fr)); }
.chalet__frame::after { content: ''; position: absolute; top: 0; bottom: 0; left: calc(33.33% - 4px); width: 9px; background: linear-gradient(90deg, #0D0806, #2A1B11 60%, #3B2616); box-shadow: 4px 0 14px rgba(0, 0, 0, 0.35); opacity: calc(1 - var(--k) * 2.4); }
.chalet__glow { position: absolute; inset: 44% 30% 0 0; background: radial-gradient(ellipse 70% 80% at 0% 112%, rgba(246, 138, 69, 0.24), rgba(232, 87, 42, 0) 70%); opacity: calc(1 - var(--k) * 1.8); animation: hearth 5.5s ease-in-out infinite alternate; }
@keyframes hearth { from { transform: scale(0.96); filter: brightness(0.9); } to { transform: scale(1.04); filter: brightness(1.08); } }

/* ---- the page below the scene (bottom 20%) ---- */
.ground { position: relative; z-index: 2; color: var(--g-fg); --col: 0px; }   /* one left margin from the nav to the footer */
.ground__edge { --edge-h: clamp(180px, 32vh, 340px); position: absolute; left: 0; right: 0; top: calc(1px - var(--edge-h)); height: var(--edge-h); background: linear-gradient(to bottom, transparent, var(--g-bg) 92%); pointer-events: none; }   /* the scene fades into the page */
.ground__in { position: relative; display: flow-root; background: var(--g-bg); padding: 0 var(--pad); }
/* the panel straddles the edge by a share of its own height, so the page below always covers a full screen before the footer opens */

/* The prompt is a line you write on, the way the route is a line you walk: a mark where you start, the send button where it ends. */
.try__note { font-size: 13px; color: var(--g-muted); margin-top: 20px; }
/* three questions to start from, set like the stage columns: a rule, a label, the words */

/* ---- the Ask Maz section: the chat window at product size, the questions beside it ---- */
section.maz { position: relative; color: var(--g-fg); }   /* section.: the Maz mark is an svg.maz */
.maz .ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.maz h2 { font-weight: 600; letter-spacing: -0.035em; line-height: 0.95; }
.maz input { background: none; border: 0; outline: 0; min-width: 0; font: inherit; color: inherit; }
.maz__send { flex: none; width: 54px; height: 54px; border-radius: 50%; background: var(--tide); color: #F8F7F4; display: grid; place-items: center; transition: background 150ms ease; }
.maz__send:hover { background: var(--tide-press); }
.maz__mic { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--card-muted); }
.maz__mic:hover { color: var(--card-fg); }
.maz__note { font-size: 13px; color: var(--g-muted); }
.maz__reading { font-size: 14px; color: var(--card-muted); }
.maz__reading::after { content: '…'; display: inline-block; width: 1.2em; overflow: hidden; vertical-align: bottom; animation: maz-dots 1.2s steps(4) infinite; }
@keyframes maz-dots { from { width: 0; } to { width: 1.2em; } }
/* the window and the text are centred on each other; the window starts higher, crossing the edge, and slides down
   into place as you scroll (see slideMaz in app.js) */
section.maz--2 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 88px); align-items: center; padding-block: clamp(64px, 9vh, 112px) clamp(88px, 13vh, 150px); }
.maz__win { position: relative; z-index: 3; height: 600px; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; background: var(--card-bg); color: var(--card-fg); border-radius: 22px; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.7), 0 2px 10px rgba(0, 0, 0, 0.2); will-change: transform; }
.maz__winh { display: flex; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--card-rule); }
.maz__winh b { font-weight: 600; font-size: 17px; }
.maz__winh .mono { margin-left: auto; color: var(--card-muted); }
.maz__winh svg.maz circle { stroke: var(--tide); }
.maz__log { overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; font-size: 16px; line-height: 1.5; }
.msg--you { align-self: flex-end; background: var(--card-fg); color: var(--card-bg); padding: 12px 16px; border-radius: 16px 16px 4px 16px; max-width: 78%; }
.msg--maz { display: grid; gap: 8px; max-width: 88%; }
.maz__log .src { color: var(--card-muted); }
.maz__bar { display: flex; align-items: center; gap: 8px; padding: 14px 14px 14px 24px; border-top: 1px solid var(--card-rule); background: #fff; }
.maz__bar input { flex: 1; height: 48px; font-size: 18px; color: var(--card-fg); }
.maz__bar input::placeholder { color: var(--card-muted); opacity: 1; }
.maz__copy { display: grid; gap: 24px; }
.maz__copy h2 { font-size: clamp(40px, 4.4vw, 66px); }
.maz__copy > p:not(.maz__note) { color: var(--g-muted); font-size: 18px; max-width: 40ch; }
.maz__qs { display: grid; border-top: 1px solid var(--g-hair); }
.maz__qs button { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--g-hair); text-align: left; font-size: 17px; color: var(--g-fg); }
.maz__qs .ico { color: var(--tide-on-g); transition: translate 150ms; }
.maz__qs button:hover .ico { translate: 4px 0; }

.book { position: relative; min-height: 56vh; background: var(--book-bg); color: var(--book-fg); display: grid; align-content: center; padding: clamp(72px, 12vh, 132px) var(--pad); overflow: hidden; }
/* where the page changes colour it does so on the same curve */
.book::before { content: ''; position: absolute; z-index: 1; left: 0; right: 0; top: -1px; height: 5vw; background: linear-gradient(to bottom right, var(--g-bg) calc(50% - 0.6px), transparent calc(50% + 0.6px)); pointer-events: none; }   /* a straight edge, rising about 3° to the right */
/* the range, faint, behind the closing line */
.book::after { content: ''; position: absolute; z-index: 0; inset: 0; background: url('../assets/img/terrain-expanded-dark.jpg') center 72% / cover no-repeat; mix-blend-mode: screen; opacity: 0.42; -webkit-mask-image: linear-gradient(to top, #000 20%, transparent 88%); mask-image: linear-gradient(to top, #000 20%, transparent 88%); pointer-events: none; }
.book__profile { display: block; width: 100%; height: clamp(130px, 25vh, 250px); overflow: visible; color: var(--tide-on-book, #30B2CE); }
.book__profile .line { fill: none; stroke: var(--tide-on-book, #30B2CE); stroke-width: 1.75; vector-effect: non-scaling-stroke; }
.book__profile .under { fill: url(#bpg); }
.book__profile .pt { fill: var(--book-fg); }
.book__profile .ring { fill: none; stroke: var(--book-fg); stroke-width: 1; }
.book__profile text { font: 500 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; fill: var(--book-fg); opacity: 0.78; }
.book__in { position: relative; z-index: 2; margin-left: var(--col); display: flex; flex-direction: column; align-items: flex-start; gap: clamp(32px, 4vw, 56px); }
.book h2 { position: relative; font-size: min(11.6vw, calc((100vw - 2 * var(--pad)) / 9.3)); font-weight: 600; line-height: 0.95; letter-spacing: -0.035em; max-width: none; white-space: nowrap; }   /* the style guide's display: Halbfett 600, 0.95, −0.035 em */
.book__go { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

.foot__window { height: calc(100vh - var(--nav-h) - 60px); position: relative; }
/* the window opens under an arch, the same curve the page rose with */
:root:not([data-variant='b']) .foot__window::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 110px; background: radial-gradient(ellipse 72% 100% at 50% 100%, transparent 0 99.3%, var(--book-edge) 100%); pointer-events: none; }
.foot__bar { background: var(--foot-bg); color: var(--foot-fg); padding: 20px var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot__bar .mono { color: var(--foot-muted); }
.lock--foot .mark { width: 31px; height: 20px; }

/* ---- review switch ---- */
.switch { position: fixed; right: 14px; bottom: 14px; z-index: 30; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(20, 28, 30, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.switch a { display: grid; place-items: center; width: 30px; height: 26px; border-radius: 999px; text-decoration: none; color: rgba(248, 247, 244, 0.7); letter-spacing: 0.04em; }
.switch a.is-on { background: #F8F7F4; color: #1C2628; }
.no-chrome .switch { display: none; }

/* ---- C: the hike. Chrome kept to a chapter label, a rail and Continue. ---- */
[data-mode='hike'] .nav .nav__read { display: inline-flex; }
[data-mode='hike'] .nav__links, [data-mode='hike'] .hud__read, [data-mode='hike'] .cue { display: none; }
[data-mode='hike'] .hud__walk { position: absolute; left: var(--pad); right: var(--pad); bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; pointer-events: auto; transition: opacity 400ms ease; }
.at-end .hud__walk { opacity: 0; pointer-events: none; }
.at-start .walk__back { visibility: hidden; }
.at-start .rail { opacity: 0; pointer-events: none; }
.hud__chapter { color: var(--fg); font-variant-numeric: tabular-nums; }
.rail { position: relative; flex: none; width: min(220px, 36vw); height: 26px; display: flex; align-items: center; transition: opacity 400ms ease; }
.rail::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--hair-2); }
.rail__fill { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--fg); transform-origin: 0 50%; transform: scaleX(0); }
.rail__tick { position: absolute; top: 0; width: 26px; height: 26px; margin-left: -13px; display: grid; place-items: center; color: var(--fg-3); }
.rail__tick::before { content: ''; position: absolute; left: 12.5px; top: 8px; width: 1px; height: 10px; background: currentColor; }
.rail__tick.is-on { color: var(--fg); }
.rail__tick.is-current::before { top: 4px; height: 18px; }
.walkbtns { display: flex; gap: 8px; justify-self: end; }
.walk__back { width: 44px; padding: 0; height: 44px; }
.walk__next { height: 44px; }
[data-mode='hike'] .ch-hero { grid-template-rows: 0 auto auto auto 1fr; align-items: start; align-content: start; padding-top: calc(var(--nav-h) + 56px); padding-bottom: 132px; }   /* the words stand in the night sky; the snow below is left to the track */
[data-mode='hike'] .ch-hero::after { display: none; }
[data-mode='hike'] .ch-hero .display { font-size: clamp(48px, 7.2vw, 112px); }
[data-mode='hike'] .stop { align-items: end; padding-bottom: 148px; }
[data-mode='hike'] .stop__text { align-self: end; }
[data-mode='hike'] .stop__text p:last-child { color: var(--fg); }
[data-mode='hike'] .stop__visual { align-self: center; }
[data-mode='hike'] .stop::after { content: ''; position: absolute; inset: auto 0 0 0; height: 66%; z-index: -1; background: linear-gradient(180deg, transparent, var(--floor) 78%); opacity: 0.85; pointer-events: none; }
:root[data-tone='light'][data-mode='hike'] .stop::after { height: 44%; opacity: 0.3; }   /* dark type on lit snow needs almost no backing; a strong one whitened the whole lower frame */
[data-mode='hike'] .ch-stages { padding-bottom: 104px; }
[data-mode='hike'] .profile, .is-read .profile { display: block; }

/* ---- read mode / no scene: the same content as a plain page ---- */
.is-read #gl, .is-read .leaders, .is-read .hud, .is-read .chalet, .is-read .grain, .is-read .postlabel, .is-read .ground__edge, .is-read .cue, .is-read .stage::before { display: none; }
.is-read body { background: var(--read-bg); }
.is-read .world { height: auto !important; }
.is-read .stage { position: static; height: auto; overflow: visible; padding-top: var(--nav-h); }
.is-read .ch { position: static; opacity: 1 !important; pointer-events: auto; padding: clamp(48px, 9vh, 96px) var(--pad); }
.is-read .ch::after { display: none !important; }
.is-read .ch-hero .display { position: static !important; width: auto !important; height: auto !important; clip-path: none !important; }
.is-read .ch-hero .eyebrow, .is-read .ch-hero .lede { position: static !important; }
.is-read .ch-hero { min-height: 62vh; }
.is-read .stop { padding-bottom: clamp(48px, 9vh, 96px); border-top: 1px solid var(--hair); }
.is-read .stop__text, .is-read .stop__visual { transform: none; }
.is-read .stop__n { display: block !important; }
.is-read .stagecol { opacity: 1; }
.is-read .foot__window { height: 46vh; background: var(--read-still) center 62% / cover; }
.is-read .foot__window::before, .is-read .foot__window::after { display: none !important; }
.is-read .nav { background: var(--read-bg); }
.no-gl .nav .nav__read { display: none !important; }

/* ---- smaller screens ---- */
@media (max-width: 1100px) {
  .stop { grid-template-columns: minmax(0, 360px) minmax(0, 1fr) minmax(0, 340px); }
  .nav__links { display: none; }
}
@media (max-width: 760px) {
  :root { --nav-h: 60px; }
  body { font-size: 16px; }
  .pill { height: 38px; padding: 0 16px; }
  .ch { padding-bottom: 32px; }
  .ch-hero { grid-template-columns: 1fr; grid-template-rows: 1fr auto auto auto auto; padding-bottom: 40px; }
  .cue { bottom: 28px; }
  .ch-hero { padding-bottom: 96px; }
  .book h2 { font-size: clamp(40px, 11vw, 56px); white-space: normal; }   /* two whole lines would be 34px on a phone: let them wrap instead */
  .ch__head { max-width: none; }
  .ch-stages { padding-top: calc(var(--nav-h) + 24px); padding-bottom: 36px; }
  .stagerow { grid-template-columns: 1fr; gap: 0; }
  .stagecol { display: none; }
  .stagecol.is-current, .is-read .stagecol { display: flex; }
  .stop { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; align-items: start; gap: 12px; padding-bottom: 28px; }
  .stop__text, .stop[data-side='left'] .stop__text { grid-column: 1; grid-row: 1; }
  .stop__visual, .stop[data-side='left'] .stop__visual, [data-mode='hike'] .stop__visual { grid-column: 1; grid-row: 3; justify-self: stretch; align-self: end; }
  .stop__text h3 { font-size: 30px; }
  .stop__text p:last-child { font-size: 15.5px; }
  .card { padding: 16px 16px 18px; gap: 10px; font-size: 14px; }
  .words { font-size: 18px; } .big__n { font-size: 64px; }
  .card--thirty .hash, .card--clarity .read, .card--plan .card__foot, .card--context .dropzone { display: none; }
  /* the hike: words sit just above their card, low on the snow, and the sky is left alone */
  [data-mode='hike'] .stop { grid-template-rows: 1fr auto auto; }
  [data-mode='hike'] .stop__text, [data-mode='hike'] .stop[data-side='left'] .stop__text { grid-row: 2; align-self: end; }
  [data-mode='hike'] .stop__text p:last-child { color: var(--fg); }
  .stop[data-last] { grid-template-rows: auto; align-content: start; }
  .hud__read, .hud__days { display: none !important; }
  [data-mode='hike'] .hud__walk { bottom: 14px; }
  [data-mode='hike'] .stop, [data-mode='hike'] .ch-hero, [data-mode='hike'] .ch-stages { padding-bottom: 118px; }
  [data-mode='hike'] .ch-hero { padding-top: calc(var(--nav-h) + 28px); }
  .ground { --col: 0px; }
  section.maz--2 { grid-template-columns: 1fr; padding-top: 0; }
  .maz__win { margin-top: -120px; height: 520px; }   /* stacked: the window crosses the edge and stays put */
  .foot__window { height: 62vh; }
  .is-read .stop { grid-template-rows: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .stop__text, .stop__visual { transform: none; }
}
[data-mode='hike'] .stop__n { color: var(--fg-2); }   /* the stop's number stays legible on blue-grey snow at first light */

/* the arrow in the headline (the DOM headline: C, small screens, read mode) */
.display--one, .display--arrow { white-space: nowrap; font-weight: 800; }
/* the arrow sits under 'From ' so that IPO starts where idea does */
.display .arr { display: inline-block; width: 2.1em; height: 1.02em; vertical-align: -0.15em; margin-right: 0.34em; overflow: visible; }
.display.display--guide { font-weight: 600; letter-spacing: -0.035em; line-height: 0.95; }   /* the style guide's Halbfett */
.display--guide .arr { width: 2.06em; margin-right: 0.32em; }
.display--guide .arr path { stroke-width: 12.5; }

.is-read .maz__win { margin-top: 0; transform: none !important; }
