/* Merged opening: green rings dive landing on the white logo spiral page. */
@font-face { font-family: "Anton"; src: url("fonts/anton.woff2") format("woff2"); font-weight: 400; font-display: block; }

:root {
  --green: #006644;
  --page: #f9fafb;
  --ink: #1a1a1a;
  --grey-on-green: #d1d5db;
  --pad: clamp(18px, 2.6vw, 40px);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--green); -webkit-text-size-adjust: 100%; }
html.white { background: var(--page); }
body {
  font-family: var(--sans); color: #fff; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent;
}

/* the tall scroll track and the stage that stays on screen while it scrolls past.
   lvh: the stage is always the height of the screen with the browser bars hidden,
   so it never changes size (and never jumps) when Safari's bar shrinks or grows */
#track { position: relative; height: 530vh; height: 530lvh; }   /* (S_END 3.3 + HOLD 1 + 1) screens: one ring, landed page held one screen (B9) */
#stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; background: var(--green); isolation: isolate; }
#gl, #still { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
#gl { opacity: 0; transition: opacity .6s ease; }
#gl.on { opacity: 1; }
#still { display: none; }

/* soft band in the page colour under the top bar, as on the approved spiral page (white page only) */
#band {
  position: absolute; left: 0; right: 0; top: 0; z-index: 2; pointer-events: none; opacity: 0;
  height: calc(clamp(56px, 11vh, 100px) + env(safe-area-inset-top));
  background: linear-gradient(var(--page) 52%, rgba(249, 250, 251, 0));
}

/* ---------- headline ---------- */
.hero {
  position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  transform-origin: 50% 50%; opacity: 0; will-change: transform, opacity;
}
.words { position: relative; font-size: 100px; }
.layer { position: absolute; inset: 0; margin: 0; font-weight: 400; font-size: inherit; perspective: 7em; perspective-origin: 50% 50%; }
.w {
  position: absolute; left: 50%; top: 0; display: block; white-space: nowrap;
  font-family: "Anton", Impact, sans-serif; font-weight: 400; text-transform: uppercase;
  line-height: .88; letter-spacing: .005em; font-kerning: normal; color: #fff;
  transform-origin: 50% 50%; -webkit-backface-visibility: hidden; backface-visibility: hidden; will-change: transform, opacity;
}
.ink .w { color: inherit; }
.ink { color: #fff; }
.ink.dark { color: var(--ink); }
/* a copy of the headline under it, drawn only as a halo in the page colour: faint logos
   passing behind are cleared just round the letters (white page only) */
.halo { opacity: 0; }
.halo .w { color: transparent; text-shadow: 0 0 .04em var(--page), 0 0 .1em var(--page), 0 0 .2em var(--page), 0 0 .32em var(--page); }
.sub {
  margin: 1.5em 0 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  white-space: nowrap; color: var(--grey-on-green); will-change: transform, opacity;
}
.sub.dark { color: var(--green); text-shadow: 0 0 6px var(--page), 0 0 14px var(--page), 0 0 24px var(--page), 0 0 24px var(--page); }

/* ---------- top bar ---------- */
.bar {
  position: absolute; z-index: 5; left: 0; right: 0; top: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(22px, env(safe-area-inset-top)) max(clamp(20px, 3vw, 40px), env(safe-area-inset-right)) 0 max(clamp(20px, 3vw, 40px), env(safe-area-inset-left));
  font-size: 14px; pointer-events: none;
}
.mark {
  pointer-events: auto; display: flex; align-items: center; gap: 9px; text-decoration: none; color: #fff;
  font-family: "Anton", Impact, sans-serif; font-weight: 400; font-size: 17px; line-height: 1; letter-spacing: .035em; text-transform: uppercase;
  opacity: 0; white-space: nowrap;
}
.mark i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.mark .two { display: none; }
.mark.stack .one { display: none; }
.mark.stack .two { display: block; line-height: 1.02; }
.right { position: relative; pointer-events: auto; }
#skip {
  appearance: none; -webkit-appearance: none; border: 0; background: none; cursor: pointer; padding: 8px 0 8px 10px; margin: -8px 0;
  font: 500 13px/1 var(--sans); letter-spacing: .02em; color: #fff; white-space: nowrap;
}
#skip:focus-visible, #nav a:focus-visible, .mark:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
#nav { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: flex; gap: clamp(18px, 2.4vw, 34px); opacity: 0; visibility: hidden; }
#nav a { color: var(--green); text-decoration: none; font-weight: 500; white-space: nowrap; }

/* ---------- captions during the dive ---------- */
/* a soft deep-green shade along the bottom edge so captions stay readable over the ring light (dive only) */
#shade { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; z-index: 3; pointer-events: none; opacity: 0;
  display: none; }   /* removed 2026-12-03: the shade greyed the bottom of the green; captions read on clean green */
.tag {
  position: absolute; left: 0; top: 0; z-index: 4; display: flex; align-items: flex-start; pointer-events: none;
  font-family: var(--mono); font-size: 10.5px; line-height: 1.45; letter-spacing: .05em; color: #fff;
  opacity: 0; will-change: transform, opacity; white-space: nowrap;
  text-shadow: 0 0 3px rgba(0, 51, 34, .9), 0 0 10px rgba(0, 51, 34, .75), 0 0 22px rgba(0, 51, 34, .55);
}
.tag .tick { width: 34px; height: 1px; background: rgba(255, 255, 255, .85); margin: 7px 8px 0 0; flex: none; }
.tag b { font-weight: 600; }
.tag i { font-style: normal; opacity: .85; }
.tag .tsub { opacity: .9; }
.steps {
  position: absolute; z-index: 4; right: max(var(--pad), env(safe-area-inset-right)); bottom: calc(var(--pad) + env(safe-area-inset-bottom));
  display: inline-flex; gap: 14px; pointer-events: none; opacity: 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: #fff;
  text-shadow: 0 0 3px rgba(0, 51, 34, .9), 0 0 10px rgba(0, 51, 34, .75), 0 0 22px rgba(0, 51, 34, .55);
}
.step { white-space: nowrap; opacity: .62; transition: opacity .6s ease; }
.step.on { opacity: 1; }
.step::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 6px; vertical-align: 1px; background: currentColor; opacity: 0; transition: opacity .6s ease; }
.step.on::before { opacity: 1; }

.hint {
  position: absolute; z-index: 4; left: 50%; bottom: calc(var(--pad) + 4px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 9px; pointer-events: none; opacity: 0;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .3em; padding-left: .3em; text-transform: uppercase; color: #fff;
}
.hint i { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .25; transform: translateY(-3px); } 50% { opacity: 1; transform: translateY(3px); } }

/* ---------- placeholder after the sequence ---------- */
.after { position: relative; background: var(--page); color: var(--ink); min-height: 100vh; min-height: 100lvh; display: flex; align-items: center; justify-content: center; padding: 15vh var(--pad); }
.after div { max-width: 34em; text-align: center; }
.after p { margin: 0; font-size: 16px; line-height: 1.6; color: #4b5563; }
.after .k { margin-bottom: 12px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--green); }

@media (max-width: 600px) {
  .bar { font-size: 13px; padding-top: max(18px, env(safe-area-inset-top)); }
  .mark { font-size: 14px; gap: 7px; }
  .mark i { width: 7px; height: 7px; }
  #nav .hide-sm { display: none; }
  .sub { font-size: 10px; letter-spacing: .12em; margin-top: 1.3em; }
  .steps { font-size: 10px; gap: 10px; }
  .tag { font-size: 10px; }
  .tag .tick { width: 22px; }
}
@media (max-width: 360px) { .steps { gap: 7px; } }

/* still page: reduced motion, or no 3D drawing available */
html.still #track { height: 100vh; height: 100lvh; }
html.still #gl { display: none; }
html.still #still { display: block; }
html.still .hint i { animation: none; }

/* One ring (2026-12-03): no step labels and no step row. */
#tag, #steps { display: none; }
