:root {
  --bg: #090907;
  --bg-2: #13130f;
  --paper: #f4f1e8;
  --ink: #11110d;
  --muted: #b7baac;
  --soft: rgba(244, 241, 232, 0.72);
  --line: rgba(244, 241, 232, 0.18);
  --line-dark: rgba(17, 17, 13, 0.16);
  --panel: rgba(15, 15, 12, 0.68);
  --max: 1260px;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  overflow-x: hidden;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(130deg, #090907 0%, #15150f 45%, #1d1713 100%);
  background-size: 72px 72px, 72px 72px, auto;
}

a {
  color: inherit;
}

img,
video {
  max-width: 100%;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  min-height: 72px;
  padding: 0 max(22px, calc((100vw - var(--max)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(180deg, rgba(9,9,7,0.88), rgba(9,9,7,0.36));
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: inline-block;
  border: 1px solid rgba(244,241,232,0.7);
  background:
    linear-gradient(135deg, rgba(61,214,198,0.95), rgba(242,193,78,0.9) 52%, rgba(226,77,92,0.95));
  clip-path: polygon(0 0, 78% 0, 100% 22%, 100% 100%, 22% 100%, 0 78%);
  box-shadow: 0 0 28px rgba(61,214,198,0.28);
}

.brand b {
  display: block;
  font-size: 15px;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

nav a {
  position: relative;
  color: rgba(244,241,232,0.72);
  font-size: 13px;
  text-decoration: none;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--paper);
}

nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 2px;
  background: var(--accent, #3dd6c6);
}

.hero {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  overflow: hidden;
  padding: 118px max(22px, calc((100vw - var(--max)) / 2)) 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 370px);
  align-items: end;
  gap: 40px;
}

.hero-video,
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  filter: saturate(1.16) contrast(1.06) brightness(0.82);
}

.hero-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(9,9,7,0.9) 0%, rgba(9,9,7,0.58) 45%, rgba(9,9,7,0.18) 100%),
    linear-gradient(0deg, rgba(9,9,7,0.96) 0%, transparent 34%, rgba(9,9,7,0.62) 100%);
}

.hero-copy {
  max-width: 880px;
  padding-bottom: 28px;
}

.eyebrow,
.section-heading span,
.tool-copy span,
.source-meta,
.section-index,
.visual-kicker,
.related > p {
  color: var(--accent, #3dd6c6);
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 880px;
  font-size: 92px;
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: rgba(244,241,232,0.78);
  font-size: 21px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-actions a,
.text-button {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(244,241,232,0.28);
  border-radius: 8px;
  color: var(--paper);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  background: rgba(244,241,232,0.04);
}

.hero-actions .primary,
.text-button.primary {
  color: var(--ink);
  border-color: var(--accent, #3dd6c6);
  background: var(--accent, #3dd6c6);
}

.hero-panel {
  align-self: end;
  padding: 22px;
  border: 1px solid rgba(244,241,232,0.22);
  border-radius: 8px;
  background: rgba(10,10,8,0.58);
  backdrop-filter: blur(16px);
}

.hero-stat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(244,241,232,0.14);
}

.hero-stat strong {
  color: var(--accent, #3dd6c6);
  font-size: 62px;
  line-height: 0.9;
}

.hero-stat span {
  color: rgba(244,241,232,0.74);
  font-size: 14px;
  line-height: 1.4;
}

.hero-panel ol {
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 11px;
  list-style: none;
}

.hero-panel li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  color: rgba(244,241,232,0.82);
  font-size: 14px;
}

.hero-panel li span {
  color: var(--accent, #3dd6c6);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: rgba(244,241,232,0.62);
  font-size: 12px;
  text-decoration: none;
}

.explainer,
.story-grid,
.instrument,
.source-section,
.related {
  width: min(var(--max), calc(100% - 44px));
  margin-inline: auto;
}

.explainer {
  padding: 98px 0 74px;
}

.section-heading {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) minmax(260px, 0.72fr);
  align-items: end;
  gap: 28px;
  margin-bottom: 26px;
}

.section-heading h2,
.tool-copy h2,
.story h2,
.source-section h2 {
  margin: 0;
  font-size: 46px;
  line-height: 1.06;
  letter-spacing: 0;
}

.section-heading p,
.tool-copy p {
  margin: 0;
  color: rgba(244,241,232,0.68);
  line-height: 1.65;
}

.video-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.36fr);
  gap: 18px;
  align-items: stretch;
}

.video-shell video,
.video-shell img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050504;
}

.video-shell img {
  filter: saturate(1.08) contrast(1.04);
}

.story-grid {
  border-top: 1px solid var(--line);
}

.story {
  min-height: 430px;
  padding: 64px 0;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.78fr);
  gap: 42px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.story:nth-child(even) {
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 0.9fr);
}

.story:nth-child(even) .story-copy {
  order: 2;
}

.story:nth-child(even) .story-visual {
  order: 1;
}

.story-copy p {
  margin: 18px 0 0;
  color: rgba(244,241,232,0.72);
  font-size: 18px;
  line-height: 1.78;
}

.story-visual {
  margin: 0;
}

.visual-board {
  min-height: 310px;
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(244,241,232,0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(244,241,232,0.1), rgba(244,241,232,0.02)),
    linear-gradient(120deg, rgba(61,214,198,0.08), rgba(242,193,78,0.06), rgba(226,77,92,0.06));
}

.visual-board::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(244,241,232,0.14);
  clip-path: polygon(0 0, 62% 0, 62% 1px, 100% 1px, 100% 72%, calc(100% - 1px) 72%, calc(100% - 1px) 100%, 30% 100%, 30% calc(100% - 1px), 0 calc(100% - 1px));
}

.visual-board strong {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 390px;
  margin-top: 26px;
  font-size: 23px;
  line-height: 1.32;
}

.visual-rings {
  position: absolute;
  right: 34px;
  top: 50px;
  width: 164px;
  height: 164px;
}

.visual-rings i {
  position: absolute;
  inset: calc(var(--n, 0) * 24px);
  border: 1px solid rgba(244,241,232,0.24);
  transform: rotate(45deg);
}

.visual-rings i:nth-child(1) { --n: 0; border-color: color-mix(in srgb, var(--accent, #3dd6c6) 72%, transparent); }
.visual-rings i:nth-child(2) { --n: 1; }
.visual-rings i:nth-child(3) { --n: 2; background: color-mix(in srgb, var(--accent, #3dd6c6) 18%, transparent); }

.visual-bars {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.visual-bars b {
  min-height: 58px;
  padding: 10px 8px;
  display: flex;
  align-items: end;
  border: 1px solid rgba(244,241,232,0.15);
  color: rgba(244,241,232,0.72);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  background: linear-gradient(to top, color-mix(in srgb, var(--accent, #3dd6c6) calc(24% + var(--i) * 6%), rgba(255,255,255,0.02)), rgba(255,255,255,0.025));
}

.instrument {
  margin-top: 24px;
  margin-bottom: 96px;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(280px, 0.65fr) minmax(0, 1fr);
  gap: 26px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244,241,232,0.045);
}

.tool-panel,
.arch-map,
.watch-grid {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(244,241,232,0.16);
  border-radius: 8px;
  background: rgba(9,9,7,0.5);
}

label {
  display: grid;
  gap: 8px;
  color: rgba(244,241,232,0.7);
  font-size: 13px;
  line-height: 1.45;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(244,241,232,0.18);
  border-radius: 8px;
  background: #12120f;
  color: var(--paper);
  font: inherit;
}

button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(244,241,232,0.18);
  border-radius: 8px;
  background: rgba(244,241,232,0.04);
  color: var(--paper);
  font-weight: 700;
  cursor: pointer;
}

button.is-active {
  color: var(--ink);
  border-color: var(--accent, #3dd6c6);
  background: var(--accent, #3dd6c6);
}

output {
  display: block;
  width: 100%;
  min-height: 54px;
  margin-top: 16px;
  padding: 15px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--accent, #3dd6c6);
  font-weight: 800;
  line-height: 1.4;
}

.grid-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.grid-inputs output {
  grid-column: 1 / -1;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.arch-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.arch-map output {
  grid-column: 1 / -1;
}

.watch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.watch-grid label {
  min-height: 86px;
  grid-template-columns: auto 1fr;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(244,241,232,0.14);
  border-radius: 8px;
}

.watch-grid input {
  width: 18px;
  min-height: 18px;
  margin-top: 3px;
}

.watch-grid span,
.watch-grid small {
  grid-column: 2;
}

.watch-grid small {
  color: rgba(244,241,232,0.52);
}

.watch-grid output {
  grid-column: 1 / -1;
}

.source-section {
  margin-bottom: 104px;
}

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

.source-card {
  min-height: 246px;
  display: grid;
  grid-template-columns: 84px 1fr;
  grid-template-rows: 1fr auto;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244,241,232,0.045);
}

.source-card[hidden] {
  display: none;
}

.source-spark {
  position: relative;
  min-height: 82px;
  border: 1px solid rgba(244,241,232,0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent, #3dd6c6) 32%, transparent), transparent),
    rgba(9,9,7,0.45);
}

.source-spark span,
.source-spark i {
  position: absolute;
  border: 1px solid rgba(244,241,232,0.4);
}

.source-spark span {
  inset: 18px;
  transform: rotate(45deg);
}

.source-spark i {
  left: 18px;
  right: 18px;
  bottom: 19px;
  height: 3px;
  border-color: var(--accent, #3dd6c6);
  background: var(--accent, #3dd6c6);
}

.source-card h3 {
  margin: 6px 0 10px;
  font-size: 22px;
  line-height: 1.18;
}

.source-card p {
  margin: 0;
  color: rgba(244,241,232,0.68);
  line-height: 1.58;
}

.source-card a {
  grid-column: 2;
  align-self: end;
  color: var(--accent, #3dd6c6);
  font-weight: 800;
  text-decoration: none;
}

.related {
  margin-bottom: 112px;
}

.related > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.related a {
  min-height: 164px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.related span {
  color: var(--accent, #3dd6c6);
  font-size: 12px;
  text-transform: uppercase;
}

.related strong {
  font-size: 22px;
  line-height: 1.2;
}

footer {
  padding: 34px max(22px, calc((100vw - var(--max)) / 2));
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 28px;
  border-top: 1px solid var(--line);
  color: rgba(244,241,232,0.58);
  font-size: 13px;
  line-height: 1.65;
}

footer p {
  margin: 0;
}

footer > a {
  color: var(--paper);
  font-weight: 800;
  text-decoration: none;
}

.simple-main {
  width: min(900px, calc(100% - 44px));
  min-height: 68svh;
  margin: 0 auto;
  padding: 136px 0 80px;
}

.simple-main h1 {
  margin: 0 0 20px;
  font-size: 64px;
  line-height: 1;
}

.simple-main p {
  color: rgba(244,241,232,0.74);
  font-size: 18px;
  line-height: 1.7;
}

.simple-visual {
  margin-top: 28px;
}

.simple-video {
  margin-top: 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.36fr);
  gap: 16px;
}

.simple-video video,
.simple-video img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050504;
}

@media (max-width: 980px) {
  .site-header {
    min-height: 66px;
    padding-inline: 18px;
  }

  nav {
    gap: 14px;
  }

  nav a {
    font-size: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 104px 22px 56px;
  }

  .hero h1 {
    font-size: 64px;
  }

  .lead {
    font-size: 19px;
  }

  .hero-panel {
    width: min(100%, 520px);
  }

  .section-heading,
  .instrument,
  .video-shell,
  .simple-video,
  .story,
  .story:nth-child(even),
  footer {
    grid-template-columns: 1fr;
  }

  .story:nth-child(even) .story-copy,
  .story:nth-child(even) .story-visual {
    order: initial;
  }

  .story {
    min-height: 0;
  }

  .grid-inputs,
  .watch-grid,
  .source-grid,
  .related > div {
    grid-template-columns: 1fr;
  }

  .arch-map {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 12px;
    padding-inline: 16px;
    overflow: hidden;
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand b {
    max-width: 122px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand small,
  nav a:nth-child(n+3) {
    display: none;
  }

  nav {
    flex: 0 0 auto;
    gap: 10px;
    margin-left: auto;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 104px 18px 54px;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }

  .hero-copy,
  .hero-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .eyebrow {
    max-width: calc(100vw - 36px);
    overflow-wrap: anywhere;
  }

  .hero h1 {
    max-width: calc(100vw - 36px);
    font-size: 38px;
    overflow-wrap: anywhere;
  }

  .lead {
    width: 100%;
    max-width: calc(100vw - 36px);
    font-size: 16px;
    overflow-wrap: break-word;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions a,
  .text-button {
    width: 100%;
    max-width: calc(100vw - 36px);
  }

  .hero-panel {
    max-width: calc(100vw - 36px);
  }

  .hero-stat strong {
    font-size: 48px;
  }

  .explainer,
  .story-grid,
  .instrument,
  .source-section,
  .related,
  .simple-main {
    width: calc(100% - 32px);
  }

  .section-heading h2,
  .tool-copy h2,
  .story h2,
  .source-section h2 {
    font-size: 34px;
  }

  .story {
    padding: 46px 0;
    gap: 24px;
  }

  .story-copy p {
    font-size: 16px;
  }

  .visual-board {
    min-height: 360px;
  }

  .visual-rings {
    right: -18px;
    top: 70px;
  }

  .visual-bars {
    grid-template-columns: 1fr;
  }

  .source-card {
    grid-template-columns: 1fr;
  }

  .source-card a {
    grid-column: 1;
  }

  .instrument {
    padding: 18px;
  }

  footer {
    padding-inline: 18px;
  }

  .simple-main h1 {
    font-size: 42px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
