/* Fastlight site. Tokens from assets/brand/BRAND.md. */
:root {
  --graphite-950: #15161B; --graphite-900: #1E1F25; --graphite-800: #2A2B33; --graphite-700: #34353F;
  --graphite-500: #5C5E6B; --graphite-300: #A3A5B3; --paper: #FAFAFB; --fog: #F5F3EE;
  --comet-orange: #FF9A3D; --comet-pink: #FF5C9A; --comet-violet: #7B5CFF; --comet-lavender: #A88BFF;
  --spark: #FFC81A; --spark-deep: #F5A300;
  --comet: linear-gradient(135deg, #FF9A3D 0%, #FF5C9A 50%, #7B5CFF 100%);
  --comet-dark: linear-gradient(135deg, #FF9A3D 0%, #FF5C9A 50%, #A88BFF 100%);

  /* Light page (default) */
  --bg: var(--paper);
  --surface: #FFFFFF;
  --border: #E7E7EC;
  --text: var(--graphite-900);
  --text-2: var(--graphite-500);
  --link: #6A3DF0;
  --accent: #C21E63;
  --warm: #B24A00;
  --code-bg: #F1F1F4;
  --focus: #7B5CFF;
  --kbd-bg: #FFFFFF;
  --kbd-edge: #D6D6DE;
  --shadow: 0 1px 2px rgb(30 31 37 / .06), 0 12px 32px -12px rgb(30 31 37 / .18);

  --font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: 16px;
  --max: 1200px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--graphite-950);
    --surface: var(--graphite-900);
    --border: var(--graphite-700);
    --text: var(--fog);
    --text-2: var(--graphite-300);
    --link: var(--comet-lavender);
    --accent: var(--comet-pink);
    --warm: var(--comet-orange);
    --code-bg: #1A1B21;
    --focus: var(--comet-lavender);
    --kbd-bg: var(--graphite-800);
    --kbd-edge: #101116;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 16px 40px -16px rgb(0 0 0 / .6);
  }
}

@media (min-width: 720px) { :root { --gutter: 32px; } }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (min-width: 720px) { body { font-size: 1.125rem; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
code {
  font-family: var(--font-mono); font-size: .86em; font-weight: 400;
  background: var(--code-bg); padding: .12em .38em; border-radius: 6px;
  white-space: nowrap; font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0;
}
kbd {
  display: inline-block; min-width: 1.9em; padding: .08em .45em .12em;
  font: 500 .82em/1.5 var(--font-mono); text-align: center;
  color: var(--text); background: var(--kbd-bg);
  border: 1px solid var(--kbd-edge); border-bottom-width: 2px; border-radius: 6px;
  white-space: nowrap; vertical-align: .08em;
}
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--fog); color: var(--graphite-950); padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 16px; }

/* Dark bands (hero, closer): always graphite, per brand. */
.site-header, .hero-band, .closer, .site-footer {
  --text: var(--fog); --text-2: var(--graphite-300); --link: var(--comet-lavender);
  --focus: var(--comet-lavender); --code-bg: rgb(255 255 255 / .08);
  --kbd-bg: var(--graphite-800); --kbd-edge: #0D0E12;
  color: var(--text);
  color-scheme: dark;
}

/* Header */
.site-header { position: absolute; inset: 0 0 auto; z-index: 2; }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.brand { display: inline-flex; border-radius: 8px; }
.brand img { height: 32px; width: auto; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav ul { display: none; list-style: none; margin: 0; padding: 0; gap: 4px; }
.nav a { color: var(--text-2); text-decoration: none; font-size: .9375rem; font-weight: 500; padding: 8px 12px; border-radius: 999px; transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--text); background: rgb(255 255 255 / .06); }
.nav-gh { display: inline-flex; align-items: center; gap: 8px; color: var(--text) !important; border: 1px solid rgb(255 255 255 / .14); }
@media (min-width: 760px) { .nav ul { display: flex; } }

/* Hero */
.hero-band {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--graphite-950);
}
.hero-band::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: 0;
  background:
    radial-gradient(60% 50% at 62% 62%, rgb(255 92 154 / .30), rgb(123 92 255 / .14) 45%, transparent 75%),
    radial-gradient(40% 30% at 20% 10%, rgb(255 154 61 / .10), transparent 70%);
}
.hero { padding-top: 104px; padding-bottom: 0; }
@media (min-width: 720px) { .hero { padding-top: 136px; } }
.hero-copy { display: grid; gap: 28px; }
.hero h1 {
  font-weight: 700; font-size: clamp(2.5rem, 1.6rem + 3.6vw, 3.6875rem);
  letter-spacing: -0.025em; line-height: 1.06; max-width: 15ch;
}
.lede { color: var(--text-2); font-size: 1.125rem; max-width: 34em; }
.lede kbd { color: var(--fog); }
@media (min-width: 720px) { .lede { font-size: 1.1875rem; } }
.hero-side { display: grid; gap: 24px; align-content: end; }
@media (min-width: 1000px) {
  .hero-copy { grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: end; }
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.fineprint { color: var(--text-2); font-size: .875rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 14px;
  font: 600 1.0625rem/1 var(--font-body); text-decoration: none;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background-color .2s, border-color .2s;
}
.btn-comet {
  color: var(--graphite-950); background: var(--comet-dark);
  box-shadow: 0 1px 0 rgb(255 255 255 / .35) inset, 0 10px 28px -10px rgb(255 92 154 / .65);
}
.btn-comet:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgb(255 255 255 / .35) inset, 0 16px 34px -12px rgb(255 92 154 / .8); text-decoration: none; }
.btn-comet:active { transform: translateY(0); }
.btn-ghost { color: var(--fog); border: 1px solid rgb(255 255 255 / .18); background: rgb(255 255 255 / .03); }
.btn-ghost:hover { border-color: rgb(255 255 255 / .34); background: rgb(255 255 255 / .07); }
.btn:focus-visible { border-radius: 14px; outline-offset: 3px; }
@media (max-width: 479px) { .hero .btn, .closer .btn { flex: 1 1 100%; } }

/* Stage: the real panel */
.stage { margin: 48px 0 0; }
@media (min-width: 720px) { .stage { margin-top: 64px; } }
.stage-frame {
  position: relative; display: grid;
  border-radius: 18px; overflow: hidden;
  aspect-ratio: 1536 / 900;
  background: #241E3A;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 30px 80px -30px rgb(0 0 0 / .8), 0 50px 120px -60px rgb(255 92 154 / .45);
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}
@media (min-width: 720px) { .stage-frame { border-radius: 24px; } }
.shot {
  grid-area: 1 / 1; display: block; min-width: 0;
  opacity: 0; transform: scale(1.012); filter: blur(6px);
  transition: opacity .7s var(--ease-out), transform .9s var(--ease-out), filter .7s var(--ease-out);
}
.shot.is-active { opacity: 1; transform: none; filter: none; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 599px) { .stage-frame { aspect-ratio: 1; } }
.nowrap { white-space: nowrap; }
.stage-caption {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 16px;
  margin-top: 20px; padding-bottom: 64px; text-align: center;
}
@media (min-width: 720px) { .stage-caption { padding-bottom: 80px; } }
.stage-label { font-size: .875rem; color: var(--text-2); }
.stage-note { flex-basis: 100%; font-size: .8125rem; color: var(--text-2); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips[hidden] { display: none; }
.chip {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: baseline; gap: 10px;
  padding: 10px 16px; border-radius: 999px; cursor: pointer;
  font: 500 .875rem/1.2 var(--font-body); color: var(--text-2);
  background: rgb(30 31 37 / .7); border: 1px solid rgb(255 255 255 / .1);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: color .2s, border-color .2s, background-color .2s;
}
.chip code { background: none; padding: 0; color: var(--fog); font-size: .9375rem; }
.chip span { font-size: .8125rem; }
.chip:hover { border-color: rgb(255 255 255 / .24); color: var(--fog); }
.chip[aria-pressed="true"] { border-color: rgb(255 154 61 / .55); color: var(--fog); background: rgb(42 43 51 / .85); }
.chip::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--comet-dark); transform: scaleX(0); transform-origin: left;
}
.chip[aria-pressed="true"].is-timing::after { animation: chip-progress var(--cycle, 5s) linear forwards; }
@keyframes chip-progress { to { transform: scaleX(1); } }
@media (max-width: 479px) { .chip span { display: none; } }

/* Page sections */
.section { padding-block: 80px; }
@media (min-width: 720px) { .section { padding-block: 120px; } }
.section + .section { border-top: 1px solid var(--border); }
.section h2 { font-size: clamp(1.875rem, 1.4rem + 1.8vw, 2.3125rem); letter-spacing: -0.02em; }
.section h3 { font-size: 1.1875rem; letter-spacing: -0.01em; }
.intro, .copy > p { color: var(--text-2); max-width: 38em; }
.copy { display: grid; gap: 20px; align-content: start; }

.split { display: grid; gap: 32px; }
@media (min-width: 960px) {
  .split-head { grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; }
  .split-media { grid-template-columns: 5fr 6fr; gap: 64px; align-items: center; }
  .split-ref { grid-template-columns: 6fr 5fr; gap: 64px; align-items: start; }
  .split-keys { grid-template-columns: 5fr 6fr; gap: 64px; align-items: start; }
  .split-faq { grid-template-columns: 4fr 8fr; gap: 64px; align-items: start; }
}

/* Speed */
.bench { margin-top: 56px; }
.bench table { width: 100%; border-collapse: collapse; }
.bench caption { caption-side: bottom; text-align: left; padding-top: 16px; font-size: .875rem; color: var(--text-2); }
.bench th, .bench td { padding: 18px 0; border-bottom: 1px solid var(--border); vertical-align: baseline; }
.bench tr:first-child th, .bench tr:first-child td { border-top: 1px solid var(--border); }
.bench th { text-align: left; font-weight: 400; color: var(--text-2); padding-right: 16px; }
.bench td { text-align: right; font: 500 1rem/1 var(--font-mono); color: var(--text-2); white-space: nowrap; }
.bench .num { font: 600 clamp(1.75rem, 1.2rem + 2.2vw, 2.875rem)/1 var(--font-display); letter-spacing: -0.03em; color: var(--text); margin-right: .12em; }
.bench tr:first-child .num { color: var(--warm); }
.bench-note { margin-top: 4px; font-size: .875rem; color: var(--text-2); }

.traits { display: grid; gap: 32px; margin: 64px 0 0; }
@media (min-width: 760px) { .traits { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.traits dt { font: 600 1.1875rem/1.3 var(--font-display); margin-bottom: 8px; }
.traits dd { margin: 0; color: var(--text-2); }
.traits dt::before {
  content: ""; display: block; width: 14px; height: 14px; margin-bottom: 16px;
  background: var(--spark-deep);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}
@media (prefers-color-scheme: dark) { .traits dt::before { background: var(--spark); } }

/* Shots in the page */
.shot-card { margin: 0; }
.shot-card img { border-radius: 16px; box-shadow: var(--shadow); width: 100%; }
.shot-card figcaption { margin-top: 14px; font-size: .875rem; color: var(--text-2); }
.shot-wide { margin-top: 56px; }

.sections-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 16px; }
.sections-list li { padding-left: 22px; position: relative; color: var(--text-2); }
.sections-list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.sections-list strong { color: var(--text); font-weight: 600; }
.sections-list code { white-space: normal; }

/* Queries */
.queries { list-style: none; margin: 56px 0 72px; padding: 0; display: grid; gap: 16px; }
.queries li { display: grid; gap: 10px 32px; align-items: center; }
@media (min-width: 860px) { .queries li { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.field {
  display: flex; align-items: center; gap: 14px; min-width: 0;
  padding: 16px 22px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  color: var(--text-2);
}
.field svg { flex: none; }
.field code {
  background: none; padding: 0; font-size: clamp(1rem, .9rem + .6vw, 1.3125rem); color: var(--text);
  white-space: normal; overflow-wrap: anywhere;
}
.field b { font-weight: 500; color: var(--accent); }
.means { color: var(--text-2); padding-left: 22px; }
@media (min-width: 860px) { .means { padding-left: 0; } }

.ref h3 { margin-bottom: 12px; }
.ref h3 + .ref-list { margin-bottom: 32px; }
.ref-list { margin: 0; display: grid; }
.ref-list > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
.ref-list > div:first-child { border-top: 1px solid var(--border); }
.ref-list dt code { background: none; padding: 0; color: var(--accent); font-weight: 500; font-size: .9375rem; }
.ref-list dd { margin: 0; color: var(--text-2); }

/* Keys */
.keys { width: 100%; border-collapse: collapse; font-size: 1rem; }
.keys th { text-align: left; font: 500 .8125rem/1 var(--font-body); color: var(--text-2); padding: 0 0 12px; border-bottom: 1px solid var(--border); }
.keys td { padding: 14px 0; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
.keys td:first-child { white-space: nowrap; padding-right: 24px; width: 1%; }
.keys td:first-child kbd + kbd { margin-left: 4px; }
.keys .or { color: var(--text-2); margin: 0 4px; }
.keys tr:first-child td:first-child kbd { border-color: var(--comet-orange); }

/* Install */
.steps { list-style: none; counter-reset: step; margin: 56px 0 0; padding: 0; display: grid; gap: 40px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); gap: 48px 48px; } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 40px; } }
.steps li { counter-increment: step; display: grid; gap: 10px; align-content: start; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 6px;
  font: 600 1rem/1 var(--font-display); color: var(--text);
  border: 1px solid var(--border); border-radius: 50%; background: var(--surface);
}
.steps li:last-child::before { border-color: var(--warm); color: var(--warm); }
.steps p { color: var(--text-2); font-size: 1rem; }
.steps code { white-space: normal; overflow-wrap: anywhere; }

/* FAQ */
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 0; font: 600 1.125rem/1.35 var(--font-display); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2);
  transform: translateY(-3px) rotate(45deg); transition: transform .3s var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq summary:hover { color: var(--link); }
.faq details p { color: var(--text-2); padding-bottom: 22px; max-width: 40em; }
.faq details p + p { margin-top: -8px; }
.faq code { white-space: normal; }

/* Closer */
.closer { position: relative; isolation: isolate; overflow: hidden; background: var(--graphite-950); text-align: center; }
.closer::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(50% 60% at 50% 30%, rgb(255 92 154 / .28), rgb(123 92 255 / .12) 45%, transparent 75%);
}
.closer-inner { display: grid; justify-items: center; gap: 28px; padding-block: 96px; }
@media (min-width: 720px) { .closer-inner { padding-block: 128px; } }
.closer-icon { width: 112px; height: 112px; filter: drop-shadow(0 18px 30px rgb(0 0 0 / .45)); }
.closer h2 { font-weight: 700; font-size: clamp(2rem, 1.3rem + 2.8vw, 3.6875rem); letter-spacing: -0.025em; }
.closer h2 kbd { font-size: .62em; vertical-align: .22em; padding: .1em .5em .16em; border-radius: 10px; color: var(--fog); }
.closer .cta-row { justify-content: center; }
.credits { color: var(--text-2); max-width: 36em; font-size: 1rem; margin-top: 12px; }

/* Footer */
.site-footer { background: var(--graphite-950); border-top: 1px solid var(--graphite-800); }
.footer-inner { display: grid; gap: 20px; padding-block: 40px; align-items: center; }
@media (min-width: 860px) { .footer-inner { grid-template-columns: auto 1fr auto; gap: 32px; } }
.footer-mark { width: 34px; height: auto; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: var(--text); text-decoration: none; font-size: .9375rem; }
.site-footer a:hover { color: var(--link); text-decoration: underline; }
.disclaimer { color: var(--text-2); font-size: .8125rem; max-width: 40em; }
@media (min-width: 860px) { .disclaimer { text-align: right; max-width: 30em; } }

/* Extensions: manifest example */
.copy { min-width: 0; }
.copy pre {
  margin: 0; max-width: 100%; overflow-x: auto; padding: 16px 18px; border-radius: 12px;
  background: var(--code-bg); border: 1px solid var(--border);
  font: 400 .875rem/1.6 var(--font-mono); color: var(--text);
}
.copy pre code { background: none; padding: 0; font: inherit; white-space: pre; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .shot { filter: none; transform: none; }
}
.shot-stack { display: grid; gap: 28px; min-width: 0; }
