/* AlivePixel marketing homepage — prototype styles.
   Type: one display face (Space Grotesk) for every headline, DM Sans for body
   copy, the system mono for labels. The paper/ink palette lives in
   monochrome.css; amber/blue appear only as accents. */

/* Self-hosted webfonts (OFL, see assets/fonts/<family>/OFL.txt): variable
   woff2, latin + latin-ext (these families have no Greek subset). */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("assets/fonts/dm-sans/dm-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("assets/fonts/dm-sans/dm-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: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/space-grotesk/space-grotesk-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/space-grotesk/space-grotesk-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;
}

:root {
  --bg: #0d0d0f;
  --bg-deep: #0a0a0d;
  --ivory: #f4efe6;
  --ivory-dim: rgba(244, 239, 230, 0.74);
  --ivory-mute: rgba(244, 239, 230, 0.6);
  --hair: rgba(244, 239, 230, 0.12);
  --hair-strong: rgba(244, 239, 230, 0.26);
  --coral: #ff8080;
  --coral-soft: #ffb3a8;
  --royal: #1034a6;
  --royal-lite: #7d95ff;

  --font-display:
    "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, sans-serif;
  --font-body:
    "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    sans-serif;
  --font-mono:
    ui-monospace, "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo,
    Consolas, monospace;

  --max: 1440px;
  --pad: clamp(20px, 4.2vw, 64px);
  --gutter: max(var(--pad), calc((100% - var(--max)) / 2));
  --header-h: 64px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ------------------------------------------------------------------ base */

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

html {
  background: var(--bg);
  color: var(--ivory);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font: 400 1rem/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
/* One display face for every headline (the dev studio keeps its own type). */
:where(h1, h2, h3):not(:where(.origin-debug *)) {
  font-family: var(--font-display);
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -120px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ivory);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(18px, 3vh, 30px);
  font: 500 0.76rem/1.2 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory-mute);
}
.kicker-mark {
  width: 6px;
  height: 6px;
  background: var(--coral);
  box-shadow: 9px 0 0 var(--royal-lite);
  margin-right: 9px;
}
.kicker-num {
  color: var(--coral);
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 700 1rem/1 var(--font-display);
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color 0.25s,
    color 0.25s,
    border-color 0.25s,
    transform 0.25s var(--ease-out);
}
.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--coral);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--ivory);
}
.btn-primary:focus-visible {
  outline-color: var(--ivory);
}

.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border-color: var(--hair-strong);
}
.btn-ghost:hover {
  border-color: var(--ivory);
}

/* Tiny 2×2 "pixel" mark that spreads apart on hover. */
.btn-pixel {
  width: 4px;
  height: 4px;
  margin-right: 6px;
  background: currentColor;
  box-shadow:
    6px 0 0 currentColor,
    0 6px 0 currentColor,
    6px 6px 0 currentColor;
  transform: translate(-1px, -3px);
  transition: box-shadow 0.35s var(--ease-out);
}
.btn:hover .btn-pixel,
.btn:focus-visible .btn-pixel {
  box-shadow:
    8px -2px 0 currentColor,
    -2px 8px 0 currentColor,
    9px 9px 0 transparent;
}

/* The scatter trigger only exists once the script has booted. */
.btn-alive {
  display: none;
}
.js .btn-alive {
  display: inline-flex;
}
.btn-alive[data-busy] {
  cursor: progress;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
  padding: 0 var(--gutter);
  background: rgba(13, 13, 15, 0.86);
  border-bottom: 1px solid var(--hair);
}
@supports (
  (-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))
) {
  .site-header {
    background: rgba(13, 13, 15, 0.6);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
  }
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  font: 700 1.02rem/0.86 var(--font-display);
  letter-spacing: -0.03em;
  text-decoration: none;
  text-transform: lowercase;
}
.wordmark-dot {
  color: var(--coral);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  position: relative;
  display: inline-block;
  padding: 10px 0;
  font: 500 0.92rem/1 var(--font-body);
  color: var(--ivory-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.site-nav a:hover {
  color: var(--ivory);
}
.site-nav a:hover::after {
  transform: scaleX(1);
}
.nav-external a {
  padding: 10px 16px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  color: var(--ivory);
}
.nav-external a::after {
  display: none;
}
.nav-external a:hover {
  border-color: var(--ivory);
}

@media (max-width: 720px) {
  .nav-external {
    display: none;
  }
}
@media (max-width: 380px) {
  .site-nav ul {
    gap: 12px;
  }
  .site-nav a {
    font-size: 0.85rem;
  }
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(28px, 5vw, 88px);
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding: clamp(36px, 7vh, 88px) var(--gutter) clamp(48px, 8vh, 96px);
  overflow: hidden;
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      55% 55% at 88% 28%,
      rgba(255, 128, 128, 0.09),
      transparent 70%
    ),
    radial-gradient(
      55% 60% at 72% 92%,
      rgba(16, 52, 166, 0.24),
      transparent 70%
    ),
    radial-gradient(40% 45% at 4% 0%, rgba(16, 52, 166, 0.12), transparent 70%);
}

/* Decorative character field. Sits above the portrait but below the copy, and
   never takes pointer input, so scrolling and taps pass straight through. */
.hero-field {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  max-width: none;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 4;
  max-width: 48rem;
}

.hero-title {
  margin: 0;
  font: 700 clamp(2.75rem, 6.6vw, 7.2rem)/0.9 var(--font-display);
  letter-spacing: -0.048em;
}
.hero-title .line {
  display: block;
}
.hero-title .accent {
  padding-bottom: 0.06em;
  color: var(--coral);
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-title .accent {
    background: linear-gradient(
      92deg,
      var(--coral) 0%,
      var(--coral-soft) 46%,
      var(--royal-lite) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.lede {
  max-width: 36ch;
  margin: clamp(20px, 3.4vh, 34px) 0 0;
  font-size: clamp(1.04rem, 0.55vw + 0.9rem, 1.28rem);
  line-height: 1.5;
  color: var(--ivory-dim);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(26px, 4vh, 40px);
}

.hero-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  max-width: 36rem;
  margin: clamp(30px, 6vh, 64px) 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--hair);
  list-style: none;
  font: 500 0.74rem/1.4 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivory-mute);
}
.hero-flow .arrow {
  margin-left: 12px;
  color: var(--coral);
}

/* Portrait stage */

.stage {
  position: relative;
  z-index: 2;
  justify-self: end;
  width: min(100%, 540px, calc((100vh - var(--header-h) - 170px) * 0.75));
  width: min(100%, 540px, calc((100svh - var(--header-h) - 170px) * 0.75));
  min-width: min(100%, 300px);
}

.stage-glow {
  position: absolute;
  inset: -14% -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      42% 38% at 28% 44%,
      rgba(16, 52, 166, 0.6),
      transparent 70%
    ),
    radial-gradient(
      38% 36% at 74% 60%,
      rgba(255, 128, 128, 0.26),
      transparent 70%
    );
  filter: blur(28px);
  opacity: 0.5;
  transform: translate3d(var(--gx, 0px), var(--gy, 0px), 0);
  transition: opacity 1.2s var(--ease-out);
}
.is-alive .stage-glow {
  opacity: 1;
}

.stage-figure {
  position: relative;
  z-index: 1;
  margin: 0;
}

.frame-slot {
  position: relative;
  aspect-ratio: 3 / 4;
}
@supports not (aspect-ratio: 3 / 4) {
  .frame-slot {
    height: 0;
    padding-top: 133.3333%;
  }
}
.js .hero:not(.is-alive) .frame-slot {
  cursor: pointer;
}

.frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-deep);
  box-shadow: 0 50px 90px -50px rgba(0, 0, 0, 0.9);
  transform: perspective(1400px) rotateX(var(--rx, 0deg))
    rotateY(var(--ry, 0deg));
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border: 1px solid var(--hair-strong);
  box-shadow: inset 0 -90px 90px -60px rgba(13, 13, 15, 0.55);
}

/* CSS-only fallback artwork: an abstract pixel-mosaic portrait silhouette.
   Shows under the field before reveal, and in full if the image fails. */
.frame-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(
      ellipse 16% 12% at 49% 36%,
      rgba(244, 239, 230, 0.34),
      transparent 72%
    ),
    radial-gradient(
      ellipse 26% 21% at 49% 38%,
      rgba(255, 160, 140, 0.2),
      transparent 72%
    ),
    radial-gradient(
      ellipse 34% 30% at 50% 31%,
      rgba(40, 30, 40, 0.9),
      transparent 75%
    ),
    radial-gradient(
      ellipse 48% 26% at 54% 97%,
      rgba(244, 239, 230, 0.18),
      transparent 70%
    ),
    radial-gradient(
      58% 50% at 12% 42%,
      rgba(16, 52, 166, 0.8),
      transparent 72%
    ),
    radial-gradient(
      52% 48% at 90% 62%,
      rgba(255, 128, 128, 0.45),
      transparent 72%
    ),
    linear-gradient(180deg, #0b0c14, #0e0a0c);
}
.frame-art::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Square cells on a 3:4 box: 3.2% of the width equals 2.4% of the height. */
  background-image:
    linear-gradient(rgba(10, 10, 13, 0.9) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 10, 13, 0.9) 1px, transparent 1px);
  background-size: 3.2% 2.4%;
}

.frame-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
  color: transparent; /* keep a broken image's alt text from painting over the art */
}
.frame.is-missing .frame-media {
  display: none;
}

.frame-gl {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  max-width: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s var(--ease-out);
}
.frame.has-gl .frame-gl {
  opacity: 1;
}

.frame-light {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background: radial-gradient(
    circle at var(--lx, 60%) var(--ly, 35%),
    rgba(255, 196, 184, 0.17),
    transparent 44%
  );
  transition: opacity 1s var(--ease-out);
}

/* Scripted states: the field covers the frame until "Make it alive". */
.js .frame-media {
  opacity: 0;
  transition: opacity 0.9s var(--ease-out);
}
.js .is-alive .frame-media {
  opacity: 1;
}
.js .frame .frame-art {
  opacity: 0.32;
  transition: opacity 0.9s var(--ease-out);
}
.js .is-alive .frame .frame-art {
  opacity: 0;
}
.js .is-alive .frame.is-missing .frame-art {
  opacity: 1;
}
.js .is-alive .frame-light {
  opacity: 1;
}

.frame-ticks {
  --t: 14px;
  --c: rgba(244, 239, 230, 0.42);
  position: absolute;
  inset: -10px;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--t) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 0 / 1px var(--t) no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--t) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 1px var(--t) no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / var(--t) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 1px var(--t) no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--t) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 1px var(--t) no-repeat;
}

.stage-caption {
  margin-top: 22px;
  font: 500 0.72rem/1.5 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--ivory-mute);
}

.stage-controls {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.motion-toggle {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ivory-dim);
  font: 500 0.72rem/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.motion-toggle:hover {
  color: var(--ivory);
  border-color: var(--ivory);
}
.motion-toggle[hidden] {
  display: none;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    min-height: 0;
    padding-top: 40px;
  }
  .stage {
    justify-self: center;
    width: min(100%, 460px);
    margin-top: 12px;
  }
}

/* -------------------------------------------------------------- sections */

.section {
  position: relative;
  padding: clamp(84px, 12vw, 168px) var(--gutter);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
  align-items: end;
  gap: 24px clamp(24px, 5vw, 80px);
}
.section-head .kicker {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.section h2 {
  max-width: 13ch;
  margin: 0;
  font: 700 clamp(2.3rem, 5.6vw, 5.6rem)/0.94 var(--font-display);
  letter-spacing: -0.042em;
}

.section-intro {
  max-width: 36ch;
  margin: 0;
  font-size: clamp(1.02rem, 0.5vw + 0.9rem, 1.2rem);
  color: var(--ivory-dim);
}

@media (max-width: 860px) {
  .section-head {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Process */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(48px, 7vw, 96px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hair);
}
.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 3vw, 40px) clamp(16px, 2vw, 32px) 8px;
  border-left: 1px solid var(--hair);
}
.step:first-child {
  padding-left: 0;
  border-left: 0;
}

.step-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: clamp(12px, 2vw, 28px);
}
.step-num {
  font: 700 clamp(3.2rem, 6vw, 6rem)/0.85 var(--font-display);
  letter-spacing: -0.05em;
  color: rgba(244, 239, 230, 0.2);
  transition:
    color 0.3s,
    -webkit-text-stroke-color 0.3s;
}
@supports (-webkit-text-stroke: 1px currentColor) {
  .step-num {
    color: transparent;
    -webkit-text-stroke: 1px rgba(244, 239, 230, 0.42);
  }
  .step:hover .step-num {
    -webkit-text-stroke-color: var(--coral);
  }
}
.step-icon {
  flex: none;
  width: 40px;
  height: 40px;
  color: var(--coral);
}
.step:nth-child(even) .step-icon {
  color: var(--royal-lite);
}

.step-tag {
  margin: 0;
  font: 500 0.72rem/1.3 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
}
.step h3 {
  margin: 0;
  font: 700 clamp(1.35rem, 1.6vw, 1.65rem)/1.15 var(--font-display);
  letter-spacing: -0.02em;
}
.step p:not(.step-tag) {
  max-width: 32ch;
  margin: 0;
  color: var(--ivory-dim);
}

@media (max-width: 1024px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .step:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .step:nth-child(n + 3) {
    border-top: 1px solid var(--hair);
  }
}
@media (max-width: 600px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .step {
    padding: 28px 0 24px;
    border-left: 0;
  }
  .step + .step {
    border-top: 1px solid var(--hair);
  }
}

/* Studies */

.studies-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 112px);
}

.study-figure {
  width: min(100%, 560px);
  margin: 0;
}
.study-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-deep);
}
@supports not (aspect-ratio: 3 / 4) {
  .study-frame {
    height: 0;
    padding-top: 133.3333%;
  }
}
.study-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border: 1px solid var(--hair-strong);
}
.study-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  color: transparent;
  transition:
    filter 0.7s var(--ease-out),
    transform 1.2s var(--ease-out);
}
.study-tint {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.7s var(--ease-out);
}
.study-index {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 4;
  padding: 7px 10px;
  background: rgba(13, 13, 15, 0.62);
  font: 500 0.7rem/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory);
}
.study-index::after {
  content: "i — As rendered";
}
.study-figure figcaption {
  margin-top: 18px;
  font: 500 0.72rem/1.5 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--ivory-mute);
}

/* Study treatments, driven purely by the checked radio (no JS needed). */
.studies:has(#study-ultramarine:checked) .study-img {
  filter: grayscale(1) contrast(1.12) brightness(1.04);
  transform: scale(1.03);
}
.studies:has(#study-ultramarine:checked) .study-tint {
  opacity: 1;
  background: linear-gradient(170deg, #7d95ff 0%, #1034a6 55%, #050b2e 100%);
  mix-blend-mode: color;
}
.studies:has(#study-ultramarine:checked) .study-index::after {
  content: "ii — Ultramarine";
}

.studies:has(#study-coral:checked) .study-img {
  filter: grayscale(1) contrast(1.05) brightness(1.1);
  transform: scale(1.03);
}
.studies:has(#study-coral:checked) .study-tint {
  opacity: 1;
  background: linear-gradient(170deg, #ffd3c6 0%, #ff8080 45%, #7a1f2b 100%);
  mix-blend-mode: color;
}
.studies:has(#study-coral:checked) .study-index::after {
  content: "iii — Coral hour";
}

.studies:has(#study-signal:checked) .study-img {
  filter: grayscale(1) contrast(1.7) brightness(0.86);
  transform: scale(1.06);
}
.studies:has(#study-signal:checked) .study-tint {
  opacity: 1;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(13, 13, 15, 0.6) 0 1px,
      transparent 1px 4px
    ),
    linear-gradient(180deg, rgba(255, 128, 128, 0.34), rgba(16, 52, 166, 0.46));
}
.studies:has(#study-signal:checked) .study-index::after {
  content: "iv — Signal";
}

.studies-copy .section-intro {
  margin-top: 24px;
}

.study-picker {
  min-width: 0;
  margin: clamp(30px, 4vw, 52px) 0 0;
  padding: 0;
  border: 0;
}
.study-picker legend {
  margin-bottom: 14px;
  padding: 0;
  font: 500 0.72rem/1.2 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivory-mute);
}
.study-option {
  position: relative;
  border-top: 1px solid var(--hair);
}
.study-option:last-child {
  border-bottom: 1px solid var(--hair);
}
/* Native radio kept focusable and operable; its label carries the visuals. */
.study-option input {
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
.study-option label {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  grid-template-areas:
    "num name mark"
    "num desc desc";
  align-items: baseline;
  gap: 6px 16px;
  padding: 20px 6px;
  cursor: pointer;
}
.study-num {
  grid-area: num;
  font: 500 0.8rem/1.6 var(--font-mono);
  color: var(--ivory-mute);
}
.study-name {
  grid-area: name;
  font: 700 clamp(1.3rem, 2vw, 1.9rem)/1.1 var(--font-display);
  letter-spacing: -0.025em;
  color: var(--ivory-dim);
  transition: color 0.3s;
}
.study-desc {
  grid-area: desc;
  font-size: 0.96rem;
  color: var(--ivory-mute);
}
.study-mark {
  grid-area: mark;
  align-self: center;
  width: 12px;
  height: 12px;
  border: 1px solid var(--hair-strong);
  transition:
    background-color 0.3s,
    border-color 0.3s,
    transform 0.4s var(--ease-out);
}
.study-option label:hover .study-name {
  color: var(--ivory);
}
.study-option input:checked + label .study-name {
  color: var(--ivory);
}
.study-option input:checked + label .study-num {
  color: var(--coral);
}
.study-option input:checked + label .study-mark {
  background: var(--coral);
  border-color: var(--coral);
  transform: rotate(45deg);
}
.study-option input:focus-visible + label {
  outline: 2px solid var(--coral);
  outline-offset: -2px;
}

@media (max-width: 860px) {
  .studies-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .study-figure {
    order: 2;
    justify-self: center;
  }
}

/* Hosts */

.hosts-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 5vw, 80px);
  margin: clamp(48px, 7vw, 96px) 0 0;
  border-top: 1px solid var(--hair);
}
.hosts-item {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 10px 24px;
  padding: clamp(24px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--hair);
}
.hosts-item dt {
  font: 700 clamp(1.25rem, 1.6vw, 1.55rem)/1.15 var(--font-display);
  letter-spacing: -0.02em;
}
.hosts-item dd {
  margin: 0;
  color: var(--ivory-dim);
}

@media (max-width: 960px) {
  .hosts-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 520px) {
  .hosts-item {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Invitation */

.invite {
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
}
.invite::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      50% 60% at 85% 100%,
      rgba(16, 52, 166, 0.28),
      transparent 70%
    ),
    radial-gradient(
      40% 50% at 100% 20%,
      rgba(255, 128, 128, 0.1),
      transparent 70%
    );
}
.invite .wrap {
  position: relative;
}

.invite-band {
  display: grid;
  gap: 4px;
  width: min(100%, 560px);
  margin-bottom: clamp(40px, 6vw, 72px);
}
.invite-band span {
  display: block;
  height: 10px;
  background: linear-gradient(
    90deg,
    var(--coral),
    var(--coral-soft) 45%,
    var(--royal-lite)
  );
  -webkit-mask: repeating-linear-gradient(
    90deg,
    #000 0 10px,
    transparent 10px 14px
  );
  mask: repeating-linear-gradient(90deg, #000 0 10px, transparent 10px 14px);
}
.invite-band span + span {
  width: 72%;
  margin-left: 14px;
  opacity: 0.45;
}

.section .invite-title {
  max-width: 10ch;
  font-size: clamp(3rem, 10vw, 10.5rem);
  line-height: 0.88;
}
.invite .section-intro {
  margin-top: clamp(24px, 3vw, 40px);
}

.invite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(32px, 4vw, 48px);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  padding: 40px var(--gutter) 48px;
  font-size: 0.9rem;
  color: var(--ivory-mute);
}
.footer-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px clamp(24px, 4vw, 64px);
}
.wordmark-footer {
  color: var(--ivory);
}
.footer-note,
.footer-meta {
  margin: 0;
}
.footer-note {
  max-width: 60ch;
}
.footer-meta a {
  color: var(--ivory-dim);
}

@media (max-width: 899px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------------------------- scroll-linked entrance */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .step,
    .study-option {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ----------------------------------------------------- motion preferences */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  /* A short crossfade is the only reveal transition kept. */
  .js .frame-media,
  .js .frame .frame-art {
    transition: opacity 0.25s linear !important;
  }
}

.motion-paused .stage-glow,
.motion-paused .frame-light {
  transition: none;
}

/* --------------------------------------------------------- forced colours */

@media (forced-colors: active) {
  .hero-title .accent {
    background: none;
    color: CanvasText;
  }
  .btn {
    border: 1px solid ButtonText;
  }
  .study-option input:checked + label .study-mark {
    background: Highlight;
  }
  .hero-field,
  .frame-gl,
  .frame-light,
  .stage-glow {
    display: none;
  }
}
