:root {
  --ink: #18151c;
  --muted: #5c5966;
  --paper: #fbfbf8;
  --panel: #ffffff;
  --line: rgba(24, 21, 28, 0.16);
  --line-strong: rgba(24, 21, 28, 0.28);
  --teal: #149c8b;
  --violet: #5b4bff;
  --coral: #e35b4f;
  --gold: #c99518;
  --green: #24885a;
  --shadow: 0 22px 65px rgba(24, 21, 28, 0.12);
  --hero-height: clamp(700px, 84svh, 920px);
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

button,
input,
a {
  font: inherit;
}

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

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 940px;
  font-size: clamp(4rem, 12vw, 10.5rem);
  font-weight: 820;
}

h2 {
  max-width: 780px;
  font-size: clamp(2.2rem, 5vw, 5.25rem);
  font-weight: 790;
}

h3 {
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
}

.hero {
  position: relative;
  min-height: var(--hero-height);
  overflow: hidden;
  background: #17151c;
  color: #fff;
  isolation: isolate;
}

.hero::after {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 42%;
  content: "";
  background: linear-gradient(180deg, rgba(23, 21, 28, 0), rgba(23, 21, 28, 0.92));
}

#heroCanvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.site-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
}

.brand {
  font-weight: 800;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.nav-links a {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.82);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  outline: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  min-height: calc(var(--hero-height) - 90px);
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 4vh 0 clamp(150px, 18vh, 220px);
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: none;
}

.hero .eyebrow {
  color: #8df4e5;
}

.lede {
  max-width: 760px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
}

.hero-equation {
  display: inline-grid;
  gap: 4px;
  width: fit-content;
  max-width: min(620px, 100%);
  margin-top: 20px;
  padding: 12px 0;
  border-top: 1px solid rgba(141, 244, 229, 0.42);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-equation span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.hero-equation strong {
  color: #fff;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.35vw, 2.35rem);
  line-height: 1.08;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 12px;
  width: min(360px, 100%);
  margin-top: 26px;
}

.primary-action,
.secondary-action,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 7px;
  cursor: pointer;
}

.primary-action,
.secondary-action {
  width: 100%;
  padding: 10px 16px;
  font-weight: 760;
  text-align: center;
  white-space: nowrap;
}

.primary-action {
  background: #fff;
  color: #17151c;
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}

.hero-stats {
  position: absolute;
  left: max(20px, calc((100vw - 1180px) / 2));
  bottom: 22px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 18px;
  width: min(760px, calc(100% - 460px));
}

.hero-stats div {
  min-height: 74px;
  padding-top: 12px;
  border-top: 1px solid rgba(141, 244, 229, 0.34);
}

.hero-stats strong {
  display: block;
  color: #8df4e5;
  font-size: 1.25rem;
  line-height: 1;
}

.hero-stats span {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
  line-height: 1.35;
}

.scroll-hint {
  position: absolute;
  right: max(20px, calc((100vw - 1180px) / 2));
  bottom: 22px;
  z-index: 1;
  max-width: min(360px, calc(100% - 40px));
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

main {
  overflow: hidden;
}

.band,
.studio,
.closing-band {
  padding: clamp(64px, 10vw, 128px) max(20px, calc((100vw - 1180px) / 2));
}

.intro-band {
  padding-top: clamp(54px, 8vw, 96px);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

.section-grid p,
.section-copy p,
.narrow p {
  max-width: 720px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.18rem);
}

.claim-panel {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-left: 7px solid var(--coral);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.claim-panel span {
  color: var(--coral);
  font-weight: 800;
}

.claim-panel strong {
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  line-height: 1.18;
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(36px, 6vw, 72px);
}

.term-grid article {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--teal);
  border-radius: 8px;
  background: var(--panel);
}

.term-grid article:nth-child(2) {
  border-top-color: var(--violet);
}

.term-grid article:nth-child(3) {
  border-top-color: var(--gold);
}

.term-grid article:nth-child(4) {
  border-top-color: var(--coral);
}

.term-grid p {
  margin-top: 12px;
  color: var(--muted);
}

.studio {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 84px);
  align-items: center;
  background: #f3f7f5;
}

.studio.reversed {
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.82fr);
  background: #f7f4fb;
}

.studio.reversed .section-copy {
  grid-column: 2;
}

.studio.reversed .visual-panel {
  grid-row: 1;
}

.callout {
  border-left: 6px solid var(--gold);
  padding-left: 16px;
  color: var(--ink) !important;
  font-weight: 720;
}

.visual-panel {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: clamp(14px, 2.5vw, 22px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.visual-panel canvas {
  width: 100%;
  aspect-ratio: 1.35 / 1;
  min-height: 280px;
  border: 1px solid rgba(24, 21, 28, 0.1);
  border-radius: 6px;
  background: #fbfbf8;
}

.visual-panel.compact canvas {
  aspect-ratio: 1.25 / 1;
  min-height: 240px;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

button {
  min-width: 88px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  font-weight: 760;
}

button:hover,
button:focus-visible {
  border-color: rgba(20, 156, 139, 0.75);
  outline: 3px solid rgba(20, 156, 139, 0.14);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.segmented button {
  min-width: 0;
  border: 0;
  border-radius: 0;
}

.segmented button + button {
  border-left: 1px solid var(--line-strong);
}

.segmented .is-active,
#flowToggle[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

.slice-band {
  background: #fff;
}

.cinema-band {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(760px, 90svh, 980px);
  padding: clamp(72px, 10vw, 132px) max(20px, calc((100vw - 1180px) / 2));
  overflow: hidden;
  background: #141119;
  color: #fff;
  isolation: isolate;
}

.cinema-band::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(20, 17, 25, 0.96) 0 28%, rgba(20, 17, 25, 0.45) 58%, rgba(20, 17, 25, 0.96) 100%),
    linear-gradient(180deg, rgba(20, 17, 25, 0.18), rgba(20, 17, 25, 0.94));
}

#proofCanvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.cinema-copy {
  position: relative;
  z-index: 1;
  max-width: 770px;
}

.cinema-copy .eyebrow {
  color: #8df4e5;
}

.cinema-copy p {
  max-width: 680px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(1.02rem, 1.55vw, 1.22rem);
}

.phase-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 780px;
  margin-top: clamp(30px, 4vw, 48px);
}

.phase-list div {
  min-height: 150px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.phase-list span {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border: 1px solid rgba(141, 244, 229, 0.58);
  border-radius: 50%;
  color: #8df4e5;
  font-weight: 850;
}

.phase-list strong {
  display: block;
  font-size: 1.15rem;
}

.phase-list p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.96rem;
}

.slider-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-weight: 760;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--violet);
}

.check-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  font-weight: 760;
}

.check-control input {
  width: 18px;
  height: 18px;
  accent-color: var(--coral);
}

.flow-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.flow-stats span {
  min-height: 54px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.flow-stats strong {
  display: block;
  color: var(--ink);
}

.perelman-band {
  padding: clamp(72px, 10vw, 132px) max(20px, calc((100vw - 1180px) / 2));
  background:
    linear-gradient(90deg, rgba(20, 156, 139, 0.09) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(227, 91, 79, 0.08) 0 1px, transparent 1px 100%),
    #f8faf7;
  background-size: 58px 58px;
}

.perelman-layout {
  display: grid;
  grid-template-columns: minmax(280px, 410px) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 88px);
  align-items: center;
}

.portrait-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.portrait-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 24%;
  filter: saturate(0.92) contrast(1.04);
}

.portrait-card figcaption {
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.portrait-card a {
  color: var(--ink);
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.perelman-copy p {
  max-width: 760px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.16rem);
}

.journey-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(28px, 4vw, 46px);
}

.journey-grid article {
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--teal);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 42px rgba(24, 21, 28, 0.08);
}

.journey-grid article:nth-child(2) {
  border-top-color: var(--violet);
}

.journey-grid article:nth-child(3) {
  border-top-color: var(--coral);
}

.journey-grid span {
  display: block;
  color: var(--teal);
  font-weight: 850;
}

.journey-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1.08rem;
  line-height: 1.15;
}

.journey-grid p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.proof-band {
  background:
    linear-gradient(90deg, rgba(141, 244, 229, 0.05) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 100%),
    #18151c;
  background-size: 68px 68px;
  color: #fff;
}

.proof-band .eyebrow {
  color: #8df4e5;
}

.proof-band p {
  color: rgba(255, 255, 255, 0.72);
}

.narrow {
  max-width: 860px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(36px, 6vw, 76px);
}

.timeline article {
  position: relative;
  min-height: 270px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-top: 4px solid rgba(141, 244, 229, 0.7);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.timeline article:nth-child(2) {
  border-top-color: rgba(91, 75, 255, 0.85);
}

.timeline article:nth-child(3) {
  border-top-color: rgba(201, 149, 24, 0.9);
}

.timeline article:nth-child(4) {
  border-top-color: rgba(227, 91, 79, 0.88);
}

.timeline article:nth-child(5) {
  border-top-color: rgba(36, 136, 90, 0.95);
}

.timeline span {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
}

.timeline h3 {
  min-height: 72px;
}

.timeline p {
  margin-top: 14px;
  font-size: 0.98rem;
}

.closing-band {
  background:
    linear-gradient(90deg, rgba(20, 156, 139, 0.12) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(91, 75, 255, 0.1) 0 1px, transparent 1px 100%),
    #fbfbf8;
  background-size: 54px 54px;
}

.proof-chain {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 28px minmax(120px, 1fr) 28px minmax(150px, 1.1fr) 28px minmax(140px, 1fr) 28px minmax(110px, 0.7fr);
  gap: 10px;
  align-items: center;
  margin-top: clamp(36px, 5vw, 66px);
}

.proof-chain div {
  display: grid;
  place-items: center;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 12px 35px rgba(24, 21, 28, 0.08);
}

.proof-chain span {
  position: relative;
  height: 2px;
  background: var(--line-strong);
}

.proof-chain span::after {
  position: absolute;
  right: -1px;
  top: 50%;
  width: 10px;
  height: 10px;
  content: "";
  border-top: 2px solid var(--line-strong);
  border-right: 2px solid var(--line-strong);
  transform: translateY(-50%) rotate(45deg);
}

footer {
  padding: 26px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

footer p {
  max-width: 860px;
  margin: 0 auto;
}

@media (max-width: 980px) {
  .hero-stats {
    left: 14px;
    right: 14px;
    bottom: 58px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: auto;
  }

  .hero-stats div {
    min-height: 0;
    padding-top: 8px;
  }

  .hero-stats strong {
    font-size: 1rem;
  }

  .hero-stats span {
    display: none;
  }

  .term-grid,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-grid,
  .studio,
  .studio.reversed,
  .perelman-layout {
    grid-template-columns: 1fr;
  }

  .studio.reversed .section-copy,
  .studio.reversed .visual-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .perelman-copy {
    order: 1;
  }

  .portrait-card {
    order: 2;
  }

  .proof-chain {
    grid-template-columns: 1fr;
  }

  .cinema-band {
    min-height: auto;
  }

  .phase-list {
    grid-template-columns: 1fr;
  }

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

  .phase-list div {
    min-height: auto;
  }

  .proof-chain span {
    width: 2px;
    height: 28px;
    margin: 0 auto;
  }

  .proof-chain span::after {
    right: auto;
    left: 50%;
    top: auto;
    bottom: -1px;
    transform: translateX(-50%) rotate(135deg);
  }
}

@media (max-width: 680px) {
  :root {
    --hero-height: clamp(700px, 88svh, 960px);
  }

  .site-nav {
    width: min(100% - 28px, 1180px);
    align-items: flex-start;
    gap: 14px;
  }

  .nav-links {
    display: none;
  }

  .hero-content {
    min-height: calc(var(--hero-height) - 78px);
    width: min(100% - 28px, 1180px);
    padding-bottom: clamp(150px, 18vh, 210px);
  }

  h1 {
    font-size: clamp(2.8rem, 14vw, 4.4rem);
  }

  .hero-equation strong {
    font-size: clamp(1.35rem, 6.8vw, 2rem);
  }

  .hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .term-grid,
  .timeline,
  .flow-stats {
    grid-template-columns: 1fr;
  }

  .term-grid article,
  .timeline article {
    min-height: auto;
  }

  .timeline h3 {
    min-height: auto;
  }

  .visual-panel canvas {
    min-height: 240px;
  }

  .scroll-hint {
    left: 14px;
    right: 14px;
    bottom: 16px;
  }
}
