/* hue.capital opener. Single deliberate dark theme. Tokens from Jeff's Home design plus the sampled keyhole brass. */
:root {
  --ink: #0e0d0c;
  --cream: #f3eee4;
  --light: #d9d4ca;
  --grey-1: #a9a39a;
  --grey-2: #6e675f;
  --grey-3: #4a443d;
  --red: #c8102e;
  --red-deep: #a50d26;
  --brass: #d8a075;           /* sampled from the keyhole rim, frame 24 */

  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'Schibsted Grotesk', 'Helvetica Neue', Arial, system-ui, sans-serif;

  /* Motion scale from the transitions.dev token set */
  --duration-quick: 150ms;
  --duration-fast: 250ms;
  --duration-slow: 400ms;
  --duration-very-slow: 500ms;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);

  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--red); color: var(--cream); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; }

/* Track and stage */
.track { position: relative; height: 760vh; }
.stage {
  position: sticky; top: 0;
  height: 100vh; height: 100lvh;
  overflow: hidden;
  /* Pass 8: transparent. Under it is the middle's fixed black (#ether, page.css), so when this stage scrolls away
     after the hero no edge of it can show. Before that the film canvas covers everything. */
  background: transparent;
}
/* Squish fix (pass4 1c12deb): the film box follows the real viewport (dynamic viewport height, so phone
   toolbars count). The canvas fills it; its backing store is resized from this box whenever the box changes. */
.film-wrap {
  position: fixed; left: 0; top: 0;
  width: 100vw;
  height: 100vh; height: 100dvh;
  overflow: hidden;
  z-index: 0;
}
.film {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  background: #000;
}

.content { z-index: 1; }

/* Scroll cue */
/* Pass 8 fix: fixed to the first screen's bottom centre; it fades on the first scroll and is then removed (main.js). */
.cue {
  position: fixed; z-index: 1; left: 50%; bottom: max(28px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--light);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-very-slow) var(--ease-smooth-out);
}
.has-frame .cue { opacity: 0.72; }
.has-frame .cue.is-gone { opacity: 0; }
.cue[hidden] { display: none; }
.cue-word {
  font-family: var(--sans); font-weight: 500;
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  padding-left: 0.32em; /* optical centering against the tracking */
}
.cue-line {
  position: relative; display: block;
  width: 1px; height: 52px; overflow: hidden;
  background: rgba(217, 212, 202, 0.18);
}
.cue-line i {
  position: absolute; left: 0; top: 0; width: 1px; height: 100%;
  background: var(--brass);
  transform: translateY(-100%);
  animation: cue-fall 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes cue-fall {
  0% { transform: translateY(-100%); }
  55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* Load line */
.load {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  pointer-events: none;
  transition: opacity var(--duration-slow) var(--ease-smooth-out) 600ms;
}
.load.is-done, .load.is-gone { opacity: 0; }
.load.is-gone { transition-delay: 0ms; }
.load-bar {
  height: 100%; width: 100%;
  background: var(--brass);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform var(--duration-fast) var(--ease-smooth-out);
}

/* Content that rises out of the black */
.content {
  position: absolute; inset: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column;
  padding: 0 var(--gutter);
  text-align: center;
}
.js .content { visibility: hidden; }
.js .content.is-armed, .is-reduced .content { visibility: visible; }
.content:focus { outline: none; }
.content-inner {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-top: 48px;
}

/* Pass 8: no masks. .m is a plain inline box; its child fades, rises and un-blurs (js/soft.js). A clipping mask
   showed a flat cut through the letters mid-rise, which reads as a hard line over the glowing black. */
.m { display: inline-block; vertical-align: top; }
.m > * { display: inline-block; }

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(18px, 1.9vw, 26px);
  line-height: 1;
  letter-spacing: 0.46em;
  padding-left: 0.46em; /* optical centering against the tracking */
  font-variation-settings: 'opsz' 72, 'SOFT' 0, 'WONK' 0;
  color: var(--brass);
}
.rule {
  display: block;
  width: 56px; height: 1px;
  margin: clamp(18px, 3vh, 28px) auto clamp(20px, 3.4vh, 34px);
  background: var(--brass);
  opacity: 0.7;
  transform-origin: 50% 50%;
}
.headline {
  margin: 0;
  max-width: 12ch;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(50px, min(10.4vw, 17.5vh), 164px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
  text-wrap: balance;
}
.headline:focus { outline: none; }
.nowrap { white-space: nowrap; }
.lede {
  margin: clamp(22px, 4vh, 40px) 0 0;
  max-width: 40ch;
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--light);
  text-wrap: pretty;
}
.actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: clamp(24px, 4vh, 40px);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 12px 24px;
  font-family: var(--sans); font-weight: 600; font-size: 15px; line-height: 1;
  color: var(--cream);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-smooth-out),
              border-color var(--duration-fast) var(--ease-smooth-out),
              color var(--duration-fast) var(--ease-smooth-out);
}
/* Pass 8 fix: the colophon has no rule (no full-width line anywhere in the middle); the small print alone. */
.btn-key { background: var(--red); }
.btn-key:hover { background: var(--red-deep); }
.btn-ghost { background: transparent; border-color: rgba(243, 238, 228, 0.6); }
.btn-ghost:hover { border-color: var(--cream); background: rgba(243, 238, 228, 0.06); }
.btn:active { transform: translateY(1px); }

.colophon {
  position: relative;
  padding: 20px 0 max(22px, env(safe-area-inset-bottom));
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--grey-2);
}

/* Skip the intro: only visible on keyboard focus */
.skip-intro {
  position: fixed; top: 12px; left: 12px; z-index: 20;
  padding: 10px 14px;
  background: var(--cream); color: var(--ink);
  font-weight: 600; font-size: 14px; text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--duration-fast) var(--ease-smooth-out);
}
.skip-intro:focus-visible { transform: none; outline-offset: 2px; }

/* Reduced motion: the film plays once in a player, then the page sits still. */
.is-reduced .track { height: auto; }
.is-reduced .stage { position: relative; height: auto; min-height: 100svh; }
.is-reduced .film-wrap, .is-reduced .cue, .is-reduced .load, .is-reduced .skip-intro { display: none; }
.is-reduced .content { position: relative; min-height: 100svh; height: auto; }
.rm-player {
  position: fixed; inset: 0; z-index: 30;
  background: #000;
}
.rm-player[hidden] { display: none; }
.rm-player video { width: 100%; height: 100%; object-fit: cover; display: block; }
.rm-skip {
  position: absolute; right: var(--gutter); bottom: max(24px, env(safe-area-inset-bottom));
  min-height: 44px; padding: 10px 20px;
  background: rgba(14, 13, 12, 0.5);
}

@media (max-width: 640px) {
  .content-inner { padding-top: 24px; }
  .colophon { font-size: 11px; line-height: 1.5; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
