/* ===========================================================================
   BASE — reset, typography, the no-JS floor.
   =========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3{
  margin: 0;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.028em;
  text-wrap: balance;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }

p  { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a{
  color: inherit;
  text-decoration: none;
  transition: color .3s var(--ease), opacity .3s var(--ease);
}

::selection { background: var(--accent); color: #17040D; }

/* Cyan, and this is the only place it appears — rootcamp does the same. The
   accent already means "this is the live thing"; focus has to read as
   something else entirely, and violet is too close to magenta to do that. */
:focus-visible{
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

canvas { display: block; }

/* ---------------------------------------------------------------------------
   Glass. One recipe — a blurred, barely-tinted surface with a bright hairline
   along its top edge. The hairline is not a detail: real glass catches light
   where it turns, and without it a blurred panel is a grey box.
   --------------------------------------------------------------------------- */
.glass{
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-edge);
}

/* Browsers without backdrop-filter get a solid tint instead of a transparent
   panel with unreadable text over a moving 3D scene. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .glass { background: rgba(8,12,17,.86); }
}

/* ---------------------------------------------------------------------------
   Shared type
   --------------------------------------------------------------------------- */
.eyebrow,
.section-index{
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: var(--s3);
  font-family: var(--mono);
  font-size: var(--t-eyebrow);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before,
.section-index::before{
  content: "";
  width: 1.6rem;
  height: 1px;
  background: currentColor;
  box-shadow: 0 0 8px var(--accent-glow);
}
.section-index .step{
  margin-left: auto;
  color: var(--faint);
  letter-spacing: .1em;
}

.lede{
  margin-top: var(--s3);
  max-width: 44ch;
  font-size: var(--t-lede);
  color: var(--soft);
}

/* The one place the accent is allowed to glow. Everywhere else it is flat —
   a page where everything glows has nothing to point at. */
.accent{
  color: var(--accent);
  text-shadow: 0 0 42px var(--accent-glow);
}

/* ---------------------------------------------------------------------------
   No JS: the pin never engages, the panels stack, the page reads as prose.
   --------------------------------------------------------------------------- */
html:not(.js) .film     { height: auto; }
html:not(.js) .film-pin { position: static; height: auto; display: block; padding-block: var(--s6); }
html:not(.js) .scene    { display: none; }
/* The pane is a fixed-height box centred with a transform. Both have to go, or
   the panels stack to their natural height inside a 40rem window and spill
   straight through the footer. */
html:not(.js) .pane     { position: static; inset: auto; height: auto;
                          transform: none; backdrop-filter: none;
                          -webkit-backdrop-filter: none; overflow: visible;
                          border: 0; box-shadow: none; background: none; }
html:not(.js) .pane::before { display: none; }
html:not(.js) .panels   { position: static; }
html:not(.js) .panel    { position: static; opacity: 1; transform: none; filter: none;
                          padding-block: var(--s5); }
html:not(.js) .sheet    { width: min(100%, 46rem); margin-inline: auto; }
html:not(.js) .run-title,
html:not(.js) .act-dots,
html:not(.js) .scroll-hint,
html:not(.js) .rail     { display: none; }

@media (prefers-reduced-motion: reduce){
  html { scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
