:root {
  color-scheme: dark;
  --bg: #12110f;
  --panel: #1a1916;
  --panel-strong: #222018;
  --text: #f3efe7;
  --muted: #b9b3a9;
  --subtle: #847f76;
  --line: rgba(255, 255, 255, 0.1);
  --blue: #85b8ff;
  --gold: #e2c36b;
  --violet: #b9a4ff;
  --green: #8ed2b0;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --radius: 8px;
  --content: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(133, 184, 255, 0.11), transparent 32rem),
    linear-gradient(180deg, #151411 0%, var(--bg) 38%, #0d0c0b 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  min-width: 320px;
}

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

code {
  color: #dbe8ff;
  background: rgba(133, 184, 255, 0.09);
  border: 1px solid rgba(133, 184, 255, 0.14);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 0.16rem 0.36rem;
}

pre {
  margin: 0;
  overflow-x: auto;
  border: 1px solid rgba(133, 184, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.18);
}

pre code {
  display: block;
  min-width: max-content;
  border: 0;
  background: transparent;
  color: #dbe8ff;
  padding: 1rem;
  line-height: 1.55;
}

.skip-link,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  width: auto;
  height: auto;
  margin: 1rem;
  padding: 0.7rem 1rem;
  clip: auto;
  z-index: 10;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 17, 15, 0.84);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(100% - 2rem, var(--content));
  margin: 0 auto;
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 0 18%, #151411 18% 24%, transparent 24% 42%, #151411 42% 48%, transparent 48%),
    linear-gradient(135deg, var(--blue), var(--gold));
  box-shadow: inset 0 -8px 18px rgba(0, 0, 0, 0.18);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(0.55rem, 1.4vw, 1.35rem);
  color: var(--muted);
  font-size: 0.94rem;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus,
.nav-links a.is-active {
  color: var(--text);
  border-color: var(--blue);
}

.section {
  width: min(100% - 2rem, var(--content));
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 7rem) 0;
}

.section[id] {
  scroll-margin-top: 5.5rem;
}

.hero {
  min-height: min(48rem, calc(100vh - 8.5rem));
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.82fr);
  align-items: center;
  gap: clamp(2.2rem, 5vw, 4.8rem);
  padding-top: clamp(3rem, 7vw, 6.5rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.hero-copy,
.demo-copy {
  max-width: 42rem;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.25rem;
  max-width: 13ch;
  font-size: clamp(3rem, 7vw, 5.85rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-subtitle,
.section-heading p,
.demo-copy p {
  color: var(--muted);
  font-size: clamp(1.03rem, 1.5vw, 1.18rem);
}

.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.65rem;
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 0.74rem 1rem;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #12110f;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.button.ghost {
  border-color: transparent;
  color: var(--muted);
}

.button.secondary:hover,
.button.secondary:focus,
.button.ghost:hover,
.button.ghost:focus {
  border-color: rgba(133, 184, 255, 0.42);
  color: var(--text);
  background: rgba(133, 184, 255, 0.08);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0;
  margin: 1.6rem 0 0;
  list-style: none;
}

.tag-list li,
.tech-panel span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  padding: 0.36rem 0.68rem;
  font-size: 0.88rem;
}

.roll-card,
.demo-visual,
.intensity-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow);
}

.roll-card {
  padding: 1rem;
}

.roll-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.piano-roll {
  height: clamp(18rem, 39vw, 26rem);
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #151411;
}

.keys {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background: #e8e2d6;
}

.keys span {
  border-bottom: 1px solid rgba(18, 17, 15, 0.28);
}

.keys span:nth-child(2),
.keys span:nth-child(4),
.keys span:nth-child(6) {
  background: linear-gradient(90deg, #151411 0 58%, #e8e2d6 58%);
}

.roll-grid {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 195, 107, 0.1), transparent 46%);
  background-size: 100% 16.66%, 12.5% 100%, 100% 100%;
}

.note {
  position: absolute;
  height: 1.2rem;
  border-radius: 6px;
  box-shadow: inset 0 -8px 14px rgba(0, 0, 0, 0.12);
}

.note.blue {
  background: var(--blue);
}

.note.gold {
  background: var(--gold);
}

.note.violet {
  background: var(--violet);
}

.n1 {
  top: 12%;
  left: 8%;
  width: 22%;
}

.n2 {
  top: 31%;
  left: 16%;
  width: 18%;
}

.n3 {
  top: 48%;
  left: 28%;
  width: 20%;
}

.n4 {
  top: 66%;
  left: 36%;
  width: 16%;
}

.n5 {
  top: 20%;
  left: 52%;
  width: 24%;
}

.n6 {
  top: 38%;
  left: 58%;
  width: 31%;
}

.n7 {
  top: 58%;
  left: 66%;
  width: 21%;
}

.n8 {
  top: 75%;
  left: 72%;
  width: 18%;
}

.n9 {
  top: 10%;
  left: 82%;
  width: 13%;
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 49%;
  width: 1px;
  background: rgba(255, 255, 255, 0.55);
}

.token-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.85rem 0.1rem 0;
}

.token-strip span {
  border: 1px solid rgba(133, 184, 255, 0.18);
  border-radius: 6px;
  background: rgba(133, 184, 255, 0.08);
  color: #dbe8ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  line-height: 1.2;
  padding: 0.35rem 0.45rem;
}

.visual-caption {
  margin: 0.7rem 0 0;
  color: var(--subtle);
  font-size: 0.86rem;
}

.section-heading {
  max-width: 46rem;
  margin-bottom: 2rem;
}

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

.limitations-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.text-card,
.pipeline-card,
.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
}

.text-card {
  padding: 1.25rem;
}

.text-card p,
.pipeline-card p,
.small-note,
.site-footer {
  color: var(--muted);
}

.text-card p,
.pipeline-card p {
  margin-bottom: 0;
}

.tech-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.callout {
  margin-top: 1.2rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(226, 195, 107, 0.26);
  border-radius: var(--radius);
  background: rgba(226, 195, 107, 0.08);
}

.callout strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--gold);
  font-size: 0.86rem;
  text-transform: uppercase;
}

.callout p {
  max-width: 54rem;
  margin-bottom: 0;
  color: var(--muted);
}

.demo {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(280px, 0.6fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.demo-visual {
  min-height: 19rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0.8rem;
}

.demo-file {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  gap: 0.7rem;
}

.demo-file-label {
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.compact-roll {
  position: relative;
  min-height: 13.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    rgba(0, 0, 0, 0.13);
  background-size: 100% 25%, 25% 100%;
}

.compact-roll::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.7rem;
  background: repeating-linear-gradient(
    180deg,
    #e8e2d6 0 2rem,
    #151411 2rem 3.2rem,
    #e8e2d6 3.2rem 5.2rem
  );
}

.compact-note {
  position: absolute;
  left: 18%;
  height: 0.82rem;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: inset 0 -7px 12px rgba(0, 0, 0, 0.12);
}

.c1 {
  top: 18%;
  width: 44%;
}

.c2 {
  top: 41%;
  width: 34%;
  left: 28%;
}

.c3 {
  top: 60%;
  width: 48%;
  left: 21%;
  background: var(--gold);
}

.c4 {
  top: 78%;
  width: 28%;
  left: 48%;
}

.c5 {
  top: 17%;
  width: 36%;
  background: var(--violet);
}

.c6 {
  top: 35%;
  left: 30%;
  width: 50%;
  background: var(--gold);
}

.c7 {
  top: 54%;
  left: 22%;
  width: 40%;
}

.c8 {
  top: 72%;
  left: 38%;
  width: 34%;
  background: var(--violet);
}

.c9 {
  top: 84%;
  left: 15%;
  width: 28%;
  background: var(--gold);
}

.demo-transform {
  display: grid;
  align-content: center;
  gap: 0.55rem;
  min-width: 8.25rem;
}

.demo-transform span {
  position: relative;
  border: 1px solid rgba(226, 195, 107, 0.2);
  border-radius: 6px;
  background: rgba(226, 195, 107, 0.08);
  color: #f2df9b;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.25;
  padding: 0.48rem 0.55rem;
  text-align: center;
}

.small-note {
  margin-top: 1rem;
  font-size: 0.95rem;
}

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

.pipeline-card {
  position: relative;
  min-height: 14rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.pipeline-card::after {
  content: "";
  position: absolute;
  top: 2.05rem;
  right: -0.62rem;
  width: 0.46rem;
  height: 0.46rem;
  border-top: 2px solid rgba(226, 195, 107, 0.78);
  border-right: 2px solid rgba(226, 195, 107, 0.78);
  transform: rotate(45deg);
}

.pipeline-card:last-child::after {
  display: none;
}

.step-number {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
}

.pipeline-card h3 {
  margin-top: 1.8rem;
}

.pipeline-card code {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  margin-top: auto;
  overflow-wrap: anywhere;
}

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

.stat-card {
  padding: 1.15rem;
}

.stat-card strong {
  display: block;
  color: var(--blue);
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  line-height: 1;
}

.stat-card span {
  display: block;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.model-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.flow-stage {
  position: relative;
  min-height: 11.5rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid rgba(133, 184, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(133, 184, 255, 0.055);
}

.flow-stage h3 {
  margin-bottom: 0.75rem;
  color: #dce8fb;
  font-size: 0.88rem;
}

.flow-stage:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -0.52rem;
  top: 50%;
  width: 0.42rem;
  height: 0.42rem;
  border-top: 2px solid rgba(226, 195, 107, 0.9);
  border-right: 2px solid rgba(226, 195, 107, 0.9);
  transform: translateY(-50%) rotate(45deg);
  z-index: 1;
}

.flow-roll {
  position: relative;
  min-height: 7.2rem;
  overflow: hidden;
  border-radius: 6px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    rgba(0, 0, 0, 0.14);
  background-size: 100% 33.33%, 33.33% 100%;
}

.flow-note {
  position: absolute;
  height: 0.65rem;
  border-radius: 999px;
  background: var(--blue);
}

.f1 {
  top: 18%;
  left: 12%;
  width: 45%;
}

.f2 {
  top: 48%;
  left: 28%;
  width: 36%;
}

.f3 {
  top: 70%;
  left: 18%;
  width: 52%;
  background: var(--gold);
}

.f4 {
  top: 20%;
  left: 16%;
  width: 42%;
  background: var(--violet);
}

.f5 {
  top: 49%;
  left: 30%;
  width: 48%;
  background: var(--gold);
}

.f6 {
  top: 74%;
  left: 12%;
  width: 38%;
}

.flow-token-list,
.layer-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.flow-token-list span,
.layer-stack span {
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  line-height: 1.25;
  padding: 0.38rem 0.45rem;
  overflow-wrap: anywhere;
}

.flow-token-list.generated span {
  border-color: rgba(226, 195, 107, 0.2);
  background: rgba(226, 195, 107, 0.075);
}

.layer-stack span {
  color: #f2df9b;
  font-family: inherit;
  font-weight: 800;
  text-align: center;
}

.transformer-stage {
  background:
    linear-gradient(180deg, rgba(185, 164, 255, 0.12), rgba(133, 184, 255, 0.055));
}

.checkpoints,
.run-local {
  border-top: 1px solid var(--line);
}

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

.comparison-card,
.command-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  padding: 1.2rem;
}

.comparison-card strong {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--blue);
  font-size: 1.18rem;
}

.comparison-card p,
.command-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.command-card {
  display: grid;
  align-content: start;
  gap: 0.85rem;
}

.side-experiment {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intensity-card {
  --preview-intensity: 0.45;
  padding: clamp(1rem, 3vw, 1.6rem);
}

.slider-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-weight: 700;
}

.slider-labels span:nth-child(2) {
  min-width: 3.25rem;
  padding: 0.24rem 0.5rem;
  text-align: center;
  border-radius: 999px;
  background: rgba(133, 184, 255, 0.1);
  color: var(--text);
}

.slider-labels span:last-child {
  text-align: right;
}

input[type="range"] {
  width: 100%;
  margin: 1.25rem 0;
  accent-color: var(--gold);
}

.intensity-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.intensity-summary strong,
.intensity-summary span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.36rem 0.65rem;
}

.intensity-summary strong {
  color: var(--text);
}

.intensity-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 1rem;
}

.intensity-roll {
  position: relative;
  min-height: 13rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(133, 184, 255, 0.08), transparent 58%),
    rgba(0, 0, 0, 0.12);
  background-size: 100% 20%, 12.5% 100%, 100% 100%, 100% 100%;
}

.intensity-roll::before {
  content: "preview notes";
  position: absolute;
  top: 0.75rem;
  left: 0.8rem;
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.intensity-note {
  position: absolute;
  height: 0.85rem;
  border-radius: 999px;
  opacity: 0.14;
  transform: scaleX(0.7);
  transform-origin: left center;
  transition: opacity 160ms ease, transform 160ms ease, filter 160ms ease;
  filter: saturate(0.4);
}

.intensity-note.is-active {
  opacity: calc(0.42 + var(--preview-intensity) * 0.5);
  transform: scaleX(calc(0.72 + var(--preview-intensity) * 0.34));
  filter: saturate(1);
}

.intensity-note.blue {
  background: var(--blue);
}

.intensity-note.gold {
  background: var(--gold);
}

.intensity-note.violet {
  background: var(--violet);
}

.i-note-1 {
  top: 24%;
  left: 10%;
  width: 22%;
}

.i-note-2 {
  top: 48%;
  left: 15%;
  width: 18%;
}

.i-note-3 {
  top: 68%;
  left: 22%;
  width: 25%;
}

.i-note-4 {
  top: 34%;
  left: 34%;
  width: 21%;
}

.i-note-5 {
  top: 57%;
  left: 43%;
  width: 28%;
}

.i-note-6 {
  top: 20%;
  left: 55%;
  width: 20%;
}

.i-note-7 {
  top: 76%;
  left: 59%;
  width: 22%;
}

.i-note-8 {
  top: 39%;
  left: 68%;
  width: 24%;
}

.i-note-9 {
  top: 62%;
  left: 77%;
  width: 18%;
}

.density-preview {
  height: 7rem;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  align-items: end;
  gap: 0.6rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    rgba(0, 0, 0, 0.12);
  background-size: 100% 33.33%;
}

.density-preview span {
  height: calc(var(--preview-intensity, 0.45) * 60% + 16% + var(--offset, 0%));
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--gold), var(--blue));
  opacity: calc(0.38 + var(--preview-intensity, 0.45) * 0.55);
}

.density-preview span:nth-child(2),
.density-preview span:nth-child(6) {
  --offset: 8%;
}

.density-preview span:nth-child(3),
.density-preview span:nth-child(7) {
  --offset: 14%;
}

.density-preview span:nth-child(4),
.density-preview span:nth-child(8) {
  --offset: 5%;
}

.final-cta {
  text-align: center;
}

.final-cta .button-row {
  justify-content: center;
}

.site-footer {
  width: min(100% - 2rem, var(--content));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

@media (max-width: 1040px) {
  .hero,
  .demo {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .roll-card,
  .demo-visual {
    max-width: 42rem;
  }

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

  .pipeline-card::after {
    display: none;
  }

  .stats-grid,
  .limitations-grid,
  .comparison-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 0.85rem 0;
  }

  .nav-links {
    justify-content: flex-start;
    row-gap: 0.3rem;
  }

  .section {
    width: min(100% - 1.25rem, var(--content));
    padding: 3.4rem 0;
  }

  .hero {
    padding-top: 2.6rem;
    padding-bottom: 1.5rem;
  }

  .overview {
    padding-top: 1.5rem;
  }

  h1 {
    max-width: 11ch;
  }

  .overview-grid,
  .stats-grid,
  .limitations-grid,
  .comparison-grid,
  .run-grid {
    grid-template-columns: 1fr;
  }

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

  .pipeline-card {
    min-height: 0;
  }

  .model-flow {
    grid-template-columns: 1fr;
  }

  .flow-stage {
    min-height: 0;
  }

  .flow-stage:not(:last-child)::after {
    right: 50%;
    top: auto;
    bottom: -0.55rem;
    transform: translateX(50%) rotate(135deg);
  }

  .demo-visual,
  .intensity-layout {
    grid-template-columns: 1fr;
  }

  .demo-transform {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
  }

  .compact-roll {
    min-height: 9.5rem;
  }

  .slider-labels {
    grid-template-columns: 1fr;
  }

  .slider-labels span,
  .slider-labels span:last-child {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .piano-roll {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    height: 14rem;
  }

  .roll-card-header {
    font-size: 0.7rem;
  }

  .token-strip span {
    font-size: 0.7rem;
  }

  .demo-transform {
    grid-template-columns: 1fr;
  }

  .intensity-roll {
    min-height: 10.5rem;
  }

  .density-preview {
    gap: 0.32rem;
    padding: 0.65rem;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
