/* ============================================================
   LANTERNFOX GAMES — Design System
   Aesthetic: Warm Noir / Lantern Light
   Fonts: Cormorant Garamond (display) · Syne (UI) · JetBrains Mono (tiles)
   ============================================================ */

/* ---- Design Tokens ---- */
:root {
  /* Backgrounds — warm dark */
  --bg-0: #090704;
  --bg-1: #110e08;
  --bg-2: #1a1508;
  --bg-card: #1e160c;

  /* Amber palette */
  --amber: #e8a534;
  --amber-light: #f0bc5c;
  --amber-08: rgba(232, 165, 52, 0.08);
  --amber-12: rgba(232, 165, 52, 0.12);
  --amber-20: rgba(232, 165, 52, 0.20);
  --amber-30: rgba(232, 165, 52, 0.30);

  /* Text */
  --text-1: #f5efe6;
  --text-2: #b09a7a;
  --text-3: #70583a;

  /* Tile text colors (progressively brighter) */
  --t2-color:   #c4a87a;
  --t4-color:   #cc8845;
  --t8-color:   #c4622a;
  --t16-color:  #b84020;
  --t32-color:  #d46840;
  --t64-color:  #e08045;
  --t128-color: #e8a534;
  --t256-color: #f0bc5c;
  --t512-color: #ead060;

  /* Typography */
  --ff-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --ff-ui:      'Syne', 'Segoe UI', system-ui, sans-serif;
  --ff-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Layout */
  --max-w: 1100px;
  --pad-x: clamp(20px, 5vw, 60px);
  --section-y: clamp(80px, 12vh, 130px);

  /* Easing */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--ff-ui);
  background-color: var(--bg-0);
  color: var(--text-1);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--amber);
  color: var(--bg-0);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: var(--ff-ui);
  font-weight: 700;
  z-index: 200;
}
.skip-link:focus { top: 1rem; }


/* ============================================================
   NAVIGATION
   ============================================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 1.25rem var(--pad-x);
  transition: padding 0.4s var(--ease-out);
}
.site-header.scrolled { padding: 0.75rem var(--pad-x); }

.nav-pill {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(17, 14, 8, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--amber-12);
  border-radius: 100px;
  padding: 0.4rem 0.6rem 0.4rem 0.4rem;
  transition: background 0.4s, border-color 0.4s;
}
.site-header.scrolled .nav-pill {
  background: rgba(17, 14, 8, 0.92);
  border-color: var(--amber-20);
}

.nav-home {
  display: flex;
  align-items: center;
  padding: 0.2rem 0.4rem 0.2rem 0.2rem;
}
.nav-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
}

.nav-links { display: flex; align-items: center; }

.nav-link {
  font-family: var(--ff-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 0.35rem 0.7rem;
  border-radius: 100px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text-1);
  background: var(--amber-08);
}


/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px var(--pad-x) 60px;
  overflow: hidden;
}

/* Dot grid texture */
.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

/* Atmospheric glow */
.hero-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.atm-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.atm-glow-1 {
  width: 560px;
  height: 560px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
  background: radial-gradient(circle, rgba(232, 165, 52, 0.11) 0%, transparent 70%);
  animation: glowPulse 7s ease-in-out infinite;
}
.atm-glow-2 {
  width: 280px;
  height: 280px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  background: radial-gradient(circle, rgba(232, 165, 52, 0.2) 0%, transparent 70%);
  animation: glowPulse 7s ease-in-out infinite reverse;
  animation-delay: -3.5s;
}
@keyframes glowPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Logo */
.logo-stage {
  position: relative;
  width: clamp(180px, 28vw, 280px);
  height: clamp(180px, 28vw, 280px);
  margin: 0 auto 2rem;
  animation: fadeUp 0.9s var(--ease-out) 0.1s both;
}
.logo-halo {
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 165, 52, 0.18) 0%, transparent 70%);
  animation: haloPulse 4.5s ease-in-out infinite;
}
@keyframes haloPulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
.hero-logo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(232, 165, 52, 0.28));
  animation: logoFloat 5.5s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Hero text — staggered entrance */
.studio-label {
  font-family: var(--ff-ui);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.9rem;
  animation: fadeUp 0.8s var(--ease-out) 0.35s both;
}
.hero-headline {
  font-family: var(--ff-display);
  font-size: clamp(3.8rem, 9vw, 7.5rem);
  font-weight: 600;
  line-height: 0.95;
  color: var(--text-1);
  margin-bottom: 1.25rem;
  animation: fadeUp 0.8s var(--ease-out) 0.55s both;
}
.hero-headline em {
  font-style: italic;
  color: var(--amber);
}
.hero-sub {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: var(--text-2);
  max-width: 420px;
  margin: 0 auto 2.5rem;
  animation: fadeUp 0.8s var(--ease-out) 0.75s both;
}

/* CTA buttons */
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.8s var(--ease-out) 0.95s both;
}
.btn-primary {
  font-family: var(--ff-ui);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: var(--amber);
  color: var(--bg-0);
  padding: 0.8rem 1.9rem;
  border-radius: 100px;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  display: inline-block;
}
.btn-primary:hover {
  background: var(--amber-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(232, 165, 52, 0.28);
}
.btn-ghost {
  font-family: var(--ff-ui);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 0.8rem 1.9rem;
  border-radius: 100px;
  border: 1px solid var(--amber-20);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
  display: inline-block;
}
.btn-ghost:hover {
  color: var(--text-1);
  border-color: var(--amber-30);
  transform: translateY(-2px);
}

/* Scroll beacon */
.scroll-beacon {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.35;
}
.scroll-track {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--amber), transparent);
  animation: scrollBeacon 2.2s ease-in-out infinite;
}
@keyframes scrollBeacon {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}

/* Shared section divider */
.section-rule {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--amber-12), transparent);
  margin-bottom: var(--section-y);
}


/* ============================================================
   SHOWCASE SECTION
   ============================================================ */

.showcase {
  padding: 0 var(--pad-x) var(--section-y);
}
.showcase-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

/* Shared type */
.eyebrow {
  display: block;
  font-family: var(--ff-ui);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
}
.section-headline {
  font-family: var(--ff-display);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 600;
  line-height: 1;
  color: var(--text-1);
  margin-bottom: 1.1rem;
}
.section-body {
  font-size: clamp(0.92rem, 1.3vw, 1.05rem);
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.feature-item {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}
.feature-mark {
  color: var(--amber);
  font-size: 0.45rem;
  margin-top: 0.5rem;
  flex-shrink: 0;
}
.feature-text {
  font-size: 0.93rem;
  color: var(--text-2);
  line-height: 1.65;
}
.feature-text strong {
  color: var(--text-1);
  font-weight: 600;
}

.store-row { display: flex; }
.store-badge {
  font-family: var(--ff-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid var(--amber-20);
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
}

/* Tile board */
.showcase-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.board-frame {
  background: var(--bg-card);
  border: 1px solid var(--amber-08);
  border-radius: 20px;
  padding: 14px;
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(232, 165, 52, 0.05);
}
.board-grid {
  display: grid;
  grid-template-columns: repeat(4, 70px);
  grid-template-rows: repeat(4, 70px);
  gap: 10px;
}

/* Tiles */
.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-family: var(--ff-mono);
  font-weight: 500;
  font-size: 1.05rem;
  user-select: none;
  transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s;
  cursor: default;
}
.tile:not(.t-empty):hover {
  transform: scale(1.1) !important;
  z-index: 1;
  position: relative;
}

.t-empty {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.035);
}

/* Individual tile styles with staggered float */
.t2   { background: #1d1408; color: var(--t2-color);   border: 1px solid rgba(196,168,122,0.18); animation: tileFloat 5s ease-in-out infinite; animation-delay: 0s;    }
.t4   { background: #261908; color: var(--t4-color);   border: 1px solid rgba(204,136,69,0.18);  animation: tileFloat 5s ease-in-out infinite; animation-delay: -1s;   }
.t8   { background: #301608; color: var(--t8-color);   border: 1px solid rgba(196,98,42,0.18);   animation: tileFloat 5s ease-in-out infinite; animation-delay: -2s;   }
.t16  { background: #381208; color: var(--t16-color);  border: 1px solid rgba(184,64,32,0.18);   animation: tileFloat 5s ease-in-out infinite; animation-delay: -3s;   }
.t32  { background: #3c1608; color: var(--t32-color);  border: 1px solid rgba(212,104,64,0.20);  animation: tileFloat 5s ease-in-out infinite; animation-delay: -4s;   }
.t64  { background: #401008; color: var(--t64-color);  border: 1px solid rgba(224,128,69,0.20);  animation: tileFloat 5s ease-in-out infinite; animation-delay: -0.5s; }
.t128 { background: #362008; color: var(--t128-color); border: 1px solid rgba(232,165,52,0.25);  box-shadow: 0 0 18px rgba(232,165,52,0.09);  animation: tileFloat 5s ease-in-out infinite; animation-delay: -1.5s; font-size: 0.88rem; }
.t256 { background: #362408; color: var(--t256-color); border: 1px solid rgba(240,188,92,0.25);  box-shadow: 0 0 22px rgba(240,188,92,0.11);  animation: tileFloat 5s ease-in-out infinite; animation-delay: -2.5s; font-size: 0.83rem; }
.t512 { background: #322808; color: var(--t512-color); border: 1px solid rgba(234,208,96,0.28);  box-shadow: 0 0 28px rgba(234,208,96,0.14);  animation: tileFloat 5s ease-in-out infinite; animation-delay: -3.5s; font-size: 0.83rem; }

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

.board-label {
  font-family: var(--ff-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
}


/* ============================================================
   STUDIO SECTION
   ============================================================ */

.studio {
  padding: 0 var(--pad-x) var(--section-y);
}
.studio-inner { max-width: var(--max-w); margin: 0 auto; }
.studio-header { margin-bottom: 3.5rem; }

.studio-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
}

.studio-prose {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.studio-prose p {
  font-size: clamp(0.92rem, 1.3vw, 1.05rem);
  color: var(--text-2);
  line-height: 1.85;
}

.pillars {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.pillar {
  padding-left: 1.5rem;
  border-left: 1px solid var(--amber-20);
  position: relative;
}
.pillar::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 0;
  height: 40%;
  width: 1px;
  background: var(--amber);
  opacity: 0.6;
}
.pillar-index {
  display: block;
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  color: var(--amber);
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
}
.pillar-title {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 0.45rem;
}
.pillar-body {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.7;
}


/* ============================================================
   LEGAL BAND
   ============================================================ */

.legal-band {
  padding: 3rem var(--pad-x);
  text-align: center;
  border-top: 1px solid var(--amber-08);
  border-bottom: 1px solid var(--amber-08);
  background: rgba(26, 21, 8, 0.45);
}
.legal-inner { max-width: 560px; margin: 0 auto; }
.legal-text {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--text-2);
  margin-bottom: 1rem;
}
.legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.legal-link {
  font-family: var(--ff-ui);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--amber);
  padding-bottom: 1px;
  border-bottom: 1px solid var(--amber-30);
  transition: color 0.2s, border-color 0.2s;
}
.legal-link:hover {
  color: var(--amber-light);
  border-color: var(--amber-light);
}
.legal-sep { color: var(--text-3); font-size: 1.1rem; }


/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  padding: 2rem var(--pad-x);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 0.78rem;
  color: var(--text-3);
}
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a {
  font-size: 0.78rem;
  color: var(--text-3);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--text-2); }


/* ============================================================
   LEGAL PAGES
   ============================================================ */

.legal-page-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 1rem var(--pad-x);
  background: rgba(9, 7, 4, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--amber-08);
}
.legal-nav {
  max-width: var(--max-w);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.legal-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.legal-brand img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 5px;
}
.legal-brand-name {
  font-family: var(--ff-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-2);
}
.legal-nav-links {
  display: flex;
  gap: 0.25rem;
}
.legal-nav-link {
  font-family: var(--ff-ui);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-2);
  padding: 0.35rem 0.7rem;
  border-radius: 100px;
  transition: color 0.2s, background 0.2s;
}
.legal-nav-link:hover,
.legal-nav-link[aria-current="page"] {
  color: var(--text-1);
  background: var(--amber-08);
}

/* Legal hero */
.legal-hero {
  padding: clamp(4rem, 8vh, 7rem) var(--pad-x) clamp(2.5rem, 5vh, 4rem);
  max-width: var(--max-w);
  margin: 0 auto;
  border-bottom: 1px solid var(--amber-08);
}
.legal-hero-eyebrow {
  display: block;
  font-family: var(--ff-ui);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.75rem;
}
.legal-hero-title {
  font-family: var(--ff-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 1;
  color: var(--text-1);
  margin-bottom: 1rem;
}
.legal-hero-meta {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--text-3);
  line-height: 1.7;
}

/* Legal main layout */
.legal-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem var(--pad-x) var(--section-y);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 4rem;
  align-items: start;
}

/* TOC sidebar */
.legal-toc {
  position: sticky;
  top: 80px;
}
.legal-toc-title {
  font-family: var(--ff-ui);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1rem;
}
.legal-toc ul {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid var(--amber-12);
}
.legal-toc li a {
  display: block;
  font-family: var(--ff-ui);
  font-size: 0.78rem;
  color: var(--text-3);
  padding: 0.3rem 0 0.3rem 1rem;
  transition: color 0.2s, border-left-color 0.2s;
  border-left: 2px solid transparent;
  margin-left: -1px;
  line-height: 1.4;
}
.legal-toc li a:hover {
  color: var(--amber);
  border-left-color: var(--amber-30);
}

/* Legal content */
.legal-content > .legal-intro {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.85;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--amber-08);
}

.legal-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--amber-08);
}
.legal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section h2 {
  font-family: var(--ff-display);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 1rem;
}

.legal-section p {
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.85;
  margin-bottom: 0.9rem;
}
.legal-section p:last-child { margin-bottom: 0; }

.legal-section ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 1rem 0;
}
.legal-section ul li {
  font-size: 0.92rem;
  color: var(--text-2);
  line-height: 1.7;
  position: relative;
  padding-left: 1.25rem;
}
.legal-section ul li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 0.22em;
  color: var(--amber);
  font-size: 0.35rem;
}
.legal-section strong {
  color: var(--text-1);
  font-weight: 600;
}


/* ============================================================
   SCROLL REVEAL
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 860px) {
  .showcase-inner,
  .studio-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .showcase-board { order: -1; }

  .legal-main {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 2rem;
  }
  .legal-toc {
    position: static;
    background: var(--bg-card);
    border: 1px solid var(--amber-08);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
  }
}

@media (max-width: 600px) {
  .nav-link {
    font-size: 0.71rem;
    padding: 0.3rem 0.55rem;
  }
  .hero-headline { line-height: 1; }
  .hero-cta { flex-direction: column; align-items: center; }
  .board-grid {
    grid-template-columns: repeat(4, 60px);
    grid-template-rows: repeat(4, 60px);
    gap: 8px;
  }
  .board-frame { padding: 10px; }
  .tile { font-size: 0.9rem; }
  .t128, .t256, .t512 { font-size: 0.72rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .legal-hero-title { font-size: clamp(2.2rem, 8vw, 3rem); }
  .legal-nav-links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
