/* ============================================================
   PROAPPS SOLUTIONS — AFTER PREDICTION
   Design system: ink editorial / field-log
   ============================================================ */

:root {
  --bg: #0a0d10;
  --bg-2: #0e1216;
  --ink: #e9e4da;          /* bone */
  --muted: #8b9199;
  --line: rgba(233, 228, 218, 0.14);
  --accent: #ff4a11;
  --font-display: "Anton", Impact, sans-serif;
  --font-body: "Archivo", Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --header-safe: clamp(6.25rem, 11vh, 7.75rem);
  --theme-ease: 0.9s cubic-bezier(0.6, 0, 0.2, 1);
}

/* light theme — flipped during CH.04/05 */
body.theme-light {
  --bg: #e9e4da;
  --bg-2: #e0dacd;
  --ink: #101418;
  --muted: #5d6167;
  --line: rgba(16, 20, 24, 0.16);
}

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

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(139,145,153,.4) transparent;
  scroll-padding-top: var(--header-safe);
  overflow-x: clip;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  transition: background-color var(--theme-ease), color var(--theme-ease);
  cursor: none;
}
@media (pointer: coarse) { body { cursor: auto; } }

::selection { background: var(--accent); color: #0a0d10; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* logo mark rendered white on dark, ink on light */
.header__mark, .turn__mark {
  filter: brightness(0) invert(1) opacity(0.92);
  transition: filter var(--theme-ease);
}
body.theme-light .header__mark,
body.theme-light .turn__mark { filter: brightness(0) opacity(0.92); }

/* ============================================================
   GRAIN
   ============================================================ */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   CURSOR
   ============================================================ */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 400;
  pointer-events: none;
  mix-blend-mode: exclusion;
  opacity: 0;
  transition: opacity 0.3s;
}
.cursor.is-on { opacity: 1; }
.cursor__dot {
  position: absolute; top: -5px; left: -5px;
  width: 10px; height: 10px;
  background: #e9e4da;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cursor.is-hover .cursor__dot { transform: rotate(45deg) scale(2.4); background: #ff4a11; }
.cursor__label {
  position: absolute; top: 12px; left: 14px;
  white-space: nowrap;
  color: rgba(233, 228, 218, 0.55);
  font-size: 0.6rem;
}
@media (pointer: coarse) { .cursor { display: none; } }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(0.9rem, 2vw, 1.4rem) var(--pad) clamp(1.2rem, 2.4vw, 1.8rem);
}
.header::before {
  content: "";
  position: absolute; inset: 0 0 -55% 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bg) 88%, transparent) 0%,
    color-mix(in srgb, var(--bg) 55%, transparent) 52%,
    transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 35%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 35%, transparent 92%);
  transition: background var(--theme-ease);
}
.header__brand { display: flex; align-items: center; gap: 0.7rem; }
.header__mark { width: 26px; }
.header__word {
  font-family: var(--font-body);
  font-weight: 600; font-size: 0.82rem; letter-spacing: 0.14em;
}
.header__word em { font-style: normal; font-weight: 400; color: var(--muted); }
.header__meta { display: flex; gap: 0.6rem; color: var(--muted); }
.header__sep { opacity: 0.5; }
.header__cta {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}
.header__cta-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
.header__cta:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 720px) {
  .header__meta { display: none; }
  .header__word em { display: none; }
  .header__cta { padding: 0.5rem 0.85rem; font-size: 0.62rem; white-space: nowrap; }
}
@media (max-width: 420px) { .header__word { display: none; } }

/* ============================================================
   RAIL
   ============================================================ */
.rail {
  position: fixed; right: calc(var(--pad) * 0.5); top: 50%; z-index: 90;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 1rem;
}
.rail__item {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--muted); opacity: 0.55;
  transition: opacity 0.3s, color 0.3s;
  font-size: 0.6rem;
}
.rail__item i {
  font-style: normal;
  opacity: 0; transform: translateX(4px);
  transition: opacity 0.3s, transform 0.3s;
}
.rail__item:hover i, .rail__item.is-active i { opacity: 1; transform: none; }
.rail__item.is-active { color: var(--accent); opacity: 1; }
@media (max-width: 900px) { .rail { display: none; } }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(min-content, 1fr) auto;
  padding: calc(var(--header-safe) + 0.5rem) var(--pad) clamp(1.25rem, 3vh, 2.5rem);
  overflow: hidden;
}
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__shade {
  position: absolute; inset: 0; z-index: 3;
  background: #05070a;
  opacity: 0;
  pointer-events: none;
}
.hero__ruler {
  position: absolute; top: 0; bottom: 0; width: 10px;
  background-image: repeating-linear-gradient(
    to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent 28px);
  opacity: 0.8;
}
.hero__ruler--l { left: calc(var(--pad) * 0.4); }
.hero__ruler--r { right: calc(var(--pad) * 0.4); }

.hero__top {
  position: relative;
  z-index: 2;
  grid-row: 1;
  display: flex; justify-content: space-between; gap: 1rem;
  color: var(--muted);
}
.hero__coord { text-align: right; }
@media (max-width: 720px) { .hero__coord { display: none; } }

.hero__title {
  position: relative; z-index: 2;
  grid-row: 2;
  align-self: end;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: min(clamp(4.2rem, 16vw, 14.5rem), 22svh);
  line-height: 0.92;
  letter-spacing: 0.005em;
  margin-top: clamp(1.5rem, 4vh, 3.5rem);
  margin-bottom: clamp(1rem, 2.5vh, 2rem);
}
.hero__line { display: block; overflow: hidden; }
.hero__line > span { display: inline-block; }
.hero__dot { color: var(--accent); display: inline-block; }

.hero__bottom {
  position: relative; z-index: 2;
  grid-row: 3;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.hero__sub { max-width: 44ch; color: var(--muted); font-size: 0.95rem; }
.hero__scroll {
  display: flex; align-items: center; gap: 0.8rem;
  color: var(--muted); white-space: nowrap;
}
.hero__scroll-line {
  width: 56px; height: 1px; background: var(--muted);
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ""; position: absolute; inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: scan 2.4s cubic-bezier(0.7, 0, 0.3, 1) infinite;
}
@keyframes scan { 0% { transform: translateX(-100%);} 55% { transform: translateX(0);} 100% { transform: translateX(102%);} }
@media (max-width: 720px) {
  .hero__bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-height: 620px) {
  .hero {
    padding-top: calc(var(--header-safe) + 0.25rem);
    padding-bottom: 0.75rem;
  }
  .hero__title {
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
  }
  .hero__bottom {
    gap: 1rem;
    padding-top: 0.75rem;
  }
  .hero__sub {
    font-size: 0.82rem;
    line-height: 1.38;
  }
  .hero__scroll { font-size: 0.6rem; }
}

/* ============================================================
   CHAPTERS — shared
   ============================================================ */
/* opaque, above the pinned hero so sections slide over it */
.chapter, .marquee, .bridge, .footer, .ascent-transition {
  position: relative;
  z-index: 2;
  background: var(--bg);
  transition: background-color var(--theme-ease);
}
.hero { z-index: 1; }
/* footer sits beneath the last chapter so it is revealed from under it */
.footer { z-index: 1; }

.chapter { padding: clamp(6rem, 14vh, 11rem) var(--pad); }
.chapter[id] { scroll-margin-top: var(--header-safe); }
.chapter__head {
  display: flex; align-items: baseline; gap: 1.2rem;
  margin-bottom: clamp(1.8rem, 4vw, 3rem);
  color: var(--muted);
}
.chapter__no { color: var(--accent); }
.chapter__name::before {
  content: ""; display: inline-block;
  width: 34px; height: 1px; background: var(--line);
  margin-right: 1rem; vertical-align: middle;
}
.chapter__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: 0.005em;
  max-width: 24ch;
  text-wrap: balance;
}
.chapter__title .split-line { display: block; overflow: hidden; }

/* ============================================================
   01 ASCENT
   ============================================================ */
.ascent-transition {
  position: relative;
  width: 100%;
  aspect-ratio: 3840 / 1672;
  margin-top: -1px;
  overflow: visible;
  overflow-x: clip;
  background: transparent;
  pointer-events: none;
}
.ascent-transition::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: -1px;
  height: clamp(6rem, 16vh, 11rem);
  background: linear-gradient(
    to bottom,
    rgba(14, 18, 22, 0) 0%,
    rgba(14, 18, 22, 0.32) 38%,
    rgba(14, 18, 22, 0.82) 76%,
    #0e1216 100%
  );
}
.ascent-transition__surface {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Give the blurred wash its own compositor layer. Without this the browser
     re-rasterizes the blur at every scale step while the surface expands,
     which is the single largest source of jank in the ascent transition.
     Promoting it means the blur is rasterized once and the expansion only
     transforms that cached texture — visually identical, steady frame rate. */
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.ascent {
  background: #0e1216;
  border-top: 1px solid #0e1216;
  margin-top: -1px;
  overflow: clip;
}
.ascent__cols {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 7rem);
  margin-top: clamp(2.5rem, 6vw, 5rem);
  align-items: end;
}
.ascent__body { font-size: clamp(1.05rem, 1.6vw, 1.35rem); max-width: 52ch; color: var(--ink); }
.ascent__aside { color: var(--accent); line-height: 1.9; }
@media (max-width: 820px) { .ascent__cols { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  /* Extra bottom inset lifts the hero copy as one composition while the
     border-box section remains exactly 100svh tall. */
  .hero {
    padding-bottom: calc(var(--pad) + 3.5svh);
  }

  .ascent > .chapter__head,
  .ascent > .chapter__title,
  .ascent > .ascent__cols {
    translate: 0 -3.5svh;
  }
}

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 1.1rem 0;
}
.marquee__track { display: flex; white-space: nowrap; will-change: transform; }
.marquee__unit {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.4rem);
  letter-spacing: 0.12em;
  color: var(--muted);
  flex-shrink: 0;
}

/* ============================================================
   02 EDGE
   ============================================================ */
.edge { padding-left: 0; padding-right: 0; padding-bottom: 0; }
.edge__intro { padding: 0 var(--pad); }
.edge__lede { margin-top: 1.6rem; color: var(--muted); max-width: 42ch; }

.edge__pin { height: 100svh; position: relative; }
.edge__stage { position: absolute; inset: 0; overflow: visible; isolation: isolate; }
.edge__problems { position: absolute; inset: 0; z-index: 2; }

/* Soft circular handoff inspired by the reference site's expertise-to-worldwide
   transition. It only becomes visible near the final problem. */
.edge__halo {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: min(-37vw, -18rem);
  width: max(92vw, 68rem);
  aspect-ratio: 1.9 / 1;
  border-radius: 50%;
  opacity: 0;
  transform: translate3d(-50%, 34%, 0) scale(0.58);
  transform-origin: 50% 100%;
  background:
    radial-gradient(ellipse at 50% 68%, rgba(255, 74, 17, 0.7) 0%, rgba(255, 74, 17, 0.18) 34%, transparent 68%);
  filter: blur(clamp(32px, 5vw, 76px));
  will-change: transform, opacity;
  pointer-events: none;
}

.problem {
  position: absolute; inset: 0;
  display: grid;
  align-content: center;
  padding: var(--header-safe) var(--pad) max(5.5rem, 11vh);
  opacity: 0; visibility: hidden;
}
.problem.is-first { opacity: 1; visibility: visible; }
.problem__ghost {
  position: absolute; right: var(--pad); top: 50%;
  transform: translateY(-50%);
  display: block;
  font-family: var(--font-display);
  font-size: min(clamp(12rem, 32vw, 32rem), 58vh);
  line-height: 0.88;
  padding-block: 0.08em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  pointer-events: none;
  user-select: none;
}
.problem__index {
  position: relative;
  z-index: 2;
  color: var(--accent);
  margin-bottom: clamp(0.9rem, 2.5vh, 1.4rem);
  line-height: 1.35;
  overflow: visible;
  white-space: nowrap;
}
.problem__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: min(clamp(2.6rem, 8vw, 7rem), 14vh);
  line-height: 0.98;
  margin-bottom: 1.6rem;
}
.problem__body {
  max-width: 44ch;
  color: var(--muted);
  font-size: min(clamp(0.95rem, 1.3vw, 1.15rem), 2.45vh);
}

.edge__rail {
  z-index: 3;
  position: absolute; left: var(--pad); bottom: clamp(2rem, 5vh, 3.5rem);
  display: flex; gap: 0.5rem;
}
.edge__tick {
  width: 26px; height: 2px;
  background: var(--line);
  transition: background 0.3s;
}
.edge__tick.is-active { background: var(--accent); }

/* ============================================================
   03 THESIS
   ============================================================ */
.thesis {
  min-height: 80svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: visible;
  isolation: isolate;
  background: transparent;
  margin-top: -2px;
}
.thesis::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: -48vh;
  width: max(88vw, 62rem);
  height: 92vh;
  transform: translateX(-50%);
  border-radius: 50%;
  opacity: 0.26;
  background: radial-gradient(ellipse at 50% 65%, rgba(255, 74, 17, 0.68), rgba(255, 74, 17, 0.10) 45%, transparent 70%);
  filter: blur(clamp(34px, 5vw, 72px));
  pointer-events: none;
}
.thesis > * { position: relative; z-index: 1; }
.thesis::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: -12vw;
  right: -12vw;
  bottom: -2px;
  height: clamp(14rem, 34vh, 26rem);
  background: linear-gradient(
    to bottom,
    rgba(10, 13, 16, 0) 0%,
    rgba(10, 13, 16, 0.36) 42%,
    rgba(10, 13, 16, 0.88) 78%,
    #0a0d10 100%
  );
  pointer-events: none;
}
.thesis__statement {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1.7rem, 4.4vw, 3.9rem);
  line-height: 1.24;
  max-width: 26ch;
  letter-spacing: -0.01em;
}
.thesis__statement em { font-style: normal; }
.thesis__statement .w { opacity: 0.13; display: inline-block; }
.thesis__statement em .w { color: var(--accent); }

/* ============================================================
   BRIDGE — centered badge, statement scrub, logo mask zoom
   ============================================================ */
.bridge { padding: 0; }
.bridge__pin {
  position: relative;
  height: 100svh;
  padding: var(--header-safe) var(--pad) max(1.5rem, 4vh);
  overflow: hidden;
}
.bridge__stack {
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: clamp(0.9rem, 2.5vh, 2rem);
  text-align: center;
}
.bridge__line {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: min(clamp(1.35rem, 3.6vw, 3.25rem), 6.2vh);
  line-height: 1.08;
  text-transform: uppercase;
  max-width: 26ch;
}
.bridge__line em { font-style: normal; }
.bridge__line .w { opacity: 0.12; display: inline-block; }
.bridge__line em .w { color: var(--accent); }

.bridge__badge {
  position: relative;
  width: clamp(180px, min(32vmin, 31svh), 340px);
  height: clamp(180px, min(32vmin, 31svh), 340px);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.bridge__orbit {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  animation: orbitSpin 40s linear infinite;
}
.bridge__orbit text {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.32em;
  fill: var(--muted);
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }
.bridge__ring {
  position: absolute; inset: 13.5%;
  border: 1px solid rgba(233, 228, 218, 0.28);
  border-radius: 50%;
}
.bridge__mark-vector {
  position: absolute;
  left: 50%; top: 50%;
  width: 100vw; height: 100vh;
  transform: translate(-50%, -50%);
  color: #e9e4da;
  overflow: visible;
  pointer-events: none;
}
.bridge__mark-vector path {
  fill: currentColor;
  shape-rendering: geometricPrecision;
}
body.reduced .bridge__pin { height: auto; padding: clamp(6rem, 14vh, 11rem) var(--pad); }
body.reduced .bridge__stack { height: auto; }
body.reduced .bridge__line .w { opacity: 1; }
body.reduced .bridge__orbit { animation: none; }
body.reduced .edge__pin { height: auto; }
body.reduced .edge__stage,
body.reduced .edge__problems { position: relative; }
body.reduced .edge__stage { overflow: visible; }
body.reduced .problem {
  position: relative;
  min-height: min(42rem, 84svh);
  border-top: 1px solid var(--line);
}
body.reduced .edge__halo,
body.reduced .edge__rail { display: none; }

@media (max-width: 720px) {
  :root { --header-safe: 5.75rem; }
  .problem {
    padding-top: calc(var(--header-safe) + 0.75rem);
    padding-bottom: 5.25rem;
  }
  .problem__ghost {
    right: max(var(--pad), 1rem);
    top: 46%;
    font-size: min(52vw, 38vh);
  }
  .problem__title {
    font-size: min(clamp(2.35rem, 12vw, 4rem), 10.5vh);
    margin-bottom: 1.15rem;
  }
  .problem__body {
    max-width: 38ch;
    font-size: min(0.94rem, 2.35vh);
    line-height: 1.48;
  }
  .edge__rail { bottom: 2rem; }
  .edge__tick { width: clamp(17px, 6vw, 25px); }
  .edge__halo {
    bottom: -15rem;
    width: max(160vw, 40rem);
    filter: blur(40px);
  }
  .bridge__pin { padding-bottom: 1.25rem; }
  .bridge__line {
    font-size: min(clamp(1.2rem, 7vw, 2rem), 4.6vh);
    line-height: 1.04;
    max-width: 22ch;
  }
  .bridge__badge {
    width: clamp(156px, min(48vmin, 27svh), 230px);
    height: clamp(156px, min(48vmin, 27svh), 230px);
  }
}

@media (max-height: 620px) and (min-width: 721px) {
  :root { --header-safe: 5.6rem; }
  .problem__title { font-size: min(10vw, 11vh); margin-bottom: 0.9rem; }
  .problem__index { margin-bottom: 0.7rem; }
  .problem__body { font-size: min(0.92rem, 2.5vh); line-height: 1.4; }
  .bridge__badge { width: 25svh; height: 25svh; }
  .bridge__stack { gap: 1.5vh; }
}

/* ============================================================
   04 TRANSITION (light)
   ============================================================ */
.turn__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  margin: clamp(3rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(2rem, 4vw, 3.5rem) 0;
}
.turn__label { color: var(--muted); margin-bottom: 0.9rem; }
.turn__value { font-size: clamp(1.05rem, 1.8vw, 1.5rem); font-weight: 500; max-width: 30ch; }
.turn__value--from { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.turn__arrow { width: clamp(70px, 9vw, 120px); color: var(--accent); }
.turn__arrow svg { width: 100%; height: auto; }
@media (max-width: 820px) {
  .turn__grid { grid-template-columns: 1fr; }
  .turn__arrow { width: 54px; margin: 0 auto; }
  /* rotate the svg itself: the wrapper's transform is animated by GSAP */
  .turn__arrow svg { transform: rotate(90deg); }
}

.turn__statement {
  display: flex; align-items: flex-start; gap: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 62rem;
}
.turn__mark { width: clamp(44px, 5vw, 64px); flex-shrink: 0; }
.turn__statement p { font-size: clamp(1.1rem, 2vw, 1.6rem); font-weight: 500; max-width: 46ch; }

/* ============================================================
   05 JOIN
   ============================================================ */
.roles { list-style: none; margin-top: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid var(--line); }
.role { border-bottom: 1px solid var(--line); }
.role__inner {
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1.1fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 1.2rem;
  padding: clamp(1.2rem, 2.6vw, 2rem) 0.5rem;
  overflow: hidden;
  isolation: isolate;
}
.role__inner::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1);
}
.role__inner:hover::before { transform: scaleY(1); transform-origin: top; }
.role__inner:hover { color: var(--bg); }
.role__inner:hover .role__no,
.role__inner:hover .role__desc { color: var(--bg); opacity: 0.75; }
.role__no { color: var(--muted); transition: color 0.3s; }
.role__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 3.2vw, 3rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.role__desc { color: var(--muted); font-size: clamp(0.85rem, 1.2vw, 1.05rem); transition: color 0.3s; }
@media (max-width: 720px) {
  .role__inner { grid-template-columns: 2.2rem 1fr; }
  .role__desc { display: none; }
}

.join__lede {
  margin-top: clamp(1.6rem, 3.5vw, 2.6rem);
  color: var(--muted);
  max-width: 46ch;
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
}

.join__cta {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 2rem;
}
.join__note { color: var(--muted); font-size: clamp(0.95rem, 1.4vw, 1.15rem); }

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1.3rem 2.6rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
}
.btn__fill {
  position: absolute; inset: -2px; z-index: -1;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1);
  border-radius: inherit;
}
.btn:hover .btn__fill { transform: none; }
.btn:hover { border-color: var(--accent); color: #0a0d10; }
.btn__label { font-size: 0.8rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #060809;
  color: #e9e4da;
  padding: clamp(4rem, 9vw, 7rem) var(--pad) calc(clamp(1.6rem, 3vw, 2.4rem) + env(safe-area-inset-bottom) + 1px);
  overflow: hidden;
  /* Keep the dark surface continuous through browser overscroll and rounding. */
  box-shadow: 0 100vh 0 #060809;
}
.footer__word {
  font-family: var(--font-display);
  font-size: clamp(5rem, 21vw, 20rem);
  line-height: 0.9;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px rgba(233, 228, 218, 0.32);
  user-select: none;
  margin-bottom: clamp(3rem, 7vw, 5.5rem);
}
.footer__word span { display: inline-block; }
.footer__row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  border-top: 1px solid rgba(233, 228, 218, 0.14);
  padding-top: 1.4rem;
  color: #8b9199;
}
.footer__row a:hover { color: var(--accent); }

/* ============================================================
   REVEAL PRIMITIVES
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(34px); }
body.reduced [data-reveal],
body.reduced .problem { opacity: 1 !important; transform: none !important; visibility: visible !important; }
body.reduced .hero__scroll-line::after { animation: none; }

/* hero entrance initial states (set here to avoid FOUC) */
.hero__line > span, .hero__dot { transform: translateY(115%); }
[data-heroline] { opacity: 0; transform: translateY(20px); }
body.reduced .hero__line > span, body.reduced .hero__dot { transform: none; }
body.reduced [data-heroline] { opacity: 1; transform: none; }
