/* Tokens. Sea Glass values come from the Ninety brand refresh; walnut, cream and
   fire come from the LABS Ridge and Hearth moodboard. */

:root {
  --sans: 'Hanken Grotesk', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --pad: clamp(20px, 5.4vw, 92px);
  --nav-h: 68px;

  --ink: #1C2628; --paper: #F8F7F4; --horizon: #F1EFEA;
  --tide: #0B7F95; --tide-press: #096C7F;
  --fire: linear-gradient(135deg, #F58A45 0%, #E8572A 100%);

  /* cards stay Paper with a soft lift, whatever is behind them */
  --card-bg: #F8F7F4; --card-fg: #1C2628; --card-muted: #5B696C; --card-rule: #E3E7E8; --card-rule-2: #C6CECF;
  --card-r: 14px; --in-r: 8px; --card-shadow: 0 36px 70px -34px rgba(0, 0, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.1);
  --now: #0B7F95;
}

/* type over the scene */
:root[data-tone='dark'] {
  --fg: #F8F7F4; --fg-2: rgba(248, 247, 244, 0.8); --fg-3: rgba(204, 214, 216, 0.72);
  --hair: rgba(248, 247, 244, 0.2); --hair-2: rgba(248, 247, 244, 0.36);
  --topfade: rgba(9, 15, 18, 0.6); --scrim: rgba(12, 20, 23, 0.8); --halo: rgba(12, 20, 23, 0.9); --floor: rgba(12, 20, 23, 0.88); --focus: #6FD0E3; --dot: #30B2CE;
}
:root[data-tone='light'] {
  --fg: #1C2628; --fg-2: #46555A; --fg-3: #5B696C;
  --hair: rgba(28, 38, 40, 0.18); --hair-2: rgba(28, 38, 40, 0.32);
  --topfade: rgba(246, 243, 236, 0); --scrim: rgba(246, 243, 236, 0.5); --halo: rgba(246, 243, 236, 0.95); --floor: rgba(246, 243, 236, 0.9); --focus: #0B7F95; --dot: #0B7F95;
}

/* ---- A · Blue hour ---- */
[data-variant='a'] {
  --page-bg: #1C2628;
  --g-bg: #1C2628; --g-fg: #F8F7F4; --g-muted: #A1ADAF; --g-hair: rgba(248, 247, 244, 0.24); --g-field: rgba(248, 247, 244, 0.05); --tide-on-g: #30B2CE;
  --book-bg: #27434B; --book-fg: #F8F7F4; --book-edge: #27434B;   /* the lighter end of blue hour: a new chapter, same family */
  --foot-bg: #223A40; --foot-fg: #F8F7F4; --foot-muted: #A1ADAF;
  --read-bg: #1C2628; --read-still: url('../assets/img/terrain-expanded-dark.jpg');
}

/* ---- B · LABS, Ridge and Hearth ---- */
[data-variant='b'] {
  --page-bg: #17110D;
  --card-bg: #EDE3D1; --card-fg: #3A1E14; --card-muted: #77593F; --card-rule: rgba(58, 30, 20, 0.15); --card-rule-2: rgba(58, 30, 20, 0.3);
  --card-r: 8px; --in-r: 4px; --card-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 2px 10px rgba(0, 0, 0, 0.2);
  --now: linear-gradient(180deg, #F58A45, #E8572A);
  --g-bg: #17110D; --g-fg: #EDE3D1; --g-muted: #B8A58C; --g-hair: rgba(237, 227, 209, 0.24); --g-field: rgba(237, 227, 209, 0.05); --tide-on-g: #30B2CE;
  --book-bg: #17110D; --book-fg: #EDE3D1; --book-edge: #17110D;
  --foot-bg: #17110D; --foot-fg: #EDE3D1; --foot-muted: #B8A58C;
  --read-bg: #17110D; --read-still: url('../assets/img/terrain-expanded-dark.jpg');
}
[data-variant='b'][data-tone='dark'] { --fg: #F4EDE0; --fg-2: rgba(237, 227, 209, 0.82); --fg-3: rgba(217, 201, 174, 0.7); --dot: #D9C9AE; }
/* Hearth speaks in the serif: the words on the chalet wall, and anything a person said */
[data-variant='b'] .ch-hero .display, [data-variant='b'] .ch-hero .lede, [data-variant='b'] .words, [data-variant='b'] .msg--you, [data-variant='b'] .overcome { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.012em; }
[data-variant='b'] .ch-hero .lede { font-size: clamp(21px, 1.9vw, 28px); max-width: none; }
[data-variant='b'] .ch-hero .display { font-size: clamp(56px, 8.4vw, 132px); line-height: 0.96; letter-spacing: -0.025em; }
@media (min-width: 900px) { [data-variant='b'] .ch-hero .display br { display: none; } }
[data-variant='b'] .ch-hero::after { display: none; }
[data-variant='b'] .ch-hero { padding-bottom: 104px; }
[data-variant='b'] .words { font-size: 24px; line-height: 1.16; padding-left: 14px; border-left: 2px solid #E8572A; }
[data-variant='b'] .overcome { font-size: 22px; line-height: 1.18; }
[data-variant='b'] .msg--you { font-size: 19px; line-height: 1.25; background: none; color: var(--card-fg); padding: 0; border-radius: 0; align-self: flex-start; }
[data-variant='b'] .card--thirty .hash { display: none; }      /* the day marks live in one place, at the foot of the page */
[data-variant='b'] .hud__read { display: none; }
[data-variant='b'] .hud__days { display: flex; bottom: 46px; left: calc(var(--pad) + 4px); }
[data-variant='b'] .stage::before { display: none; }
[data-variant='b'] .card__t { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
[data-variant='b'] .card__t .ico { display: none; }
[data-variant='b'] h2, [data-variant='b'] .stop__text h3, [data-variant='b'] .stagecol h3 { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.015em; line-height: 1.02; }
[data-variant='b'] .stop__text h3 { font-size: clamp(34px, 3.8vw, 56px); }
[data-variant='b'] .stagecol h3 { font-size: clamp(24px, 2.2vw, 32px); }
[data-variant='b'] .ch-hero .eyebrow { margin-bottom: 10px; }
[data-variant='b'] .nav { top: 14px; }
[data-variant='b'] .words { border-left-color: rgba(58, 30, 20, 0.3); }
/* the wall carries on below: planks, and a little of the fire */
[data-variant='b'] .ground__in, [data-variant='b'] .book { background-image: radial-gradient(ellipse 60% 90% at -6% 104%, rgba(246, 138, 69, 0.16), rgba(232, 87, 42, 0) 64%), repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 137px, rgba(0, 0, 0, 0.4) 137px 138.5px, rgba(255, 214, 170, 0.04) 138.5px 140px); }
/* back by the fire: the range seen once more through the window, the hearth below it */
[data-variant='b'] .foot__window { --hx: max(var(--pad), 8vw); --ht: 7vh; --hb: 16vh; }
[data-variant='b'] .foot__window::before { content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 72% 58% at 50% 120%, rgba(246, 138, 69, 0.52), rgba(232, 87, 42, 0.15) 45%, rgba(232, 87, 42, 0) 76%), linear-gradient(180deg, #17110D, #231A13);
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, var(--hx) var(--ht), calc(100% - var(--hx)) var(--ht), calc(100% - var(--hx)) calc(100% - var(--hb)), var(--hx) calc(100% - var(--hb)), var(--hx) var(--ht)); }
[data-variant='b'] .foot__window::after { content: ''; position: absolute; left: var(--hx); right: var(--hx); top: var(--ht); bottom: var(--hb); border-style: solid; border-width: 24px 24px 34px; border-color: #0D0806 #22160E #5E4028 #1A110B; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.7), inset 0 34px 64px -26px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(246, 167, 107, 0.18); }
[data-variant='b'] .foot__bar { background: #231A13; }

/* ---- C · The hike ---- */
[data-variant='c'] {
  --page-bg: #1C2628;
  --g-bg: #F1EFEA; --g-fg: #1C2628; --g-muted: #5B696C; --g-hair: rgba(28, 38, 40, 0.2); --g-field: #F8F7F4; --tide-on-g: #0B7F95;
  --book-bg: #1C2628; --book-fg: #F8F7F4; --book-edge: #1C2628;
  --foot-bg: #1C2628; --foot-fg: #F8F7F4; --foot-muted: #A1ADAF;
  --read-bg: #F1EFEA; --read-still: url('../assets/img/terrain-expanded.jpg');
  --card-shadow: 0 30px 60px -32px rgba(28, 38, 40, 0.42), 0 2px 8px rgba(28, 38, 40, 0.08);
}

.ground { --focus: var(--tide-on-g); }

/* the hike: the nav reads against the sky, not the snow */
:root[data-navtone='dark']:not(.on-ground):not(.is-read) .nav { --fg: #F8F7F4; --fg-2: rgba(248, 247, 244, 0.8); --hair-2: rgba(248, 247, 244, 0.36); color: #F8F7F4; }

/* once the page has risen over the scene, the nav sits on it */
.on-ground .nav { background: var(--g-bg); color: var(--g-fg); --fg: var(--g-fg); --fg-2: var(--g-muted); --hair-2: var(--g-hair); }

/* over the booking band and the footer, the nav takes their colour, so the last view of the scene sits in one frame */
.on-book .nav, .on-book .nav::before { background: var(--book-edge); }
.on-book .nav { color: var(--book-fg); --fg: var(--book-fg); --fg-2: rgba(248, 247, 244, 0.8); --hair-2: rgba(248, 247, 244, 0.36); }

/* the hike: while the sky behind the nav is still dark, a little shade holds the white type */
:root[data-navtone='dark'][data-tone='light'] { --topfade: rgba(9, 15, 18, 0.3); }
