:root {
  --bg-base: #f6efe2;
  --bg-soft: #f2e6d4;
  --bg-panel: rgba(255, 250, 242, 0.7);
  --bg-panel-strong: rgba(255, 250, 242, 0.86);
  --bg-device: #0d1318;
  --bg-device-soft: #131d24;

  --ink-strong: #16130f;
  --ink-body: #514a41;
  --ink-muted: #83776c;
  --ink-inverse: #fbf7f0;

  --accent-fire: #c96e42;
  --accent-gold: #d8b47b;
  --accent-sage: #7e9974;
  --accent-sky: #7f97ba;
  --accent-ink: #2d343d;

  --grid-major: rgba(22, 19, 15, 0.12);
  --grid-minor: rgba(22, 19, 15, 0.05);
  --line-soft: rgba(22, 19, 15, 0.12);
  --line-strong: rgba(22, 19, 15, 0.2);
  --line-inverse: rgba(251, 247, 240, 0.12);

  --shadow-soft: 0 24px 70px rgba(20, 15, 12, 0.08);
  --shadow-device: 0 28px 90px rgba(11, 15, 19, 0.26);
  --glow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 24px rgba(216, 180, 123, 0.22);
  --motion-squash: cubic-bezier(0.22, 1.24, 0.32, 1);
  --motion-rebound: cubic-bezier(0.175, 0.885, 0.32, 1.275);

  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Space Grotesk", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-strong);
  background:
    radial-gradient(circle at top right, rgba(201, 110, 66, 0.08), transparent 24%),
    radial-gradient(circle at 16% 12%, rgba(126, 153, 116, 0.08), transparent 20%),
    linear-gradient(180deg, var(--bg-base) 0%, var(--bg-soft) 100%);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.motion-paused * {
  animation-play-state: paused !important;
}

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

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

button {
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.button,
.chapter-link,
.mode-toggle,
.mission-tile,
.device-tab,
.story-panel,
.persona-tab,
.profile-tab,
.capability-cell,
.pilot-tile,
.laptop-pill {
  transform-origin: 50% 50%;
  will-change: transform;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.96;
  color: var(--ink-strong);
}

p {
  margin: 0;
  color: var(--ink-body);
  line-height: 1.7;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 123px,
      var(--grid-major) 123px,
      var(--grid-major) 125px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 123px,
      var(--grid-major) 123px,
      var(--grid-major) 125px
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 30px,
      var(--grid-minor) 30px,
      var(--grid-minor) 31px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 30px,
      var(--grid-minor) 30px,
      var(--grid-minor) 31px
    );
  opacity: 0.78;
}

.top-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(1320px, calc(100% - 32px));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.2rem;
  padding: 0.9rem 1.15rem;
  border: 1px solid rgba(255, 250, 242, 0.5);
  border-radius: 999px;
  background: rgba(246, 239, 226, 0.97);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 18px 44px rgba(20, 15, 12, 0.12);
  isolation: isolate;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background:
    linear-gradient(135deg, var(--accent-fire), transparent 68%),
    linear-gradient(225deg, var(--accent-sage), transparent 68%),
    var(--ink-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 250, 242, 0.18);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong {
  font-size: 0.96rem;
  letter-spacing: 0.03em;
}

.brand-copy span {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.chapter-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-width: 0;
}

.chapter-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition:
    color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease,
    transform 220ms var(--motion-squash);
}

.chapter-link.active {
  color: var(--ink-strong);
  background: rgba(255, 250, 242, 0.86);
  box-shadow: var(--glow);
  transform: translateY(-1px) scaleX(1.03) scaleY(0.97);
}

.mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 250, 242, 0.56);
  color: var(--ink-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition:
    background 220ms ease,
    box-shadow 220ms ease,
    transform 220ms var(--motion-squash);
}

.mode-toggle:hover,
.mode-toggle[aria-pressed="true"] {
  background: rgba(255, 250, 242, 0.84);
  box-shadow: var(--glow);
  transform: translateY(-2px) scaleX(1.02) scaleY(0.98);
}

.mode-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-fire), var(--accent-gold));
  box-shadow: 0 0 0 6px rgba(201, 110, 66, 0.12);
}

.section-rail {
  position: fixed;
  left: 26px;
  top: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: left top;
}

.rail-lines {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.rail-lines span {
  width: 42px;
  height: 2px;
  background: var(--line-strong);
}

.rail-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.rail-number {
  color: var(--ink-strong);
}

.chapter {
  position: relative;
  min-height: 100svh;
  padding: 150px 0 110px;
  scroll-margin-top: 120px;
}

.content-shell {
  width: min(1260px, calc(100% - 96px));
  margin: 0 auto;
}

.chapter-word {
  position: absolute;
  left: max(320px, 22vw);
  top: 122px;
  z-index: 0;
  font-family: var(--font-display);
  font-size: clamp(4rem, 11vw, 9.2rem);
  line-height: 0.88;
  letter-spacing: -0.06em;
  color: rgba(22, 19, 15, 0.045);
  pointer-events: none;
  white-space: nowrap;
}

.eyebrow,
.screen-kicker,
.board-kicker,
.reason-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.eyebrow::before {
  content: "";
  width: 42px;
  height: 1px;
  background: var(--line-strong);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition:
    transform 220ms var(--motion-squash),
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

.button:hover {
  transform: translateY(-4px) scaleX(1.03) scaleY(0.98);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent-fire), #d78a55);
  color: var(--ink-inverse);
  box-shadow: 0 18px 36px rgba(201, 110, 66, 0.22);
}

.button-secondary {
  border-color: var(--line-soft);
  background: rgba(255, 250, 242, 0.66);
  color: var(--ink-strong);
}

.section-intro {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-bottom: 3rem;
}

.section-intro h2 {
  margin: 1rem 0 1rem;
  font-size: clamp(2.3rem, 4.8vw, 5rem);
  letter-spacing: -0.05em;
}

.section-intro p:last-child {
  font-size: 1.02rem;
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(440px, 1.12fr);
  gap: 2rem;
  align-items: center;
  min-width: 0;
}

.hero-copy,
.hero-stage {
  min-width: 0;
}

.hero-title {
  margin: 1.1rem 0 1.2rem;
  font-size: clamp(4rem, 9vw, 8.4rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.hero-line {
  display: block;
}

.hero-title em {
  font-style: normal;
  color: var(--accent-fire);
}

.hero-summary {
  max-width: 620px;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.7rem;
}

.hero-proofline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 2rem;
}

.proof-chip {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background: rgba(255, 250, 242, 0.6);
  box-shadow: var(--shadow-soft);
}

.proof-chip strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.proof-chip span {
  display: block;
  color: var(--ink-muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

.hero-stage {
  position: relative;
  min-height: 780px;
  --pointer-x: 0;
  --pointer-y: 0;
}

.mission-field {
  position: absolute;
  inset: 0 0 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 160px;
  gap: 1rem;
  padding: 0 0 0 1rem;
  transform: translate3d(calc(var(--pointer-x) * -10px), calc(var(--pointer-y) * -10px), 0);
  transition: transform 180ms ease;
}

.mission-tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 250, 242, 0.2);
  background: linear-gradient(160deg, rgba(22, 19, 15, 0.06), rgba(22, 19, 15, 0.2));
  color: var(--ink-strong);
  box-shadow: var(--shadow-soft);
  text-align: left;
  transition:
    transform 260ms var(--motion-squash),
    border-color 220ms ease,
    box-shadow 220ms ease,
    opacity 220ms ease;
  animation: ricochet 8.6s ease-in-out infinite;
}

.mission-tile:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; animation-delay: 0s; }
.mission-tile:nth-child(2) { grid-column: 2; grid-row: 1; animation-delay: -1.3s; }
.mission-tile:nth-child(3) { grid-column: 3; grid-row: 1 / span 2; animation-delay: -2.7s; }
.mission-tile:nth-child(4) { grid-column: 1; grid-row: 3; animation-delay: -4.2s; }
.mission-tile:nth-child(5) { grid-column: 2; grid-row: 2 / span 2; animation-delay: -5.8s; }
.mission-tile:nth-child(6) { grid-column: 3; grid-row: 3; animation-delay: -7.1s; }

.mission-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.08), transparent 36%),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 38%);
  pointer-events: none;
}

.mission-tile:hover,
.mission-tile.active {
  transform: translateY(-10px) scaleX(1.05) scaleY(0.96);
  border-color: rgba(22, 19, 15, 0.22);
  box-shadow: 0 28px 72px rgba(20, 15, 12, 0.16);
}

.mission-tile.active {
  box-shadow: 0 0 0 1px rgba(255, 250, 242, 0.42), 0 28px 72px rgba(20, 15, 12, 0.18);
}

.tile-index {
  position: absolute;
  top: 0.9rem;
  left: 1rem;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(22, 19, 15, 0.62);
}

.tile-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
}

.tile-caption {
  font-size: 0.84rem;
  color: rgba(22, 19, 15, 0.72);
}

.tile-water {
  background:
    radial-gradient(circle at 30% 20%, rgba(127, 151, 186, 0.28), transparent 22%),
    linear-gradient(145deg, rgba(127, 151, 186, 0.28), rgba(255, 250, 242, 0.74));
}

.tile-greenhouse {
  background:
    radial-gradient(circle at 75% 18%, rgba(126, 153, 116, 0.24), transparent 26%),
    linear-gradient(145deg, rgba(126, 153, 116, 0.26), rgba(255, 250, 242, 0.76));
}

.tile-wind {
  background:
    radial-gradient(circle at 28% 24%, rgba(216, 180, 123, 0.28), transparent 28%),
    linear-gradient(145deg, rgba(216, 180, 123, 0.32), rgba(255, 250, 242, 0.74));
}

.tile-robotics {
  background:
    radial-gradient(circle at 60% 18%, rgba(45, 52, 61, 0.18), transparent 30%),
    linear-gradient(145deg, rgba(127, 151, 186, 0.2), rgba(255, 250, 242, 0.76));
}

.tile-city {
  background:
    radial-gradient(circle at 74% 26%, rgba(201, 110, 66, 0.24), transparent 30%),
    linear-gradient(145deg, rgba(201, 110, 66, 0.26), rgba(255, 250, 242, 0.76));
}

.tile-ecosystem {
  background:
    radial-gradient(circle at 46% 18%, rgba(126, 153, 116, 0.24), transparent 28%),
    linear-gradient(145deg, rgba(126, 153, 116, 0.2), rgba(255, 250, 242, 0.76));
}

.phone-frame {
  position: absolute;
  right: 3.5%;
  top: 6%;
  z-index: 2;
  width: min(390px, 100%);
  border-radius: 38px;
  border: 1px solid rgba(22, 19, 15, 0.1);
  background: linear-gradient(180deg, rgba(248, 242, 233, 0.96), rgba(244, 235, 223, 0.92));
  box-shadow: 0 28px 90px rgba(20, 15, 12, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translate3d(calc(var(--pointer-x) * 12px), calc(var(--pointer-y) * 12px), 0) rotate(2deg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.device-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem 0.8rem;
  color: var(--ink-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.device-tabs {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0 1.2rem 0.95rem;
}

.device-tab {
  min-height: 34px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(22, 19, 15, 0.08);
  background: rgba(22, 19, 15, 0.04);
  color: var(--ink-body);
  font-size: 0.78rem;
  font-weight: 700;
  transition:
    background 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms var(--motion-squash);
}

.device-tab.active {
  background: rgba(255, 250, 242, 0.96);
  color: var(--ink-strong);
  box-shadow: 0 12px 28px rgba(20, 15, 12, 0.08);
  transform: translateY(-2px) scaleX(1.04) scaleY(0.97);
}

.phone-screen {
  position: relative;
  padding: 1.25rem 1.2rem 1.3rem;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(127, 151, 186, 0.15), transparent 24%),
    linear-gradient(180deg, var(--bg-device) 0%, var(--bg-device-soft) 100%);
  color: var(--ink-inverse);
}

.hero-stage[data-theme="greenhouse"] .phone-screen {
  background:
    radial-gradient(circle at top right, rgba(126, 153, 116, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-device) 0%, var(--bg-device-soft) 100%);
}

.hero-stage[data-theme="wind"] .phone-screen {
  background:
    radial-gradient(circle at top right, rgba(216, 180, 123, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-device) 0%, var(--bg-device-soft) 100%);
}

.hero-stage[data-theme="robotics"] .phone-screen {
  background:
    radial-gradient(circle at top right, rgba(127, 151, 186, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-device) 0%, var(--bg-device-soft) 100%);
}

.hero-stage[data-theme="city"] .phone-screen {
  background:
    radial-gradient(circle at top right, rgba(201, 110, 66, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-device) 0%, var(--bg-device-soft) 100%);
}

.hero-stage[data-theme="ecosystem"] .phone-screen {
  background:
    radial-gradient(circle at top right, rgba(126, 153, 116, 0.16), transparent 24%),
    linear-gradient(180deg, var(--bg-device) 0%, var(--bg-device-soft) 100%);
}

.screen-block + .screen-block {
  margin-top: 1.2rem;
}

.phone-screen h2,
.phone-screen p,
.screen-list li {
  color: var(--ink-inverse);
}

.phone-screen .screen-kicker,
.laptop-screen .screen-kicker {
  color: rgba(251, 247, 240, 0.6);
}

.phone-screen h2 {
  margin: 0.55rem 0 0.7rem;
  font-size: 1.9rem;
  letter-spacing: -0.04em;
}

.screen-list {
  display: grid;
  gap: 0.65rem;
}

.screen-list li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.95rem;
  line-height: 1.52;
}

.screen-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--accent-gold);
}

.screen-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.screen-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line-inverse);
  background: rgba(251, 247, 240, 0.08);
  font-size: 0.78rem;
}

.mentor-prompt {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(216, 180, 123, 0.18);
  background: rgba(216, 180, 123, 0.08);
  color: var(--ink-inverse);
  line-height: 1.6;
}

.studio-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(520px, 1.22fr);
  gap: 1.4rem;
  align-items: start;
}

.story-stack {
  display: grid;
  gap: 1rem;
}

.story-panel {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  background: rgba(255, 250, 242, 0.56);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition:
    transform 240ms var(--motion-squash),
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.story-panel:hover,
.story-panel.active {
  transform: translateY(-8px) scaleX(1.03) scaleY(0.98);
  border-color: var(--line-strong);
  background: rgba(255, 250, 242, 0.86);
  box-shadow: 0 24px 64px rgba(20, 15, 12, 0.12);
}

.story-time {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.2rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.story-copy h3 {
  font-size: 1.85rem;
  letter-spacing: -0.04em;
}

.story-copy p {
  margin-top: 0.55rem;
}

.story-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.story-notes span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: rgba(22, 19, 15, 0.05);
  color: var(--ink-body);
  font-size: 0.78rem;
}

.studio-stage {
  position: sticky;
  top: 118px;
  isolation: isolate;
}

.laptop-frame {
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 250, 242, 0.14);
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.06), rgba(255, 250, 242, 0.02));
  box-shadow: var(--shadow-device);
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
  contain: paint;
}

.laptop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: rgba(255, 250, 242, 0.06);
  color: rgba(251, 247, 240, 0.72);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.laptop-pills {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.laptop-pill {
  min-height: 30px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line-inverse);
  background: rgba(251, 247, 240, 0.04);
  color: rgba(251, 247, 240, 0.6);
  font-size: 0.7rem;
}

.laptop-pill.active {
  color: var(--ink-inverse);
  background: rgba(251, 247, 240, 0.12);
  transform: translateY(-1px) scaleX(1.04) scaleY(0.97);
}

.laptop-screen {
  position: relative;
  min-height: 640px;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(201, 110, 66, 0.12), transparent 18%),
    radial-gradient(circle at 30% 18%, rgba(126, 153, 116, 0.12), transparent 18%),
    linear-gradient(180deg, var(--bg-device) 0%, var(--bg-device-soft) 100%);
  color: var(--ink-inverse);
  transform: translateZ(0);
  backface-visibility: hidden;
  isolation: isolate;
}

.scene-view {
  position: absolute;
  inset: 1.2rem;
  z-index: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 24px, 0) scaleX(1.06) scaleY(0.92);
  transition: none;
  transform-origin: 50% 70%;
  will-change: opacity, transform;
}

.scene-view.active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scaleX(1) scaleY(1);
  transition: none;
}

.scene-shell {
  display: grid;
  gap: 1rem;
  height: 100%;
}

.scene-hero {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-inverse);
  background: rgba(251, 247, 240, 0.04);
}

.scene-hero h3,
.scene-hero p,
.scene-card h4,
.scene-card p {
  color: var(--ink-inverse);
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.scene-card {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-inverse);
  background: rgba(251, 247, 240, 0.04);
}

.scene-card h4 {
  margin-bottom: 0.65rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scene-card em,
.mentor-ladder em {
  font-style: normal;
  color: rgba(251, 247, 240, 0.7);
}

.briefing-bands,
.mentor-ladder,
.reflection-points,
.metric-rows {
  display: grid;
  gap: 0.7rem;
}

.briefing-bands span,
.mentor-ladder span,
.reflection-points span,
.metric-rows span {
  display: block;
  padding: 0.72rem 0.8rem;
  border-radius: 12px;
  background: rgba(251, 247, 240, 0.06);
  border: 1px solid rgba(251, 247, 240, 0.08);
  color: var(--ink-inverse);
}

.mentor-ladder span {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.reflection-editor {
  min-height: 220px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.8rem;
}

.reflection-note {
  padding: 0.9rem;
  border-radius: 12px;
  background: rgba(251, 247, 240, 0.06);
  border: 1px solid rgba(251, 247, 240, 0.08);
  color: rgba(251, 247, 240, 0.88);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.metric-chip {
  padding: 0.9rem;
  border-radius: 14px;
  background: rgba(251, 247, 240, 0.05);
  border: 1px solid rgba(251, 247, 240, 0.08);
}

.metric-chip strong {
  display: block;
  font-size: 1.5rem;
  margin-top: 0.4rem;
  font-family: var(--font-display);
  color: var(--ink-inverse);
}

.path-shell,
.measure-shell,
.pilot-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(520px, 1.2fr);
  gap: 1.4rem;
  align-items: start;
}

.persona-switcher,
.profile-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.persona-tab,
.profile-tab {
  min-height: 38px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 250, 242, 0.56);
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 700;
  transition:
    background 220ms ease,
    color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms var(--motion-squash);
}

.persona-tab.active,
.profile-tab.active {
  background: rgba(255, 250, 242, 0.9);
  color: var(--ink-strong);
  box-shadow: var(--glow);
  transform: translateY(-2px) scaleX(1.04) scaleY(0.97);
}

.signal-strip {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.signal-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: rgba(255, 250, 242, 0.66);
  border: 1px solid var(--line-soft);
}

.signal-chip strong {
  font-size: 0.92rem;
}

.signal-chip span:last-child {
  color: var(--ink-muted);
  font-size: 0.86rem;
}

.path-board,
.measure-board {
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-soft);
  background: rgba(255, 250, 242, 0.78);
  box-shadow: var(--shadow-soft);
  padding: 1.2rem;
}

.board-topline,
.detail-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.quest-hero h3 {
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.05em;
}

.quest-hero p {
  margin-top: 0.7rem;
}

.quest-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.quest-track::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-sky), var(--accent-gold), var(--accent-fire));
  transform: translateY(-50%);
  opacity: 0.44;
}

.quest-node {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 250, 242, 0.94);
  border: 1px solid var(--line-soft);
  box-shadow: 0 20px 40px rgba(20, 15, 12, 0.08);
}

.quest-node strong {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.quest-node span:last-child {
  font-family: var(--font-display);
  font-size: 1.36rem;
  line-height: 1;
}

.path-reason {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
}

.reason-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.reason-badges span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(22, 19, 15, 0.05);
  color: var(--ink-body);
  font-size: 0.78rem;
}

.measure-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.08fr) minmax(300px, 0.92fr);
  gap: 1rem;
  margin-top: 1rem;
}

.capability-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(168px, 1fr);
  gap: 0.65rem;
}

.capability-cell {
  display: grid;
  min-width: 0;
  gap: 0.35rem;
  min-height: 168px;
  padding: 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(22, 19, 15, 0.08);
  background: rgba(255, 250, 242, 0.9);
  text-align: left;
  align-content: space-between;
  overflow: hidden;
  transition:
    transform 240ms var(--motion-squash),
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.capability-cell:hover,
.capability-cell.active {
  transform: translateY(-8px) scaleX(1.04) scaleY(0.97);
  border-color: var(--line-strong);
  box-shadow: 0 18px 42px rgba(20, 15, 12, 0.1);
}

.capability-cell strong {
  font-size: 0.74rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.capability-cell span {
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 1.5vw, 1.55rem);
  line-height: 0.98;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.capability-cell[data-strength="high"] {
  background: linear-gradient(180deg, rgba(127, 151, 186, 0.18), rgba(255, 250, 242, 0.94));
}

.capability-cell[data-strength="mid"] {
  background: linear-gradient(180deg, rgba(216, 180, 123, 0.18), rgba(255, 250, 242, 0.94));
}

.capability-cell[data-strength="low"] {
  background: linear-gradient(180deg, rgba(201, 110, 66, 0.12), rgba(255, 250, 242, 0.92));
}

.capability-detail {
  display: grid;
  min-width: 0;
  gap: 0.9rem;
  align-content: start;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: rgba(22, 19, 15, 0.04);
}

.chapter-measure .chapter-word {
  left: max(430px, 30vw);
  top: 110px;
}

.capability-detail h3 {
  font-size: 2.4rem;
  letter-spacing: -0.05em;
}

.capability-bars {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.2rem;
}

.bar-row {
  display: grid;
  gap: 0.5rem;
}

.bar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.92rem;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(22, 19, 15, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  width: calc(var(--score) * 100%);
  background: linear-gradient(90deg, var(--accent-sage), var(--accent-fire));
}

.capability-footnote {
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.moat-stack {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.3rem;
}

.moat-card {
  padding: 1.05rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  background: rgba(255, 250, 242, 0.62);
  box-shadow: var(--shadow-soft);
}

.moat-card h3 {
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}

.moat-card p {
  margin-top: 0.55rem;
}

.pilot-shell {
  grid-template-columns: minmax(360px, 0.82fr) minmax(340px, 1.18fr);
  align-items: center;
}

.pilot-mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.pilot-tile {
  min-height: 108px;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-soft);
  background: rgba(255, 250, 242, 0.66);
  box-shadow: var(--shadow-soft);
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  transition:
    transform 240ms var(--motion-squash),
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.pilot-tile:nth-child(3n + 1) {
  background: linear-gradient(180deg, rgba(127, 151, 186, 0.14), rgba(255, 250, 242, 0.7));
}

.pilot-tile:nth-child(3n + 2) {
  background: linear-gradient(180deg, rgba(216, 180, 123, 0.14), rgba(255, 250, 242, 0.7));
}

.pilot-tile:nth-child(3n) {
  background: linear-gradient(180deg, rgba(201, 110, 66, 0.12), rgba(255, 250, 242, 0.7));
}

.pilot-tile:hover,
.pilot-tile.active {
  transform: translateY(-9px) scaleX(1.04) scaleY(0.97);
  border-color: var(--line-strong);
  box-shadow: 0 24px 60px rgba(20, 15, 12, 0.12);
}

.pilot-copy {
  padding-left: 1rem;
}

.pilot-copy h2 {
  margin: 1rem 0 1rem;
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.pilot-copy p {
  max-width: 580px;
  font-size: 1.03rem;
}

.pilot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.7rem;
}

.site-footer {
  width: min(1260px, calc(100% - 96px));
  margin: 0 auto 40px;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.footer-brand strong {
  display: block;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--ink-body);
}

@keyframes ricochet {
  0%, 100% {
    transform: translate3d(0, 0, 0) scaleX(1) scaleY(1);
  }
  18% {
    transform: translate3d(6px, -10px, 0) scaleX(1.04) scaleY(0.97);
  }
  34% {
    transform: translate3d(-7px, -18px, 0) scaleX(0.95) scaleY(1.06);
  }
  52% {
    transform: translate3d(8px, -8px, 0) scaleX(1.03) scaleY(0.98);
  }
  70% {
    transform: translate3d(-5px, 5px, 0) scaleX(0.98) scaleY(1.03);
  }
}

@media (max-width: 1180px) {
  .hero-shell,
  .path-shell,
  .measure-shell,
  .pilot-shell,
  .studio-shell {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 940px;
  }

  .phone-frame {
    position: relative;
    top: auto;
    right: auto;
    margin: 320px auto 0;
    transform: none;
  }

  .studio-stage {
    position: relative;
    top: auto;
  }
}

@media (max-width: 980px) {
  .section-rail {
    display: none;
  }

  .content-shell,
  .site-footer {
    width: min(100% - 36px, 100%);
  }

  .hero-proofline,
  .scene-grid,
  .measure-layout,
  .quest-track {
    grid-template-columns: 1fr;
  }

  .path-reason {
    grid-template-columns: 1fr;
  }

  .reason-badges {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .grid-overlay {
    opacity: 0.5;
  }

  .top-nav {
    position: sticky;
    top: calc(env(safe-area-inset-top) + 8px);
    left: auto;
    transform: none;
    width: calc(100% - 20px);
    max-width: 100%;
    margin: 10px auto 0;
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 0.75rem;
    padding: 0.8rem;
    border-radius: 26px;
  }

  .brand {
    gap: 0.7rem;
  }

  .brand-copy strong {
    font-size: 0.9rem;
  }

  .brand-copy span {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
  }

  .chapter-nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    gap: 0.45rem;
    white-space: nowrap;
    scroll-snap-type: x proximity;
  }

  .chapter-nav::-webkit-scrollbar {
    display: none;
  }

  .chapter-link {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    scroll-snap-align: start;
  }

  .mode-toggle {
    min-height: 42px;
    padding: 0.55rem 0.85rem;
    font-size: 0.74rem;
  }

  .chapter {
    min-height: auto;
    padding-top: 64px;
    padding-bottom: 76px;
    scroll-margin-top: 84px;
  }

  .chapter-word {
    display: none;
  }

  .eyebrow,
  .screen-kicker,
  .board-kicker,
  .reason-label {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }

  .eyebrow::before {
    width: 28px;
  }

  .hero-title {
    margin: 0.8rem 0 1rem;
    font-size: clamp(3rem, 17vw, 4.6rem);
  }

  .hero-copy {
    display: contents;
  }

  .hero-shell > .hero-copy > .eyebrow {
    order: 1;
  }

  .hero-shell > .hero-copy > .hero-title {
    order: 2;
  }

  .hero-shell > .hero-copy > .hero-summary {
    order: 3;
  }

  .hero-stage {
    order: 4;
  }

  .hero-summary {
    font-size: 1rem;
  }

  .hero-actions {
    order: 5;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .button {
    width: 100%;
    max-width: 100%;
  }

  .hero-stage {
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 0.4rem;
    width: 100%;
  }

  .mission-field {
    position: relative;
    inset: auto;
    display: flex;
    gap: 0.75rem;
    padding: 0 0 0.2rem;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    transform: none;
    scrollbar-width: none;
  }

  .mission-field::-webkit-scrollbar {
    display: none;
  }

  .mission-tile {
    flex: 0 0 168px;
    min-height: 118px;
    padding: 0.85rem;
    animation: none;
  }

  .mission-tile:hover,
  .mission-tile.active {
    transform: none;
  }

  .tile-title {
    font-size: 1.12rem;
  }

  .tile-caption {
    font-size: 0.78rem;
  }

  .phone-frame {
    order: -1;
    width: 100%;
    margin-top: 0;
    transform: none;
    border-radius: 28px;
  }

  .device-header {
    padding: 0.9rem 1rem 0.7rem;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
  }

  .device-tabs {
    flex-wrap: nowrap;
    gap: 0.45rem;
    padding: 0 1rem 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .device-tabs::-webkit-scrollbar {
    display: none;
  }

  .device-tab {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0.4rem 0.72rem;
    font-size: 0.74rem;
  }

  .phone-screen {
    padding: 1rem;
    border-radius: 24px;
  }

  .phone-screen h2 {
    font-size: 1.55rem;
  }

  .phone-screen p,
  .screen-list li {
    font-size: 0.92rem;
  }

  .section-intro {
    margin-bottom: 1.8rem;
  }

  .section-intro h2 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .hero-proofline {
    order: 6;
  }

  .story-panel {
    grid-template-columns: 1fr;
  }

  .pilot-mosaic {
    grid-template-columns: 1fr;
  }

  .pilot-copy {
    padding-left: 0;
  }
}

@media (max-width: 560px) {
  .top-nav {
    width: calc(100% - 16px);
    margin-top: 8px;
    padding: 0.75rem;
    border-radius: 22px;
  }

  .content-shell,
  .site-footer {
    width: min(100% - 24px, 100%);
  }

  .pilot-actions {
    flex-direction: column;
  }

  .mode-toggle {
    width: 100%;
  }

  .hero-proofline {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .proof-chip {
    padding: 0.9rem;
  }

  .capability-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(128px, 1fr);
  }

  .capability-cell {
    min-height: 128px;
  }

  .measure-layout {
    grid-template-columns: 1fr;
  }

  .path-board,
  .measure-board {
    padding: 1rem;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
