@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --lime: #dbff00;
  --lime-dim: rgba(219, 255, 0, 0.14);
  --bg: #0a0a0a;
  --ink: #111;
  --panel: #121212;
  --line: #222;
  --white: #fff;
  --muted: #9a9a9a;
  --soft: #ccc;
  --font-sans: "Geist", -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --gutter: clamp(20px, 5.5vw, 88px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* One frosted surface shared by the fixed header and the mobile nav panel */
  --glass-tint: rgba(10, 10, 10, 0.01);
  --glass-blur: blur(9px) saturate(125%);
  /* measured height of the fixed header; the mobile bar is shorter because the
     nav leaves the flow and the 40px toggle sets the height */
  --header-h: 71px;
}

/* Without blur support the tint alone has to carry legibility, so drop the
   translucency rather than leaving content readable through the glass. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --glass-tint: rgba(10, 10, 10, 0.90);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-wrap: pretty;
}

h1,
h2 {
  text-wrap: balance;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-feature-settings: "ss02" 1, "ss03" 1;
  background: var(--bg);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss02" 1, "ss03" 1;
}

/* ---------- Jelly UI theming ---------- */

/* layout-neutral wrapper so the theme element doesn't affect flow */
jelly-theme {
  display: contents;
}

/* Brand the jelly tokens to match the site: lime accent, Geist fonts,
   and control padding/font-size close to the original controls. */
jelly-theme {
  --jelly-accent: var(--lime);
  --jelly-color-background-accent: var(--lime);
  --jelly-color-foreground-on-accent: var(--ink);
  --jelly-ring-color: var(--lime);

  --jelly-font-text: var(--font-sans);
  --jelly-font-display: var(--font-sans);
  --jelly-font-mono: var(--font-mono);

  /* buttons — keep the compact footprint of the old .btn (~14px / 22px) */
  --jelly-button-font-size: 14px;
  --jelly-button-min-width: 0;

  /* inputs / textarea — match the 15px body text of the old fields */
  --jelly-input-font-size: 15px;
  --jelly-textarea-font-size: 15px;
}

/* Set padding on the element itself: document rules beat the shadow
   :host([size]) defaults, which would override a theme-inherited token. */
jelly-button {
  --jelly-button-padding-inline: 28px;
}

/* jelly-button is neither .btn nor <a>, so re-enable clicks in the hero */
.hero-content jelly-button {
  pointer-events: auto;
}

.nav-cta-jelly {
  --jelly-button-padding-inline: 22px;
}

/* Fragment CTAs stay real links so they re-scroll even when the URL already
   points at the target; inline-flex drops the inline baseline gap. */
.cta-link {
  display: inline-flex;
}

/* Form controls: jelly defaults to fixed showcase widths (220/280px).
   Stretch them to the grid, and ease the default pill radius. */
.contact-form jelly-input,
.contact-form jelly-select,
.contact-form jelly-textarea,
.newsletter-form jelly-input {
  display: block;
  width: 100%;
  max-width: none;
  --jelly-input-radius: 12px;
  --jelly-select-radius: 12px;
  --jelly-textarea-radius: 14px;
  --jelly-input-font-size: 15px;
  --jelly-select-font-size: 15px;
  --jelly-textarea-font-size: 15px;
  --jelly-color-background-muted: #1a1a1a;
  --jelly-fill: #1a1a1a;
}

.contact-form jelly-input,
.contact-form jelly-select {
  height: 48px;
}

/* Jelly hardcodes select at 600 vs inputs at 500; match the inputs. */
.contact-form jelly-select {
  font: 500 var(--jelly-select-font-size, 15px) / 1.2 var(--font-sans);
}

.contact-form jelly-textarea {
  height: auto;
  min-height: 148px;
  --jelly-textarea-min-height: 148px;
  --jelly-textarea-max-height: 280px;
}

.contact-submit {
  align-self: flex-start;
  margin-top: 4px;
}

.form-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

.form-status.is-success {
  color: var(--lime);
}

.form-status.is-error {
  color: #ff8f8f;
}

/* ---------- Atmosphere ---------- */

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 70% 45%, rgba(219, 255, 0, 0.07), transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(255, 255, 255, 0.03), transparent 55%),
    linear-gradient(180deg, #0a0a0a 0%, #111 55%, #0a0a0a 100%);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.62);
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(219, 255, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(219, 255, 0, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 65% 60% at 68% 48%, black 10%, transparent 75%);
  opacity: 0.55;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.92) 0%, rgba(10, 10, 10, 0.55) 38%, rgba(10, 10, 10, 0.15) 62%, rgba(10, 10, 10, 0.35) 100%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.35) 0%, transparent 28%, transparent 70%, rgba(10, 10, 10, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 4;
}

/* ---------- Header ---------- */

/* Fixed, not sticky: the header lives inside .hero, whose overflow: hidden
   makes it the sticky scrollport, so a sticky header scrolls off with the
   hero. Fixed also escapes body's overflow-x: clip. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* clears .hero-content (4), the sticky walkthrough visual (5) and .noise
     (50); the mobile nav panel nests inside this stacking context at 40 */
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 14px var(--gutter);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* The glass rides on a pseudo-element because backdrop-filter on the header
   itself would make it the containing block for the fixed mobile nav panel,
   collapsing that panel to the height of the header. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--glass-tint);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}

/* Fragment targets land below the fixed header rather than under it; the
   per-target offsets further down keep the breathing room each already had. */
section[id] {
  scroll-margin-top: var(--header-h);
}

.logo img {
  height: 28px;
  width: auto;
}

.header-rule {
  flex: 1;
  height: 1px;
  margin: 0 36px;
  background: rgba(255, 255, 255, 0.16);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--soft);
  transition: color 0.2s var(--ease);
}

.site-nav a:hover {
  color: var(--white);
}

.nav-cta {
  padding: 9px 16px;
  border: 1px solid var(--lime);
  color: var(--lime) !important;
  transition: background 0.2s var(--ease), color 0.2s var(--ease) !important;
}

.nav-cta:hover {
  background: var(--lime);
  color: var(--ink) !important;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

body.nav-open .nav-toggle span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

body.nav-open .nav-toggle span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ---------- Hero content ---------- */

.hero-content {
  margin-top: auto;
  padding: 0 var(--gutter) clamp(40px, 7vh, 72px);
  max-width: min(1520px, 100%);
  pointer-events: none;
}

.hero-content .btn,
.hero-content a {
  pointer-events: auto;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 24px;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.1s forwards;
}

.hero-content h1 {
  font-size: clamp(48px, 7.5vw, 84px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.9;
  margin-bottom: 24px;
  color: var(--white);
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.55);
  opacity: 0;
  animation: rise 0.95s var(--ease) 0.18s forwards;
}

.hero-content h1 .kern {
  letter-spacing: -0.04em;
}

.hero-lead {
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--soft);
  max-width: 36ch;
  margin-bottom: 34px;
  opacity: 0;
  animation: rise 0.95s var(--ease) 0.28s forwards;
}

/* Desktop: balance H1 to 3 lines and lead to 2 via measure */
@media (min-width: 769px) {
  .hero-content h1 {
    max-width: 14ch;
  }

  .hero-lead {
    max-width: 44ch;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  opacity: 0;
  animation: rise 0.95s var(--ease) 0.38s forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn-solid {
  background: var(--lime);
  color: var(--ink);
}

.btn-solid:hover {
  background: #eaff4d;
}

.btn-ghost {
  border-color: #333;
  color: var(--white);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
  border-color: var(--lime);
  color: var(--lime);
}

/* ---------- Logo bar ---------- */

.logo-bar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  overflow: hidden;
  background: var(--ink);
}

.logo-track {
  display: flex;
  align-items: center;
  gap: clamp(56px, 7vw, 96px);
  width: max-content;
  padding-left: var(--gutter);
  animation: marquee 40s linear infinite;
}

.logo-track img {
  height: 62px;
  width: auto;
  max-width: 202px;
  object-fit: contain;
  object-position: center;
  opacity: 0.55;
  filter: brightness(0) invert(1);
  transition: opacity 0.2s;
}

.logo-track img:hover {
  opacity: 0.9;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */

.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.section-lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 48ch;
}

.product,
.team {
  padding: clamp(72px, 12vw, 140px) var(--gutter);
}

.product {
  background:
    linear-gradient(180deg, #0a0a0a, #111 40%, #0a0a0a);
  border-bottom: 1px solid var(--line);
}

/* ---------- Value props ---------- */

.value-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.value {
  padding: 36px 28px;
  border-right: 1px solid var(--line);
}

.value:last-child {
  border-right: none;
  padding-right: 0;
}

.value-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.value-viz {
  height: 110px;
  margin-bottom: 28px;
}

.value-viz canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.value-index {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* These ship in brand lime already, so no recoloring filter. The artwork
   relies on a 40% alpha band, which a blanket opacity would dim further. */
.value-icon {
  width: 26px;
  height: 26px;
}

.value h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.value p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 36ch;
}

.value.is-in {
  animation: rise 0.8s var(--ease) both;
}

.value:nth-child(2).is-in { animation-delay: 0.08s; }
.value:nth-child(3).is-in { animation-delay: 0.16s; }

/* ---------- Walkthrough (scrollytelling) ---------- */

.walkthrough {
  /* light bottom padding: the steps column already carries a 24vh runway */
  padding: clamp(72px, 12vw, 140px) var(--gutter) clamp(32px, 4vw, 48px);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.walk-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
  /* columns must stretch to the full row height or sticky has no travel */
}

.walk-steps {
  display: flex;
  flex-direction: column;
  /* extends the sticky container so the frame stays pinned until the
     last step has been centered in the viewport */
  padding-bottom: 24vh;
}

.walk-step {
  /* each step owns a generous scroll span so the sticky visual dwells */
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
  opacity: 0.28;
  transition: opacity 0.45s var(--ease);
}

.walk-step.is-active {
  opacity: 1;
}

.walk-index {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--lime);
  margin-bottom: 14px;
}

.walk-step h3 {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.walk-step p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 44ch;
}

.walk-visual {
  position: relative;
}

.walk-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
}

/* Abstract app window */
.shot-frame {
  width: 100%;
  aspect-ratio: 16 / 10.5;
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: #101010;
  border: 1px solid #262626;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(219, 255, 0, 0.05),
    0 0 120px rgba(219, 255, 0, 0.04);
}

.shot-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid #222;
  background: #141414;
  flex-shrink: 0;
}

.shot-chrome span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2c2c2c;
}

.shot-address {
  height: 10px;
  width: 34%;
  margin-left: 14px;
  border-radius: 5px;
  background: #1e1e1e;
}

.shot-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Abstract sidebar: b = active nav item (lime), spans = the rest */
.shot-rail {
  width: 52px;
  flex-shrink: 0;
  border-right: 1px solid #222;
  background: #0d0d0d;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
}

.shot-rail b,
.shot-rail span {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #222;
  transition: background 0.4s var(--ease), transform 0.4s var(--ease), order 0s;
}

.shot-rail b {
  background: var(--lime-dim);
  outline: 1px solid rgba(219, 255, 0, 0.55);
}

/* the lime nav item walks down the rail as steps advance */
.shot-frame[data-active="0"] .shot-rail b { transform: translateY(0); }
.shot-frame[data-active="1"] .shot-rail b { transform: translateY(36px); }
.shot-frame[data-active="2"] .shot-rail b { transform: translateY(72px); }
.shot-frame[data-active="3"] .shot-rail b { transform: translateY(108px); }

.shot-frame[data-active="1"] .shot-rail span:nth-of-type(1),
.shot-frame[data-active="2"] .shot-rail span:nth-of-type(1),
.shot-frame[data-active="2"] .shot-rail span:nth-of-type(2),
.shot-frame[data-active="3"] .shot-rail span:nth-of-type(1),
.shot-frame[data-active="3"] .shot-rail span:nth-of-type(2),
.shot-frame[data-active="3"] .shot-rail span:nth-of-type(3) {
  transform: translateY(-36px);
}

.shot-stage {
  position: relative;
  flex: 1;
  min-width: 0;
}

.shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.shot.is-active {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 980px) {
  .walk-layout {
    grid-template-columns: 1fr;
  }

  /* visual pins below the fixed header, steps scroll beneath it */
  .walk-visual {
    order: -1;
    position: sticky;
    top: var(--header-h);
    z-index: 5;
    background: var(--bg);
    padding: 12px 0;
  }

  .walk-sticky {
    position: static;
    height: auto;
  }

  .shot-frame {
    aspect-ratio: 16 / 9;
    max-height: 44vh;
  }

  .walk-step {
    min-height: 0;
    padding: 40px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .walk-step,
  .shot,
  .shot-rail b,
  .shot-rail span {
    transition: none !important;
  }
}

/* ---------- Team ---------- */

.team {
  background: var(--bg);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 22px;
}

.team-photo-wrap {
  --blob: 58% 42% 55% 45% / 48% 55% 45% 52%;
  width: 104px;
  height: 104px;
  margin-bottom: 18px;
}

/* Gooey metaball blobs echoing the Resilient logo mark; varied per member */
.team-member:nth-child(2) .team-photo-wrap { --blob: 44% 56% 48% 52% / 55% 44% 56% 45%; }
.team-member:nth-child(3) .team-photo-wrap { --blob: 52% 48% 60% 40% / 42% 58% 42% 58%; }
.team-member:nth-child(4) .team-photo-wrap { --blob: 62% 38% 50% 50% / 45% 50% 50% 55%; }

.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  background: #141414;
  border: 1px solid var(--lime);
  border-radius: var(--blob);
  filter: grayscale(1) contrast(1.18) brightness(0.96) drop-shadow(5px 6px 0 rgba(219, 255, 0, 0.28));
  transition: transform 0.5s var(--ease), filter 0.4s var(--ease), border-radius 0.6s var(--ease);
}

.team-member:hover .team-photo {
  transform: scale(1.05);
  border-radius: 50% 50% 47% 53% / 52% 48% 53% 47%;
  filter: grayscale(0) contrast(1.08) brightness(1.02) drop-shadow(4px 5px 0 rgba(219, 255, 0, 0.55));
}

.team-member h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.team-role {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 12px;
}

.team-bio {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.team-bio p + p {
  margin-top: 10px;
}

.team-bio a {
  color: var(--soft);
  border-bottom: 1px solid #333;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.team-bio a:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

.team-media {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 18px;
}

.team-media .team-photo-wrap {
  margin-bottom: 0;
  flex-shrink: 0;
}

.team-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 4px;
}

.team-links a {
  display: block;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}

.team-links a:hover {
  color: var(--lime);
}

.team-links svg {
  display: block;
  width: 16px;
  height: 16px;
}

/* ---------- Contact ---------- */

.contact {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: clamp(40px, 6vw, 80px);
  padding: clamp(72px, 12vw, 120px) var(--gutter);
  border-top: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(219, 255, 0, 0.04), transparent 40%),
    var(--ink);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 640px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.form-field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-content: start;
  padding-top: 8px;
}

.aside-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 12px;
}

.aside-group ul {
  list-style: none;
}

.aside-group li {
  font-size: 14px;
  color: var(--soft);
  margin-bottom: 8px;
}

.aside-group a:hover {
  color: var(--lime);
}

.aside-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 14px;
}

.newsletter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.newsletter-form jelly-input {
  flex: 1 1 170px;
  min-width: 0;
  height: 44px;
}

.newsletter-submit {
  flex: 0 0 auto;
  --jelly-button-height: 44px;
  --jelly-button-min-width: 0;
  --jelly-button-padding-inline: 20px;
}

.newsletter-status {
  margin-top: 10px;
}

.aside-legal {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Mobile ---------- */

@media (max-width: 980px) {
  .value-list {
    grid-template-columns: 1fr;
  }

  .value {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 28px 0;
  }

  .value:last-child {
    border-bottom: none;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 69px;
  }

  .nav-toggle {
    display: flex;
  }

  .header-rule {
    display: none;
  }

  /* The panel is a sibling of the logo and toggle inside the header's own
     stacking context, so raise those over it to keep the close control
     reachable once the menu covers the viewport. */
  body.nav-open .logo,
  body.nav-open .nav-toggle {
    position: relative;
    z-index: 41;
  }

  /* The panel supplies its own glass, so drop the header's layer while the
     menu is open — otherwise the tint doubles and the header rule cuts a
     seam across the top of the panel. */
  body.nav-open .site-header {
    border-bottom-color: transparent;
  }

  body.nav-open .site-header::before {
    opacity: 0;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 40;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    background: var(--glass-tint);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
  }

  body.nav-open .site-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s var(--ease), visibility 0s;
  }

  .site-nav a {
    font-size: 28px;
    letter-spacing: -0.03em;
  }

  .nav-cta {
    border: none;
    padding: 0;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-content h1 {
    font-size: clamp(38px, 11vw, 64px);
  }

  .hero-hint {
    display: none;
  }

  .hero-vignette {
    background:
      linear-gradient(180deg, rgba(10, 10, 10, 0.2) 0%, transparent 30%, rgba(10, 10, 10, 0.55) 55%, rgba(10, 10, 10, 0.92) 100%);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .logo-track {
    animation-duration: 28s;
  }
}

@media (max-width: 520px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

}

@media (prefers-reduced-motion: reduce) {
  .hero-label,
  .hero-content h1,
  .hero-lead,
  .hero-actions,
  .hero-hint,
  .logo-track,
  .reveal,
  .value.is-in {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .logo-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
    row-gap: 20px;
  }
}

/* ==========================================================================
   Whitepaper page (whitepaper.html)
   Long-form reading layout: sticky contents rail, ~68ch measure, light
   "figure cards" for the report's charts, and dark-brand HTML tables.
   ========================================================================== */

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

.paper-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: min(720px, 90svh);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 50% at 78% 30%, rgba(219, 255, 0, 0.08), transparent 62%),
    linear-gradient(180deg, #0a0a0a 0%, #101010 50%, #0a0a0a 100%);
}

.paper-hero-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.paper-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
  opacity: 0.58;
  filter: grayscale(0.4) contrast(1.04) brightness(0.92);
}

.paper-hero-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.92) 0%, rgba(10, 10, 10, 0.66) 48%, rgba(10, 10, 10, 0.22) 100%),
    linear-gradient(180deg, rgba(10, 10, 10, 0.88) 0%, rgba(10, 10, 10, 0.26) 28%, rgba(10, 10, 10, 0.66) 74%, #0a0a0a 100%);
}

.paper-hero .hero-grid {
  mask-image: radial-gradient(ellipse 60% 60% at 72% 42%, black 10%, transparent 76%);
}

.paper-hero-content {
  position: relative;
  z-index: 4;
  margin-top: auto;
  padding: clamp(56px, 9vh, 104px) var(--gutter) clamp(44px, 7vh, 76px);
  max-width: min(1520px, 100%);
}

.paper-hero-content h1 {
  font-size: clamp(34px, 5.2vw, 62px);
  font-weight: 600;
  letter-spacing: -0.042em;
  line-height: 1.03;
  max-width: 17ch;
  color: var(--white);
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.55);
}

.paper-hero-lead {
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--soft);
  max-width: 44ch;
  margin-top: 18px;
}

.paper-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px clamp(28px, 4vw, 56px);
  margin-top: clamp(26px, 4vh, 40px);
}

.paper-meta dt {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 7px;
}

.paper-meta dd {
  font-size: 14px;
  line-height: 1.4;
  color: var(--soft);
}

.paper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(28px, 4vh, 40px);
}

/* Match the pill footprint of the jelly-button controls used elsewhere. */
.paper-actions .btn {
  border-radius: 999px;
  padding: 10px 24px;
}

.site-nav a[aria-current="page"] {
  color: var(--white);
}

/* ---------- Paper layout ---------- */

.paper {
  display: grid;
  grid-template-columns: minmax(0, 232px) minmax(0, 74ch);
  justify-content: center;
  gap: clamp(32px, 5vw, 72px);
  padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(72px, 10vw, 128px);
  background: var(--bg);
}

.paper-toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  align-self: start;
  max-height: calc(100svh - var(--header-h) - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.paper-toc-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 12px;
}

.paper-toc ol {
  list-style: none;
  counter-reset: paper-toc;
}

.paper-toc > ol > li {
  counter-increment: paper-toc;
}

/* Hanging indent so wrapped entries align past the number, not under it. */
.paper-toc > ol > li > a {
  padding-left: 27px;
  text-indent: -27px;
}

.paper-toc > ol > li > a::before {
  content: counter(paper-toc, decimal-leading-zero);
  display: inline-block;
  width: 27px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-indent: 0;
}

.paper-toc a {
  display: block;
  padding: 5px 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--soft);
  transition: color 0.2s var(--ease);
}

.paper-toc a:hover {
  color: var(--lime);
}

.paper-toc a.is-active,
.paper-toc a[aria-current="true"] {
  color: var(--lime);
}

.paper-toc > ol > li > a.is-active::before,
.paper-toc > ol > li > a[aria-current="true"]::before {
  color: var(--lime);
}

/* Nested subheadings only when the owning top-level branch is active. */
.paper-toc > ol > li > ol {
  display: none;
  margin: 2px 0 8px 5px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.paper-toc > ol > li.is-open > ol {
  display: block;
}

.paper-toc ol ol a {
  font-size: 12.5px;
  color: var(--muted);
  padding: 4px 0;
}

.paper-toc ol ol a.is-active,
.paper-toc ol ol a[aria-current="true"] {
  color: var(--lime);
}

/* ---------- Paper body ---------- */

.paper-body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--soft);
}

.paper-body section {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.paper-body section + section {
  margin-top: clamp(52px, 6vw, 80px);
}

.paper-body h2 {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--white);
  margin-bottom: 22px;
}

.paper-body h3 {
  scroll-margin-top: calc(var(--header-h) + 24px);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--white);
  margin: clamp(36px, 4.5vw, 52px) 0 14px;
}

.paper-body h4 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--white);
  margin-bottom: 14px;
}

.paper-body p {
  max-width: 68ch;
  margin-bottom: 22px;
}

.paper-body > section > *:last-child,
.paper-callout > *:last-child {
  margin-bottom: 0;
}

.paper-body strong {
  color: var(--white);
  font-weight: 600;
}

.paper-body a {
  color: var(--white);
  border-bottom: 1px solid #333;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.paper-body a:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

.paper-list {
  list-style: none;
  max-width: 68ch;
  margin-bottom: 22px;
}

.paper-list > li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 14px;
}

.paper-list > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 13px;
  width: 6px;
  height: 6px;
  background: var(--lime);
}

.paper-list ul {
  list-style: none;
  margin: 10px 0 0;
}

.paper-list ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 17px;
  color: var(--muted);
}

.paper-list ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 9px;
  height: 1px;
  background: #444;
}

/* ---------- Footnote markers ---------- */

.paper-fn {
  font-size: 0.62em;
  line-height: 0;
  vertical-align: super;
}

/* The markers are also the return targets for the footnote back-links, so
   they need the same clearance under the fixed header. */
.paper-body .paper-fn a {
  scroll-margin-top: calc(var(--header-h) + 32px);
  color: var(--lime);
  border-bottom: none;
  padding: 0 1px;
}

.paper-body .paper-fn a:hover {
  color: var(--white);
}

/* ---------- Figures ---------- */

/* The report's figures are colour-coded charts on white, so they sit in a
   light card rather than being inverted for the dark page. */
.paper-figure {
  margin: clamp(26px, 3.4vw, 38px) 0;
}

.paper-figure-media {
  background: #fff;
  border-radius: 8px;
  padding: clamp(14px, 2.4vw, 24px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.paper-figure-media img {
  width: 100%;
  height: auto;
}

.paper-figure figcaption {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.paper-figure-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
  margin-right: 7px;
}

/* ---------- Boxes and case studies ---------- */

.paper-callout {
  margin: clamp(28px, 3.6vw, 40px) 0;
  padding: clamp(22px, 3.4vw, 34px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.paper-callout-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 12px;
}

.paper-callout p {
  font-size: 17px;
}

/* ---------- Tables ---------- */

.paper-table-wrap {
  margin: clamp(22px, 3vw, 30px) 0;
  overflow-x: auto;
}

.paper-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}

/* Most captions exist only for screen readers; the payoff table's caption is
   printed in the source report, so it stays visible. */
.paper-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.paper-table-payoff caption {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  caption-side: bottom;
  text-align: left;
  padding-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.paper-table th {
  text-align: left;
  vertical-align: top;
  font-weight: 600;
  color: var(--white);
}

.paper-table thead th,
.paper-table thead td {
  padding: 0 24px 12px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--lime);
}

.paper-table tbody th,
.paper-table tbody td {
  padding: 15px 24px 15px 0;
  vertical-align: top;
}

.paper-table tbody td {
  color: var(--soft);
}

.paper-table tbody tr + tr th,
.paper-table tbody tr + tr td {
  border-top: 1px solid var(--line);
}

.paper-table th:last-child,
.paper-table td:last-child {
  padding-right: 0;
}

.paper-table thead th {
  width: 50%;
}

.paper-table-payoff thead th {
  width: 34%;
}

.paper-table-payoff tbody td {
  font-family: var(--font-mono);
  font-feature-settings: "ss02" 1, "ss03" 1;
  color: var(--white);
}

.paper-th-eyebrow {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
}

/* ---------- References ---------- */

.paper-source-note {
  margin-top: clamp(28px, 3.6vw, 38px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}

.paper-references ol {
  list-style: none;
  counter-reset: paper-ref;
  max-width: 68ch;
}

.paper-references li {
  counter-increment: paper-ref;
  position: relative;
  padding-left: 34px;
  margin-bottom: 16px;
  scroll-margin-top: calc(var(--header-h) + 32px);
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.paper-references li::before {
  content: counter(paper-ref);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--font-mono);
  font-feature-settings: "ss02" 1, "ss03" 1;
  font-size: 12px;
  color: var(--lime);
}

.paper-references li:target {
  color: var(--soft);
}

.paper-body .paper-fn-back {
  margin-left: 7px;
  color: var(--lime);
  border-bottom: none;
  white-space: nowrap;
}

/* ---------- Whitepaper responsive ---------- */

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

  .paper-toc {
    position: static;
    max-height: none;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel);
  }

  .paper-body {
    max-width: 74ch;
  }
}

@media (max-width: 680px) {
  .paper-hero-content h1 {
    max-width: none;
  }

  /* Stack table rows into labelled blocks so nothing needs sideways scrolling. */
  .paper-table thead,
  .paper-table tbody,
  .paper-table tr,
  .paper-table th,
  .paper-table td {
    display: block;
    width: auto;
  }

  /* Flex column keeps the visible caption below the stacked rows. */
  .paper-table {
    display: flex;
    flex-direction: column;
  }

  .paper-table-payoff caption {
    order: 2;
    padding: 16px 0 0;
  }

  .paper-table thead {
    display: none;
  }

  .paper-table tbody tr {
    padding: 18px 0;
  }

  .paper-table tbody tr + tr {
    border-top: 1px solid var(--line);
  }

  .paper-table tbody th,
  .paper-table tbody td {
    padding: 0;
    border-top: none;
  }

  .paper-table tbody tr + tr th,
  .paper-table tbody tr + tr td {
    border-top: none;
  }

  .paper-table tbody th {
    margin-bottom: 10px;
  }

  .paper-table tbody td + td,
  .paper-table tbody th + td {
    margin-top: 12px;
  }

  .paper-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lime);
  }
}

/* ---------- Whitepaper teaser (home) ---------- */

.wp-teaser {
  padding: clamp(72px, 12vw, 140px) var(--gutter);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(219, 255, 0, 0.04), transparent 40%),
    var(--ink);
}

.wp-teaser-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.wp-teaser-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: clamp(28px, 3vw, 36px);
  max-width: 56ch;
}

.wp-teaser-points li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 20px;
  align-items: start;
}

.wp-teaser-index {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding-top: 4px;
}

.wp-teaser-points h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.wp-teaser-points p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.wp-teaser-cta {
  display: inline-flex;
}

.wp-teaser-media {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
}

.wp-teaser-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

@media (max-width: 980px) {
  .wp-teaser-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .wp-teaser-media {
    order: -1;
    max-width: 520px;
  }
}
