/* ==========================================================================
   Materia — Production stylesheet
   Consolidates: design tokens, aurora background, shared site chrome,
   brand mark, material blocks (Glass / Jelly / Pop), landing-page hero +
   pillars, and legal-page container styles. Static, framework-free,
   mobile-first. Tokens mirror the in-game theme system (Inter, navy/purple
   base, cyan + violet accent) so the site reads as the same product.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* -------- Base surface (matches in-game dark theme) -------- */
  --bg-top: #111827;
  --bg-mid: #231b35;
  --bg-low: #080b12;
  --bg-void: #05060b;

  /* -------- Text -------- */
  --ink:    #f8fbff;
  --fg-2:   #e6edf7;
  --muted:  rgba(248, 251, 255, 0.68);
  --fg-4:   rgba(248, 251, 255, 0.48);
  --fg-5:   rgba(248, 251, 255, 0.34);

  /* -------- Borders / strokes -------- */
  --line:    rgba(255, 255, 255, 0.14);
  --line-2:  rgba(134, 237, 255, 0.28);

  /* -------- Brand accents (from the in-game theme tokens) -------- */
  --accent:     #86edff; /* cyan */
  --accent-two: #c797ff; /* violet */
  --danger:     #ff8192;
  --promo:      #6ee7a8;

  /* -------- Panels -------- */
  --panel:        rgba(18, 22, 36, 0.72);
  --panel-strong: rgba(12, 15, 26, 0.92);

  /* -------- Material families (Glass / Jelly / Pop) -------- */
  --glass-a: #d8f4ff;
  --glass-b: #6fc4ff;
  --glass-c: #3a7bd5;
  --jelly-a: #ffe27a;
  --jelly-b: #c76bff;
  --jelly-c: #6bd1ff;
  --pop-a:   #ffd9cf;
  --pop-b:   #ff9eb0;
  --pop-c:   #f5b783;

  /* -------- Type -------- */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* -------- Radii -------- */
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-full: 9999px;

  /* -------- Motion -------- */
  --ease-soft: cubic-bezier(0.45, 0.05, 0.55, 0.95);
  --ease-pop:  cubic-bezier(0.19, 1.00, 0.22, 1.00);
  --dur-fast:  180ms;
  --dur-med:   320ms;

  /* -------- Shadows -------- */
  --shadow-card:
    0 6px 20px rgba(0, 0, 0, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   Reset + base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
body { position: relative; overscroll-behavior-x: none; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
section { scroll-margin-top: 88px; }
body {
  font-family: var(--font-body);
  color: var(--fg-2);
  background: var(--bg-top);
  background-image: radial-gradient(ellipse 100% 70% at 50% 0%, rgba(134, 237, 255, 0.10) 0%, transparent 50%);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
noscript { display: none !important; }

/* ==========================================================================
   Aurora page background (landing only) — soft cyan/violet mesh, no stars.
   ========================================================================== */
.aurora {
  position: fixed; inset: 0;
  background: linear-gradient(190deg, var(--bg-top) 0%, var(--bg-mid) 55%, var(--bg-low) 100%);
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.aurora::before {
  content: '';
  position: absolute;
  top: -12%; left: 50%;
  width: 1300px; height: 950px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(134, 237, 255, 0.22) 0%, rgba(134, 237, 255, 0.06) 42%, transparent 72%);
  filter: blur(20px);
  animation: aurora-drift 14s var(--ease-soft) infinite;
}
.aurora::after {
  content: '';
  position: absolute;
  bottom: 10%; right: -10%;
  width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(199, 151, 255, 0.20) 0%, transparent 70%);
  filter: blur(40px);
  animation: aurora-drift 18s var(--ease-soft) infinite reverse;
}
@keyframes aurora-drift {
  0%, 100% { transform: translate(-50%, 0)    scale(1);    opacity: 0.9; }
  50%      { transform: translate(-52%, 2%)   scale(1.05); opacity: 1;   }
}
@media (prefers-reduced-motion: reduce) {
  .aurora::before, .aurora::after,
  .hero-glow, .hero-glow::after,
  .float-block, .rays-spin { animation: none !important; }
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */
.wrap        { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 880px;  margin: 0 auto; padding: 0 24px; }

section { padding: 120px 0; position: relative; }
@media (max-width: 720px) { section { padding: 80px 0; } }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-full);
  background: rgba(134, 237, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
  font-size: clamp(32px, 4.6vw, 52px);
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}
.section-body {
  color: var(--muted);
  font-size: 18px;
  max-width: 56ch;
  text-wrap: pretty;
}
.section-head {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 20px; margin-bottom: 72px;
}
.section-head.center { align-items: center; text-align: center; }
.section-head.center .section-body { margin: 0 auto; }

/* ==========================================================================
   Shared site header (baked into every page)
   ========================================================================== */
.mt-topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: linear-gradient(180deg, rgba(8,10,18,0.82) 0%, rgba(8,10,18,0.55) 100%);
  border-bottom: 1px solid var(--line);
}
.mt-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.mt-brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.mt-brand:hover { text-decoration: none; }
.mt-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--glass-a) 0%, var(--accent) 45%, var(--accent-two) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(134, 237, 255, 0.25));
  line-height: 1;
}
.mt-nav { display: flex; gap: 2px; align-items: center; }
.mt-nav a {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft);
}
.mt-nav a:hover { color: var(--ink); background: rgba(134, 237, 255, 0.10); }
.mt-nav a[aria-current="page"] { color: var(--accent); }

.mt-nav-cta {
  margin-left: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px;
  padding: 0 16px;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.02em;
  color: #071018 !important;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-two) 100%);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(134, 237, 255, 0.30), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform var(--dur-fast) var(--ease-pop), box-shadow var(--dur-fast) var(--ease-soft);
}
.mt-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(134, 237, 255, 0.45), inset 0 1px 0 rgba(255,255,255,0.45);
  text-decoration: none;
}
.mt-nav-cta svg { width: 14px; height: 14px; }

@media (max-width: 768px) {
  .mt-nav a[href="support.html"],
  .mt-nav a[href="legal.html"] { display: none; }
  .mt-topbar-inner { height: 60px; padding: 0 16px; }
  .mt-wordmark     { font-size: 18px; }
  .mt-nav-cta      { height: 36px; padding: 0 14px; font-size: 12px; margin-left: 0; }
}
@media (max-width: 540px) { .mt-topbar-inner { height: 56px; padding: 0 14px; } }
@media (max-width: 380px) { .mt-wordmark { font-size: 16px; } .mt-nav-cta { height: 34px; padding: 0 12px; font-size: 12px; } }

/* ==========================================================================
   Brand mark — abstract crossing-bars glyph (matches the app icon), used
   at header size and scaled up in the hero. Pure CSS, no image asset.
   ========================================================================== */
.mt-mark {
  --mark-size: 28px;
  width: var(--mark-size); height: var(--mark-size);
  position: relative;
  flex: 0 0 auto;
  display: inline-block;
}
.mt-mark svg { width: 100%; height: 100%; display: block; }

/* ==========================================================================
   Material blocks — reused in hero floats and pillar cards.
   Rounded, tactile puzzle-piece squares in three material families.
   ========================================================================== */
.block {
  --block-a: var(--glass-a);
  --block-b: var(--glass-b);
  --block-glow: rgba(111, 196, 255, 0.42);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  aspect-ratio: 1;
  border-radius: 18%;
  background: linear-gradient(155deg, var(--block-a) 0%, var(--block-b) 100%);
  box-shadow:
    0 6px 18px var(--block-glow),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 4px rgba(0, 0, 0, 0.16);
}
.block::before, .block::after { content: none !important; }
.block.glass { --block-a: var(--glass-a); --block-b: var(--glass-c); --block-glow: rgba(111, 196, 255, 0.45); }
.block.jelly { --block-a: var(--jelly-a); --block-b: var(--jelly-b); --block-glow: rgba(199, 107, 255, 0.42); }
.block.pop   { --block-a: var(--pop-a);   --block-b: var(--pop-b);   --block-glow: rgba(255, 158, 176, 0.42); }
.block.empty {
  background: rgba(255,255,255,0.05);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

/* ==========================================================================
   HERO (index)
   ========================================================================== */
.hero { padding: 88px 0 128px; position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 72px;
  align-items: center;
}
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; gap: 56px; } .hero { padding: 56px 0 80px; } }
@media (max-width: 768px) { .hero { padding: 40px 0 72px; } .hero-grid { gap: 44px; } }
@media (max-width: 540px) { .hero { padding: 32px 0 64px; } .hero-grid { gap: 36px; } }

.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.hero-eyebrow .pip {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--promo); box-shadow: 0 0 8px var(--promo);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 7.5vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 18px;
  text-wrap: balance;
}
.hero-title .gradient {
  background: linear-gradient(135deg, var(--glass-a) 0%, var(--accent) 45%, var(--accent-two) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(134, 237, 255, 0.30));
}
.hero-sub {
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--fg-2);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: 22px;
  max-width: 36ch;
}
.hero-body { font-size: 18px; color: var(--muted); max-width: 56ch; text-wrap: pretty; margin-bottom: 40px; }
.hero-ctas { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  height: 56px; padding: 0 22px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  font-weight: 600; font-size: 15px;
  transition: background var(--dur-fast) var(--ease-soft), border-color var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-pop);
}
.btn-ghost:hover { background: rgba(134, 237, 255, 0.10); border-color: rgba(134, 237, 255, 0.55); transform: translateY(-2px); text-decoration: none; }
.btn-ghost svg { width: 14px; height: 14px; opacity: 0.7; }

.hero-trust { font-size: 13px; color: var(--fg-4); margin-top: 10px; max-width: 52ch; line-height: 1.6; }
.hero-trust .dot { color: var(--fg-5); margin: 0 6px; }

.proof-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; max-width: 580px; }
.proof-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: var(--radius-full);
  background: rgba(134, 237, 255, 0.08); border: 1px solid var(--line-2);
  font-size: 13px; font-weight: 600; color: var(--fg-2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft);
}
.proof-pill:hover { border-color: rgba(134, 237, 255, 0.55); background: rgba(134, 237, 255, 0.14); }
.proof-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); flex: 0 0 auto; }

.btn-app-badge {
  display: inline-flex; height: 56px; align-items: center;
  transition: transform var(--dur-fast) var(--ease-pop), filter var(--dur-fast) var(--ease-soft);
}
.btn-app-badge:hover { transform: translateY(-2px); filter: drop-shadow(0 8px 22px rgba(134, 237, 255, 0.30)); text-decoration: none; }
.btn-app-badge img { height: 56px; width: auto; display: block; }
@media (max-width: 540px) { .btn-app-badge, .btn-app-badge img { height: 50px; } }

/* HERO VISUAL — phone with brand + board-glimpse (no gameplay claims) */
.hero-visual { position: relative; height: 600px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 940px) { .hero-visual { height: 540px; } }
@media (max-width: 768px) { .hero-visual { height: auto; min-height: 560px; padding: 32px 0; overflow: hidden; } }
@media (max-width: 540px) { .hero-visual { min-height: 520px; padding: 24px 0; } }
@media (max-width: 380px) { .hero-visual { min-height: 480px; padding: 20px 0; } }

.hero-glow {
  position: absolute; width: 720px; height: 720px; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(134, 237, 255, 0.38) 0%, rgba(199, 151, 255, 0.16) 42%, transparent 72%);
  filter: blur(24px); pointer-events: none;
  animation: glow-pulse 5s var(--ease-soft) infinite;
}
.hero-glow::after {
  content: ''; position: absolute; inset: -8%;
  background: radial-gradient(closest-side, rgba(199, 151, 255, 0.18) 0%, transparent 65%);
  filter: blur(32px); animation: glow-pulse-2 7s var(--ease-soft) infinite;
}
@keyframes glow-pulse    { 0%,100% { transform: translate(-50%,-50%) scale(1); opacity: .9; } 50% { transform: translate(-50%,-50%) scale(1.06); opacity: 1; } }
@keyframes glow-pulse-2  { 0%,100% { transform: scale(.95); opacity: .5; } 50% { transform: scale(1.05); opacity: .85; } }

.phone {
  position: relative; width: 290px; height: 580px; border-radius: 44px;
  background: linear-gradient(160deg, #171b28 0%, #0a0c14 100%);
  padding: 9px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1.5px rgba(134, 237, 255, 0.30),
    0 0 60px rgba(134, 237, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  z-index: 2;
}
@media (max-width: 768px) { .phone { width: min(80vw, 320px); height: calc(min(80vw, 320px) * 2); border-radius: 40px; } }
@media (max-width: 540px) { .phone { width: min(78vw, 300px); height: calc(min(78vw, 300px) * 2); } }
@media (max-width: 380px) { .phone { width: min(82vw, 280px); height: calc(min(82vw, 280px) * 2); } }

.phone::before {
  content: ''; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 88px; height: 22px; background: #000; border-radius: 12px; z-index: 3;
}
.phone-screen {
  position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden;
  background:
    radial-gradient(ellipse 120% 70% at 50% 0%, rgba(134, 237, 255, 0.22), transparent 60%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(199, 151, 255, 0.18), transparent 60%),
    #0a0c16;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 22px 32px; text-align: center;
}
.phone-mark {
  position: relative; z-index: 2;
  font-family: var(--font-display); font-weight: 800;
  font-size: 26px; letter-spacing: 0.14em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--glass-a) 0%, var(--accent) 45%, var(--accent-two) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(134, 237, 255, 0.45));
  margin-bottom: 6px;
}
.phone-tagline {
  position: relative; z-index: 2;
  font-size: 11px; letter-spacing: 0.24em; color: var(--glass-a);
  text-transform: uppercase; font-weight: 700; margin-bottom: 28px;
  text-shadow: 0 0 12px rgba(134, 237, 255, 0.35);
}

/* Board glimpse — a small grid of material blocks, not a literal gameplay claim */
.phone-board {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; width: 200px; margin-bottom: 22px;
}
.phone-board .block { width: 100%; }

.phone-materials {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
}
.phone-materials .m { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.phone-materials .block { width: 34px; }
.phone-materials .m-label { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-4); font-weight: 700; }

.phone-foot { margin-top: 10px; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-4); font-weight: 700; }
.phone-foot .accent { color: var(--glass-a); }

.float-block { position: absolute; z-index: 1; animation: float-y 4.2s var(--ease-soft) infinite; }
.float-block.delay-1 { animation-delay: .4s; }
.float-block.delay-2 { animation-delay: .9s; }
.float-block.delay-3 { animation-delay: 1.3s; }
.float-block.delay-4 { animation-delay: .7s; }
@keyframes float-y { 0%,100% { transform: translateY(0) rotate(var(--rot,0deg)); } 50% { transform: translateY(-10px) rotate(var(--rot,0deg)); } }

.float-block.f1 { top: 6%;    left: 4%;  --rot:-8deg; width: 72px; height: 72px; }
.float-block.f2 { top: 24%;   right: 0;  --rot:6deg;  width: 58px; height: 58px; }
.float-block.f3 { bottom: 26%; left: -2%; --rot:4deg;  width: 54px; height: 54px; }
.float-block.f4 { bottom: 8%; right: 4%; --rot:-5deg; width: 66px; height: 66px; }
.float-block.f5 { top: 50%;   left: -4%; --rot:10deg; width: 46px; height: 46px; }

@media (max-width: 768px) {
  .float-block.f1 { width: 60px; height: 60px; top: 4%; left: 2%; }
  .float-block.f2 { width: 50px; height: 50px; top: 18%; right: -2%; }
  .float-block.f3 { width: 46px; height: 46px; bottom: 22%; left: -3%; }
  .float-block.f4 { width: 52px; height: 52px; bottom: 10%; right: -2%; }
  .float-block.f5 { width: 38px; height: 38px; top: 48%; left: -3%; }
}
@media (max-width: 540px) {
  .float-block.f1, .float-block.f5 { display: none; }
  .float-block.f2 { width: 46px; height: 46px; top: 14%; right: -4%; }
  .float-block.f3 { width: 42px; height: 42px; bottom: 24%; left: -4%; }
  .float-block.f4 { width: 48px; height: 48px; bottom: 8%; right: -4%; }
}

/* ==========================================================================
   PILLARS — Place. Clear. Materials.
   ========================================================================== */
.pillars-grid { display: grid; gap: 28px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .pillars-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }

.pillar-card {
  position: relative; padding: 28px;
  background: linear-gradient(160deg, rgba(20, 24, 38, 0.90) 0%, rgba(9, 11, 20, 0.96) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform var(--dur-med) var(--ease-pop), border-color var(--dur-fast) var(--ease-soft), box-shadow var(--dur-med) var(--ease-soft);
}
.pillar-card:hover {
  transform: translateY(-4px);
  border-color: rgba(134, 237, 255, 0.45);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(134, 237, 255, 0.10);
}
.pillar-visual { height: 140px; margin-bottom: 24px; display: flex; align-items: center; justify-content: center; position: relative; }
.pillar-label { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; font-weight: 700; }
.pillar-title { font-family: var(--font-display); font-size: 27px; color: var(--ink); line-height: 1; margin-bottom: 12px; font-weight: 800; }
.pillar-body { color: var(--muted); font-size: 15px; line-height: 1.55; }

/* Place visual: piece descending toward a partial board */
.place-visual { position: relative; width: 130px; height: 140px; }
.place-visual .falling { position: absolute; top: 0; left: 40px; width: 46px; height: 46px; opacity: .8; animation: place-drop 2.4s ease-in-out infinite; }
.place-visual .board { position: absolute; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 130px; }
.place-visual .board .block { width: 100%; }
@keyframes place-drop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(14px); } }

/* Clear visual: a full row about to release */
.clear-visual { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.clear-visual .row { display: flex; gap: 6px; }
.clear-visual .row .block { width: 34px; }
.clear-visual .row.clearing .block { animation: clear-pulse 1.6s ease-in-out infinite; }
@keyframes clear-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.88); } }

/* Materials visual: Glass / Jelly / Pop swatches side by side */
.materials-visual { display: flex; align-items: flex-end; gap: 16px; }
.materials-visual .m { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.materials-visual .block { width: 58px; }
.materials-visual .m:nth-child(2) .block { width: 68px; }
.materials-visual .m-name { font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase; color: var(--fg-4); font-weight: 700; }

/* ==========================================================================
   Site footer (baked into every page)
   ========================================================================== */
.mt-footer {
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  padding: 56px 0 28px;
  margin-top: 80px;
  color: var(--muted);
}
.mt-footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.mt-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .mt-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 540px) { .mt-footer-grid { grid-template-columns: 1fr; gap: 28px; } }

.mt-foot-wordmark {
  font-family: var(--font-display); font-weight: 800;
  font-size: 20px; letter-spacing: 0.06em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--glass-a) 0%, var(--accent) 45%, var(--accent-two) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 14px; line-height: 1;
}
.mt-foot-brand p { color: var(--fg-4); font-size: 13px; max-width: 38ch; line-height: 1.6; }
.mt-foot-col h5 { font-size: 11px; letter-spacing: 0.20em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0 0 14px; }
.mt-foot-col a { display: block; color: var(--muted); font-size: 14px; padding: 4px 0; transition: color var(--dur-fast) var(--ease-soft); }
.mt-foot-col a:hover { color: var(--accent); }

.mt-foot-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--fg-4); font-size: 12px; }
.mt-foot-bottom p { line-height: 1.7; margin: 0; }
.mt-foot-compliance { margin-top: 16px; color: var(--fg-5); font-size: 11.5px; line-height: 1.6; max-width: 92ch; }

/* ==========================================================================
   LEGAL pages — .container card and inner typography
   ========================================================================== */
body.mt-legal { padding: 0; }
body.mt-legal .container {
  max-width: 800px; margin: 40px auto 0;
  background: linear-gradient(160deg, rgba(20, 24, 38, 0.90) 0%, rgba(9, 11, 20, 0.96) 100%);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(134, 237, 255, 0.16);
  box-shadow: 0 0 60px rgba(134, 237, 255, 0.08), 0 20px 40px rgba(0, 0, 0, 0.4);
}
body.mt-legal .container h1 { font-family: var(--font-display); color: #fff; margin-bottom: 10px; font-size: 1.8rem; text-align: center; line-height: 1.2; font-weight: 800; }
body.mt-legal .container .subtitle { color: var(--fg-4); margin-bottom: 30px; font-size: 0.95rem; text-align: center; }
body.mt-legal .container .last-updated { color: var(--fg-4); margin-bottom: 30px; font-size: 0.85rem; text-align: center; }
body.mt-legal .container h2 {
  color: var(--accent-two); margin-top: 35px; margin-bottom: 15px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(134, 237, 255, 0.24); font-size: 1.2rem; font-weight: 700;
}
body.mt-legal .container h3 { color: var(--glass-a); margin-top: 20px; margin-bottom: 10px; font-size: 1rem; font-weight: 700; }
body.mt-legal .container p { margin-bottom: 15px; color: var(--muted); line-height: 1.7; }
body.mt-legal .container ul, body.mt-legal .container ol { margin-bottom: 15px; padding-left: 25px; color: var(--muted); line-height: 1.7; }
body.mt-legal .container li { margin-bottom: 8px; }
body.mt-legal .container a { color: var(--accent-two); text-decoration: none; }
body.mt-legal .container a:hover { text-decoration: underline; }
body.mt-legal .container strong { color: var(--fg-2); }

body.mt-legal .container .contact-box {
  background: linear-gradient(135deg, rgba(134, 237, 255, 0.12) 0%, rgba(199, 151, 255, 0.10) 100%);
  border: 1px solid rgba(134, 237, 255, 0.26);
  padding: 25px; margin: 25px 0; border-radius: var(--radius-md); text-align: center;
}
body.mt-legal .container .contact-box p { margin-bottom: 10px; }
body.mt-legal .container .contact-email { font-size: 1.2rem; font-weight: 700; color: var(--accent-two); }
body.mt-legal .container .faq-item { background: rgba(134, 237, 255, 0.045); border: 1px solid rgba(134, 237, 255, 0.10); border-radius: 12px; padding: 20px; margin-bottom: 15px; }
body.mt-legal .container .faq-item h3 { margin-top: 0; color: var(--fg-2); }
body.mt-legal .container .faq-item p { margin-bottom: 0; }
body.mt-legal .container .tip-box { background: rgba(110, 231, 168, 0.10); border-left: 3px solid var(--promo); padding: 15px 20px; margin: 20px 0; border-radius: 0 12px 12px 0; }
body.mt-legal .container .tip-box p { color: #a7f3c8; margin-bottom: 0; }
body.mt-legal .container .warning-box { background: rgba(255, 129, 146, 0.10); border-left: 3px solid var(--danger); padding: 15px 20px; margin: 20px 0; border-radius: 0 12px 12px 0; }
body.mt-legal .container .warning-box p { color: #ffb3bd; margin-bottom: 0; }
body.mt-legal .container .highlight-box { background: rgba(134, 237, 255, 0.08); border-left: 3px solid var(--accent); padding: 15px 20px; margin: 20px 0; border-radius: 0 12px 12px 0; }
body.mt-legal .container .highlight-box p { margin-bottom: 0; }
body.mt-legal .container .info-box { background: rgba(134, 237, 255, 0.08); border: 1px solid rgba(134, 237, 255, 0.18); border-radius: 12px; padding: 20px; margin: 20px 0; }
body.mt-legal .container .info-box p { margin-bottom: 8px; }
body.mt-legal .container .info-box p:last-child { margin-bottom: 0; }
body.mt-legal .container table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.9rem; }
body.mt-legal .container th, body.mt-legal .container td { border: 1px solid rgba(134, 237, 255, 0.18); padding: 12px; text-align: left; vertical-align: top; }
body.mt-legal .container th { background: rgba(134, 237, 255, 0.12); color: var(--glass-a); font-weight: 700; }
body.mt-legal .container td { color: var(--muted); }

@media (max-width: 600px) {
  body.mt-legal .container { padding: 24px 20px; margin: 24px 16px 0; }
  body.mt-legal .container h1 { font-size: 1.5rem; }
  body.mt-legal .container h2 { font-size: 1.1rem; }
  body.mt-legal .container th, body.mt-legal .container td { padding: 10px; font-size: 0.85rem; }
}

/* Legal hub list (legal.html) */
.legal-hub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 24px 0; }
@media (max-width: 540px) { .legal-hub-grid { grid-template-columns: 1fr; } }
.legal-hub-card {
  display: block; padding: 20px 22px;
  background: rgba(134, 237, 255, 0.045);
  border: 1px solid rgba(134, 237, 255, 0.16);
  border-radius: 14px;
  transition: border-color var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-pop);
}
.legal-hub-card:hover { border-color: rgba(134, 237, 255, 0.5); background: rgba(134, 237, 255, 0.09); transform: translateY(-2px); text-decoration: none !important; }
.legal-hub-card .t { display: block; font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 4px; letter-spacing: 0.005em; }
.legal-hub-card .d { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ==========================================================================
   FAQ
   ========================================================================== */
#faq { padding-top: 0; }
#faq .wrap-narrow { max-width: 760px; }
#faq .faq-list { display: flex; flex-direction: column; gap: 12px; margin-top: 36px; }
#faq .faq-item {
  border: 1px solid rgba(134, 237, 255, 0.16);
  border-radius: 18px; padding: 4px 22px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft);
}
#faq .faq-item:hover { border-color: rgba(134, 237, 255, 0.32); }
#faq .faq-item[open] { border-color: var(--accent); background: rgba(134, 237, 255, 0.06); }
#faq .faq-item summary {
  cursor: pointer; list-style: none; padding: 18px 0;
  font-size: 1rem; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
#faq .faq-item summary::-webkit-details-marker { display: none; }
#faq .faq-item summary::marker { content: ""; }
#faq .faq-item summary::after {
  content: "+"; flex-shrink: 0; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-two); font-size: 1.5rem; font-weight: 400; line-height: 1;
  transition: color var(--dur-fast) var(--ease-soft);
}
#faq .faq-item[open] summary::after { content: "\2212"; }
#faq .faq-item p { margin: 0 0 18px; color: var(--fg-2); font-size: 0.95rem; line-height: 1.65; }
