/* The Sound of It — static landing page
   Accent is the single swappable brand color (mockup options:
   #12224e default, #3b2170, #0d4f4a, #7a2b12). */

/* Self-hosted fonts (assets/), latin + latin-ext subsets pulled from Google
   Fonts. Noto Sans ships as a single variable woff2 per subset that covers
   the whole weight axis, so one file serves both 400 and 700. */
@font-face {
  font-family: 'Michroma';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/michroma-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Michroma';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/michroma-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(assets/noto-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(assets/noto-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --accent: #12224e;
  --ink: #16203f;
  --ink-soft: #2c3d68;
  --node-border: #7590b6;
  --shadow-bevel: 2px 2px 0 rgba(18, 34, 78, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #0a1230;
}

a { color: #1b2f7a; text-decoration: none; }
a:hover { color: #0a1230; }


.stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: linear-gradient(168deg, #cfe0f2 0%, #b9cbe8 22%, #cdd8ea 40%, #d9e4dd 58%, #b8c8e6 76%, #8fa4cf 100%);
  font-family: 'Noto Sans', Helvetica, Arial, sans-serif;
  color: var(--ink);
  display: flex;
  flex-direction: column;
}

/* Background decoration */
.bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.35;
  /* Drift by exactly one tile (44px) so the loop wraps seamlessly — an
     endless, slow diagonal scroll. */
  animation: grid-drift 20s linear infinite;
}
@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 44px 44px, 44px 44px; }
}
.bg-streak {
  position: absolute;
  top: -8%;
  left: 4%;
  width: 22%;
  height: 120%;
  pointer-events: none;
  background: linear-gradient(96deg, rgba(255, 255, 255, 0.55), rgba(168, 199, 224, 0.15), rgba(255, 255, 255, 0.4));
  filter: blur(0.3px);
  transform: skewX(-6deg);
  animation: streak-drift 28s ease-in-out infinite alternate;
}
@keyframes streak-drift {
  from { transform: skewX(-6deg) translateX(0); }
  to   { transform: skewX(-9.5deg) translateX(4%); }
}
/* Monochrome model ghosted into the background. `darken` drops the white
   field and leaves only her dark dithering over the page gradient; very low
   opacity keeps it subtle. Pinned bottom-right and sized off the viewport so
   her square torso cut always falls off-screen, and a radial mask feathers
   the edges to transparency (keeping the eyes) so no hard boundary shows. */
.bg-model {
  position: absolute;
  right: -3vw;
  bottom: 0;
  height: clamp(600px, 108vh, 1320px);
  aspect-ratio: 1 / 1;
  pointer-events: none;
  background: url("assets/MODEL.png") center / contain no-repeat;
  mix-blend-mode: darken;
  opacity: 0.07;
  -webkit-mask-image: radial-gradient(68% 66% at 60% 33%, #000 52%, transparent 100%);
  mask-image: radial-gradient(68% 66% at 60% 33%, #000 52%, transparent 100%);
}
.bg-orb {
  position: absolute;
  right: -10%;
  top: -18%;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.75), rgba(140, 176, 214, 0.35) 46%, rgba(20, 44, 102, 0.12) 72%, transparent 74%);
  opacity: 0.55;
  animation: orb-float 38s ease-in-out infinite alternate;
}
@keyframes orb-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-3%, 3.5%, 0) scale(1.09); }
}

/* Slow, out-of-phase light ribbons drifting across the field — the soothing,
   PS3-XMB "wave" feel. Only transforms animate (blur stays static) so it
   composites on the GPU. Long staggered durations keep it from ever syncing. */
.bg-wave {
  position: absolute;
  left: -25%;
  right: -25%;
  height: 60%;
  pointer-events: none;
  filter: blur(30px);
  will-change: transform;
}
.bg-wave--1 {
  top: 6%;
  opacity: 0.55;
  background: linear-gradient(102deg, transparent 8%, rgba(255, 255, 255, 0.30) 34%, rgba(176, 203, 232, 0.10) 52%, rgba(255, 255, 255, 0.26) 70%, transparent 94%);
  animation: wave-one 32s ease-in-out infinite alternate;
}
.bg-wave--2 {
  bottom: 2%;
  opacity: 0.5;
  background: linear-gradient(94deg, transparent 6%, rgba(255, 255, 255, 0.22) 40%, rgba(150, 180, 220, 0.10) 58%, rgba(255, 255, 255, 0.20) 78%, transparent 96%);
  animation: wave-two 45s ease-in-out infinite alternate;
}
@keyframes wave-one {
  from { transform: translate3d(-5%, -2%, 0) skewY(-4deg) scaleY(1); }
  to   { transform: translate3d(5%, 2%, 0) skewY(-1.5deg) scaleY(1.12); }
}
@keyframes wave-two {
  from { transform: translate3d(4%, 2%, 0) skewY(3deg) scaleY(1.05); }
  to   { transform: translate3d(-4%, -2%, 0) skewY(1deg) scaleY(0.95); }
}
.bg-code {
  position: absolute;
  pointer-events: none;
  margin: 0;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.06em;
  color: #1b3a7a;
}
/* Preserve intra-line spacing on the lines themselves. Note: do NOT put
   white-space: pre on the container, or the newlines between the indented
   line divs render as blank vertical gaps. */
.bg-code__line {
  white-space: pre;
}
.bg-code--left { left: 2vw; top: 16vh; opacity: 0.28; }
.bg-code--right { right: 2vw; bottom: 12vh; opacity: 0.22; text-align: right; }

/* Header */
.header {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 28px;
  padding: clamp(16px, 3vw, 34px) clamp(16px, 4vw, 48px) 0;
}
.brand__mark {
  font-family: Michroma, Helvetica, sans-serif;
  font-size: clamp(17px, 3.1vw, 30px);
  letter-spacing: 0.02em;
  line-height: 1;
  background: linear-gradient(179deg, #ffffff 0%, #c9dcf2 22%, #4f7ec0 44%, #12224e 50%, #6d97cd 56%, #e8f1fb 76%, #93b3d8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0.6px rgba(15, 28, 64, 0.55);
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.9));
}
.brand__tag {
  margin-top: 7px;
  font-size: clamp(10px, 1.15vw, 13px);
  letter-spacing: 0.3em;
  text-transform: lowercase;
  color: #2b3f76;
}
.status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: #24365f;
  background: linear-gradient(#ffffff, #d3e0f0);
  border: 1px solid #8ea6c6;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  padding: 6px 12px;
  box-shadow: 1px 1px 0 rgba(20, 40, 90, 0.25);
}
.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b9ffd0, #12a04a 60%, #0a5c2c);
  box-shadow: 0 0 6px rgba(24, 190, 96, 0.8);
}

/* Dial */
.main {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vh, 48px) clamp(52px, 8vw, 90px);
}
.dial {
  position: relative;
  width: min(84vw, 66vh, 680px);
  aspect-ratio: 1 / 1;
}
.dial__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(16, 34, 80, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.dial__sheen {
  position: absolute;
  inset: -30%;
  background: conic-gradient(from 210deg, #ffffff, #7ea3ce 12%, #16244f 24%, #cfe0f4 38%, #ffffff 46%, #4a72b0 58%, #101d42 68%, #b9d0ea 82%, #ffffff 100%);
  /* The sheen no longer spins freely; JS rotates it so the bright part of
     the gradient stays locked to the selected node. */
  transform: rotate(var(--dial-angle, 0deg));
  transition: transform 695ms cubic-bezier(0.65, 0, 0.35, 1);
}
.dial__bezel {
  position: absolute;
  inset: 4.4%;
  border-radius: 50%;
  background: linear-gradient(160deg, #d6e2f1, #b9cbe8 40%, #cfd9e9 62%, #a9bedd);
  box-shadow: inset 0 2px 6px rgba(15, 30, 70, 0.35);
}
.dial__hairline {
  position: absolute;
  inset: 6.4%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.dial__face {
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 26%, #ffffff 0%, #eef4fb 34%, #d3e1f2 62%, #aec5e2 100%);
  box-shadow: inset 0 1px 0 #ffffff, inset 0 -14px 32px rgba(20, 44, 102, 0.16), 0 2px 0 rgba(255, 255, 255, 0.7);
}

/* Instrument graduations around the dial, drawn as SVG lines (populated by JS)
   so they anti-alias cleanly and stay uniform-width. Minor ticks every 6deg;
   major ticks every 60deg (aligned to the six nodes). They sit just inside the
   hairline, off the glossy ring. */
.dial__ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.dial__ticks line {
  stroke: #92a3be;
}
/* The lit graduation for the active node; JS rotates it to the node angle. */
.dial__tick-active {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: rotate(var(--tick-angle, 0deg));
  transition: transform 695ms cubic-bezier(0.65, 0, 0.35, 1);
}
.dial__tick-active::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6.5%;
  width: 2px;
  height: 5%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.5);
  border-radius: 1px;
}

/* Center content panel */
.panel {
  position: absolute;
  inset: 17%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.panel__inner {
  position: relative;
  width: 100%;
}
/* Streaming reveal: characters hold their final space but start hidden and
   are switched on one at a time, so content types in without reflow. */
.tw-ch.is-off { opacity: 0; }
/* Solid (non-blinking) pipe cursor at the type position; the current cell's
   glyph is hidden until it is revealed. Drawn in the cell's own space. */
.tw-ch.tw-cursor-char {
  position: relative;
  color: transparent;
}
.tw-ch.tw-cursor-char::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.02em;
  width: 0.1em;
  height: 1em;
  background: var(--accent);
}

.section { display: none; }
.section.is-active { display: block; }

.section__eyebrow {
  font-family: 'Courier New', monospace;
  font-size: clamp(9px, 1.1vw, 11px);
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: #5877a6;
}
.section__title {
  margin: 10px 0 0;
  font-family: Michroma, Helvetica, sans-serif;
  font-weight: normal;
  font-size: clamp(13px, 1.9vw, 20px);
  line-height: 1.35;
  text-transform: lowercase;
  color: #14224c;
}
.section__lead {
  margin: 12px auto 0;
  max-width: 30ch;
  font-size: clamp(11px, 1.25vw, 14px);
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.section__note {
  margin: 14px auto 0;
  max-width: 30ch;
  font-size: clamp(10px, 1.1vw, 12px);
  line-height: 1.55;
  color: #48608e;
}

.rows {
  margin: 14px auto 0;
  display: grid;
  gap: 7px;
  max-width: 32ch;
  text-align: left;
  font-size: clamp(10px, 1.2vw, 13px);
  color: #22345f;
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dotted rgba(30, 54, 110, 0.35);
  padding-bottom: 5px;
}
.row:last-child { border-bottom: none; padding-bottom: 0; }
.row__key { font-family: 'Courier New', monospace; color: #5877a6; }

.steps {
  margin: 14px auto 0;
  display: grid;
  gap: 8px;
  max-width: 26ch;
  text-align: left;
  font-size: clamp(10px, 1.2vw, 13px);
  color: #22345f;
}
.step { display: flex; gap: 10px; }
.step__num { font-family: 'Courier New', monospace; color: #5877a6; }

.section__cta {
  margin-top: 14px;
  display: inline-block;
  font-family: 'Courier New', monospace;
  font-size: clamp(11px, 1.3vw, 14px);
  letter-spacing: 0.06em;
  color: #12224e;
  padding: 9px 18px;
  background: linear-gradient(#ffffff, #cfe0f4 52%, #9fbbdd);
  border: 1px solid #6d8cb4;
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  box-shadow: 2px 2px 0 rgba(18, 34, 78, 0.3);
  /* Starts hidden and fades in, synced to its own text streaming (JS sets the
     duration and toggles .is-in). Opacity keeps its layout space reserved. */
  opacity: 0;
  transition: opacity 240ms ease;
}
.section__cta.is-in { opacity: 1; }
.section__cta:hover {
  color: #12224e;
  background: linear-gradient(#ffffff, #e6f0fb 52%, #b9d0ea);
}

/* Radial nodes */
/* The container spans the whole dial (inset:0), so it must not capture clicks
   meant for the center content (e.g. the contact mailto button) — only the
   buttons themselves are interactive. */
.nodes { position: absolute; inset: 0; pointer-events: none; }
.node {
  position: absolute;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  cursor: pointer;
  min-width: clamp(76px, 15%, 132px);
  text-align: center;
  padding: 8px 10px;
  font: inherit;
  font-size: clamp(8.5px, 1.05vw, 11px);
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--accent);
  background: linear-gradient(#ffffff, #dae5f3 52%, #b7cae4);
  border: 1px solid var(--node-border);
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  box-shadow: var(--shadow-bevel);
  user-select: none;
  overflow: hidden;
  isolation: isolate;
  transition: color 320ms ease, transform 110ms ease, box-shadow 110ms ease;
}
/* Hover: subtle depress toward the shadow; :active presses in further.
   Keep translate(-50%, -50%) so the node stays anchored to its point. */
.node:hover {
  transform: translate(-50%, -50%) translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(18, 34, 78, 0.28);
}
.node:active {
  transform: translate(-50%, -50%) translate(2px, 2px);
  box-shadow: 0 0 0 rgba(18, 34, 78, 0.28);
}
/* Active gradient lives on a pseudo-element so it can be crossfaded
   (CSS cannot transition between two linear-gradient backgrounds). */
.node::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(var(--accent), #35508c 52%, #1b2f66);
  opacity: 0;
  transition: opacity 320ms ease;
}
.node__label { position: relative; z-index: 1; }
.node.is-active { color: #ffffff; }
.node.is-active::before { opacity: 1; }

/* Footer */
.footer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding: 0 clamp(16px, 4vw, 48px) clamp(16px, 3vw, 30px);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #2b3f76;
  text-transform: lowercase;
}
.progress {
  /* Fixed width, never flex:1 — otherwise the bar sizes off the space the
     variable-width quip leaves behind, so every quip swap reflowed it. The
     quip (.footer__status) is the elastic element instead. */
  flex: 0 0 240px;
  height: 14px;
  background: #0e1a3c;
  border: 1px solid var(--node-border);
  border-top-color: #ffffff;
  border-left-color: #ffffff;
  padding: 2px;
}
.progress__bar {
  height: 100%;
  width: 1%;
  background: linear-gradient(90deg, #cfe0f4, #6d97cd);
  /* Width is driven continuously per-frame by JS (requestAnimationFrame),
     so no CSS transition here — that would double-smooth and lag the motion. */
}
.footer__status {
  /* Elastic cell: its width comes from leftover space, not the quip's text,
     so a longer/shorter quip is absorbed here (wrapping within) rather than
     shifting the bar or the meta. min-width:0 lets it shrink and wrap. */
  flex: 1 1 300px;
  min-width: 0;
  font-family: 'Courier New', monospace;
  text-transform: none;
  letter-spacing: 0.06em;
  transition: opacity 140ms ease;
}
.footer__meta {
  margin-left: auto;
  display: flex;
  gap: 18px;
  align-items: center;
}
.footer__meta a { letter-spacing: 0.1em; }

/* HUD registration frame — thin corner brackets that frame the viewport as a
   technical readout, plus a small vertical build tag along the right edge. */
.hud {
  position: fixed;
  inset: 14px;
  pointer-events: none;
  z-index: 5;
}
.hud__corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(30, 54, 110, 0.4);
}
.hud__corner--tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hud__corner--tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.hud__corner--bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.hud__corner--br { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.hud__tag {
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: 'Courier New', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(30, 54, 110, 0.45);
}

/* Narrow / mobile: stack the footer into a centered column. The row layout
   sizes the progress bar off the remaining space after the (variable-width)
   quip, so each quip swap reflowed the bar. Stacking gives the bar a fixed
   width independent of the quip, and centers the copyright/email pair that
   otherwise sat flush-right via margin-left:auto. */
@media (max-width: 600px) {
  .footer {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
  .progress {
    flex: none;
    width: 100%;
  }
  .footer__status {
    /* Column layout: reset the row flex — a 300px flex-basis would become a
       300px *height* here and open a big gap above the meta. */
    flex: none;
    width: 100%;
  }
  .footer__meta {
    margin-left: 0;
    justify-content: center;
    flex-wrap: wrap;
  }
}
