/* =============================================================================
   VIBESQUAD — landing stylesheet
   -----------------------------------------------------------------------------
   Order:  tokens → reset → primitives → chrome → hero → sections → components
           → footer → motion → responsive → reduced motion / print
   Colour: strictly black & white. Every surface flips the same four tokens
           (--bg / --fg / --muted / --line) instead of hard-coding a colour, so
           `.s--light` inverts an entire section with no per-element overrides.
   ========================================================================== */

/* ---------------------------------------------------------------- tokens -- */
:root {
  /* palette */
  --black: #000;
  --white: #fff;

  /* surface tokens — the only colours components are allowed to reference */
  --bg: var(--black);
  --fg: var(--white);
  --muted: rgba(255, 255, 255, .52);
  --faint: rgba(255, 255, 255, .30);
  --line: rgba(255, 255, 255, .16);
  --line-soft: rgba(255, 255, 255, .08);

  /* type */
  --font-display: "Archivo", "Helvetica Neue", Helvetica, "Arial Black", Arial, sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --fs-hero: clamp(1.95rem, 10.2vw, 11rem); /* safe floor; [data-fit] grows it to fill */
  --fs-h2: clamp(2.4rem, 6vw, 6.25rem);
  --fs-h3: clamp(1.25rem, 1.5vw + .85rem, 2.1rem);
  --fs-lead: clamp(1.05rem, .55vw + .92rem, 1.45rem);
  --fs-body: clamp(1rem, .28vw + .93rem, 1.1rem);
  --fs-mono: clamp(.66rem, .22vw + .6rem, .78rem);

  /* layout */
  --pad: clamp(20px, 4.5vw, 72px);
  --maxw: 1560px;
  --sec-y: clamp(96px, 13vh, 200px);

  /* motion */
  --e-out: cubic-bezier(.16, 1, .3, 1);
  --e-io: cubic-bezier(.65, .05, .36, 1);
  --t-fast: .28s;
  --t-med: .55s;
  --t-slow: .9s;
}

/* Inverted surface. Applied to a section — everything inside follows. */
.s--light {
  --bg: var(--white);
  --fg: var(--black);
  --muted: rgba(0, 0, 0, .58);
  --faint: rgba(0, 0, 0, .36);
  --line: rgba(0, 0, 0, .18);
  --line-soft: rgba(0, 0, 0, .09);
}

/* ----------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: #555 #000;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.62;
  letter-spacing: -.005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 500; }

::selection { background: var(--white); color: var(--black); }
.s--light ::selection { background: var(--black); color: var(--white); }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 1px;
}

.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--white);
  color: var(--black);
  font: 500 .8rem/1 var(--font-mono);
  transform: translateY(-200%);
  transition: transform var(--t-fast) var(--e-out);
}
.skip-link:focus-visible { transform: none; }

/* ------------------------------------------------------------ primitives -- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.5;
}

/* Redaction bar — a solid block sized in `ch`, no fake text for screen readers. */
.bar {
  display: inline-block;
  width: var(--w, 8ch);
  height: .74em;
  background: currentColor;
  vertical-align: -.02em;
  position: relative;
  overflow: hidden;
}
.bar::after {
  content: "";
  position: absolute;
  inset: 0 100% 0 0;
  background: var(--bg);
  opacity: .35;
  transition: inset var(--t-med) var(--e-out);
}

/* ---------------------------------------------------------------- chrome -- */
/* Grain, vignette, cursor and nav all sit above the page and use
   mix-blend-mode so they stay legible on both black and white sections. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

.grain {
  opacity: .055;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 900ms steps(3) infinite;
}

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 110;
  mix-blend-mode: difference;
  pointer-events: none;
}
.progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--white);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}

/* -- nav ------------------------------------------------------------------ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(16px, 2.2vw, 30px) var(--pad);
  color: var(--white);
  mix-blend-mode: difference; /* stays readable over black *and* white bands */
  transition: transform var(--t-med) var(--e-out);
}
.is-hidden-nav .nav { transform: translateY(-120%); }

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 .82rem/1 var(--font-display);
  letter-spacing: .22em;
}
.nav__mark {
  font-size: .6rem;
  transform: translateY(-1px);
  transition: transform var(--t-med) var(--e-out);
}
.nav__logo:hover .nav__mark { transform: translateY(-1px) rotate(90deg); }

.nav__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .12em;
}
.dot {
  width: 6px; height: 6px;
  background: currentColor;
  border-radius: 50%;
  animation: pulse 2.4s var(--e-io) infinite;
}

/* -- cursor --------------------------------------------------------------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 999;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity var(--t-fast) linear;
}
.cursor.is-live { opacity: 1; }
.cursor__ring,
.cursor__dot {
  position: absolute;
  border-radius: 50%;
  background: var(--white);
  transform: translate(-50%, -50%);
}
.cursor__dot { width: 6px; height: 6px; }
.cursor__ring {
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid var(--white);
  transition: width var(--t-fast) var(--e-out), height var(--t-fast) var(--e-out), opacity var(--t-fast);
}
.cursor.is-hover .cursor__ring { width: 74px; height: 74px; }
.cursor.is-hover .cursor__dot { opacity: 0; }

/* -- intro veil ----------------------------------------------------------- */
.veil { display: none; }
.js .veil {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  background: var(--black);
  animation: veil 1s var(--e-out) .3s forwards;
}
.veil__mark {
  font: 900 clamp(2.4rem, 9vw, 7rem)/1 var(--font-display);
  letter-spacing: -.03em;
  color: var(--white);
  animation: veilMark .9s var(--e-out) forwards;
}

/* ------------------------------------------------------------------ hero -- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(120px, 18vh, 200px) var(--pad) clamp(28px, 5vh, 56px);
  overflow: hidden;
  isolation: isolate;
}

/* faint engineering grid, masked to a soft circle */
.hero__grid {
  position: absolute;
  inset: -10%;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: clamp(48px, 6vw, 92px) clamp(48px, 6vw, 92px);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 42%, #000 0%, transparent 78%);
  mask-image: radial-gradient(70% 60% at 50% 42%, #000 0%, transparent 78%);
}

/* pointer-following light, positions driven by --mx/--my from JS */
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    36vmax 36vmax at calc(var(--mx, 50) * 1%) calc(var(--my, 38) * 1%),
    rgba(255, 255, 255, .14) 0%,
    rgba(255, 255, 255, .05) 34%,
    transparent 66%
  );
}

/* cinematic falloff, scoped to the hero so white bands stay pure white */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(115% 85% at 50% 42%, transparent 52%, rgba(0, 0, 0, .72) 100%);
}

.hero__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
}

.hero__eyebrow {
  color: var(--muted);
  margin-bottom: clamp(20px, 4vh, 44px);
  padding-left: 2px;
}

/* -- the headline --------------------------------------------------------- */
.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-hero);
  line-height: .84;
  letter-spacing: -.045em;
  text-transform: uppercase;
  margin-left: -.012em; /* optical alignment for the flat left stem */
}

.line {
  display: block;
  overflow: hidden;
  padding-block: .08em;   /* keeps tall caps off the mask edge... */
  margin-block: -.08em;   /* ...without changing the visual rhythm */
}
.line__in {
  display: inline-block; /* shrink-to-fit so the fitter can measure real width */
  vertical-align: top;
  white-space: nowrap;
  will-change: transform;
}
.js .hero__title .line__in {
  transform: translate3d(0, 135%, 0);
  animation: lineUp 1.15s var(--e-out) forwards;
  animation-delay: calc(1.05s + var(--i) * .11s);
}

.hero__foot {
  margin-top: clamp(32px, 6vh, 72px);
  padding-top: clamp(24px, 3vh, 40px);
  border-top: 1px solid var(--line);
}
.js .hero__foot { opacity: 0; animation: fadeUp .9s var(--e-out) 1.55s forwards; }

.hero__lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: 42ch;
  color: rgba(255, 255, 255, .74);
}

.hero__scroll {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  margin-top: clamp(28px, 5vh, 56px);
  align-self: flex-start;
}
.hero__scrollline {
  width: clamp(56px, 8vw, 120px);
  height: 1px;
  background: currentColor;
  transform-origin: 0 50%;
  animation: scrollLine 2.6s var(--e-io) infinite;
}

/* --------------------------------------------------------------- marquee -- */
.marquee {
  background: var(--bg);
  color: var(--fg);
  padding-block: clamp(14px, 1.8vw, 26px);
  overflow: hidden;
  border-block: 1px solid var(--line);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: slide 34s linear infinite;
}
.marquee__row {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
  padding-right: clamp(20px, 3vw, 48px);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 3.6vw, 3.4rem);
  letter-spacing: -.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee__sep { font-size: .48em; transform: translateY(-.12em); }

/* -------------------------------------------------------------- sections -- */
/* The page is deliberately sparse: a few quiet blocks separated by a lot of
   air. Every block sets its own surface tokens via .s--light or inherits the
   default black. */

.statement,
.readout,
.roster,
.coda,
.band {
  position: relative;
  background: var(--bg);
  color: var(--fg);
}

/* -- statement ---------------------------------------------------------- */
.statement { padding-block: clamp(110px, 17vh, 240px); }

.statement__p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 3.4rem);
  line-height: 1.16;
  letter-spacing: -.03em;
  max-width: 22ch;
  text-wrap: balance;
}
.statement__p + .statement__p {
  margin-top: clamp(40px, 7vh, 96px);
  color: var(--muted);
}
/* Each paragraph steps further into the column, so the block reads as a
   descending staircase rather than a wall of text. */
.statement__p:nth-child(2) { margin-left: clamp(0px, 8vw, 160px); }
.statement__p:nth-child(3) { margin-left: clamp(0px, 16vw, 320px); }
.statement__p:nth-child(4) { margin-left: clamp(0px, 24vw, 480px); }

/* -- band --------------------------------------------------------------- */
.band { padding-block: clamp(90px, 15vh, 210px); }

.band__line {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.95rem, 8.6vw, 9rem); /* floor only; [data-fit] fills it */
  line-height: .86;
  letter-spacing: -.045em;
  text-transform: uppercase;
  margin-left: -.012em;
}

/* -- readout ------------------------------------------------------------ */
/* A deadpan instrument panel. It states facts and offers nothing. */
.readout { padding-block: clamp(70px, 10vh, 140px); }

.readout__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.readout__cell {
  padding: clamp(22px, 3vw, 44px) clamp(16px, 2vw, 32px) clamp(26px, 3.5vw, 52px);
  border-left: 1px solid var(--line);
}
/* Outer cells sit flush with the page margin. */
.readout__grid > .readout__cell:first-child { padding-left: 0; border-left: 0; }
.readout__grid > .readout__cell:last-child { padding-right: 0; }

.readout__cell dt { color: var(--faint); }
.readout__cell dd {
  margin: clamp(14px, 2vw, 28px) 0 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 4.4vw, 4.6rem);
  line-height: 1;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}

/* -- roster ------------------------------------------------------------- */
.roster { padding-block: clamp(90px, 14vh, 200px); }
.roster__cap { color: var(--faint); }

.roster__list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: clamp(18px, 3vw, 48px);
  margin-block: clamp(32px, 5vh, 64px);
}
.roster__list .bar {
  height: clamp(42px, 5.4vw, 84px);
  opacity: .96;
  /* Explicit widths: the shared .bar sizes itself in `ch`, which here would
     inherit the small body font and collapse each bar into a square. */
  width: var(--rw);
}
.roster__list li:nth-child(1) .bar { --rw: clamp(120px, 17vw, 300px); }
.roster__list li:nth-child(2) .bar { --rw: clamp(78px, 10vw, 180px); }
.roster__list li:nth-child(3) .bar { --rw: clamp(150px, 21vw, 360px); }
.roster__list li:nth-child(4) .bar { --rw: clamp(100px, 13vw, 230px); }
.roster__list li:hover .bar::after { inset: 0; }
.roster__note { color: var(--faint); }
.bar--flicker { animation: flicker 5.5s steps(1) infinite; }

/* -- coda --------------------------------------------------------------- */
.coda { padding-block: clamp(100px, 16vh, 220px); }
.coda__p {
  font-size: var(--fs-lead);
  line-height: 1.5;
  max-width: 46ch;
  color: var(--muted);
  margin-left: auto;   /* pushed right, as an afterthought */
  text-align: right;
}
.coda__p--last {
  margin-top: clamp(20px, 3vh, 36px);
  color: var(--fg);
}

/* ---------------------------------------------------------------- footer -- */
.footer {
  background: var(--black);
  color: var(--white);
  padding-top: clamp(60px, 9vh, 120px);
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  padding-bottom: clamp(40px, 7vh, 90px);
}

/* The address is stated, not pitched: no button, no verb, no arrow. */
.footer__mail {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.2rem, 2.6vw, 2.4rem);
  letter-spacing: -.03em;
  line-height: 1;
  position: relative;
  will-change: transform;
  transition: transform .35s var(--e-out);
}
.footer__mail::after {
  content: "";
  position: absolute;
  left: 0; bottom: -.14em;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform var(--t-med) var(--e-out);
}
.footer__mail:hover::after,
.footer__mail:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }

.footer__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
  color: var(--faint);
}

/* Outlined wordmark, fitted edge to edge by [data-fit] and cropped at the
   baseline so it reads as a watermark rather than a heading. */
.footer__word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 12vw, 15rem);
  line-height: .74;
  letter-spacing: -.05em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .34);
  margin-bottom: -.14em;
  user-select: none;
}
.footer__word .line { padding-block: .1em; margin-block: -.1em; }

/* ---------------------------------------------------------------- motion -- */
@keyframes lineUp { to { transform: translate3d(0, 0, 0); } }
@keyframes fadeUp { from { opacity: 0; transform: translate3d(0, 24px, 0); } to { opacity: 1; transform: none; } }
@keyframes slide { to { transform: translate3d(-50%, 0, 0); } }
@keyframes grain {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-4%, 3%); }
  50%  { transform: translate(3%, -4%); }
  75%  { transform: translate(-3%, -2%); }
  100% { transform: translate(0, 0); }
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes scrollLine {
  0%   { transform: scaleX(0); transform-origin: 0 50%; }
  45%  { transform: scaleX(1); transform-origin: 0 50%; }
  55%  { transform: scaleX(1); transform-origin: 100% 50%; }
  100% { transform: scaleX(0); transform-origin: 100% 50%; }
}
@keyframes flicker { 0%, 92%, 100% { opacity: .92; } 94% { opacity: .35; } 96% { opacity: .95; } }
@keyframes veil { to { transform: translateY(-101%); visibility: hidden; } }
@keyframes veilMark {
  0%   { opacity: 0; transform: scale(.94); letter-spacing: .3em; }
  60%  { opacity: 1; transform: none; letter-spacing: -.03em; }
  100% { opacity: 0; transform: none; letter-spacing: -.03em; }
}

/* While the fitter measures, nothing may animate size. */
.is-measuring * { transition: none !important; }

/* Scroll reveal — opt-in, and only while JS is available. */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition:
    opacity var(--t-slow) var(--e-out) var(--d, 0s),
    transform var(--t-slow) var(--e-out) var(--d, 0s);
  will-change: opacity, transform;
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ responsive -- */
@media (max-width: 1100px) {
  .readout__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout__grid > .readout__cell:nth-child(2) { padding-right: 0; }
  .readout__grid > .readout__cell:nth-child(3) { padding-left: 0; }
}

@media (max-width: 860px) {
  .nav__status { display: none; }
  .statement__p:nth-child(2),
  .statement__p:nth-child(3),
  .statement__p:nth-child(4) { margin-left: 0; }
  .statement__p { max-width: 26ch; }
  .coda__p { margin-left: 0; text-align: left; }
}

@media (max-width: 620px) {
  .readout__grid { grid-template-columns: minmax(0, 1fr); }
  .readout__grid > .readout__cell { padding-left: 0; padding-right: 0; }
  .footer__meta { text-align: left; }
  .roster__list { gap: 14px; }
  .roster__list .bar { height: 44px; }
}

/* Fine pointers only: hide the native cursor, keep the custom one. */
@media (hover: hover) and (pointer: fine) {
  /* .has-cursor is set by JS *after* the replacement cursor is live, so a
     failed or skipped module can never leave the page with no pointer. */
  .has-cursor body,
  .has-cursor a,
  .has-cursor button { cursor: none; }
}
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

/* ------------------------------------------------- reduced motion / print -- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .js .hero__title .line__in { transform: none; }
  .js .hero__foot { opacity: 1; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .veil { display: none; }
  .grain { animation: none; }
}

@media print {
  .nav, .cursor, .grain, .progress, .veil, .marquee { display: none !important; }
  body { background: #fff; color: #000; }
  .statement, .band, .readout, .roster, .coda, .footer { background: #fff; color: #000; break-inside: avoid; }
}
