/* CivicReady — civicready.app
   Tokens follow the product palette (docs/design.md) pushed onto a stage. */

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/SourceSerif4-Semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/AtkinsonHyperlegible-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --stage: #0b1526;
  --navy: #183a61;
  --beam: #7fb3ff;
  --action: #0b63ce;
  --ivory: #efe9df;
  --ivory-dim: #d6cfc3;
  --canvas: #f5f7fa;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #52606d;
  --muted-on-stage: #c5d0dc;
  --success: #176b45;
  --success-wash: #e8f5ee;
  --error: #b42318;
  --error-wash: #fdecea;
  --line: rgba(23, 32, 51, 0.1);
  --line-on-stage: rgba(239, 233, 223, 0.12);
  --shadow: 0 8px 16px rgba(24, 58, 97, 0.08);
  --shadow-lift: 0 16px 32px rgba(24, 58, 97, 0.14);
  --glow: 0 0 80px rgba(127, 179, 255, 0.18);
  --radius-card: 16px;
  --radius-control: 12px;
  --radius-pill: 999px;
  --gutter: 24px;
  --max: 1120px;
  --reading: 680px;
  --nav-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 1, 0.5, 1);
  --display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", serif;
  --body: "Atkinson Hyperlegible", "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark light;
}

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

html {
  scroll-behavior: smooth;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--stage);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0;
  text-wrap: balance;
}

:focus {
  outline: none;
}

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

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--ivory);
  color: var(--stage);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(var(--max), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--action);
}

.on-stage .eyebrow,
.stage .eyebrow {
  color: var(--beam);
}

.lede {
  margin-top: 12px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  max-width: 42rem;
}

.on-stage .lede,
.stage .lede {
  color: var(--muted-on-stage);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--stage) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-on-stage);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ivory);
  font-weight: 700;
  font-size: 17px;
  flex-shrink: 0;
}

.brand img {
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted-on-stage);
  font-size: 15px;
  font-weight: 700;
}

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

.nav .btn {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
  color: var(--stage);
}

.nav .btn:hover {
  color: var(--stage);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-on-stage);
  background: transparent;
  color: var(--ivory);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  margin-inline: auto;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -5px;
}

.nav-toggle span::after {
  top: 5px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: var(--radius-control);
  border: 1.5px solid transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-ivory {
  background: var(--ivory);
  color: var(--stage);
}

.btn-ivory:hover {
  background: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border-color: var(--line-on-stage);
}

.btn-ghost:hover {
  border-color: var(--ivory-dim);
}

.btn-action {
  background: var(--action);
  color: #fff;
}

.btn-action:hover {
  background: #0957b6;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: 204px;
  height: 56px;
  padding: 0 18px 0 16px;
  border-radius: 14px;
  background: var(--ivory);
  color: var(--stage);
  text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}

.store:hover {
  background: #fff;
}

.store:active {
  transform: scale(0.97);
}

.store:focus-visible {
  outline: 2px solid var(--beam);
  outline-offset: 3px;
}

.store-logo {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.store-ios .store-logo {
  transform: translateY(-1px);
}

.store-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  line-height: 1.05;
}

.store-kicker {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--stage) 72%, var(--ivory));
  white-space: nowrap;
}

.store-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 80px;
  color: var(--ivory);
  background:
    radial-gradient(ellipse 60% 50% at 78% 42%, rgba(127, 179, 255, 0.16), transparent 60%),
    radial-gradient(ellipse 40% 40% at 8% 90%, rgba(24, 58, 97, 0.9), transparent 70%),
    var(--stage);
}

.hero-star {
  position: absolute;
  right: -8%;
  top: 8%;
  width: min(56vw, 640px);
  opacity: 0.09;
  pointer-events: none;
  user-select: none;
  animation: star-settle 1.4s var(--ease-out) both;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
  position: relative;
}

.hero h1 {
  margin-top: 16px;
  font-size: clamp(44px, 6.4vw, 76px);
  line-height: 1.02;
  color: var(--ivory);
}

.hero .lede {
  margin-top: 20px;
  font-size: 20px;
  max-width: 36rem;
}

.hero-cta {
  margin-top: 28px;
}

.hero-note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted-on-stage);
  max-width: 32rem;
}

.hero-note a {
  color: var(--beam);
}

/* Oral loop */

.loop {
  position: relative;
  min-width: 0;
  background: color-mix(in srgb, var(--navy) 72%, #000 28%);
  border: 1px solid var(--line-on-stage);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--glow);
  animation: loop-rise 0.8s 0.15s var(--ease-out) both;
}

.loop-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--beam);
}

.loop-phase {
  color: var(--ivory-dim);
}

.qcard {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-card);
  padding: 20px 22px 20px 28px;
  position: relative;
  box-shadow: var(--shadow);
}

.qcard::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  border-radius: 16px 0 0 16px;
  background: var(--action);
  transition: background-color 200ms ease;
}

.qcard.is-listening::before {
  background: var(--success);
}

.qcard-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.qcard h3 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.wave {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 52px;
  margin: 18px 0 8px;
}

.wave span {
  width: 7px;
  flex: none;
  height: 28%;
  border-radius: 99px;
  background: color-mix(in srgb, var(--action) 32%, var(--canvas));
  transform-origin: bottom;
}

.wave span:nth-child(1) { height: 34%; }
.wave span:nth-child(2) { height: 58%; }
.wave span:nth-child(3) {
  height: 92%;
  background: var(--beam);
}
.wave span:nth-child(4) { height: 48%; }
.wave span:nth-child(5) { height: 38%; }

.loop.is-hearing .wave span {
  animation: bar 0.9s ease-in-out infinite;
}

.loop.is-hearing .wave span:nth-child(1) {
  animation-delay: 0s;
  animation-duration: 0.82s;
}

.loop.is-hearing .wave span:nth-child(2) {
  animation-delay: 0.12s;
  animation-duration: 0.7s;
}

.loop.is-hearing .wave span:nth-child(3) {
  animation-delay: 0.04s;
  animation-duration: 0.95s;
}

.loop.is-hearing .wave span:nth-child(4) {
  animation-delay: 0.18s;
  animation-duration: 0.76s;
}

.loop.is-hearing .wave span:nth-child(5) {
  animation-delay: 0.08s;
  animation-duration: 0.88s;
}

.transcript {
  min-height: 56px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--canvas);
  color: var(--ink);
  font-size: 16px;
}

.transcript[data-empty="true"] {
  color: var(--muted);
}

.verdict {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(4px);
}

.verdict.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 220ms ease, transform 220ms var(--ease-out);
}

.verdict.is-match {
  background: var(--success-wash);
  border-color: color-mix(in srgb, var(--success) 35%, transparent);
  color: var(--success);
}

/* ---------- Sections ---------- */

section[id],
.band {
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

.band {
  padding: 88px 0;
}

.band-canvas {
  background: var(--canvas);
  color: var(--ink);
}

.band-stage {
  background: var(--stage);
  color: var(--ivory);
}

.band-navy {
  background: var(--navy);
  color: var(--ivory);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 40px;
}

.section-head h2 {
  margin-top: 10px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
}

/* Facts */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  padding: 0;
  margin: 0;
}

.facts li {
  list-style: none;
  background: var(--surface);
  padding: 22px 18px;
  margin: 0;
}

.facts .k {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--action);
  letter-spacing: 0.04em;
}

.facts p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--muted);
}

/* Session steps */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  counter-reset: step;
}

.step {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow);
  min-height: 220px;
}

.step .icon {
  width: 40px;
  height: 40px;
  color: var(--action);
}

.step h3 {
  margin-top: 18px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 20px;
}

.step p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--action);
  display: block;
  margin-bottom: 12px;
}

/* Edition picker */

.picker {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.picker-form {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-weight: 700;
  font-size: 15px;
}

.field input[type="date"] {
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent);
  border-radius: 12px;
  background: var(--canvas);
  color: var(--ink);
}

.field input[type="date"]:focus-visible {
  border-color: var(--action);
  border-width: 2px;
  outline: none;
}

.hint {
  font-size: 14px;
  color: var(--muted);
}

.toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  font-size: 15px;
}

.toggle input {
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  flex-shrink: 0;
  border: 1.5px solid color-mix(in srgb, var(--muted) 55%, transparent);
  border-radius: 5px;
  background: var(--canvas);
}

.toggle input:checked {
  background: var(--action);
  border-color: var(--action);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5 6.5 11.5 12.5 4.5'/></svg>");
  background-size: 14px 14px;
  background-position: center;
  background-repeat: no-repeat;
}

.edition-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.edition {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px;
  border: 2px solid transparent;
  box-shadow: var(--shadow);
  opacity: 0.55;
  transform: scale(0.985);
  transition: opacity 220ms ease, transform 220ms var(--ease-out), border-color 220ms ease;
}

.edition.is-active {
  opacity: 1;
  transform: none;
  border-color: var(--action);
}

.edition.is-dim {
  opacity: 0.38;
}

.edition .year {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--action);
}

.edition h3 {
  margin-top: 6px;
  font-size: 28px;
}

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 20px;
}

.stats > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

.stats dt {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.stats dd {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--mono);
  text-align: right;
}

.cutoff {
  margin-top: 16px;
  grid-column: 1 / -1;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--action) 8%, var(--surface));
  border-radius: 12px;
  font-size: 15px;
  color: var(--ink);
}

/* Mock visualizer */

.mock-board {
  background: var(--surface);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.mock-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.mock-modes {
  display: flex;
  gap: 8px;
}

.chip {
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid color-mix(in srgb, var(--muted) 35%, transparent);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}

.chip:active {
  transform: scale(0.97);
}

.chip.is-on {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--ivory);
}

.dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 420px;
}

.dot {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: var(--canvas);
  border: 1.5px solid color-mix(in srgb, var(--muted) 30%, transparent);
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms var(--ease-out);
}

.dot.is-ok {
  background: var(--success);
  border-color: var(--success);
  transform: scale(1.04);
}

.dot.is-miss {
  background: var(--error);
  border-color: var(--error);
}

.dot.is-now {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--beam) 40%, transparent);
}

.mock-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}

.mock-readout strong {
  color: var(--ink);
  font-family: var(--body);
}

.mock-result {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--canvas);
  font-size: 16px;
  min-height: 52px;
  display: flex;
  align-items: center;
}

.mock-result em {
  font-style: normal;
  color: var(--muted);
}

/* Features */

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 200ms var(--ease-out), box-shadow 200ms ease;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.feature .icon {
  width: 36px;
  height: 36px;
  color: var(--action);
}

.feature h3 {
  margin-top: 16px;
  font-family: var(--body);
  font-size: 20px;
  font-weight: 700;
}

.feature p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
}

/* Screens */

.screens {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 16px;
  margin-inline: calc(var(--gutter) * -0.25);
}

.screen {
  margin: 0;
  flex: 0 0 220px;
  scroll-snap-align: start;
}

.screen img {
  width: 100%;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  background: var(--canvas);
}

.screen figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* Pricing */

.price-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}

.price-card {
  background: color-mix(in srgb, var(--navy) 80%, #000);
  border: 1px solid var(--line-on-stage);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--glow);
}

.price-card .amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
}

.price-card .amount b {
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: 0;
  font-variant-numeric: lining-nums;
}

.price-card .amount span {
  color: var(--muted-on-stage);
  font-size: 18px;
}

.price-card ul {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.price-card li {
  display: flex;
  gap: 10px;
  color: var(--muted-on-stage);
  font-size: 16px;
}

.price-card li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 1px;
  background: var(--beam);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.split {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}

.split article {
  background: color-mix(in srgb, var(--navy) 55%, var(--stage));
  border: 1px solid var(--line-on-stage);
  border-radius: 16px;
  padding: 22px;
}

.split h3 {
  font-family: var(--body);
  font-size: 16px;
  font-weight: 700;
  color: var(--beam);
}

.split p {
  margin-top: 8px;
  color: var(--muted-on-stage);
  font-size: 15px;
}

/* Independence */

.indep {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.indep-mark {
  width: min(100%, 280px);
  opacity: 0.92;
}

.indep h2 {
  font-size: clamp(32px, 4vw, 48px);
}

.indep p {
  margin-top: 16px;
  color: var(--muted-on-stage);
  font-size: 18px;
}

.sources {
  margin-top: 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.sources a {
  color: var(--beam);
  font-size: 15px;
}

/* FAQ */

.faq {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.faq details {
  background: var(--surface);
  border-radius: 14px;
  padding: 4px 18px;
  box-shadow: var(--shadow);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 17px;
  padding: 16px 0;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  float: right;
  font-family: var(--mono);
  color: var(--action);
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  padding: 0 0 16px;
  color: var(--muted);
  font-size: 16px;
}

/* Studio */

.studio {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  border-top: 1px solid var(--line-on-stage);
  padding-top: 48px;
}

.studio h2 {
  font-size: clamp(28px, 3.4vw, 40px);
}

.studio p {
  margin-top: 12px;
  color: var(--muted-on-stage);
  max-width: 40rem;
}

.studio a {
  color: var(--beam);
}

/* Footer */

.footer {
  border-top: 1px solid var(--line-on-stage);
  padding: 32px 0 48px;
  background: var(--stage);
  color: var(--muted-on-stage);
  font-size: 14px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer a {
  color: var(--ivory-dim);
  text-decoration: none;
}

.footer a:hover {
  color: var(--ivory);
}

.footer-disclaimer {
  margin-top: 20px;
  max-width: 52rem;
  font-size: 13px;
  line-height: 1.5;
}

/* Legal / 404 */

.legal {
  background: var(--canvas);
  color: var(--ink);
  min-height: calc(100vh - var(--nav-h) - 180px);
  padding: 64px 0 96px;
}

.legal-inner {
  width: min(var(--reading), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.legal h1 {
  font-size: 40px;
  margin: 12px 0 8px;
}

.legal .meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.legal h2 {
  font-family: var(--body);
  font-size: 22px;
  font-weight: 700;
  margin: 28px 0 10px;
}

.legal h3 {
  font-family: var(--body);
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0 8px;
}

.legal p {
  margin: 0 0 16px;
  color: var(--ink);
}

.legal ul {
  margin: 0 0 16px;
  padding-left: 1.2em;
}

.legal li {
  margin: 0 0 8px;
}

.legal code {
  font-family: var(--mono);
  font-size: 0.92em;
}

.legal-contact {
  list-style: none;
  padding-left: 0;
}

.legal a {
  color: var(--action);
}

/* Reveal */

html.js .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(16px);
}

html.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 560ms var(--ease-soft), transform 560ms var(--ease-soft);
}

/* Keyframes */

@keyframes bar {
  0%,
  100% {
    height: 18%;
  }
  50% {
    height: 92%;
  }
}

@keyframes star-settle {
  from {
    opacity: 0;
    transform: rotate(-8deg) scale(0.96);
  }
  to {
    opacity: 0.09;
    transform: none;
  }
}

@keyframes loop-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Reduced motion */

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

  html.js .reveal,
  html.js .reveal:not(.is-in),
  .loop,
  .hero-star,
  .edition,
  .feature,
  .verdict,
  .dot {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .loop.is-hearing .wave span {
    animation: none;
    height: 40%;
  }

  .loop.is-hearing .wave span:nth-child(odd) {
    height: 70%;
  }
}

/* Responsive */

@media (max-width: 960px) {
  .hero-grid,
  .picker,
  .price-grid,
  .indep,
  .studio {
    grid-template-columns: 1fr;
  }

  .hero-star {
    width: 70vw;
    right: -20%;
    top: auto;
    bottom: 20%;
  }

  .picker-form {
    position: static;
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
    --nav-h: 64px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    background: var(--stage);
    border-bottom: 1px solid var(--line-on-stage);
  }

  .nav.is-open .nav-links {
    display: flex;
  }

  .nav-links a,
  .nav-links .btn {
    padding: 14px 8px;
  }

  .nav-links .btn {
    justify-content: center;
    width: 100%;
  }

  .facts,
  .steps,
  .edition-cards,
  .features {
    grid-template-columns: 1fr 1fr;
  }

  .facts li:last-child {
    grid-column: 1 / -1;
  }

  .band {
    padding: 64px 0;
  }

  .hero {
    padding: 36px 0 56px;
  }

  .hero h1 {
    font-size: 42px;
  }
}

@media (max-width: 520px) {
  .facts,
  .steps,
  .edition-cards,
  .features,
  .split {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 36px;
  }

  .btn-row:has(.store) {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .store {
    width: auto;
    height: 52px;
    padding: 0 12px;
    gap: 8px;
  }

  .store-logo {
    width: 22px;
    height: 22px;
  }

  .store-name {
    font-size: 15px;
  }

  body {
    font-size: 17px;
  }
}

@media (max-width: 420px) {
  .btn-row:has(.store) {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .store {
    width: min(100%, 220px);
  }
}
