/*
 * The palette is lifted from the app itself (apps/web/src/index.css) rather than picked
 * again here, so the page and the product cannot drift apart: a near-neutral warm
 * graphite, with saturation spent only on the one accent.
 */
:root {
  --canvas: oklch(0.155 0.006 75);
  --panel: oklch(0.191 0.006 75);
  --raised: oklch(0.232 0.007 75);
  --edge: oklch(0.272 0.008 75);
  --edge-strong: oklch(0.361 0.011 75);

  --ink: oklch(0.962 0.004 75);
  --ink-dim: oklch(0.762 0.008 75);
  --ink-faint: oklch(0.634 0.009 75);

  --lime: #c6f24e;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 62ch;
  --max: 1120px;
}

/*
 * Every band is full-bleed so its rule spans the viewport, but holds a single centred
 * track. That keeps the header, hero, sections and footer on one shared left edge.
 */
.site-head,
.hero,
.band,
.site-foot {
  display: grid;
  grid-template-columns: minmax(0, var(--max));
  justify-content: center;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 1rem;
  z-index: 10;
  background: var(--raised);
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
}

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

/* ---------- header ---------- */

.site-head {
  padding: 1.25rem var(--gutter);
  border-bottom: 1px solid var(--edge);
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in oklch, var(--canvas) 88%, transparent);
  backdrop-filter: blur(12px);
}

.site-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.site-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.2s var(--ease-out-expo);
}

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

@media (max-width: 640px) {
  .site-nav a:not(.nav-repo) {
    display: none;
  }
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(3.5rem, 11vw, 8rem) var(--gutter) clamp(3rem, 7vw, 5rem);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 7.5vw, 5rem);
  line-height: 1.03;
  font-weight: 600;
}

.lede {
  margin-top: 1.5rem;
  /* Wider than body measure so it sits under the headline rather than in its shadow. */
  max-width: 40rem;
  font-size: clamp(1rem, 1.6vw, 1.175rem);
  color: var(--ink-dim);
}

/* ---------- call to action ---------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 2.5rem;
}

.cta {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--lime);
  color: #14170c;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  transition:
    transform 0.25s var(--ease-out-expo),
    filter 0.25s var(--ease-out-expo);
}

.cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.cta-label {
  font-size: 1rem;
  line-height: 1.2;
}

.cta-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.72;
}

.cta-ghost {
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--edge-strong);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink-dim);
  font-size: 0.9rem;
  transition:
    border-color 0.2s var(--ease-out-expo),
    color 0.2s var(--ease-out-expo);
}

.cta-ghost:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
}

.fineprint {
  margin-top: 1.25rem;
  max-width: 54ch;
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

/* ---------- flow strip ---------- */

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 3.5rem 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

.flow li + li::before {
  content: '→';
  margin-right: 0.75rem;
  color: var(--edge-strong);
}

.flow .flow-out {
  color: var(--lime);
}

/* ---------- bands ---------- */

.band {
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter);
  border-top: 1px solid var(--edge);
}

.band h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 600;
  max-width: 20ch;
}

.band-lede {
  margin-top: 1rem;
  max-width: var(--measure);
  color: var(--ink-dim);
}

.band-note {
  margin-top: 2rem;
  max-width: var(--measure);
  font-size: 0.875rem;
  color: var(--ink-faint);
}

.band-note code,
.band article code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--raised);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  color: var(--ink-dim);
}

.band-note a {
  color: var(--lime);
  text-underline-offset: 3px;
}

/* ---------- screenshots and clips ---------- */

.media {
  margin: 2.5rem 0 0;
}

/*
 * Screenshots are of a dark app on a dark page, so the frame is what separates them
 * from the band behind. Height is declared on every element to hold layout while the
 * file loads.
 */
.media-frame {
  display: block;
  width: 100%;
  height: auto;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 8px;
}

.media figcaption {
  margin-top: 0.85rem;
  max-width: var(--measure);
  font-size: 0.875rem;
  color: var(--ink-faint);
}

.media figcaption strong {
  color: var(--ink-dim);
  font-weight: 600;
}

.shots {
  display: grid;
  gap: 2.5rem;
  margin-top: 3rem;
}

@media (min-width: 900px) {
  .shots {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 2rem;
  }

  .shots .media {
    margin: 0;
  }
}

/*
 * Each pacing mode keeps a slot for a render of the same round. The slot sits at the
 * bottom of its card so the three line up however long the descriptions run.
 */
.modes article {
  display: flex;
  flex-direction: column;
}

.slot {
  margin-top: auto;
  padding-top: 1.25rem;
}

.slot video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--canvas);
  border: 1px solid var(--edge);
  border-radius: 6px;
}

.grid-3,
.grid-2,
.modes {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* The default mode carries the most explanation, so it gets the wider cell. */
.modes {
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .modes {
    grid-template-columns: 1fr 1fr 1.4fr;
  }
}

.band article {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 1.5rem;
}

.band article h3 {
  font-size: 1rem;
  font-weight: 600;
}

.band article p {
  margin-top: 0.6rem;
  font-size: 0.9375rem;
  color: var(--ink-dim);
}

.band article ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.9375rem;
  color: var(--ink-dim);
}

.band article li + li {
  margin-top: 0.35rem;
}

.band article a {
  color: var(--lime);
  text-underline-offset: 3px;
}

.is-default {
  border-color: color-mix(in oklch, var(--lime) 40%, var(--edge));
}

.tag {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
}

/* ---------- releases ---------- */

.releases {
  margin-top: 2.5rem;
  display: grid;
  gap: 1rem;
}

.release {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 1.5rem;
}

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
}

.release-version {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--lime);
}

.release-date,
.release-size {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.release-pre {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--edge-strong);
  border-radius: 3px;
  padding: 0.1em 0.45em;
}

.release-body {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--ink-dim);
  max-width: var(--measure);
}

.release-body h4 {
  margin: 1.1rem 0 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

.release-body h4:first-child {
  margin-top: 0;
}

.release-body ul {
  margin: 0;
  padding-left: 1.1rem;
}

.release-body li + li {
  margin-top: 0.35rem;
}

.release-body code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--raised);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.release-body hr {
  border: 0;
  border-top: 1px solid var(--edge);
  margin: 1.25rem 0;
}

.release-download {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--lime);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklch, var(--lime) 35%, transparent);
}

.release-download:hover {
  border-bottom-color: var(--lime);
}

/* ---------- footer ---------- */

.site-foot {
  padding: clamp(2.5rem, 5vw, 4rem) var(--gutter);
  border-top: 1px solid var(--edge);
  font-size: 0.8125rem;
  color: var(--ink-dim);
  gap: 0.4rem;
}

/* ---------- motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.6s var(--ease-out-expo),
    transform 0.6s var(--ease-out-expo);
}

.reveal.shown {
  opacity: 1;
  transform: none;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cta:hover {
    transform: none;
  }
}
