:root {
  --bg: #050506;
  --bg-elev: #0b0b0f;
  --bg-card: #121218;
  --bg-card-hover: #17171f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --purple: #483df3;
  --purple-soft: rgba(72, 61, 243, 0.16);
  --purple-mid: rgba(72, 61, 243, 0.32);
  --text: #f5f5f7;
  --muted: #9b9ba8;
  --dim: #6e6e7c;
  --warn: #e8c37a;
  --warn-bg: rgba(232, 195, 122, 0.08);
  --warn-line: rgba(232, 195, 122, 0.28);
  --miss: #d7d0c4;
  --miss-bg: rgba(215, 208, 196, 0.06);
  --miss-line: rgba(215, 208, 196, 0.2);
  --font: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  --nav-w: 220px;
  --header-h: 72px;
  --radius: 16px;
  --radius-sm: 10px;
  --content: 1080px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

/* Header */
.site-header {
  position: relative;
  padding: 28px 48px 0;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1200px 280px at 80% -40%, rgba(72, 61, 243, 0.18), transparent 60%),
    var(--bg);
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: calc(var(--content) + var(--nav-w) + 80px);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand img.wordmark {
  height: 22px;
  width: auto;
}
.header-p {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.header-p img { width: 100%; height: 100%; object-fit: cover; }

.hero {
  max-width: calc(var(--content) + var(--nav-w) + 80px);
  margin: 0 auto;
  padding: 56px 0 48px;
}
.hero-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  margin: 0 0 16px;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.hero h1 span { color: var(--muted); font-weight: 500; }
.hero-lead {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
}

/* Spec strip */
.spec {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.spec-inner {
  max-width: calc(var(--content) + var(--nav-w) + 80px);
  margin: 0 auto;
  padding: 28px 48px 32px;
}
.spec-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 16px;
}
.spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}
.chip .swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--purple);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
.chip a, a.chip { color: var(--text); }
a.chip:hover { border-color: var(--purple-mid); background: var(--purple-soft); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.spec-notes {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
  max-width: 880px;
}
.spec-notes a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.spec-notes a:hover { text-decoration-color: var(--purple); }

/* Layout with side nav */
.shell {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 48px 96px;
}

.side-nav {
  position: sticky;
  top: 32px;
  padding: 48px 0 24px;
}
.side-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.side-nav a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0 10px 18px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  text-decoration: none;
  color: var(--dim);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.side-nav a .num {
  font-size: 12px;
  font-weight: 600;
  color: var(--dim);
  min-width: 1.2em;
}
.side-nav a .when {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--dim);
  margin-top: 2px;
  letter-spacing: 0;
}
.side-nav a:hover { color: var(--text); }
.side-nav a.is-active {
  color: var(--text);
  border-left-color: var(--purple);
}
.side-nav a.is-active .num { color: var(--purple); }

.content { padding-top: 24px; min-width: 0; }

/* Sections */
.section {
  padding: 48px 0 16px;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 28px;
}
.section-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.section-title .mark {
  color: var(--purple);
  font-weight: 600;
  font-size: 0.86em;
  letter-spacing: -0.02em;
}
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.badge.accent {
  border-color: var(--purple-mid);
  background: var(--purple-soft);
  color: #c9c6ff;
}

.block-label {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.req-list {
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}
.req-list li {
  position: relative;
  padding: 0 0 10px 18px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
}
.req-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple);
}
.req-list li + li { border-top: none; }
.req-list code, .inline-quote {
  font-family: var(--font);
  font-weight: 500;
  color: #fff;
}

.callout {
  margin: 0 0 32px;
  padding: 16px 18px 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
}
.callout h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warn);
}
.callout ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.callout li {
  padding: 4px 0 4px 16px;
  position: relative;
  font-size: 14.5px;
  line-height: 1.6;
  color: #f0e6d0;
}
.callout li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn);
}

.missing {
  margin: 8px 0 0;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--miss-line);
  background: var(--miss-bg);
  color: var(--miss);
  font-size: 14.5px;
  line-height: 1.65;
}
.missing strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--miss);
}

/* Media grids */
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 32px;
}
.media-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.media-grid.triple { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.media-card {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.2s ease;
}
a.media-card:hover,
button.media-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.media-card button, button.media-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--bg-card);
  cursor: zoom-in;
  text-align: left;
  font: inherit;
  color: inherit;
}
.media-frame {
  background: #000;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.media-frame.wide { aspect-ratio: 16 / 9; }
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-cap {
  padding: 12px 14px 14px;
}
.media-cap .name {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.media-cap .meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--dim);
}

/* Video / asset cards */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 32px;
}
.asset-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.asset-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
}
.phone {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 16px 0;
  min-height: 320px;
}
.phone video {
  width: auto;
  height: 360px;
  max-width: 100%;
  border-radius: 12px;
  background: #000;
}
.wide-player {
  background: #000;
  padding: 16px 16px 0;
}
.wide-player video {
  width: 100%;
  height: auto;
  max-height: 420px;
  margin: 0 auto;
  border-radius: 12px;
  background: #000;
}
.asset-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
  flex: 1;
}
.asset-body .file {
  font-size: 12.5px;
  font-weight: 500;
  word-break: break-all;
  line-height: 1.4;
  color: var(--text);
}
.asset-body .facts {
  font-size: 12px;
  color: var(--dim);
}
.asset-body .note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}
.asset-body .note.caution { color: var(--warn); }
.btn-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn-dl:hover { filter: brightness(1.08); }
.btn-dl:active { transform: translateY(1px); }
.btn-dl.ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn-dl.ghost:hover { border-color: #fff; filter: none; }

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin: 0 0 32px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.file-row .info .name { font-size: 14px; font-weight: 500; }
.file-row .info .facts { font-size: 12px; color: var(--dim); margin-top: 2px; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(0, 0, 0, 0.86);
  backdrop-filter: blur(8px);
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(1200px, 100%);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.lightbox .lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-card);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.lightbox .lb-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 48px 40px;
  color: var(--dim);
  font-size: 13px;
}
.site-footer .inner {
  max-width: calc(var(--content) + var(--nav-w) + 80px);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 5, 6, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.mobile-nav::-webkit-scrollbar { display: none; }
.mobile-nav .track {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  min-width: max-content;
}
.mobile-nav a {
  flex: none;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg-card);
}
.mobile-nav a.is-active {
  color: #fff;
  border-color: var(--purple-mid);
  background: var(--purple-soft);
}

@media (max-width: 980px) {
  .site-header, .spec-inner, .shell, .site-footer { padding-left: 20px; padding-right: 20px; }
  .shell { grid-template-columns: 1fr; }
  .side-nav { display: none; }
  .mobile-nav { display: block; }
  .asset-grid, .asset-grid.two, .media-grid, .media-grid.triple {
    grid-template-columns: 1fr;
  }
  .phone video { height: 420px; }
  .hero { padding: 36px 0 32px; }
  .section-title { font-size: 24px; }
}

@media (min-width: 720px) and (max-width: 980px) {
  .asset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media-grid, .media-grid.triple { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .media-card, a.media-card:hover, button.media-card:hover { transition: none; transform: none; }
}
