@import url("vendor/fonts/ui.css");

:root {
  --page-bg: #07080b;
  --panel-bg: #1a2230;
  --border: rgba(255, 255, 255, 0.14);
  --text: #f4f5f7;
  --muted: #9aa3ad;
  --cyan: #3ec8ff;
  --orange: #ff7a1a;
  --ink: #071016;
  --field: #10161e;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--page-bg);
  color: var(--text);
  font-family: Geist, system-ui, sans-serif;
}

a { color: var(--cyan); }

.logo-fallback, .brand img { image-rendering: pixelated; image-rendering: crisp-edges; }

.doc img, .look .shot {
  image-rendering: auto;
  max-width: 100%;
  height: auto;
}

.doc img { border: 1px solid var(--border); }

/* Landing */

.landing { min-height: 100vh; }

.deck {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
}

.deck button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: var(--cyan);
  color: var(--ink);
  cursor: pointer;
}

.deck select {
  height: 40px;
  max-width: min(14rem, calc(100vw - 200px));
  padding: 0 10px;
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--border);
  font: inherit;
}

.deck-vol {
  position: relative;
}

.deck-vol button {
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--border);
}

.deck-vol-pop {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  padding: 10px 6px;
  background: var(--field);
  border: 1px solid var(--border);
}

.deck-vol.is-open .deck-vol-pop { display: block; }

.deck-vol-pop input {
  width: 16px;
  height: 88px;
  writing-mode: vertical-lr;
  direction: rtl;
  accent-color: var(--cyan);
}

.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;
}

#stage {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.logo-fallback {
  position: fixed;
  z-index: 1;
  top: 14vh;
  left: 50%;
  width: min(280px, 46vw);
  height: auto;
  transform: translateX(-50%);
}

.logo-fallback.is-hidden { visibility: hidden; }

.landing-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  padding: 58vh 24px 48px;
  background: linear-gradient(transparent 0%, transparent 62%, rgba(7, 8, 11, 0.9) 84%, var(--page-bg) 100%);
  pointer-events: none;
}

.landing-copy a, .landing-copy .actions, .landing-copy .deck { pointer-events: auto; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-family: "Better VCR", sans-serif;
}

.landing-copy h1 {
  margin: 0.25em 0 12px;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 1.15;
  font-weight: 700;
  font-family: "Better VCR", sans-serif;
  text-shadow: 0 0 18px rgba(62, 200, 255, 0.75), 0 0 2px #fff;
  animation: hero-title 1.6s ease-in-out infinite;
}

@keyframes hero-title {
  50% { text-shadow: 0 0 28px rgba(255, 122, 26, 0.85), 0 0 10px #3ec8ff; }
}

@media (prefers-reduced-motion: reduce) {
  .landing-copy h1 { animation: none; }
  .shot,
  .look-row:nth-of-type(even) .shot,
  .frame:hover .shot,
  .look-row:nth-of-type(even) .frame:hover .shot { transform: none; }
}

.landing-copy p { margin: 0; max-width: 38rem; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.landing-copy p.actions { margin-top: 40px; }

.look {
  position: relative;
  z-index: 2;
}

.look-row {
  display: grid;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  min-height: 100vh;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 5vw, 4rem);
  background:
    radial-gradient(60% 70% at 15% 20%, rgba(62, 200, 255, 0.16), transparent 70%),
    radial-gradient(50% 60% at 90% 85%, rgba(255, 122, 26, 0.12), transparent 70%);
  border-top: 1px solid var(--border);
}

.look-copy {
  max-width: 38rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--page-bg) 72%, #000000aa);
  backdrop-filter: blur(6px);
}

.look-copy h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-family: "Better VCR", sans-serif;
  color: var(--text);
}

.look-copy p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.look-copy a { pointer-events: auto; }

.frame { margin: 0; perspective: 1400px; }

.frame a { display: block; }

.shot {
  display: block;
  width: 100%;
  border: 1px solid rgba(62, 200, 255, 0.45);
  box-shadow:
    -18px 18px 60px rgba(62, 200, 255, 0.28),
    18px -12px 60px rgba(255, 122, 26, 0.18),
    0 30px 60px #000a;
  transform: rotateY(-8deg) rotateX(3deg);
  transition: transform 0.6s ease;
}

.frame:hover .shot { transform: none; }

@media (min-width: 60rem) {
  .look-row {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }

  .look-row:nth-of-type(even) {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  }

  .look-row:nth-of-type(even) .look-copy { order: 2; justify-self: end; }

  .look-row:nth-of-type(even) .shot { transform: rotateY(8deg) rotateX(3deg); }

  .look-row:nth-of-type(even) .frame:hover .shot { transform: none; }
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

/* Docs */

.topbar {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 10px 16px;
  overflow: hidden;
  background: transparent;
  border-bottom: 1px solid rgba(62, 200, 255, 0.22);
}

#headerStage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#headerStage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.topbar > :not(#headerStage) {
  position: relative;
  z-index: 1;
}

.topbar-label {
  color: var(--cyan);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-family: "Better VCR", sans-serif;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  text-shadow: 0 0 12px rgba(7, 8, 11, 0.9);
}

.brand img { width: 42px; height: auto; }

.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.topbar .download { margin-left: auto; padding: 8px 14px; }

.repo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid var(--border);
}

.repo:hover { color: var(--cyan); border-color: var(--cyan); }

.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 49px);
}

.nav {
  padding: 12px 0;
  background: var(--panel-bg);
  border-right: 1px solid var(--border);
}

.nav-group {
  margin: 12px 16px 4px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--muted);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--cyan);
}

.doc {
  padding: 28px 32px 80px;
  max-width: 52rem;
}

.doc h1 { margin-top: 0; font-size: 1.8rem; }

.doc h2 { margin-top: 1.8rem; font-size: 1.15rem; }

.doc p, .doc li { line-height: 1.5; }

.doc code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.92em;
}

.doc :not(pre) > code {
  background: var(--field);
  padding: 0 4px;
}

.doc pre {
  background: var(--field);
  border: 1px solid var(--border);
  padding: 12px 14px;
  overflow: auto;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.doc th, .doc td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.doc th { background: var(--panel-bg); }

.muted { color: var(--muted); }

@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .nav a { padding: 8px 12px; }
  .nav-group { flex-basis: 100%; margin: 8px 12px 0; }
  .doc { padding: 20px 16px 64px; }
}
