/* Hueproof launch site. Tokens are the brief's; the --sp-* colours are content, never chrome. */
:root {
  color-scheme: light dark;

  /* Light */
  --paper: #f4f1ea;
  --paper-raised: #fbfaf6;
  --paper-sunken: #ebe7dd;
  --ink: #16171d;
  --ink-soft: #4a4d57;
  --line: #d9d4c7;
  --line-strong: #8a8f9a;
  --accent: #3d40c2;
  --accent-hover: #2f32a3;
  --on-accent: #ffffff;
  --pass: #1b6b3a;
  --fail: #b42318;
  --focus: #3d40c2;

  /* The starter palette, used only as content */
  --sp-ink: #1b1f3b;
  --sp-paper: #fafaf7;
  --sp-brand: #4f46e5;
  --sp-accent: #f59e0b;
  --sp-muted: #6b7280;

  --shadow: 0 1px 2px rgb(22 23 29 / 0.06), 0 12px 32px -12px rgb(22 23 29 / 0.18);
  --shadow-lift: 0 2px 4px rgb(22 23 29 / 0.08), 0 18px 40px -14px rgb(22 23 29 / 0.26);

  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --section-gap: clamp(5rem, 3rem + 8vw, 9rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121318;
    --paper-raised: #1b1d24;
    --paper-sunken: #0d0e12;
    --ink: #ece8df;
    --ink-soft: #a6abb8;
    --line: #2c2e37;
    --line-strong: #6b7080;
    --accent: #a5a8ff;
    --accent-hover: #c0c2ff;
    --on-accent: #121318;
    --pass: #6dd394;
    --fail: #ff8f85;
    --focus: #a5a8ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.6);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.35), 0 18px 40px -14px rgb(0 0 0 / 0.75);
  }
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
pre {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5.25rem);
  line-height: 1.02;
}

h2 {
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3.25rem);
  line-height: 1.08;
}

h1 em,
h2 em {
  font-style: italic;
}

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.35;
}

p {
  max-width: 62ch;
}

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

a:hover {
  color: var(--accent-hover);
}

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

main:focus {
  outline: none;
}

.mono,
code,
pre,
kbd {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: calc(72rem + 2 * 1.25rem);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 720px) {
  .wrap {
    max-width: calc(72rem + 2 * 2rem);
    padding-inline: 2rem;
  }
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.intro {
  max-width: 56ch;
  margin-top: 1.25rem;
  color: var(--ink-soft);
}

section[id] {
  scroll-margin-top: 64px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.skip-link:hover {
  color: var(--on-accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--on-accent);
  transition: background-color 160ms var(--ease);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: var(--on-accent);
}

.btn-primary .arrow {
  display: inline-block;
  transition: transform 160ms var(--ease);
}

.btn-primary:hover .arrow {
  transform: translateX(3px);
}

.btn-secondary {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn-secondary:hover {
  color: var(--ink);
  background-color: var(--paper-raised);
}

.btn-small {
  min-height: 44px;
  padding: 0 18px;
  font-size: 0.9375rem;
}

.btn-large {
  min-height: 56px;
  padding: 0 26px;
  font-size: 1.0625rem;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-soft);
  font: 500 0.875rem var(--font-body);
  cursor: pointer;
}

.text-btn:hover {
  color: var(--ink);
}

/* 0. Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.mark {
  flex: none;
  display: block;
  color: var(--ink);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: none;
}

@media (min-width: 720px) {
  .nav-links {
    display: flex;
    gap: 0.25rem;
    margin-right: 0.5rem;
  }
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--accent);
}

/* 1. Hero */
.hero {
  padding-top: clamp(3rem, 2rem + 6vw, 7rem);
}

.hero-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 5fr 7fr;
    align-items: start;
    gap: 3.5rem;
  }
}

.hero-sub {
  max-width: 34ch;
  margin-top: 1.5rem;
  font-size: 1.1875rem;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}

.facts {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.matrix-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-raised);
  box-shadow: var(--shadow);
}

.matrix {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 4px;
  margin: -4px;
  width: calc(100% + 8px);
}

.matrix caption {
  padding: 0 4px 12px;
  text-align: left;
}

.caption-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.caption-title {
  font-weight: 600;
  font-size: 0.9375rem;
}

.caption-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.matrix th {
  padding: 4px 2px;
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.25;
  vertical-align: middle;
}

.matrix thead th {
  text-align: center;
}

.matrix tbody th {
  text-align: left;
}

.matrix .corner {
  width: 6.25rem;
}

.matrix th .sw {
  display: block;
  width: 20px;
  height: 20px;
  margin: 0 auto 4px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
}

.matrix tbody th .sw {
  margin: 0 0 4px;
}

.h-name {
  display: block;
}

.h-hex {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.matrix td {
  padding: 0;
}

.cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 76px;
  border-radius: 8px;
  text-align: center;
  line-height: 1.2;
}

.cell .aa {
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.1;
}

.cell .ratio {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
}

.cell .grade {
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cell {
  box-shadow: inset 0 0 0 1px var(--line);
}

.cell.fail {
  box-shadow: inset 0 0 0 2px var(--fail);
}

.cell.same {
  border: 1px dashed var(--line);
  background: var(--paper-sunken);
  color: var(--ink-soft);
  font-size: 0.6875rem;
  padding: 0 4px;
}

/* The fixed cell: both grade labels share one grid area and cross-fade. */
.grade-swap {
  display: grid;
}

.grade-swap > span {
  grid-area: 1 / 1;
}

.grade-after {
  opacity: 0;
}

.fix-cell {
  transition:
    color 600ms var(--ease),
    box-shadow 300ms var(--ease);
}

.fix-cell::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid var(--accent);
  border-radius: 11px;
  opacity: 0;
  pointer-events: none;
}

.fix-cell.is-ringed::after {
  animation: ring-pulse 900ms var(--ease) forwards;
}

.fix-cell.is-fixed {
  box-shadow: inset 0 0 0 1px var(--line);
}

.fix-cell.is-fixed .grade-before {
  opacity: 0;
  transition: opacity 250ms var(--ease);
}

.fix-cell.is-fixed .grade-after {
  opacity: 1;
  transition: opacity 250ms var(--ease);
}

@keyframes ring-pulse {
  0% {
    opacity: 0;
    transform: scale(1.08);
  }
  35% {
    opacity: 1;
    transform: scale(1);
  }
  70% {
    opacity: 1;
    transform: scale(1.04);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.fix-chip {
  display: inline-flex;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
  box-shadow: var(--shadow);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.fix-chip .mono {
  font-weight: 500;
}

.chip-anim {
  display: none;
  flex-direction: column;
}

.chip-note {
  color: var(--ink-soft);
}

/* With motion, the chip waits for the signature moment and shows the short form. */
.motion .chip-static {
  display: none;
}

.motion .chip-anim {
  display: flex;
}

.motion .fix-chip {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 400ms var(--ease),
    transform 400ms var(--ease);
}

.motion .fix-chip.is-shown {
  opacity: 1;
  transform: none;
}

/* Cells rest fully visible; only the animation's backwards fill hides them
   during their delay. Once main.js marks the intro done, the animation is
   dropped, so a cell that comes back from display: none (phone to desktop)
   shows at once instead of replaying from opacity 0. */
.motion .matrix .cell {
  animation: cell-in 380ms var(--ease) backwards;
  animation-delay: calc(var(--d) * 40ms);
}

.motion .matrix.is-settled .cell {
  animation: none;
}

@keyframes cell-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

/* Phone: Paper and Ink columns only, with all five rows. */
@media (max-width: 599px) {
  .matrix .col-extra {
    display: none;
  }

  .matrix .corner {
    width: 5.5rem;
  }

  .cell {
    height: 64px;
  }

  .matrix-card {
    padding: 14px;
  }
}

/* Sections */
.section {
  margin-top: var(--section-gap);
}

.band {
  padding-block: var(--section-gap);
  background: var(--paper-sunken);
}

/* Reveals (only when main.js turns motion on) */
.motion .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 600ms var(--ease),
    transform 600ms var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}

.motion .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* 2. How it works */
.steps {
  display: grid;
  gap: 3rem;
  margin-top: 3rem;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.step {
  display: flex;
  flex-direction: column;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.step h3 {
  margin-top: 0.5rem;
}

.step > p {
  margin-top: 0.5rem;
  color: var(--ink-soft);
}

.visual {
  min-height: 140px;
  margin-top: auto;
  padding-top: 1.5rem;
}

.palette-visual ul {
  display: grid;
  gap: 0.5rem;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
}

.palette-visual li {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  column-gap: 0.75rem;
  font-size: 0.9375rem;
}

.sw-36 {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.palette-visual li:not(:first-child) .sw-36 {
  grid-row: auto;
}

.pv-name {
  font-weight: 500;
}

.pv-hex {
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.pill {
  grid-column: 2 / -1;
  justify-self: start;
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.mini {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
  align-items: center;
}

.mini-h {
  padding: 0 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
}

.mini-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 56px;
  border-radius: 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.3;
}

.mini-cell b {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: none;
}

.mini-cell.same {
  border: 1px dashed var(--line);
  background: var(--paper-sunken);
  color: var(--ink-soft);
  font-weight: 400;
  text-transform: none;
}

.code {
  overflow-x: auto;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ink);
}

.code .prop {
  color: var(--accent);
}

/* 3. Features */
.feature-large {
  display: grid;
  gap: 2.5rem;
  margin-top: 3rem;
}

@media (min-width: 900px) {
  .feature-large {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
  }
}

.feature-copy h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.feature-copy p {
  margin-top: 1rem;
  color: var(--ink-soft);
}

.rail {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
  box-shadow: var(--shadow);
}

.rail-pins {
  position: relative;
  padding-top: 64px;
  overflow-x: clip;
}

.rail-bar {
  height: 56px;
  border-radius: 10px;
  background: linear-gradient(
    to right,
    hsl(37.7 92.1% 0%),
    hsl(37.7 92.1% 50%),
    hsl(37.7 92.1% 100%)
  );
}

/* A pin is a 2px line from its 22px head down through the bar. */
.pin {
  position: absolute;
  top: 26px;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
}

.pin::before {
  content: "";
  position: absolute;
  top: 11px;
  bottom: 0;
  left: -1px;
  width: 2px;
  background: var(--ink);
}

.pin-head {
  position: absolute;
  top: 0;
  left: -11px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px var(--paper-raised),
    0 0 0 3px var(--ink);
}

.pin-label {
  position: absolute;
  top: -24px;
  font-size: 0.75rem;
  white-space: nowrap;
  color: var(--ink);
}

.pin-a {
  left: 50.2%;
}

.pin-a .pin-label {
  left: -4px;
}

/* Pin B's track is as wide as the rail, so translateX(%) moves it in rail percentages. */
.pin-b-track {
  position: absolute;
  inset: 26px 0 0 0;
  transform: translateX(32.9%);
  pointer-events: none;
}

.pin-b-track .pin {
  top: 0;
  left: 0;
}

.pin-b .pin-label {
  right: -4px;
}

.motion .pin-b-track {
  transform: translateX(50.2%);
}

.motion .pin-b .pin-label {
  opacity: 0;
}

.motion .rail.is-in .pin-b-track {
  transform: translateX(32.9%);
  transition: transform 900ms var(--ease);
}

.motion .rail.is-in .pin-b .pin-label {
  opacity: 1;
  transition: opacity 250ms var(--ease) 900ms;
}

.rail-zones {
  display: grid;
  grid-template-columns: 32.9% 1fr;
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 500;
}

.zone {
  padding-top: 6px;
}

.zone-pass {
  border-top: 3px solid var(--pass);
  color: var(--pass);
  white-space: nowrap;
}

.zone-fail {
  margin-top: 1px;
  border-top: 1px dashed var(--fail);
  color: var(--fail);
  padding-left: 6px;
  padding-top: 8px;
}

.rail-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.rail-legend {
  display: none;
  gap: 0.375rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
}

.rail-legend li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-sw {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

/* On narrow rails the pin labels would collide, so they move into a legend under the rail. */
@media (max-width: 599px) {
  .rail {
    padding: 18px;
  }

  .rail-pins {
    padding-top: 36px;
  }

  .pin {
    top: 0;
  }

  .pin-b-track {
    top: 0;
  }

  .pin-label {
    display: none;
  }

  .rail-legend {
    display: grid;
  }

  /* The pass zone is a third of the rail: keep its label on one line. */
  .zone-long {
    display: none;
  }
}

.sample-tile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 14px 16px;
  border-radius: 8px;
  background: #fafaf7;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 16px;
  font-weight: 500;
}

.sample-hex {
  display: none;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-soft);
}

/* Two columns would break "Readable at 16 px." in half, so the samples
   stack, each named by its hex so they still read as before and after. */
@media (max-width: 599px) {
  .sample-tile {
    grid-template-columns: 1fr;
  }

  .sample-hex {
    display: block;
  }
}

/* 3b. Bento */
.bento {
  display: grid;
  gap: 1rem;
  margin-top: 4rem;
}

@media (min-width: 720px) {
  .bento {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

.bento > li {
  display: flex;
}

.bento-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
  box-shadow: var(--shadow);
}

.bento-card > p:not(.keys) {
  margin: 0.5rem 0 1.25rem;
  color: var(--ink-soft);
}

.bento-card > :last-child {
  margin-top: auto;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .bento-card {
    transition:
      transform 200ms var(--ease),
      box-shadow 200ms var(--ease);
  }

  .bento-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
  }
}

.checks {
  display: grid;
  gap: 0;
  font-size: 0.875rem;
}

.checks > div {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--line);
}

.checks > div:last-child {
  border-bottom: 0;
}

.checks-head {
  font-weight: 600;
}

.checks dd {
  font-weight: 600;
}

.checks .pass {
  color: var(--pass);
}

.checks .fail {
  color: var(--fail);
}

.fox {
  display: grid;
  gap: 0.25rem;
  padding: 14px 16px;
  border-radius: 8px;
  background: #fafaf7;
  color: #6b7280;
  box-shadow: inset 0 0 0 1px var(--line);
  line-height: 1.3;
}

.fox-16 {
  font-size: 16px;
}

.fox-24 {
  font-size: 24px;
}

.keys {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.5rem;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.8125rem;
}

.themes {
  display: flex;
  gap: 0.75rem;
}

.theme {
  position: relative;
  width: 48px;
  height: 32px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.theme .dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
}

.theme-light {
  background: #f4f1ea;
}

.theme-light .dot {
  background: #3d40c2;
}

.theme-dark {
  background: #121318;
}

.theme-dark .dot {
  background: #a5a8ff;
}

/* 4. Try it */
.tabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 2rem;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-raised);
}

.tabs button {
  min-height: 44px;
  min-width: 44px;
  padding: 0 1.125rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 500 0.9375rem var(--font-body);
  cursor: pointer;
  transition:
    background-color 160ms var(--ease),
    color 160ms var(--ease);
}

.tabs button:hover {
  background-color: var(--paper-sunken);
}

.tabs button[aria-pressed="true"] {
  background-color: var(--accent);
  color: var(--on-accent);
}

.device {
  margin-top: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper-raised);
  box-shadow: var(--shadow);
}

.tabs[hidden] + .device {
  margin-top: 2rem;
}

.device-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
}

.dots {
  position: absolute;
  left: 14px;
  display: flex;
  gap: 6px;
}

.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.address {
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.device iframe {
  display: block;
  width: 100%;
  /* Under 720 px the frame stays shorter than the screen, so a thumb on the
     app can still find page above or below it to scroll. */
  height: 600px;
  height: min(600px, 70svh);
  border: 0;
  background: var(--paper);
}

@media (min-width: 720px) {
  .device iframe {
    height: min(820px, 80vh);
  }
}

.try-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1rem;
  max-width: none;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.inline-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
}

/* 5. Closing */
.closing {
  margin-top: var(--section-gap);
  padding-block: 9rem;
  text-align: center;
}

.closing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closing-inner p {
  margin-top: 1rem;
  color: var(--ink-soft);
}

.closing .btn {
  margin-top: 2rem;
}

.swatch-row {
  display: flex;
  gap: 6px;
  margin-bottom: 2rem;
}

.swatch-row span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px var(--line),
    0 0 0 3px var(--paper);
}

/* Overlapped by 10px: each neighbour sits 16px closer than at its 6px resting gap. */
.motion .swatch-row span {
  transform: translateX(calc(var(--n) * 16px));
  transition: transform 500ms var(--ease);
}

.motion .swatch-row.is-in span {
  transform: none;
}

/* 6. Footer */
.site-footer {
  padding-block: 32px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  gap: 1rem 2rem;
  align-items: center;
}

@media (min-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.9375rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: 6px;
  font-weight: 500;
}

.footer-credit {
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

/* Reduced motion: everything is instant, whatever main.js does. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
