/* Fibly — shared public-site styles (landing + legal pages).
   Brand = Aurora palette, ported from app/lib/core/themes/brand_palette.dart
   (b1 #6B63E8 → b2 #453CAE gradient; bm #8B3FD6, bp #C92A55 accents).
   Visual language = "Fibly Glass": frosted glass on an animated aurora gradient
   (docs/design/glass-visual-language.md). */

:root {
  --b1: #6b63e8; /* gradient start */
  --b2: #453cae; /* gradient end   */
  --bm: #8b3fd6; /* mid accent     */
  --bp: #c92a55; /* "hot" accent   */
  --solid: #5b54e0; /* primary      */
  --ok: #34c77b; /* "true" green   */
  --ok-deep: #1e9e5c;

  --ink: #181c20; /* onSurface       */
  --ink-soft: #43474e; /* onSurfaceVariant */
  --muted: #9aa0ad;
  --surface: #fdfcff;
  --surface-card: #ffffff;
  --hairline: #e4e1f3;

  --grad: linear-gradient(135deg, var(--b1) 0%, var(--b2) 100%);
  --radius: 24px;
  --radius-sm: 14px;
  --maxw: 920px;

  --shadow-sm: 0 8px 14px rgba(24, 39, 75, 0.06);
  --shadow-md: 0 10px 40px rgba(24, 39, 75, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eceaf6;
    --ink-soft: #b8b5cf;
    --muted: #807d99;
    --surface: #121320;
    --surface-card: #1b1d2e;
    --hairline: #2c2e44;
    --shadow-sm: 0 8px 14px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.45);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.demo-open {
  overflow: hidden;
}

a {
  color: var(--solid);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Layout shell ─────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  width: 100%;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  gap: 20px;
  font-size: 14px;
  font-weight: 600;
}

.nav-links a {
  color: var(--ink-soft);
}

/* ── Aurora backdrop (hero + demo overlay) ────────────────────── */
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora .blob {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}

.blob-a {
  background: radial-gradient(circle, #a06bff 0%, transparent 65%);
  top: -20%;
  left: -15%;
  animation: drift-a 26s ease-in-out infinite alternate;
}

.blob-b {
  background: radial-gradient(circle, #ff5f8f 0%, transparent 65%);
  bottom: -30%;
  right: -20%;
  opacity: 0.35;
  animation: drift-b 32s ease-in-out infinite alternate;
}

.blob-c {
  background: radial-gradient(circle, #4dc3ff 0%, transparent 65%);
  top: 30%;
  right: 10%;
  width: 40vmax;
  height: 40vmax;
  opacity: 0.3;
  animation: drift-c 22s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(12%, 18%) scale(1.15); }
}

@keyframes drift-b {
  from { transform: translate(0, 0) scale(1.1); }
  to { transform: translate(-15%, -12%) scale(0.95); }
}

@keyframes drift-c {
  from { transform: translate(0, 0); }
  to { transform: translate(-20%, 14%) scale(1.2); }
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  background: var(--grad);
  color: #fff;
  text-align: center;
  padding: 44px 20px 64px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-mascot {
  width: min(240px, 55vw);
  height: auto;
  margin: 0 auto 10px;
  display: block;
  filter: drop-shadow(0 24px 40px rgba(20, 10, 70, 0.45));
  animation: mascot-float 5s ease-in-out infinite;
}

@keyframes mascot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.hero .tagline {
  font-size: 18px;
  font-weight: 600;
  opacity: 0.92;
  margin-bottom: 18px;
}

.hero p {
  max-width: 560px;
  margin: 0 auto;
  font-size: 17px;
  opacity: 0.92;
}

.hero-try {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.hero-try:hover,
.hero-try:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(23, 12, 66, 0.28);
}

.hero-try:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.hero-try-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: var(--b2);
  font-size: 11px;
  padding-left: 2px;
}

/* ── Store badges ─────────────────────────────────────────────── */
.store-badges {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.store-badge:hover,
.store-badge:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(23, 12, 66, 0.28);
}

.store-badge:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.store-badge:active {
  transform: translateY(0);
  box-shadow: none;
}

.store-badge .store-badge-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
}

.store-badge .store-badge-icon {
  display: inline-flex;
  flex: none;
}

.store-badge .store-badge-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.hero-pill {
  display: block;
  width: fit-content;
  margin: 22px auto 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 14px;
}

/* ── Scroll-reveal ────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* No-JS / reduced-motion safety: never hide content permanently. */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Demo CTA panel ───────────────────────────────────────────── */
.demo-cta {
  padding: 56px 0 8px;
}

.demo-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  background: var(--grad);
  border-radius: var(--radius);
  padding: 28px 32px;
  color: #fff;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.demo-panel::after {
  content: "";
  position: absolute;
  inset: -60% 55% auto -10%;
  height: 130%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.demo-panel-mascot {
  width: 150px;
  height: auto;
  filter: drop-shadow(0 14px 24px rgba(20, 10, 70, 0.4));
  position: relative;
  z-index: 1;
}

.demo-panel-copy {
  position: relative;
  z-index: 1;
}

.demo-panel .section-title,
.demo-panel .section-sub {
  text-align: left;
  color: #fff;
}

.demo-panel-sub {
  opacity: 0.92;
  margin: 0 0 20px;
  max-width: none;
}

.demo-play-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 34px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--b2);
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(23, 12, 66, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.demo-play-btn:hover,
.demo-play-btn:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 34px rgba(23, 12, 66, 0.45);
}

.demo-play-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.demo-play-note {
  font-size: 12px;
  font-weight: 600;
  color: var(--bm);
}

@media (max-width: 640px) {
  .demo-panel {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 26px 22px;
  }
  .demo-panel-mascot {
    margin: 0 auto;
    width: 120px;
  }
  .demo-panel .section-title,
  .demo-panel .section-sub {
    text-align: center;
  }
}

/* ── Screenshots strip ────────────────────────────────────────── */
.screens {
  padding: 56px 0 8px;
}

.screens-strip {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 8px max(20px, calc((100vw - var(--maxw)) / 2 + 20px)) 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.screens-strip img {
  width: min(240px, 62vw);
  height: auto;
  flex: none;
  border-radius: 22px;
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-md);
  scroll-snap-align: center;
}

.screens-strip:focus-visible {
  outline: 2px solid var(--solid);
  outline-offset: 2px;
}

/* ── Topics showcase (doubles as the demo launcher) ───────────── */
.topics {
  padding: 8px 20px 64px;
}

.section-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.3px;
  text-align: center;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--ink-soft);
  font-size: 16px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto 32px;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.topic-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--hairline);
  padding: 0;
  background: var(--surface-card);
  cursor: pointer;
  font: inherit;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.topic-card:hover,
.topic-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

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

.topic-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-card .topic-name {
  position: absolute;
  left: 14px;
  bottom: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.topic-card .topic-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 4px 10px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.topic-card:hover .topic-play,
.topic-card:focus-visible .topic-play {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .topic-card .topic-play {
    opacity: 1;
    transform: none;
  }
}

.topic-card::after {
  /* readability scrim under the label */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  pointer-events: none;
}

/* ── Social / "with friends" ──────────────────────────────────── */
.social {
  padding: 40px 20px 64px;
}

.social-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.social-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  /* branded fallback while the illustration loads / if it's missing */
  background: var(--grad);
  aspect-ratio: 3 / 2;
}

.social-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-title {
  text-align: left;
  margin-bottom: 12px;
}

.social-copy p {
  color: var(--ink-soft);
  font-size: 16px;
  margin-bottom: 16px;
}

.social-points {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-points li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-soft);
  font-size: 15px;
}

.social-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 720px) {
  .social-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .social-title {
    text-align: center;
  }
}

/* ── Demo overlay ─────────────────────────────────────────────── */
.demo-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--grad);
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.demo-overlay[hidden] {
  display: none;
}

.demo-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.demo-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.demo-close {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.18s ease;
}

.demo-close:hover,
.demo-close:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.demo-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.demo-progressbar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.demo-progressbar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd66b, #ff8f6b);
  transition: width 0.35s ease;
}

.demo-meta {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  min-width: 64px;
  justify-content: flex-end;
}

.demo-streak {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 13px;
}

.demo-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  perspective: 1200px;
}

/* Flip card */
.demo-card {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-card.is-flipped {
  transform: rotateY(180deg);
}

.demo-card-face {
  width: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 24px 60px rgba(15, 8, 60, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.demo-card-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  overflow-y: auto;
}

.demo-topic-chip {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 12px;
}

.demo-statement {
  font-size: clamp(19px, 2.6vh, 24px);
  font-weight: 700;
  line-height: 1.45;
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 120px;
}

.demo-actions {
  display: flex;
  gap: 12px;
}

.demo-btn {
  flex: 1;
  padding: 15px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.demo-btn:hover,
.demo-btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.demo-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.demo-btn:active {
  transform: translateY(0) scale(0.98);
}

.demo-btn-true {
  background: linear-gradient(135deg, rgba(52, 199, 123, 0.85), rgba(30, 158, 92, 0.85));
  box-shadow: 0 10px 24px rgba(30, 158, 92, 0.35);
}

.demo-btn-false {
  background: linear-gradient(135deg, rgba(139, 63, 214, 0.85), rgba(201, 42, 85, 0.85));
  box-shadow: 0 10px 24px rgba(201, 42, 85, 0.35);
}

.demo-verdict {
  font-size: 21px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-verdict .demo-verdict-badge {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.demo-verdict.is-correct .demo-verdict-badge {
  background: linear-gradient(135deg, var(--ok), var(--ok-deep));
}

.demo-verdict.is-wrong .demo-verdict-badge {
  background: linear-gradient(135deg, var(--bm), var(--bp));
}

.demo-why {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.94;
  flex: 1;
}

.demo-why b {
  display: inline-block;
  margin-right: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #ffd66b;
}

.demo-next {
  align-self: stretch;
  padding: 14px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: var(--b2);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 8, 60, 0.3);
  transition: transform 0.15s ease;
}

.demo-next:hover,
.demo-next:focus-visible {
  transform: translateY(-2px);
}

.demo-next:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Results */
.demo-results {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  overflow-y: auto;
  max-height: 100%;
  padding: 10px 0;
}

.demo-results[hidden] {
  display: none;
}

.demo-results-mascot {
  width: min(170px, 24vh);
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(15, 8, 60, 0.4));
}

.demo-score {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
}

.demo-title {
  font-size: 22px;
  font-weight: 800;
}

.demo-message {
  font-size: 15px;
  opacity: 0.92;
  max-width: 400px;
}

.demo-results-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.demo-results-secondary {
  display: flex;
  gap: 18px;
  margin-top: 6px;
}

.demo-again,
.demo-share {
  background: none;
  border: 0;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  opacity: 0.85;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.demo-again:hover,
.demo-share:hover,
.demo-again:focus-visible,
.demo-share:focus-visible {
  opacity: 1;
}

.demo-confetti {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* ── Legal / content pages ────────────────────────────────────── */
.page {
  padding: 40px 20px 64px;
}

.page .back-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.page h1 {
  font-size: 30px;
  margin-bottom: 6px;
}

.page .updated {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.page h2 {
  font-size: 20px;
  margin: 30px 0 10px;
}

.page p,
.page li {
  color: var(--ink-soft);
  font-size: 15px;
}

.page ul {
  padding-left: 22px;
  margin: 8px 0;
}

.page .todo {
  background: #fff7e6;
  border: 1px dashed #e0a82e;
  color: #8a5a00;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  margin: 12px 0;
}

/* ── 404 ──────────────────────────────────────────────────────── */
.notfound {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}

.notfound .code {
  font-size: 80px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--hairline);
  background: var(--surface-card);
}

.site-footer .wrap {
  padding-top: 28px;
  padding-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
}

.footer-links a {
  color: var(--ink-soft);
}

.copyright {
  color: var(--muted);
  font-size: 13px;
}

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

  .aurora .blob,
  .hero-mascot {
    animation: none;
  }

  .store-badge,
  .hero-try,
  .demo-play-btn,
  .topic-card,
  .demo-btn,
  .demo-next,
  .demo-card {
    transition: none;
  }

  .store-badge:hover,
  .store-badge:focus-visible,
  .hero-try:hover,
  .demo-play-btn:hover,
  .topic-card:hover,
  .demo-btn:hover {
    transform: none;
  }
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 32px;
  }
  .topics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .topic-card .topic-name {
    font-size: 14px;
    left: 12px;
    bottom: 10px;
  }
  .topic-card .topic-play {
    display: none;
  }
  .nav-links {
    display: none;
  }
  .site-footer .wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .demo-card-face {
    padding: 22px 18px;
  }
}
