/* ==========================================================================
   Acedemy marketing site
   Mirrors the learner app's design system 1:1:
   lib/ui/design_system/tokens/{colors,app_theme_colors,typography,radius,
   shadows,spacing}.dart
   ========================================================================== */

/* ---------- Design tokens (see tokens/colors.dart) ---------- */
:root {
  /* Brand accents — identical to AppColors */
  --primary: #58cc02;
  --primary-dark: #58a700;
  --primary-light: #89e219;

  --blue: #1cb0f6;
  --blue-dark: #1899d6;
  --blue-light: #84d8ff;

  --red: #ff4b4b;
  --red-dark: #ea2b2b;
  --red-light: #ff9696;

  --orange: #ff9600;
  --orange-dark: #e58700;
  --yellow: #ffc800;
  --yellow-dark: #e5b400;

  --purple: #ce82ff;
  --purple-dark: #a568cc;

  /* Light theme neutrals — AppThemeColors.light */
  --background: #ffffff;
  --surface: #f7f7f7;
  --surface-variant: #e5e5e5;
  --border: #e5e5e5;
  --text-primary: #4b4b4b;
  --text-secondary: #afafaf;
  --on-accent: #ffffff;
  --shadow: rgba(0, 0, 0, 0.1);

  /* Radii — AppRadius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-xxl: 32px;
  --radius-pill: 999px;

  /* Spacing — AppSpacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  color-scheme: light;
}

/* Dark theme neutrals — AppThemeColors.dark */
[data-theme='dark'] {
  --background: #131f24;
  --surface: #202f36;
  --surface-variant: #2b3b43;
  --border: #37464f;
  --text-primary: #f7f7f7;
  --text-secondary: #afafaf;
  --shadow: rgba(0, 0, 0, 0.4);

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 600; /* AppTextStyles.body — thicker body text for readability */
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

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

a:hover {
  text-decoration: underline;
}

/* AppTextStyles */
h1,
.heading-1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin: 0 0 var(--space-md);
}

h2,
.heading-2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 var(--space-md);
}

h3,
.title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 var(--space-sm);
}

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

.text-secondary {
  color: var(--text-secondary);
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: 96px 0;
}

.section--tinted {
  background: var(--surface);
}

.section-header {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

/* ---------- 3D buttons (components/primary_button.dart, shadows.dart) ----------
   Solid darker offset shadow, no blur; on press the surface translates down
   and the shadow shrinks — the app's signature gamified feel. */
.btn {
  --btn-bg: var(--primary);
  --btn-shadow: var(--primary-dark);
  --btn-fg: var(--on-accent);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 18px 24px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 6px 0 var(--btn-shadow);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--btn-shadow);
}

.btn:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.btn--blue {
  --btn-bg: var(--blue);
  --btn-shadow: var(--blue-dark);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--blue);
  --btn-shadow: var(--border);
  border: 2px solid var(--border);
  box-shadow: 0 4px 0 var(--border);
}

.btn--ghost:hover {
  background: var(--surface);
  filter: none;
}

.btn--ghost:active {
  box-shadow: 0 1px 0 var(--border);
}

.btn--block {
  width: 100%;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--background);
  border-bottom: 2px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  text-transform: uppercase;
}

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

.brand img {
  width: 34px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-left: auto;
}

.site-nav a {
  color: var(--text-secondary);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.site-nav a:hover {
  color: var(--primary);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-actions .btn {
  padding: 12px 20px;
  font-size: 14px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--background);
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 3px 0 var(--border);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.theme-toggle:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--border);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme='dark'] .theme-toggle .icon-sun {
  display: block;
}

[data-theme='dark'] .theme-toggle .icon-moon {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0 96px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.hero__eyebrow .dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--primary);
}

.hero h1 .accent {
  color: var(--primary);
}

.hero__sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 46ch;
  margin: 0 0 var(--space-xl);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

/* Store badges — official App Store / Google Play artwork.
   Both assets are trimmed to the button edge (no baked-in clear space), so
   matching their heights matches them visually. If either asset is ever
   re-downloaded from the vendor, re-crop it: the stock Google Play PNG ships
   at 646x250 with ~41px of transparent padding, which renders ~32% short. */
.store-badge {
  display: inline-block;
  flex: 0 0 auto; /* never let flex shrink scale the artwork down */
  transition: transform 0.15s ease, filter 0.15s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.store-badge:active {
  transform: translateY(1px);
}

.store-badge img {
  height: 56px;
  width: auto;
  max-width: none; /* opt out of the global img{max-width:100%} */
  display: block;
}

/* Stores without vendor artwork in the repo (Huawei AppGallery) render as a
   text badge with the same footprint as the image badges. */
.store-badge--text {
  display: inline-flex;
  align-items: center;
  height: 56px;
  padding: 0 1.25rem;
  border-radius: 8px;
  background: #000;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

/* A store without a verified listing: the badge stays visible so visitors
   know the platform is planned, but it no longer looks or behaves like a link. */
.store-badge--unavailable {
  cursor: default;
  opacity: 0.45;
  filter: grayscale(1);
  pointer-events: none;
}

.store-badge--unavailable:hover,
.store-badge--unavailable:active {
  transform: none;
  filter: grayscale(1);
}

.store-availability {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.store-availability[hidden] {
  display: none;
}

.hero__note {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ---------- Phone mockup (a mini replica of the app's Learn tab) ---------- */
.phone-stage {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone {
  width: 320px;
  border: 2px solid var(--border);
  border-radius: 44px;
  background: var(--background);
  box-shadow: 0 12px 0 var(--shadow), 0 24px 48px var(--shadow);
  padding: 12px;
  position: relative;
}

.phone__notch {
  width: 120px;
  height: 24px;
  margin: 0 auto 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-variant);
}

.phone__screen {
  border-radius: 32px;
  background: var(--background);
  border: 2px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 560px;
}

.phone__body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
}

/* streak + XP pills row */
.app-pills {
  display: flex;
  gap: var(--space-sm);
}

.app-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 800;
}

.app-pill svg {
  width: 16px;
  height: 16px;
}

.app-pill--streak {
  color: var(--orange);
}

.app-pill--xp {
  color: var(--yellow-dark);
  margin-left: auto;
}

/* segmented toggle (components/segmented_toggle.dart) */
.app-toggle {
  display: flex;
  gap: var(--space-sm);
}

.app-toggle span {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.app-toggle span.is-active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* progress bar (onboarding/lesson progress) */
.app-progress {
  height: 16px;
  border-radius: var(--radius-pill);
  background: var(--surface-variant);
  overflow: hidden;
}

.app-progress i {
  display: block;
  height: 100%;
  width: 62%;
  border-radius: var(--radius-pill);
  background: var(--primary);
}

/* topic cards (components/topic_card.dart) */
.app-topic {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.app-topic img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
}

.app-topic__meta {
  flex: 1;
  min-width: 0;
}

.app-topic__meta strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topic__meta small {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.app-topic__check {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.app-topic__check svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

.app-topic__ring {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  flex-shrink: 0;
}

.app-topic__lock {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--surface-variant);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.app-topic__lock svg {
  width: 14px;
  height: 14px;
}

.app-cta {
  margin-top: auto;
  padding: 14px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  box-shadow: 0 4px 0 var(--primary-dark);
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* bottom nav (components/gamified_bottom_nav.dart) */
.app-nav {
  display: flex;
  border-top: 2px solid var(--border);
  padding: 10px var(--space-md);
  justify-content: space-between;
}

.app-nav span {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
}

.app-nav span.is-active {
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 14%, transparent);
}

.app-nav svg {
  width: 22px;
  height: 22px;
}

/* floating gamified chips around the phone */
.float-chip {
  position: absolute;
  z-index: 2; /* sits above the phone edge so it reads as a floating badge */
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  background: var(--background);
  font-weight: 800;
  box-shadow: 0 5px 0 var(--border);
  animation: bob 5s ease-in-out infinite;
}

.float-chip svg {
  width: 24px;
  height: 24px;
}

.float-chip--streak {
  top: 8%;
  left: 0;
  color: var(--orange);
}

.float-chip--trophy {
  bottom: 3%;
  right: 0;
  color: var(--purple);
  animation-delay: 1.2s;
}

.float-chip--xp {
  top: 42%;
  right: -4%;
  color: var(--blue);
  animation-delay: 2.4s;
}

.float-chip small {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.float-chip strong {
  display: block;
  font-size: 1.1rem;
  line-height: 1.2;
  color: var(--text-primary);
}

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

@media (prefers-reduced-motion: reduce) {
  .float-chip {
    animation: none;
  }
}

/* ---------- Feature cards ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  --accent: var(--primary);
  --accent-dark: var(--primary-dark);

  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--background);
  padding: var(--space-xl);
  box-shadow: 0 5px 0 var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 9px 0 var(--border);
}

.feature-card--blue {
  --accent: var(--blue);
  --accent-dark: var(--blue-dark);
}

.feature-card--green {
  --accent: var(--primary);
  --accent-dark: var(--primary-dark);
}

.feature-card--purple {
  --accent: var(--purple);
  --accent-dark: var(--purple-dark);
}

.feature-card--orange {
  --accent: var(--orange);
  --accent-dark: var(--orange-dark);
}

.feature-card--yellow {
  --accent: var(--yellow);
  --accent-dark: var(--yellow-dark);
}

.feature-card--red {
  --accent: var(--red);
  --accent-dark: var(--red-dark);
}

.feature-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--accent);
  box-shadow: 0 4px 0 var(--accent-dark);
  display: grid;
  place-items: center;
  color: #fff;
  margin-bottom: var(--space-lg);
}

.feature-card__icon svg {
  width: 28px;
  height: 28px;
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-card h3 {
  font-size: 1.15rem;
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  counter-reset: step;
}

.step {
  position: relative;
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--background);
  padding: var(--space-xl);
  box-shadow: 0 5px 0 var(--border);
}

.step__number {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  box-shadow: 0 4px 0 var(--blue-dark);
  color: #fff;
  font-weight: 900;
  font-size: 1.15rem;
  display: grid;
  place-items: center;
  margin-bottom: var(--space-lg);
}

.step:nth-child(2) .step__number {
  background: var(--primary);
  box-shadow: 0 4px 0 var(--primary-dark);
}

.step:nth-child(3) .step__number {
  background: var(--orange);
  box-shadow: 0 4px 0 var(--orange-dark);
}

.step p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ---------- Exam spotlight ---------- */
.spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.spotlight__list {
  list-style: none;
  margin: var(--space-lg) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.spotlight__list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 700;
}

.spotlight__list svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--primary);
}

/* leaderboard card mock */
.board-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--background);
  box-shadow: 0 6px 0 var(--border);
  overflow: hidden;
}

.board-card__header {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 2px solid var(--border);
}

.board-card__header span {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border: 2px solid transparent;
}

.board-card__header span.is-active {
  color: var(--blue-dark);
  background: color-mix(in srgb, var(--blue) 14%, transparent);
  border-color: var(--blue);
}

.board-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px var(--space-lg);
}

.board-row + .board-row {
  border-top: 2px solid var(--border);
}

.board-row__rank {
  width: 28px;
  font-weight: 900;
  color: var(--text-secondary);
  text-align: center;
}

.board-row:nth-child(1) .board-row__rank {
  color: var(--yellow-dark);
}

.board-row__avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}

.board-row__name {
  flex: 1;
  font-weight: 800;
}

.board-row__name small {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.board-row__xp {
  font-weight: 800;
  color: var(--purple);
}

.board-row--self {
  background: color-mix(in srgb, var(--primary) 10%, transparent);
}

.board-row--self .board-row__xp {
  color: var(--primary-dark);
}

/* ---------- Final CTA ---------- */
.cta-banner {
  text-align: center;
  border-radius: var(--radius-xxl);
  background: var(--primary);
  box-shadow: 0 8px 0 var(--primary-dark);
  padding: 72px var(--space-lg);
  color: #fff;
}

.cta-banner h2 {
  color: #fff;
}

.cta-banner p {
  max-width: 52ch;
  margin: 0 auto var(--space-xl);
  color: rgba(255, 255, 255, 0.9);
}

.cta-banner .btn--white {
  --btn-bg: #ffffff;
  --btn-fg: var(--primary);
  --btn-shadow: var(--primary-dark);
}

.cta-banner__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

.cta-banner .store-availability {
  margin: var(--space-md) auto 0;
  color: rgba(255, 255, 255, 0.9);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px solid var(--border);
  padding: 64px 0 var(--space-xl);
  margin-top: 96px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.site-footer h4 {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin: 0 0 var(--space-md);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer ul a {
  color: var(--text-primary);
  font-weight: 700;
}

.site-footer ul a:hover {
  color: var(--primary);
  text-decoration: none;
}

.site-footer__blurb {
  max-width: 36ch;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.site-footer__bottom {
  border-top: 2px solid var(--border);
  padding-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ---------- Legal pages ---------- */
.legal-hero {
  padding: 64px 0 var(--space-xl);
  border-bottom: 2px solid var(--border);
}

.legal-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 0 96px;
}

.legal-body h2 {
  font-size: 1.35rem;
  margin-top: 48px;
}

.legal-body h3 {
  font-size: 1.05rem;
  margin-top: var(--space-lg);
}

.legal-body p,
.legal-body li {
  color: var(--text-primary);
}

.legal-body ul {
  padding-left: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.legal-body a {
  font-weight: 700;
}

.legal-meta {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.legal-callout {
  border: 2px solid var(--border);
  border-left: 6px solid var(--blue);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid,
  .spotlight {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  /* Stacked layouts centre the phone; the floating chips would sit at the
     far edges of the full-width column and clip, so they are desktop-only. */
  .float-chip {
    display: none;
  }

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

  .float-chip--xp {
    right: 0;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 64px 0;
  }

  .features-grid,
  .steps,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
  }

  /* Mobile header is brand-only: the nav, theme toggle and CTA are all
     dropped so the logo can centre. The hero's store badges carry the
     download CTA, and the theme still follows the OS preference. */
  .header-actions {
    display: none;
  }

  .site-header__inner {
    justify-content: center;
  }

  .hero {
    padding: 48px 0 64px;
  }

  .float-chip {
    padding: 8px 12px;
  }

  .float-chip strong {
    font-size: 0.9rem;
  }
}
