/* Palette is lifted from the hero composition (design/hero.html) so the page
   and the video read as one system. The video vignettes to --bg at its edges,
   which is what lets a square clip sit on the page without a visible box. */

:root {
  --bg: #161826;
  --surf: #232532;
  --text: #e9e9ed;
  --muted: #9397ab;
  --dim: #75798c;
  --rule: #292b31;
  --accent: #9184d9;
  --accent-lt: #d2cefd;
  --accent-dk: #5d5294;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  width: 100%;
  max-width: 36rem;
}

/* ── hero ─────────────────────────────────────────────────────────────── */

.hero {
  margin: 0 0 3rem;
  position: relative;
}

.hero-video,
.hero-still {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
}

/* The still is the reduced-motion substitute; the video is the default. */
.hero-still {
  display: none;
}

/* ── type ─────────────────────────────────────────────────────────────── */

h1 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* The cursor block reads as a terminal prompt without needing an image. */
h1::after {
  content: "_";
  color: var(--accent);
}

.tagline {
  margin: 1rem 0 0;
  max-width: 30rem;
  color: var(--muted);
  font-size: 1rem;
  text-wrap: balance;
}

.rules {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.rules li {
  padding: 0.85rem 0 0.85rem 1.6rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
  position: relative;
}

.rules li::before {
  content: "\2014"; /* em dash */
  position: absolute;
  left: 0;
  color: var(--accent);
}

code {
  font: inherit;
  color: var(--accent-lt);
}

.status {
  margin: 2.5rem 0 0;
  color: var(--dim);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── motion ───────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  main {
    animation: rise 0.5s ease-out;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(0.5rem);
    }
  }
}

/* Swap the loop for its closing frame. The page ships no JavaScript, so the
   video element is still fetched — this suppresses the motion, not the
   download. Accepted: the alternative is a script, and a script would mean
   loosening the CSP for one media query. */
@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }

  .hero-still {
    display: block;
  }
}
