:root {
  --ink: #07080c;
  --paper: #f6f1e8;
  --mist: #9a94ab;
  --gold: #c4a35a;
  --play: #c9a0ff;
  --play-hot: #ff8fab;
  --lib: #c4a35a;
  --lib-cool: #5b8fd9;
  --line: rgba(246, 241, 232, 0.12);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* Ambient wash */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 40% at 18% 40%, rgba(201, 160, 255, 0.14), transparent 60%),
    radial-gradient(ellipse 55% 40% at 82% 45%, rgba(196, 163, 90, 0.12), transparent 60%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(91, 143, 217, 0.06), transparent 55%);
  transition: opacity 0.6s ease;
}

body.is-hover-play .ambient {
  background:
    radial-gradient(ellipse 70% 55% at 20% 45%, rgba(201, 160, 255, 0.22), transparent 62%),
    radial-gradient(ellipse 40% 35% at 80% 50%, rgba(196, 163, 90, 0.05), transparent 60%);
}

body.is-hover-library .ambient {
  background:
    radial-gradient(ellipse 40% 35% at 20% 50%, rgba(201, 160, 255, 0.05), transparent 60%),
    radial-gradient(ellipse 70% 55% at 80% 45%, rgba(196, 163, 90, 0.2), transparent 62%);
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.main-scroll {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0 0 2rem;
}

/* Top chrome */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 3vw, 2rem);
}

.mark {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.mark strong {
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.98rem;
}

.mark span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
  font-family: var(--font-mono);
}

.top-meta {
  font-size: 0.8rem;
  color: var(--mist);
  text-align: right;
  max-width: 22rem;
  line-height: 1.4;
}

/* Intro / north star */
.intro {
  text-align: center;
  padding: 0.5rem 1.25rem 1.75rem;
  max-width: 46rem;
  margin: 0 auto;
}

.hero-north .lede {
  max-width: 48ch !important;
}

.intro .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.65rem;
  opacity: 0;
  animation: rise 0.8s ease 0.1s forwards;
}

.intro h1 {
  font-family: var(--font-display);
  font-weight: 450;
  font-size: clamp(1.75rem, 4.8vw, 2.85rem);
  line-height: 1.15;
  margin: 0 0 0.9rem;
  opacity: 0;
  animation: rise 0.85s ease 0.2s forwards;
}

.intro p {
  margin: 0 auto 0.85rem;
  color: var(--mist);
  line-height: 1.6;
  max-width: 42ch;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  opacity: 0;
  animation: rise 0.85s ease 0.32s forwards;
}

.intro p strong {
  color: var(--paper);
  font-weight: 600;
}

.promise {
  color: rgba(246, 241, 232, 0.88) !important;
  font-style: italic;
  max-width: 40ch !important;
}

.tagline-line {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  color: var(--paper) !important;
  letter-spacing: 0.02em;
  max-width: none !important;
}

.tagline-line span {
  margin: 0 0.15rem;
}

.jersey-note {
  font-size: 0.9rem !important;
  max-width: 44ch !important;
  line-height: 1.5 !important;
}

/* Panels */
.panel {
  padding: 1.75rem clamp(1rem, 3vw, 1.75rem) 0.5rem;
}

.panel-head {
  margin-bottom: 1.1rem;
  max-width: 40rem;
}

.panel-head.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.panel-head .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.45rem;
}

.panel-head h2 {
  font-family: var(--font-display);
  font-weight: 450;
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  margin: 0 0 0.45rem;
  line-height: 1.2;
}

.panel-head h3 {
  font-family: var(--font-display);
  font-weight: 450;
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}

.panel-sub {
  margin: 0;
  color: var(--mist);
  line-height: 1.5;
  font-size: 0.95rem;
}

/* Begin-here router */
.begin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.65rem;
}

.begin-card {
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 0.35rem;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.begin-card:hover,
.begin-card:focus-visible {
  border-color: rgba(196, 163, 90, 0.45);
  background: rgba(196, 163, 90, 0.08);
  outline: none;
}

.begin-card.is-active {
  border-color: rgba(196, 163, 90, 0.65);
  background: rgba(196, 163, 90, 0.12);
  box-shadow: 0 0 0 1px rgba(196, 163, 90, 0.2);
}

.begin-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.begin-card strong {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
}

.begin-card span:last-child {
  font-size: 0.85rem;
  color: var(--mist);
  line-height: 1.4;
}

.route-result {
  margin-top: 1rem;
}

.route-result.hidden {
  display: none;
}

.route-card {
  padding: 1.15rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(196, 163, 90, 0.35);
  background: linear-gradient(135deg, rgba(196, 163, 90, 0.1), rgba(255, 255, 255, 0.02));
}

.route-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.35rem;
}

.route-card h3 {
  font-family: var(--font-display);
  font-weight: 450;
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
}

.route-card p {
  margin: 0 0 0.55rem;
  color: rgba(246, 241, 232, 0.85);
  line-height: 1.5;
  font-size: 0.95rem;
}

.route-note {
  color: var(--mist) !important;
  font-size: 0.88rem !important;
}

.route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.btn-route {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--line);
}

.btn-route.primary {
  background: var(--gold);
  color: #0b0d12;
  border-color: transparent;
}

.btn-route.ghost {
  color: var(--paper);
}

.btn-route:hover {
  filter: brightness(1.05);
}

/* Doors wrap */
.doors-wrap {
  padding-top: 0.5rem;
}

/* Split doors */
.doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  padding: 0 clamp(0.75rem, 2.5vw, 1.5rem) 1rem;
  width: min(1180px, 100%);
  margin: 0 auto;
  align-content: center;
  min-height: min(48vh, 520px);
}

.door {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: min(58vh, 560px);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  isolation: isolate;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.3s ease,
    box-shadow 0.45s ease;
}

.door:nth-child(1) {
  animation: door-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

.door:nth-child(2) {
  animation: door-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.52s forwards;
}

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

.door__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
  filter: saturate(0.92) brightness(0.72);
}

.door-play .door__media {
  background-image:
    linear-gradient(180deg, rgba(7, 8, 12, 0.15) 0%, rgba(7, 8, 12, 0.35) 40%, rgba(7, 8, 12, 0.92) 100%),
    url("../assets/play-hero.jpg");
}

.door-library .door__media {
  background-image:
    linear-gradient(180deg, rgba(7, 8, 12, 0.2) 0%, rgba(7, 8, 12, 0.4) 42%, rgba(7, 8, 12, 0.93) 100%),
    url("../assets/library-hero.jpg");
}

.door__glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 0.4s ease;
}

.door-play .door__glow {
  background: linear-gradient(0deg, rgba(201, 160, 255, 0.28), transparent 70%);
}

.door-library .door__glow {
  background: linear-gradient(0deg, rgba(196, 163, 90, 0.26), transparent 70%);
}

.door__body {
  position: relative;
  z-index: 2;
  padding: clamp(1.15rem, 2.5vw, 1.75rem);
  display: grid;
  gap: 0.55rem;
}

.door__kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
}

.door-play .door__kicker {
  color: var(--play);
}

.door-library .door__kicker {
  color: var(--gold);
}

.door__body h2 {
  font-family: var(--font-display);
  font-weight: 450;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.15;
  margin: 0;
}

.door__body p {
  margin: 0;
  color: rgba(246, 241, 232, 0.78);
  line-height: 1.5;
  font-size: 0.95rem;
  max-width: 32ch;
}

.door__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.door__stats span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(246, 241, 232, 0.88);
}

.door__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  font-weight: 600;
  font-size: 0.95rem;
  width: fit-content;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.door-play .door__cta {
  background: rgba(201, 160, 255, 0.16);
  border-color: rgba(201, 160, 255, 0.35);
  color: #f3e9ff;
}

.door-library .door__cta {
  background: rgba(196, 163, 90, 0.16);
  border-color: rgba(196, 163, 90, 0.4);
  color: #f6edd5;
}

.door__cta i {
  font-style: normal;
  transition: transform 0.25s ease;
}

.door:hover,
.door:focus-visible {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
}

.door-play:hover,
.door-play:focus-visible {
  border-color: rgba(201, 160, 255, 0.45);
}

.door-library:hover,
.door-library:focus-visible {
  border-color: rgba(196, 163, 90, 0.5);
}

.door:hover .door__media,
.door:focus-visible .door__media {
  transform: scale(1.12);
  filter: saturate(1.05) brightness(0.82);
}

.door:hover .door__glow,
.door:focus-visible .door__glow {
  opacity: 0.9;
}

.door:hover .door__cta i,
.door:focus-visible .door__cta i {
  transform: translateX(4px);
}

/* Leverage */
.leverage-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  counter-reset: lev;
}

.leverage-list li {
  counter-increment: lev;
}

.leverage-list a {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem 0.9rem 3rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.leverage-list a::before {
  content: counter(lev, decimal-leading-zero);
  position: absolute;
  left: 0.9rem;
  top: 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
}

.leverage-list a:hover {
  border-color: rgba(196, 163, 90, 0.4);
  background: rgba(196, 163, 90, 0.07);
}

.leverage-list strong {
  font-size: 0.98rem;
}

.leverage-list span {
  font-size: 0.86rem;
  color: var(--mist);
  line-height: 1.4;
}

.card-soft {
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.mini-win-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.mini-win p {
  margin: 0 0 0.5rem;
  line-height: 1.5;
  color: rgba(246, 241, 232, 0.9);
}

.mini-win .muted {
  color: var(--mist);
  font-size: 0.9rem;
}

.five-q {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.2rem;
  color: var(--mist);
  line-height: 1.55;
  font-size: 0.92rem;
}

.five-q li {
  margin-bottom: 0.25rem;
}

/* Constitution */
.principles {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
  counter-reset: prin;
}

.principles li {
  counter-increment: prin;
  padding: 0.85rem 1rem 0.85rem 3.1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  position: relative;
  line-height: 1.5;
  color: rgba(246, 241, 232, 0.82);
  font-size: 0.92rem;
}

.principles li::before {
  content: counter(prin, decimal-leading-zero);
  position: absolute;
  left: 0.85rem;
  top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
}

.principles li strong {
  display: block;
  color: var(--paper);
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
}

.constitution-foot {
  margin: 1.1rem 0 0;
  color: var(--mist);
  font-size: 0.92rem;
  line-height: 1.5;
}

.constitution-foot strong {
  color: var(--paper);
}

/* Contract / not / levels */
.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.split-2 h2 {
  font-family: var(--font-display);
  font-weight: 450;
  font-size: 1.35rem;
  margin: 0 0 0.65rem;
}

.split-2 .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.35rem;
}

.contract-list,
.not-list {
  margin: 0;
  padding-left: 1.1rem;
  color: rgba(246, 241, 232, 0.85);
  line-height: 1.55;
  font-size: 0.92rem;
}

.contract-list li,
.not-list li {
  margin-bottom: 0.4rem;
}

.not-list {
  color: var(--mist);
}

.levels .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.35rem;
}

.level-row {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.level-row li {
  font-size: 0.8rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--mist);
}

.level-row strong {
  color: var(--paper);
}

/* Why */
.why-copy {
  max-width: 48rem;
  margin: 0;
  color: rgba(246, 241, 232, 0.85);
  line-height: 1.65;
  font-size: 1.02rem;
}

.why-panel .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.45rem;
}

.why-panel h2 {
  font-family: var(--font-display);
  font-weight: 450;
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

/* Foot */
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem clamp(1rem, 3vw, 2rem) 1.5rem;
  color: var(--mist);
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}

.foot a {
  color: var(--gold);
  font-weight: 600;
}

.foot a:hover {
  text-decoration: underline;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  z-index: 50;
}

.skip:focus {
  left: 0.5rem;
}

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

@keyframes door-in {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 820px) {
  .doors {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: 0.5rem;
  }

  .door {
    min-height: 42vh;
  }

  .top-meta {
    display: none;
  }

  .intro {
    padding-bottom: 0.85rem;
  }

  .split-2 {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro .eyebrow,
  .intro h1,
  .intro p,
  .door {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .door,
  .door__media,
  .door__cta,
  .door__cta i,
  .ambient {
    transition: none !important;
  }

  .door:hover,
  .door:focus-visible {
    transform: none;
  }

  .door:hover .door__media,
  .door:focus-visible .door__media {
    transform: none;
  }
}
