/* hikers.dev
   1 tokens · 2 base · 3 parts · 4 the page as a plain document · 5 the page as one route · 6 small screens · 7 motion */

@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

/* ───────────── 1. tokens: every colour on the site is set here ───────────── */
:root {
  /* the brand inks. Change one of these and the page and the 3D map both follow. */
  --charcoal: #2B2B2B;        /* dark-mode paper */
  --limestone: #E6E4DB;       /* light-mode paper */
  --blaze: #FF6A3D;           /* the one signal colour */
  --blaze-deep: #B52E08;      /* blaze at text size on limestone */
  --chalk: #EDEAE2;           /* light ink */
  --night: #161616;           /* dark ink */

  /* roles. These are the dark-mode values; the light-mode pair for each sits in the block below. */
  color-scheme: dark;
  --paper: var(--charcoal);
  --ink: var(--chalk);
  --ink-soft: #B6B2A8;
  --signal: var(--blaze);         /* fills, dots, the trail */
  --signal-text: var(--blaze);    /* the signal when it is set as small text */
  --on-signal: var(--night);      /* text on a signal fill */
  --rule: rgb(237 234 226 / .2);

  /* map inks, read by main.js */
  --relief-hi: #8E8B84;           /* dot screen on lit slopes */
  --relief-lo: #1E1E1E;           /* dot screen on shadowed slopes */
  --contour: #6B6963;
  --chasm: #171717;
  --trail-planned: #D8D5CC;
  --river: #1D3B47;               /* water, in the blue a printed map keeps for it */
  --river-flow: #7FB2C2;          /* the strokes that show the current */
  --signal-shade: var(--blaze-deep);   /* the shaded side of a blaze solid, such as the bridge planks */
  --title-from: var(--ink);            /* the headline's gradient: from this at the top */
  --title-to: var(--signal-text);      /* to this at the bottom */
  --figure: #0C0C0C;                   /* the team is drawn in solid black, on both themes */
  --problem: #F2766F;                  /* light red: the cast of an obstacle card while the problem stands */
  --solved: #62C68D;                   /* light green: its cast once the problem is solved */
  --figure-line: var(--chalk);         /* the fine line work on those figures. Their tools take --signal, their outline --ink */

  /* glass: every label and card on the map is a pane of glass. Fill is the tint, shine the bright rim. */
  --glass-fill: rgb(30 30 30 / .46);
  --glass-fill-deep: rgb(30 30 30 / .72);   /* a pane that has to hold its text over the lit summit */
  --glass-shine: rgb(255 255 255 / .16);
  --glass-edge: rgb(255 255 255 / .2);
  --glass-shadow: rgb(0 0 0 / .45);
  --glass-ink-soft: var(--ink-soft);   /* secondary text on glass */
  --glass-blur: 20px;
  --radius-glass: 1.25rem;

  /* the dawn plate: the summit and the traverse print on blaze in both themes */
  --dawn-paper: var(--blaze);
  --dawn-ink: var(--night);
  --dawn-ink-soft: #47190A;
  --dawn-relief-hi: #FF9A76;
  --dawn-relief-lo: #7A2A0F;
  --dawn-contour: #A33A17;
  --dawn-chasm: #151515;
  --dawn-planned: #7A2A0F;
  --dawn-river: #151515;
  --dawn-river-flow: #A33A17;

  /* type and space */
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --bar-h: 4.25rem;
  --radius: 5px;
  --ease: cubic-bezier(.23, 1, .32, 1);
}

/* light-dark() keeps both themes on one line per role: light value first, dark value second */
@supports (color: light-dark(#000, #fff)) {
  :root {
    color-scheme: light dark;
    --paper: light-dark(var(--limestone), var(--charcoal));
    --ink: light-dark(var(--night), var(--chalk));
    --ink-soft: light-dark(#53514B, #B6B2A8);
    --signal-text: light-dark(var(--blaze-deep), var(--blaze));
    --rule: light-dark(rgb(22 22 22 / .22), rgb(237 234 226 / .2));
    --relief-hi: light-dark(#F6F5EF, #8E8B84);
    --relief-lo: light-dark(#7C7971, #1E1E1E);
    --contour: light-dark(#8D8B82, #6B6963);
    --chasm: light-dark(#4A4843, #171717);
    --trail-planned: light-dark(#3A3936, #D8D5CC);
    --river: light-dark(#8FB6C4, #1D3B47);
    --river-flow: light-dark(#F1F6F6, #7FB2C2);
    --glass-fill: light-dark(rgb(240 239 233 / .62), rgb(30 30 30 / .46));
    --glass-fill-deep: light-dark(rgb(240 239 233 / .8), rgb(30 30 30 / .72));
    --glass-shine: light-dark(rgb(255 255 255 / .75), rgb(255 255 255 / .16));
    --glass-edge: light-dark(rgb(255 255 255 / .8), rgb(255 255 255 / .2));
    --glass-shadow: light-dark(rgb(22 22 22 / .22), rgb(0 0 0 / .45));
    --glass-ink-soft: light-dark(#3D3B36, #B6B2A8);
    --problem: light-dark(#DC4A40, #F2766F);
    --solved: light-dark(#2C9A5F, #62C68D);
  }
  :root[data-theme="light"] { color-scheme: light; }
  :root[data-theme="dark"] { color-scheme: dark; }
}

/* the cast of an obstacle card is a colour that can be faded from one to the other */
@property --cast { syntax: "<color>"; inherits: true; initial-value: transparent; }

/* ───────────── 2. base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--ink-soft) var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 420 1.0625rem/1.55 var(--font);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  caret-color: var(--signal);
}
::selection { background: var(--blaze); color: var(--night); }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: .09em; }
:focus-visible { outline: 2px solid var(--signal-text); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; }

h1, h2, h3 { font-weight: 900; line-height: .94; letter-spacing: -.012em; text-transform: uppercase; text-wrap: balance; overflow-wrap: break-word; }
h2 { font-size: clamp(1.9rem, 4.1vw, 3.5rem); font-stretch: 106%; }
p { text-wrap: pretty; }

.skip { position: fixed; left: var(--gutter); top: .75rem; z-index: 20; padding: .6rem .9rem; background: var(--signal); color: var(--on-signal); font-weight: 700; border-radius: var(--radius); transform: translateY(-300%); }
.skip:focus { transform: none; }

/* ───────────── 3. parts ───────────── */
#world { position: fixed; inset: 0; width: 100%; height: 100lvh; display: block; z-index: 0; pointer-events: none; }
.no-map #world { display: none; }

.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 10; height: var(--bar-h);
  display: flex; align-items: center; gap: clamp(.75rem, 2.2vw, 2rem);
  padding: 0 var(--gutter); color: var(--ink);
  transition: color .25s var(--ease);
}
.mark { display: inline-flex; align-items: center; gap: .6rem; margin-right: auto; text-decoration: none; font-weight: 800; font-stretch: 112%; font-size: 1.12rem; letter-spacing: -.01em; }
.mark svg { height: 1.75rem; width: auto; flex: none; overflow: visible; }
.mark__ink { fill: currentColor; }
.mark__flag { fill: var(--signal); transition: transform .22s var(--ease); }
.mark b { font-weight: 800; color: var(--signal-text); }
.bar__nav { display: flex; gap: clamp(1rem, 2vw, 1.9rem); }
.bar__nav a { font-size: .8125rem; font-weight: 650; font-stretch: 108%; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; padding: .55rem 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .22s var(--ease); }
.theme { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; background: none; border: 1px solid var(--rule); border-radius: 50%; cursor: pointer; transition: border-color .18s var(--ease), transform .18s var(--ease); }
.theme svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .35s var(--ease); }
.theme__half { fill: currentColor; stroke: none; }

.btn {
  display: inline-flex; align-items: center; gap: .7rem; min-height: 3.1rem; padding: .85rem 1.35rem;
  background: var(--signal); color: var(--on-signal); border-radius: var(--radius);
  font-weight: 800; font-stretch: 108%; font-size: .95rem; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.btn::after { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; box-shadow: .78rem 0 0 -1px currentColor, 1.56rem 0 0 -2px currentColor; margin-right: 1.5rem; transition: transform .22s var(--ease); }
.btn--small { min-height: 2.75rem; padding: .6rem 1rem; font-size: .8125rem; }
.btn--small::after { display: none; }
/* on a phone the links and the call to action move into a glass sheet that opens from a Menu button in the bar (section 6) */
.bar__menu, .menu { display: none; }
.link { font-weight: 650; text-decoration: underline dotted; text-decoration-thickness: .14em; text-underline-offset: .3em; padding: .6rem 0; transition: color .16s var(--ease); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2rem; }
.reach, .social { display: flex; flex-wrap: wrap; gap: 0 1.75rem; margin-top: .9rem; font-weight: 650; }
.reach { align-items: baseline; }
.reach .link, .reach span, .social .link { display: inline-block; padding: .6rem 0; }
.reach span { color: var(--ink-soft); }
.social { margin-top: 0; }

.key { display: inline-block; flex: none; width: .72rem; height: .72rem; }
.key--walked { border-radius: 50%; background: var(--signal); }
.key--planned { border-radius: 50%; background: var(--trail-planned); transform: scale(.72); }
.key--blocked { color: var(--signal-text); background: linear-gradient(45deg, transparent 40%, currentColor 40% 60%, transparent 60%), linear-gradient(-45deg, transparent 40%, currentColor 40% 60%, transparent 60%); }
.key--summit { background: var(--ink); clip-path: polygon(50% 4%, 100% 96%, 0 96%); }

.legend { display: flex; gap: 1.4rem; font-size: .75rem; font-weight: 650; font-stretch: 108%; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.legend li { display: flex; align-items: center; gap: .5rem; }

.pin { display: none; }

.status { display: grid; margin-bottom: 1rem; font-size: .75rem; font-weight: 750; font-stretch: 110%; letter-spacing: .08em; text-transform: uppercase; }
.status span { grid-area: 1 / 1; display: flex; align-items: center; gap: .55rem; transition: opacity .2s var(--ease), transform .28s var(--ease); }
.status span::before { content: ""; width: .72rem; height: .72rem; flex: none; }
.status__no { color: var(--ink-soft); }
.status__no::before { background: linear-gradient(45deg, transparent 40%, currentColor 40% 60%, transparent 60%), linear-gradient(-45deg, transparent 40%, currentColor 40% 60%, transparent 60%); }
.status__yes { color: var(--signal-text); }
.status__yes::before { border-radius: 50%; background: currentColor; }
.status__no { opacity: 0; transform: translateY(-.5rem); }

.rail__item h3 { font-size: clamp(3.4rem, 8.6vw, 8.25rem); font-stretch: 125%; letter-spacing: -.03em; line-height: .86; }
.rail__item dl { margin-top: 1.4rem; border-top: 2px solid currentColor; }
.rail__item dl > div { padding: .8rem 0 .85rem; border-bottom: 1px solid var(--rule); }
.rail__item dt { font-weight: 800; font-stretch: 106%; font-size: 1.02rem; }
.rail__item dd { color: var(--ink-soft); font-size: .97rem; line-height: 1.45; max-width: 38ch; }
.rail__item--title p { margin-top: 1.25rem; max-width: 34ch; font-size: 1.12rem; }

.say { font-size: clamp(1.45rem, 2.7vw, 2.4rem); font-weight: 600; line-height: 1.2; letter-spacing: -.012em; max-width: 24ch; margin-top: 1.5rem; }

.steps { margin-top: 1.6rem; counter-reset: step; }
.steps li { position: relative; padding: .85rem 0 .9rem 2rem; border-top: 1px solid var(--rule); }
.steps li::before { content: ""; position: absolute; left: .1rem; top: 1.18rem; width: .62rem; height: .62rem; border-radius: 50%; background: var(--trail-planned); transform: scale(.72); transition: transform .25s var(--ease), background-color .25s var(--ease); }
.steps h3 { font-size: 1.05rem; font-stretch: 108%; letter-spacing: .02em; line-height: 1.15; }
.steps p { margin-top: .3rem; color: var(--ink-soft); font-size: .97rem; line-height: 1.45; max-width: 46ch; }

.colophon { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 2rem; margin-top: 1.6rem; padding-top: .9rem; border-top: 1px solid var(--rule); font-size: .8125rem; color: var(--ink-soft); }
.trace, .veil { display: none; }

/* the dawn plate: wherever the paper is blaze, the inks are these */
.wp--summit, .wp--traverse, :root[data-plate="dawn"] .bar, :root[data-plate="dawn"] .trace {
  --paper: var(--dawn-paper); --ink: var(--dawn-ink); --ink-soft: var(--dawn-ink-soft);
  --signal: var(--night); --signal-text: var(--night); --on-signal: var(--blaze);
  --rule: rgb(22 22 22 / .32); --trail-planned: var(--dawn-planned);
  color: var(--ink);
}

/* ───────────── 4. the page as a plain document (no script, no WebGL, or reduced motion) ───────────── */
.wp { position: relative; z-index: 1; padding: clamp(4rem, 9vw, 7.5rem) var(--gutter); background: var(--paper); }
.wp__copy { max-width: 40rem; }
.wp__copy > p:not(.status) { margin-top: 1.1rem; color: var(--ink-soft); max-width: 46ch; }
.wp--hero { min-height: 100svh; display: grid; align-content: end; gap: 2.5rem; padding-top: calc(var(--bar-h) + 2rem); padding-bottom: clamp(2rem, 6vh, 4rem); }
.has-map .wp--hero { background: none; }
h1 { font-size: var(--h1, clamp(3rem, min(9vw, 14.5vh), 8.6rem)); line-height: .88; letter-spacing: -.02em; width: fit-content; max-width: 100%; }   /* as wide as its words, so the page can tell what the headline covers */
h1 span { display: block; white-space: nowrap; }
h1 span:nth-child(1) { font-stretch: 62%; }       /* the four widths set the four lines to one measure, narrow at the top and wide at the foot */
h1 span:nth-child(2) { font-stretch: 65%; }
h1 span:nth-child(3) { font-stretch: 78.5%; }
h1 span:nth-child(4) { font-stretch: 125%; }
/* the headline runs from ink to the signal, top to bottom. Where a browser cannot paint text with a gradient, the last line alone takes the signal */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  h1 { background: linear-gradient(174deg, var(--title-from) 22%, var(--title-to) 88%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; padding-bottom: .06em; }
}
@supports not ((background-clip: text) or (-webkit-background-clip: text)) {
  h1 span:last-child { color: var(--signal-text); }
}
.wp--hero .wp__copy { margin-bottom: clamp(1.5rem, 11vh, 7.5rem); }       /* the headline and its action sit a little up from the foot of the screen */
.wp--hero .actions { margin-top: 2.4rem; }
.wp--obstacle .status__no { display: none; }
.wp--obstacle .status__yes { opacity: 1; transform: none; }
.wp--summit h2 { font-size: clamp(2.6rem, 9vw, 9.4rem); letter-spacing: -.02em; line-height: .84; }
.wp--summit h2 span { display: block; white-space: nowrap; }
.wp--summit h2 span:nth-child(1) { font-stretch: 125%; }
.wp--summit h2 span:nth-child(2) { font-stretch: 88.5%; }
.wp--summit h2 span:nth-child(3) { font-stretch: 103.5%; }
.wp--summit .wp__copy { max-width: none; }
.wp--summit .wp__copy > p { color: var(--ink); font-size: clamp(1.05rem, 1.5vw, 1.3rem); font-weight: 520; max-width: 40ch; }
.rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 3.5rem clamp(2rem, 4vw, 4rem); }
:root:not(.world) .rail__item h3 { font-size: clamp(2.6rem, 5vw, 4.4rem); font-stretch: 112%; }
:root:not(.world) .bar { position: sticky; background: var(--paper); border-bottom: 1px solid var(--rule); }
.has-map:not(.world) .bar { background: color-mix(in srgb, var(--paper) 92%, transparent); }

/* ───────────── 5. the page as one route (script on, WebGL on, motion allowed) ───────────── */
.world body { overflow-x: clip; }
.world .bar { background: linear-gradient(var(--paper) 45%, transparent); }   /* the map never runs under the navigation at full strength */
.world .wp {
  position: fixed; inset: 0; z-index: 1; overflow: clip;
  display: grid; align-content: end; justify-items: start;
  padding: calc(var(--bar-h) + 1rem) calc(var(--gutter) + 1.75rem) clamp(1.75rem, 6vh, 3.75rem) var(--gutter);
  background: none; pointer-events: none;
}
/* each part fades on its own. Fading the whole section would cut its glass off from the map behind it. */
.world .wp > *, .world .wp--hero::before, .world .rail__item { opacity: var(--o, 0); }
.world .wp > .rail { opacity: 1; }
.world .wp.is-on a, .world .wp.is-on button { pointer-events: auto; }
.world .wp__copy { max-width: 31rem; }

/* glass: a tinted pane that blurs the map behind it, with a bright rim where the light catches the edge */
.world .wp--obstacle .wp__copy, .world .wp--process .wp__copy, .world .wp--name .wp__copy, .world .wp--contact .wp__copy, .world .rail__item, .world .legend, .world .pin, .menu {
  background: linear-gradient(135deg, var(--glass-shine), transparent 36%, transparent 72%, color-mix(in srgb, var(--glass-shine) 40%, transparent)), var(--glass-fill);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.7);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.7);
  border: 1px solid var(--glass-edge); border-radius: var(--radius-glass);
  box-shadow: inset 0 1px 0 var(--glass-shine), inset 0 -1px 0 rgb(0 0 0 / .12), 0 1.6rem 3rem -1.6rem var(--glass-shadow), 0 .25rem .7rem -.3rem var(--glass-shadow);
  --ink-soft: var(--glass-ink-soft);
}
.world .wp--obstacle .wp__copy, .world .wp--process .wp__copy, .world .wp--name .wp__copy, .world .wp--contact .wp__copy {
  padding: clamp(1.25rem, 2.2vw, 2rem);
  transform: translate3d(0, calc((1 - var(--o, 0)) * 1.25rem), 0);
}
.world .wp--process .wp__copy { --glass-fill: var(--glass-fill-deep); }
/* an obstacle card is cast light red while the problem stands and light green once it is solved */
.world .wp--obstacle .wp__copy {
  --cast: var(--problem);
  background: linear-gradient(135deg, color-mix(in srgb, var(--cast) 30%, transparent), color-mix(in srgb, var(--cast) 8%, transparent) 52%, color-mix(in srgb, var(--cast) 16%, transparent)),
    linear-gradient(135deg, var(--glass-shine), transparent 36%, transparent 72%, color-mix(in srgb, var(--glass-shine) 40%, transparent)), var(--glass-fill);
  border-color: color-mix(in srgb, var(--cast) 50%, var(--glass-edge));
  box-shadow: inset 0 1px 0 var(--glass-shine), inset 0 -1px 0 rgb(0 0 0 / .12), 0 1.6rem 3rem -1.6rem var(--glass-shadow), 0 0 2.8rem -.7rem color-mix(in srgb, var(--cast) 55%, transparent);
  transition: --cast .6s var(--ease);
}
.world .wp--obstacle.is-clear .wp__copy { --cast: var(--solved); }
.world .wp--obstacle .status__no { color: var(--ink); }          /* full ink: the red cast is strongest behind this small label */
.world .wp--obstacle .status__no::before { color: var(--problem); }
.world .wp--obstacle .status__yes::before { background: var(--solved); }
/* an obstacle card sizes its heading from its own width, so the longest word always fits */
.world .wp--obstacle .wp__copy { width: min(100%, 31rem); container-type: inline-size; }
.world .wp--obstacle h2 { font-size: clamp(1.5rem, 10.4cqi, 3.5rem); }
.world .wp--right { justify-items: end; }
.world .wp--obstacle .status__no { display: flex; opacity: 1; transform: none; }
.world .wp--obstacle .status__yes { opacity: 0; transform: translateY(.5rem); }
.world .wp--obstacle.is-clear .status__no { opacity: 0; transform: translateY(-.5rem); }
.world .wp--obstacle.is-clear .status__yes { opacity: 1; transform: none; }
.world .wp--obstacle .status__yes { color: var(--ink); }      /* on glass the label is ink and only its dot is blaze: small blaze type cannot hold contrast over a moving map */

.world .wp--hero { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.world .wp--hero .wp__copy { max-width: none; transform: translate3d(0, calc(var(--p, 0) * -3rem), 0); }
.world .legend { justify-self: end; padding: .6rem .95rem; --radius-glass: .8rem; --glass-blur: 12px; }

.world .pin {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: .45rem; white-space: nowrap;
  padding: .36rem .7rem .34rem; --radius-glass: .7rem; --glass-blur: 12px;
  font-size: .72rem; font-weight: 700; font-stretch: 100%; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; color: var(--ink);
  transform: translate3d(calc(var(--x, -999px) + 14px), calc(var(--y, -999px) - 50%), 0);
  transition: opacity .2s var(--ease), border-color .16s var(--ease);
}
.world .pin.is-flip { transform: translate3d(calc(var(--x, -999px) - 100% - 14px), calc(var(--y, -999px) - 50%), 0); }
.world .pin.is-off { opacity: 0; }
.world .wp .pin.is-off { pointer-events: none; }   /* a label out of sight takes no clicks: the page hides any that would lie over the headline or its button */
/* a tag names a member of the team: it sits centred above the figure's head */
.world .pin--tag, .world .pin--tag.is-flip { transform: translate3d(calc(var(--x, -999px) - 50%), calc(var(--y, -999px) - 100% - .5rem - var(--up, 0rem)), 0); }
.world .pin--you { color: var(--on-signal); --glass-fill: var(--signal); font-weight: 800; }
/* a role keeps out of sight until the pointer is on its figure, or a finger taps it */
.world .pin--tag:not(.pin--you) { opacity: 0; translate: 0 .35rem; transition: opacity .2s var(--ease), translate .28s var(--ease); }
.world .pin--tag.is-named:not(.is-off) { opacity: var(--o, 0); translate: 0 0; }

/* the fade between the lookout and the mountain: a sheet of paper over the map, under the copy */
.world .veil { display: block; position: fixed; inset: 0; z-index: 0; background: var(--paper); opacity: var(--veil, 0); pointer-events: none; }

/* at the summit the lead speaks and the client's dashboard opens beside the laptop. Both wait for the last step */
.world .pin--say, .world .pin--dash { opacity: 0; translate: 0 .6rem; transition: opacity .25s var(--ease), translate .32s var(--ease); text-transform: none; letter-spacing: 0; }
.world .wp.is-summit .pin--say:not(.is-off), .world .wp.is-summit .pin--dash:not(.is-off) { opacity: var(--o, 0); translate: 0 0; }
.world .pin--say, .world .pin--say.is-flip {
  white-space: normal; width: max-content; max-width: 13rem; padding: .6rem .85rem .64rem; --radius-glass: 1rem;
  font-size: .92rem; font-weight: 650; line-height: 1.25;
  transform: translate3d(clamp(var(--gutter), calc(var(--x, -999px) - 86%), calc(100vw - 100% - var(--gutter))), calc(var(--y, -999px) - 100% - 1.15rem), 0);
}
.world .pin--say::after { content: ""; position: absolute; left: 80%; bottom: -.43rem; width: .76rem; height: .76rem; background: var(--glass-fill); border-right: 1px solid var(--glass-edge); border-bottom: 1px solid var(--glass-edge); transform: rotate(45deg); }   /* the bubble's tail */
.world .pin--dash, .world .pin--dash.is-flip {
  display: grid; gap: .32rem; padding: .6rem .75rem; --radius-glass: .9rem;
  transform: translate3d(min(calc(var(--x, -999px) + 4.6vh), calc(100vw - 100% - var(--gutter))), calc(var(--y, -999px) - 100% - 6.8vh), 0);   /* in screen heights, because the scene scales with the screen's height: this lifts it clear of the raised hands and keeps it under the flag */
}
.pin--dash p { display: grid; grid-template-columns: 5rem 3.7rem auto; align-items: center; gap: .55rem; }
.pin--dash span { font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.pin--dash svg { width: 3.7rem; height: 1.25rem; overflow: visible; }
.pin--dash path { fill: none; stroke: var(--signal); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 90; stroke-dashoffset: 90; transition: stroke-dashoffset .8s var(--ease) .2s; }
.pin--dash em { display: flex; gap: .22rem; }
.pin--dash i { width: .52rem; height: .52rem; border-radius: 50%; background: var(--signal); scale: 0; transition: scale .3s var(--ease); }
.pin--dash i:nth-child(2) { transition-delay: .08s; } .pin--dash i:nth-child(3) { transition-delay: .16s; } .pin--dash i:nth-child(4) { transition-delay: .24s; } .pin--dash i:nth-child(5) { transition-delay: .32s; }
.pin--dash b { display: inline-flex; align-items: center; gap: .32rem; font-size: .74rem; font-weight: 800; }
.pin--dash p:first-child b::before { content: ""; border: .27rem solid transparent; border-top: 0; border-bottom: .4rem solid var(--signal); }   /* an arrow pointing up */
.is-summit .pin--dash path { stroke-dashoffset: 0; }
.is-summit .pin--dash i { scale: 1; }

.world .wp--summit { align-content: start; justify-items: center; text-align: center; padding: calc(var(--bar-h) + 3vh) var(--gutter) 0; }
/* once the summit line is drawn into the map, the heading only keeps its place: the map sets the words down inside this box */
.world.has-title .wp--summit h2 { width: min(86vw, 68rem, 118vh); aspect-ratio: var(--aspect, 3); margin-inline: auto; overflow: hidden; color: transparent; user-select: none; }
.world .wp--summit .wp__copy { max-width: none; }
.world .wp--summit .wp__copy > p { margin-inline: auto; opacity: clamp(0, (var(--p, 0) - .52) * 6, 1); }   /* the line of copy waits for the summit line to land */

.world .wp--traverse { align-content: start; padding-top: calc(var(--bar-h) + 4vh); padding-right: 0; }
.world .rail {
  display: flex; align-items: start; gap: clamp(2.5rem, 6vw, 6rem); width: max-content; padding-right: 14vw;
  transform: translate3d(calc(clamp(0, (var(--p, 0) - .15) * 1.33, 1) * var(--travel, 0px) * -1), 0, 0);
  will-change: transform;
}
.world .rail__item { width: max-content; min-width: min(78vw, 21rem); flex: none; padding: clamp(1.25rem, 2vw, 1.75rem) clamp(1.25rem, 2.2vw, 2rem); }
/* on the dawn plate the panes are smoked glass with light ink, so they read over blaze and over the dark mountain alike */
.world .wp--traverse .rail__item {
  --glass-fill: rgb(26 22 20 / .56); --glass-shine: rgb(255 255 255 / .22); --glass-edge: rgb(255 255 255 / .3); --glass-shadow: rgb(70 20 4 / .55);
  --ink: var(--chalk); --glass-ink-soft: #E2DED5; --rule: rgb(237 234 226 / .22); color: var(--ink);
}
.world .rail__item dl { max-width: 29rem; }
.world .rail__item--title { width: min(78vw, 30rem); }
.world .rail__item--title h2 { font-size: clamp(2.3rem, 5vw, 4.4rem); }

.world .wp--name { align-content: center; }
.world .wp--name .wp__copy { max-width: 36rem; }
.world .say .w { opacity: clamp(.26, (var(--p, 0) * 1.5 - .12) * var(--n) - var(--i) + .26, 1); }

.world .wp--process { align-content: center; }
.world .wp--process h2 { font-size: clamp(1.7rem, 3.1vw, 2.6rem); }
.world .steps h3 { color: var(--ink-soft); transition: color .25s var(--ease); }
.world .steps li.is-active h3 { color: var(--ink); }
.world .steps li.is-active::before { background: var(--signal); transform: none; }

/* the last card is the short version: the question, the action, where to reach us. It is deeper glass, because cloud lies behind it */
.world .wp--contact { align-content: center; }
.world .wp--contact .wp__copy { max-width: 33rem; --glass-fill: var(--glass-fill-deep); }
.world .wp--contact h2 { font-size: clamp(1.7rem, 3.1vw, 2.65rem); }
.world .wp--contact .wp__copy > p { display: none; }
.world .wp--contact .reach span { color: var(--ink); }      /* full ink: cloud lies behind this pane */

/* the trace: the route walked so far, down the right edge */
.world .trace {
  display: block; position: fixed; z-index: 5; right: calc(var(--gutter) * .5 - 3px); top: 24vh; bottom: 24vh; width: 6px;
  background: radial-gradient(circle at 3px 3px, var(--ink-soft) 1.7px, transparent 2.2px) 0 0 / 6px 15px repeat-y; opacity: .9;
}
.world .trace i { position: absolute; inset: 0; background: radial-gradient(circle at 3px 3px, var(--signal) 2.6px, transparent 3px) 0 0 / 6px 15px repeat-y; clip-path: inset(0 0 calc((1 - var(--route, 0)) * 100%) 0); }

/* ───────────── 6. small screens ───────────── */
@media (max-width: 760px) {
  :root { --h1: 18.5vw; --bar-h: 3.75rem; --radius-glass: 1rem; }
  .bar__nav { display: none; }
  .world .wp { padding-right: var(--gutter); }
  .world .wp--hero { grid-template-columns: minmax(0, 1fr); }
  .world .wp--hero::before { content: ""; position: absolute; inset: 36% 0 0; z-index: -1; background: linear-gradient(to top, var(--paper) 78%, transparent); }   /* a band of paper under full-width copy */
  .world .legend, .world .trace { display: none; }
  .world .wp__copy, .world .wp--name .wp__copy, .world .wp--contact .wp__copy { max-width: none; width: 100%; }
  .world .wp--name, .world .wp--process, .world .wp--contact { align-content: end; }
  .world .pin { font-size: .64rem; padding: .26rem .5rem .24rem; }
  .world .wp--hero .pin:not(.is-off) { opacity: calc(var(--o, 0) * clamp(0, 1 - var(--p, 0) * 5, 1)); }   /* the map's labels leave as the scroll starts, before the map carries them over the headline */
  .world .pin--say, .world .pin--say.is-flip { max-width: 9rem; padding: .5rem .7rem .54rem; font-size: .84rem; }
  .world .pin--dash, .world .pin--dash.is-flip { left: 50%; top: calc(var(--bar-h) + .6rem); padding: .5rem .65rem; transform: translate3d(-50%, 0, 0); }   /* on a phone the dashboard sits under the bar, clear of the group */
  .world .rail__item dl { max-width: 78vw; }
  .rail__item h3 { font-size: 15vw; }
  .world .steps p { font-size: .9rem; }
  .world .steps li { padding-block: .6rem; }
  .world .steps li:not(.is-active) p { display: none; }
  .wp--summit h2 { font-size: 11.4vw; }
  .actions { margin-top: 1.5rem; }
  .wp--hero .wp__copy { margin-bottom: 0; }   /* the headline keeps to the foot of the screen, which leaves the map's labels the room above it */
}
/* the phone menu: a Menu button in place of the call to action, and a glass sheet that drops from the bar. It uses the browser's own popover,
   so a tap outside or Escape closes it; where there is no popover the bar keeps its button and nothing here applies */
@supports selector(:popover-open) {
  @media (max-width: 760px) {
    .bar > .btn { display: none; }
    .bar__menu {
      display: inline-flex; align-items: center; gap: .6rem; height: 2.75rem; padding: 0 1rem; background: none; border: 1px solid var(--rule); border-radius: 999px;
      color: inherit; font: inherit; font-size: .8125rem; font-weight: 700; font-stretch: 108%; letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
      transition: border-color .18s var(--ease), transform .18s var(--ease);
    }
    .bar__menu:active { transform: scale(.96); }
    .bar__menu i { position: relative; width: 1rem; height: .5rem; }   /* two bars that cross when the sheet is open */
    .bar__menu i::before, .bar__menu i::after { content: ""; position: absolute; left: 0; width: 100%; height: 2px; border-radius: 1px; background: currentColor; transition: top .2s var(--ease), transform .2s var(--ease); }
    .bar__menu i::before { top: 0; }
    .bar__menu i::after { top: calc(100% - 2px); }
    .bar:has(+ .menu:popover-open) .bar__menu i::before { top: calc(50% - 1px); transform: rotate(45deg); }
    .bar:has(+ .menu:popover-open) .bar__menu i::after { top: calc(50% - 1px); transform: rotate(-45deg); }
    .menu {
      position: fixed; inset: calc(var(--bar-h) + .35rem) var(--gutter) auto auto; margin: 0; width: min(19rem, calc(100vw - 2 * var(--gutter)));
      padding: .5rem 1.1rem 1.1rem; color: var(--ink); overflow: visible;
      opacity: 0; translate: 0 -.5rem; scale: .97; transform-origin: 100% 0;
      transition: opacity .18s var(--ease), translate .24s var(--ease), scale .24s var(--ease), display .24s allow-discrete, overlay .24s allow-discrete;
    }
    .menu:popover-open { display: grid; opacity: 1; translate: 0 0; scale: 1; }
    @starting-style { .menu:popover-open { opacity: 0; translate: 0 -.5rem; scale: .97; } }
    .menu::backdrop { background: none; }
    .menu a:not(.btn) { display: flex; align-items: center; min-height: 3.1rem; border-bottom: 1px solid var(--rule); font-size: .95rem; font-weight: 700; font-stretch: 108%; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; }
    .menu .btn { justify-content: space-between; margin-top: 1rem; }
  }
}

/* short, wide screens (a laptop with the browser's bars showing): the tall cards tighten so nothing is cut off */
@media (max-height: 720px) and (min-width: 761px) {
  .world .wp--traverse { padding-top: calc(var(--bar-h) + 1.5vh); }
  .world .rail__item { padding-block: 1rem; }
  .world .rail__item h3 { font-size: min(8.6vw, 12.5vh); }
  .world .rail__item dl { margin-top: .8rem; }
  .world .rail__item dl > div { padding: .45rem 0 .5rem; }
  .world .rail__item dd, .world .steps p { font-size: .9rem; line-height: 1.38; }
  .world .wp--process .wp__copy { padding-block: 1.1rem; }
  .world .wp--process h2 { font-size: 1.5rem; }
  .world .steps { margin-top: 1rem; }
  .world .steps li { padding-block: .5rem; }
  .world .steps li::before { top: .82rem; }
}

/* ───────────── 7. motion ───────────── */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgb(0 0 0 / .55); }
  .btn:hover::after { transform: translateX(.3rem); }
  .link:hover { color: var(--signal-text); text-decoration-style: solid; }
  .bar__nav a:hover { background-size: 100% 2px; }
  .mark:hover .mark__flag { transform: translateX(5px); }
  .theme:hover { border-color: currentColor; }
  .theme:hover svg { transform: rotate(180deg); }
  .world a.pin:hover { border-color: var(--signal-text); }
}
.btn:active { transform: translateY(1px) scale(.985); box-shadow: none; }
.theme:active { transform: scale(.94); }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.world) { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
/* no see-through panes for people who ask for less transparency, or where the browser cannot blur what is behind */
@media (prefers-reduced-transparency: reduce) {
  :root { --glass-fill: var(--paper); --glass-fill-deep: var(--paper); --glass-blur: 0px; }
  .world .wp--traverse .rail__item { --glass-fill: var(--night); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root { --glass-fill: color-mix(in srgb, var(--paper) 94%, transparent); --glass-fill-deep: color-mix(in srgb, var(--paper) 94%, transparent); }
  .world .wp--traverse .rail__item { --glass-fill: rgb(22 22 22 / .94); }
}
