/* ==========================================================================
   Mind Terrarium — landing page
   The palette, radii and type scale below are the app's own design tokens.
   When the app's change, change them here too.
   ========================================================================== */

@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/quicksand-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  /* Surfaces */
  --bg: #0b1326;
  --surface-lowest: #060e20;
  --surface-low: #131b2e;
  --surface: #171f33;
  --surface-high: #222a3d;
  --surface-highest: #2d3449;

  /* Primary — bioluminescent cyan */
  --primary: #8aebff;
  --primary-dim: #2fd9f4;
  --primary-container: #22d3ee;
  --on-primary: #00363e;

  /* Secondary — warm amber, the streak fire */
  --secondary: #ffc640;
  --on-secondary: #402d00;

  /* Tertiary — soft periwinkle */
  --tertiary: #d2ddf5;

  /* Text */
  --text: #dae2fd;
  --text-muted: #bbc9cd;
  --outline: #859397;
  --outline-variant: #3c494c;

  /* Rarity */
  --faint: #e6eaf5;
  --glimmering: #5aa9ff;
  --radiant: #b98bff;

  --border: rgba(255, 255, 255, 0.05);
  --border-accent: rgba(138, 235, 255, 0.35);

  /* Radii */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-card: 24px;
  --r-pill: 999px;

  /* Spacing */
  --gutter: clamp(20px, 5vw, 32px);
  --section-y: clamp(72px, 11vw, 132px);
  --maxw: 1120px;

  --shadow-ambient: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-lift: 0 24px 60px rgba(0, 0, 0, 0.5);
}

/* --- Base ---------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Quicksand', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system,
    'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The night sky the whole page sits in: a slow vertical ramp plus a cyan bloom
   roughly where the hero terrarium lands. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 620px at 78% 8%, rgba(138, 235, 255, 0.1), transparent 62%),
    radial-gradient(700px 520px at 8% 42%, rgba(157, 140, 255, 0.07), transparent 65%),
    linear-gradient(180deg, var(--surface-lowest) 0%, var(--bg) 45%, var(--surface-lowest) 100%);
}

/* Starfield. Fixed so it reads as sky rather than page decoration. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, rgba(218, 226, 253, 0.9), transparent),
    radial-gradient(1.2px 1.2px at 34% 62%, rgba(218, 226, 253, 0.7), transparent),
    radial-gradient(1.6px 1.6px at 58% 22%, rgba(138, 235, 255, 0.8), transparent),
    radial-gradient(1.1px 1.1px at 72% 74%, rgba(218, 226, 253, 0.65), transparent),
    radial-gradient(1.5px 1.5px at 88% 34%, rgba(218, 226, 253, 0.8), transparent),
    radial-gradient(1.2px 1.2px at 22% 86%, rgba(157, 140, 255, 0.7), transparent),
    radial-gradient(1.3px 1.3px at 47% 44%, rgba(218, 226, 253, 0.5), transparent),
    radial-gradient(1.1px 1.1px at 6% 56%, rgba(218, 226, 253, 0.6), transparent),
    radial-gradient(1.4px 1.4px at 92% 88%, rgba(138, 235, 255, 0.6), transparent),
    radial-gradient(1.2px 1.2px at 64% 96%, rgba(218, 226, 253, 0.5), transparent);
}

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

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

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 0 0 var(--r-md) 0;
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

/* --- Layout -------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section {
  padding-block: var(--section-y);
}

/* --- Type ---------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #eaf0ff;
}

h1 {
  font-size: clamp(2.5rem, 6.4vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px 7px 12px;
  border-radius: var(--r-pill);
  background: rgba(138, 235, 255, 0.08);
  border: 1px solid var(--border-accent);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: pulse 2.6s ease-in-out infinite;
}

.lede {
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 54ch;
}

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(40px, 6vw, 64px);
  display: grid;
  gap: 16px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.section-head.center .lede {
  margin-inline: auto;
}

/* --- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 19, 38, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(11, 19, 38, 0.9);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #eaf0ff;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  margin-right: auto;
}

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

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 0 22px rgba(138, 235, 255, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 9px 14px;
  border-radius: var(--r-pill);
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 720px) {
  .site-nav {
    display: none;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 8px 28px rgba(138, 235, 255, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 12px 34px rgba(138, 235, 255, 0.32);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.875rem;
}

/* --- Store badges (placeholders) ----------------------------------------
   The app has no store listing yet, so these deliberately do NOT imitate the
   real "Download on the App Store" / "Get it on Google Play" badges — an
   official-looking badge that leads nowhere is worse than an honest one.
   Swap in the real badge art at launch.
   ------------------------------------------------------------------------ */

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 11px 22px 11px 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  font-family: inherit;
  cursor: default;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.store-badge:hover {
  border-color: var(--border-accent);
  background: var(--surface-high);
  transform: translateY(-2px);
  text-decoration: none;
}

.store-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--primary);
}

.store-badge .badge-text {
  display: grid;
  line-height: 1.25;
}

.store-badge .badge-top {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--outline);
}

.store-badge .badge-name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.store-note {
  font-size: 0.875rem;
  color: var(--outline);
}

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

.hero {
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(56px, 8vw, 104px);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 26px;
  justify-items: start;
}

.hero h1 .glow-word {
  background: linear-gradient(120deg, var(--primary) 0%, #b7f5ff 45%, var(--tertiary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 60px rgba(138, 235, 255, 0.35);
}

@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    justify-items: center;
    text-align: center;
  }

  .hero-copy .lede {
    margin-inline: auto;
  }

  .hero-copy .store-row {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }
}

/* --- The living terrarium -----------------------------------------------
   Built by js/terrarium.js using the same isometric math as the app.
   ------------------------------------------------------------------------ */

.hero-visual {
  display: grid;
  place-items: center;
}

.terrarium {
  position: relative;
  width: 100%;
  max-width: var(--stage, 460px);
  aspect-ratio: 1 / 1;
  /* Contains the plus-lighter emission layers so they light the soil, not the page. */
  isolation: isolate;
}

.terrarium-bloom {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 108%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(138, 235, 255, 0.16) 0%,
    rgba(138, 235, 255, 0.06) 42%,
    transparent 68%
  );
  pointer-events: none;
  animation: breathe 7s ease-in-out infinite;
}

.terrarium-base,
.terrarium-dome {
  position: absolute;
  pointer-events: none;
}

/* Seating matches the app: base is stage-wide, sits `stage * 0.12` off the
   bottom, at the delivered art's 1052x756 aspect. */
.terrarium-base {
  left: 0;
  bottom: 12%;
  width: 100%;
  height: auto;
}

.terrarium-dome {
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  opacity: 0.92;
}

/* The scene layer sits `stage * 0.08` above the stage top, same as SCENE_OFFSET_Y. */
.terrarium-scene {
  position: absolute;
  left: 0;
  top: -8%;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Anchored bottom-centre on its cell: left/top are the cell, the translate does the
   anchoring, so the inner element is free to use transform for the sway. */
.occupant {
  position: absolute;
  transform: translate(-50%, -100%);
}

.occupant-art {
  position: absolute;
  inset: 0;
  transform-origin: 50% 100%;
  animation: sway 7s ease-in-out infinite;
}

.occupant-art.is-animal {
  animation-name: bob;
}

.occupant-art > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.occupant img {
  object-fit: contain;
}

/* The emission pass: a blurred, brightened copy added over the art with `plus`
   blending — the CSS analogue of the glow the app renders. */
.occupant .emit {
  mix-blend-mode: plus-lighter;
  pointer-events: none;
}

/* A species whose glow is tinted blooms in a colour its art doesn't carry, so its
   emission is flat colour in the shape of the sprite. */
.occupant .emit-tint {
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

@supports not (mix-blend-mode: plus-lighter) {
  .occupant .emit {
    mix-blend-mode: screen;
  }
}

.firefly {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px 2px rgba(138, 235, 255, 0.7);
  opacity: 0;
  animation: drift var(--dur, 14s) ease-in-out var(--delay, 0s) infinite;
}

/* --- Steps / phone mockups ----------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    max-width: 460px;
    margin-inline: auto;
  }
}

.step {
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
}

.step-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(138, 235, 255, 0.1);
  border: 1px solid var(--border-accent);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 700;
}

.step p {
  color: var(--text-muted);
  max-width: 34ch;
}

/* Phone frame ------------------------------------------------------------- */

.phone {
  position: relative;
  width: 100%;
  max-width: 268px;
  aspect-ratio: 9 / 19;
  padding: 9px;
  border-radius: 42px;
  background: linear-gradient(160deg, #2c3550, #141b2c 40%, #10182a);
  box-shadow: var(--shadow-lift), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--bg);
}

.phone-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.phone-notch {
  position: absolute;
  left: 50%;
  top: 9px;
  transform: translateX(-50%);
  width: 74px;
  height: 21px;
  border-radius: var(--r-pill);
  background: #05090f;
  z-index: 8;
}

/* --- Species -------------------------------------------------------------- */

.species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.species-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 20px 18px 22px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.species-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--rarity-color) 45%, transparent);
}

/* A pool of the species' own rarity light behind its art. */
.species-card::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 4px;
  width: 150px;
  height: 150px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--rarity-color) 22%, transparent) 0%,
    transparent 68%
  );
  pointer-events: none;
}

.species-art {
  position: relative;
  width: 108px;
  height: 108px;
  margin-inline: auto;
  object-fit: contain;
}

.species-name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #eaf0ff;
  text-align: center;
}

.rarity-chip {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--rarity-color) 40%, transparent);
  background: color-mix(in srgb, var(--rarity-color) 10%, transparent);
  color: var(--rarity-color);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.rarity-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.species-lore {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
  text-align: center;
}

.species-more {
  margin-top: 28px;
  text-align: center;
  color: var(--outline);
  font-size: 0.9375rem;
}

/* --- Features ------------------------------------------------------------ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 18px;
}

.feature {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 26px 24px 28px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.28s ease, transform 0.28s ease;
}

.feature:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  background: rgba(138, 235, 255, 0.1);
  color: var(--primary);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature.violet .feature-icon {
  background: rgba(185, 139, 255, 0.1);
  color: var(--radiant);
}

.feature p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* --- CTA ----------------------------------------------------------------- */

.cta-card {
  position: relative;
  display: grid;
  gap: 24px;
  justify-items: center;
  text-align: center;
  padding: clamp(44px, 7vw, 76px) var(--gutter);
  border-radius: 32px;
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-low) 100%);
  border: 1px solid var(--border-accent);
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -55%;
  width: 620px;
  height: 620px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 235, 255, 0.16), transparent 62%);
  pointer-events: none;
}

.cta-card > * {
  position: relative;
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 48px 40px;
  margin-top: 40px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  display: grid;
  gap: 12px;
  max-width: 34ch;
}

.footer-brand p {
  color: var(--outline);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.footer-col {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-col h4 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--outline);
  font-weight: 700;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

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

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--outline);
  font-size: 0.8125rem;
}

/* --- Legal pages --------------------------------------------------------- */

.legal-hero {
  padding-block: clamp(48px, 7vw, 80px) 32px;
}

.legal-hero .wrap {
  display: grid;
  gap: 14px;
}

.legal-meta {
  color: var(--outline);
  font-size: 0.9375rem;
}

.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 8px;
  padding: 22px;
  border-radius: var(--r-card);
  background: var(--surface);
  border: 1px solid var(--border);
}

.legal-toc h4 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--outline);
  margin-bottom: 4px;
}

.legal-toc a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

.legal-toc a:hover {
  color: var(--primary);
}

@media (max-width: 880px) {
  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .legal-toc {
    position: static;
  }
}

.legal-body {
  max-width: 70ch;
  color: var(--text-muted);
}

.legal-body h2 {
  font-size: 1.5rem;
  margin-top: 48px;
  margin-bottom: 14px;
  scroll-margin-top: 96px;
  color: #eaf0ff;
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body h3 {
  font-size: 1.0625rem;
  margin-top: 28px;
  margin-bottom: 8px;
  color: var(--text);
}

.legal-body p,
.legal-body ul,
.legal-body ol {
  margin-bottom: 16px;
}

.legal-body ul,
.legal-body ol {
  padding-left: 22px;
}

.legal-body li {
  margin-bottom: 8px;
}

.legal-body strong {
  color: var(--text);
  font-weight: 700;
}

.legal-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.callout {
  display: grid;
  gap: 8px;
  padding: 20px 22px;
  margin-bottom: 28px;
  border-radius: var(--r-md);
  background: rgba(255, 198, 64, 0.07);
  border: 1px solid rgba(255, 198, 64, 0.28);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.callout strong {
  color: var(--secondary);
}

.callout.info {
  background: rgba(138, 235, 255, 0.06);
  border-color: var(--border-accent);
}

.callout.info strong {
  color: var(--primary);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.9375rem;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.legal-table th {
  color: var(--text);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-scroll {
  overflow-x: auto;
  margin-bottom: 20px;
}

/* --- 404 ----------------------------------------------------------------- */

.notfound {
  min-height: 68vh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 22px;
}

.notfound .terrarium {
  --stage: 260px;
}

/* --- Motion -------------------------------------------------------------- */

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.75;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

/* Plants sway the way they do in the app: a slow ±2 degree rotation about the base. */
@keyframes sway {
  0%,
  100% {
    transform: rotate(-2.2deg);
  }
  50% {
    transform: rotate(2.2deg);
  }
}

/* Creatures idle rather than wander here — a slow breath in place. */
@keyframes bob {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3%) scale(1.02);
  }
}

@keyframes drift {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  12% {
    opacity: 0.9;
  }
  70% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx, 30px), var(--dy, -46px));
  }
}

/* Scroll reveal, applied by js/main.js. */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .firefly {
    display: none;
  }
}
