:root {
  color-scheme: dark;
  --bg: oklch(9% 0.018 245);
  --panel: oklch(14% 0.026 245);
  --panel-2: oklch(18% 0.03 245);
  --ink: oklch(96% 0.008 235);
  --muted: oklch(74% 0.024 238);
  --soft: oklch(58% 0.026 238);
  --line: oklch(91% 0.01 238 / 0.15);
  --line-strong: oklch(91% 0.01 238 / 0.28);
  --blue: oklch(78% 0.13 235);
  --green: oklch(78% 0.12 166);
  --gold: oklch(78% 0.13 88);
  --radius: 8px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: Avenir Next, Segoe UI, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 5%, oklch(78% 0.13 235 / 0.18), transparent 28rem),
    radial-gradient(circle at 8% 38%, oklch(78% 0.12 166 / 0.1), transparent 24rem),
    linear-gradient(160deg, var(--bg), oklch(12% 0.025 238));
}

body.modal-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background: oklch(10% 0.02 245);
}

.brand-mark img {
  display: block;
  width: clamp(9rem, 16vw, 13rem);
  height: auto;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
}

.top-nav a {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.top-nav a:hover {
  color: var(--ink);
  border-color: var(--line);
  background: var(--panel);
}

.section-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.48fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.label {
  margin: 0 0 0.7rem;
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 10ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(3.5rem, 9vw, 8rem);
  line-height: 0.9;
  letter-spacing: 0;
  font-weight: 820;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  font-weight: 780;
}

h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.08;
  font-weight: 760;
}

.hero-lede,
.section-heading p,
.demo-card p,
.runway p,
.notes-panel li {
  color: var(--muted);
  line-height: 1.6;
}

.hero-lede {
  max-width: 58ch;
  margin: 1.25rem 0 0;
  font-size: clamp(1rem, 1.8vw, 1.22rem);
}

.hero-actions,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.hero-actions {
  margin-top: 2rem;
}

.button,
.watch-button {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.button.primary,
.watch-button {
  border-color: transparent;
  color: oklch(10% 0.02 245);
  background: linear-gradient(135deg, oklch(88% 0.07 232), oklch(82% 0.12 166));
  font-weight: 800;
}

.button.secondary {
  background: var(--panel);
}

.system-panel,
.notes-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  overflow: hidden;
}

.system-panel div {
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.system-panel div:last-child {
  border-bottom: 0;
}

.panel-kicker {
  color: var(--soft);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.theater,
.flow,
.notes {
  padding: clamp(2.8rem, 7vw, 5.5rem) 0;
}

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

.section-heading {
  display: grid;
  grid-template-columns: minmax(12rem, 0.55fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3.5rem);
  align-items: end;
  margin-bottom: 1.5rem;
}

.section-heading p:last-child {
  max-width: 64ch;
  margin: 0;
}

iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: oklch(6% 0.014 245);
}

.video-modal[hidden] {
  display: none;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(0.6rem, 3vw, 2rem);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: oklch(4% 0.012 245 / 0.78);
  cursor: pointer;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 30px 90px oklch(2% 0.01 245 / 0.65);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}

.modal-header p {
  max-width: 70ch;
  margin: 0.4rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.modal-close {
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: oklch(20% 0.03 245);
  cursor: pointer;
}

.modal-frame {
  aspect-ratio: 16 / 9;
  background: oklch(6% 0.014 245);
}

.modal-frame iframe {
  width: 100%;
  height: 100%;
}

.demo-list {
  display: grid;
  gap: 0.8rem;
}

.demo-card {
  width: 100%;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.05rem;
  color: var(--ink);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: oklch(13.5% 0.024 245 / 0.9);
  cursor: pointer;
}

.demo-card:hover,
.demo-card:focus-visible {
  border-color: var(--blue);
  outline: none;
}

.demo-card.is-active {
  border-color: oklch(78% 0.13 235 / 0.85);
  background:
    radial-gradient(circle at 0% 50%, oklch(78% 0.13 235 / 0.18), transparent 12rem),
    oklch(18% 0.032 245 / 0.94);
}

.demo-number {
  color: var(--gold);
  font-weight: 850;
}

.demo-card h3 {
  margin-bottom: 0.35rem;
}

.demo-card p {
  margin: 0;
}

.demo-meta {
  display: grid;
  gap: 0.5rem;
  justify-items: end;
  white-space: nowrap;
}

.demo-duration {
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 850;
}

.runway {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 1.5rem 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.runway li {
  padding: 1.1rem;
  background: var(--panel);
}

.runway span {
  display: inline-flex;
  margin-bottom: 1.2rem;
  color: var(--gold);
  font-weight: 850;
}

.runway strong {
  display: block;
  line-height: 1.2;
}

.runway p {
  margin: 0.7rem 0 0;
  font-size: 0.92rem;
}

.notes-panel {
  display: grid;
  grid-template-columns: minmax(14rem, 0.55fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding: 1.4rem;
}

.notes-panel ul {
  columns: 2;
  column-gap: 2rem;
  margin: 0;
  padding-left: 1.2rem;
}

.notes-panel li {
  margin-bottom: 0.7rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem clamp(1rem, 4vw, 2.5rem);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: oklch(10% 0.02 245);
}

.site-footer a:hover {
  color: var(--ink);
}

@media (max-width: 900px) {
  .site-header,
  .hero,
  .section-heading,
  .notes-panel {
    grid-template-columns: 1fr;
  }

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

  .hero {
    padding: 2.5rem 0;
  }

  .top-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .top-nav a {
    justify-content: center;
  }

  .demo-card {
    grid-template-columns: 2.3rem minmax(0, 1fr);
    align-items: start;
  }

  .demo-meta {
    grid-column: 2;
    grid-template-columns: auto 1fr;
    justify-items: stretch;
    align-items: center;
  }

  .watch-button {
    width: 100%;
  }

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

  .notes-panel ul {
    columns: 1;
  }
}

@media (max-width: 520px) {
  .section-shell {
    width: min(100% - 0.8rem, 1180px);
  }

  h1 {
    font-size: clamp(2.7rem, 16vw, 4.4rem);
  }

  .hero-actions,
  .player-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .demo-card {
    padding: 0.9rem;
  }

  .modal-header {
    display: grid;
  }

  .modal-close {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
