/* Loadia landing - "Nebula" dark. Tokens mirror the app theme (src/theme/index.ts)
   so web matches device 1:1. Flat surfaces, one violet accent, no gradients. */
:root {
  --bg: #0e0f16;
  --bg-sunken: #090a10;
  --surface: #171823;
  --surface-2: #1f2030;
  --surface-3: #292b3d;
  --hairline: #2a2c3c;
  --text: #f2f3f8;
  --text-dim: #a9aec2;
  --text-muted: #868ba3;
  --violet: #7b6cf5;
  --blue: #52a8ff;
  --pink: #ff5c9d;
  --teal: #2dd4bf;
  --gold: #ffc24b;
  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(123, 108, 245, 0.35); }

/* ── layout ─────────────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; padding: 96px 0; }
.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 14px;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
h1 { font-size: clamp(40px, 7vw, 76px); }
h2 { font-size: clamp(30px, 4.4vw, 50px); }
h3 { font-size: 21px; font-weight: 700; }
p { color: var(--text-dim); }
.lead { font-size: clamp(18px, 2.2vw, 22px); max-width: 56ch; }
.grad-text { color: var(--violet); }
/* the Loadia wordmark is white (matches the app's brand lockup); the violet
   .grad-text accent stays on in-copy highlights like "every game" / "the Oracle" */
.brand .grad-text { color: #fff; }
.muted { color: var(--text-muted); }
.center { text-align: center; }

/* ── buttons / badges ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s var(--ease), filter 0.15s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--violet);
  color: #fff;
  padding: 13px 26px;
  box-shadow: 0 8px 20px -10px rgba(123, 108, 245, 0.55);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-ghost { border: 1px solid var(--hairline); color: var(--text); background: rgba(255, 255, 255, 0.02); }

.badges { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
/* google-play.png is pre-cropped to its content box (no built-in padding),
   so both badges share one height and read as the same size. */
.store-badge { display: inline-flex; align-items: center; transition: transform 0.15s var(--ease); }
.store-badge:hover { transform: translateY(-2px); }
.store-badge img { height: 50px; width: auto; display: block; object-fit: contain; }

/* ── header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(11, 7, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--text-dim); font-size: 15px; font-weight: 500; transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }

/* ── language switcher ──────────────────────────────────────────────────── */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  color: var(--text-dim);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 7px 11px;
  min-height: 32px;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active { color: #fff; background: rgba(123, 108, 245, 0.22); box-shadow: inset 0 0 0 1px rgba(123, 108, 245, 0.5); }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero { padding-top: 64px; padding-bottom: 64px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero-copy { max-width: 600px; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { margin-bottom: 26px; color: var(--text-dim); }
.pillars { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 28px; font-family: var(--font-display); font-weight: 700; color: var(--text); }
.pillars span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.pillars b { font-weight: 700; white-space: nowrap; }
.pillars i { color: var(--violet); font-style: normal; }
.hero-cta-note { margin-top: 16px; font-size: 14px; color: var(--text-muted); }
.hero-art { position: relative; display: flex; justify-content: center; }

/* generic UI atoms reused across mockups */
.cover {
  border-radius: 9px;
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

.stars { display: inline-flex; gap: 2px; color: var(--gold); font-size: 14px; letter-spacing: 1px; }
.stars.sm { font-size: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--hairline); color: var(--text-dim); }
.chip.on { background: rgba(123, 108, 245, 0.16); border-color: rgba(123, 108, 245, 0.5); color: #cdc6ff; }

/* ── section heading block ──────────────────────────────────────────────── */
.sec-head { max-width: 60ch; margin-bottom: 40px; position: relative; z-index: 1; }
.sec-head.center { margin-left: auto; margin-right: auto; }
.sec-head p { margin-top: 14px; font-size: 18px; }
.caption { margin-top: 16px; font-size: 14px; color: var(--text-muted); font-style: italic; }

/* feature row layout */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.feature.reverse .feature-art { order: -1; }
.feature-art { position: relative; }
/* grid items default to min-width:auto, so a wide child (a padded recap card,
   a mockup panel) refuses to shrink and overflows the viewport on mobile. Let the
   1fr columns shrink to fit instead. */
.feature > *, .hero-grid > *, .lists-grid > * { min-width: 0; }

/* glass panel for bare-UI crops */
.panel {
  background: rgba(26, 27, 40, 0.92);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}

/* ── recognition wall ───────────────────────────────────────────────────── */
.wall { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.wall-track { display: flex; gap: 14px; width: max-content; animation: marquee 60s linear infinite; }
.wall .cover { width: 116px; flex: none; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── status ladder bento ────────────────────────────────────────────────── */
.ladder { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.rating-control { display: flex; align-items: center; gap: 14px; padding-top: 18px; border-top: 1px solid var(--hairline); }
.rating-control .stars { font-size: 30px; }
.rating-control .rc-num { font-family: var(--font-display); font-weight: 800; font-size: 26px; }

/* ── diary ──────────────────────────────────────────────────────────────── */
.diary-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.diary-row:last-child { border-bottom: 0; }
.diary-row .cover { width: 40px; border-radius: 7px; }
.diary-row .d-body { flex: 1; }
.diary-row .d-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.diary-row .d-date { font-size: 12px; color: var(--text-muted); }
.streak-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 92, 157, 0.12); border: 1px solid rgba(255, 92, 157, 0.35); color: #ffb3d2; font-weight: 700; font-family: var(--font-display); margin-bottom: 16px; }

/* ── oracle ─────────────────────────────────────────────────────────────── */
.oracle-card { text-align: center; }
.orb { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 22px; background: var(--violet); box-shadow: 0 0 60px rgba(123, 108, 245, 0.55); animation: pulse 4s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.oracle-rows { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; text-align: left; }
.oracle-row .or-label { font-size: 13px; font-weight: 600; color: var(--violet); margin-bottom: 8px; }
.oracle-row .or-covers { display: flex; gap: 8px; }
.oracle-row .or-covers .cover { width: 56px; }

/* ── activity feed ──────────────────────────────────────────────────────── */
.feed-card { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.feed-card:last-child { border-bottom: 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; background: var(--violet); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 15px; }
.feed-body { flex: 1; }
.feed-meta { font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.feed-meta b { color: var(--text); font-weight: 700; }
.feed-review { font-size: 14px; color: var(--text-dim); }
.feed-react { margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.feed-cover { width: 46px; flex: none; align-self: center; }

/* ── game stats card (mirrors the in-app community stats row) ─────────────── */
.stats-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 26px; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.4); }
.sc-game { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.sc-cover { width: 60px; height: 80px; border-radius: 10px; overflow: hidden; flex: none; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); }
.sc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-name { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.sc-meta { color: var(--text-muted); font-size: 14px; margin-top: 3px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-cell { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: 14px; padding: 18px 10px; text-align: center; }
.stat-cell .sc-num { font-family: var(--font-display); font-weight: 800; font-size: 26px; }
.stat-cell .sc-num.sc-like { color: var(--pink); }
.stat-cell .sc-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.07em; margin-top: 5px; }

/* ── lists ──────────────────────────────────────────────────────────────── */
.lists-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.list-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 16px; }
.list-card .lc-covers { display: flex; }
.list-card .lc-covers .cover { width: 46px; margin-left: -14px; border: 2px solid var(--surface); }
.list-card .lc-covers .cover:first-child { margin-left: 0; }
.list-card .lc-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin-top: 12px; }
.list-card .lc-count { font-size: 13px; color: var(--text-muted); }

/* ── cross-platform ─────────────────────────────────────────────────────── */
.platform-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 28px; margin-top: 40px; color: var(--text-muted); font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.platform-row span { display: inline-flex; align-items: center; gap: 8px; }

/* ── plus comparison ────────────────────────────────────────────────────── */
.compare { max-width: 640px; margin: 0 auto; border: 1px solid var(--hairline); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--hairline); font-size: 15px; }
.compare thead th { font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.compare th.col, .compare td.col { text-align: center; width: 96px; }
.compare .col-plus { position: relative; }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare .yes { color: var(--teal); font-weight: 700; }
.compare .no { color: var(--text-muted); }
.compare .plus-head { color: var(--violet); }
.price-line { text-align: center; margin-top: 18px; color: var(--text-dim); font-size: 15px; }
.price-line b { color: var(--text); font-family: var(--font-display); }

/* ── closing ────────────────────────────────────────────────────────────── */
.closing { text-align: center; }
.closing .badges { justify-content: center; margin-top: 28px; }

/* ── footer ─────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--hairline); padding: 56px 0 40px; background: var(--bg-sunken); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.footer-links a { color: var(--text-dim); font-size: 14px; transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-legal { margin-top: 32px; font-size: 12px; color: var(--text-muted); line-height: 1.7; max-width: 720px; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  section { padding: 72px 0; }
  /* copy first on mobile: headline + badges above the fold, phone render after */
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature.reverse .feature-art { order: 0; }
  /* hide the text nav links on narrow screens, keep the switcher + CTA */
  .nav-links { display: none; }
  .lists-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  section { padding: 60px 0; }
  /* keep header on one row: tighten gaps, shrink the CTA so it always fits */
  .nav { height: 60px; }
  .nav-cta { gap: 10px; }
  .nav-cta .btn-primary { padding: 11px 16px; font-size: 14px; }
  .lang-btn { padding: 8px 9px; font-size: 12px; }
  /* feature mockups must never push the page wider than the viewport */
  .feature-art, .panel, .recap-card { max-width: 100%; }
  .panel { padding: 20px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  h1 { font-size: clamp(32px, 10vw, 44px); }
  .hero h1 { word-break: break-word; }
  .pillars span { gap: 14px; }
  .pillars { gap: 6px 14px; }
  .recap-stats { grid-template-columns: 1fr 1fr; }
  .recap-card { padding: 24px; }
  .store-badge img { height: 44px; }
  /* comparison table: trim cell padding + narrower check columns so it fits */
  .compare th, .compare td { padding: 13px 12px; font-size: 14px; }
  .compare th.col, .compare td.col { width: 56px; }
  .compare thead th { font-size: 15px; }
  /* recognition wall: smaller covers feel right at phone width */
  .wall .cover { width: 96px; }
}

@media (max-width: 380px) {
  .wrap { padding: 0 14px; }
  h1 { font-size: clamp(28px, 9vw, 38px); }
  /* drop the FR/EN labels to flag-only would lose clarity; instead keep both
     but make sure the row never overflows */
  .nav-cta { gap: 8px; }
  .nav-cta .btn-primary { padding: 10px 13px; }
  .lang-btn { padding: 7px 7px; }
  .compare th.col, .compare td.col { width: 48px; }
  .compare th, .compare td { padding: 12px 9px; }
  .platform-row { gap: 10px 18px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- v2: real app screenshots (device frame baked into the PNG) ---- */
.phone-shot { height: auto; filter: drop-shadow(0 40px 80px rgba(0,0,0,0.55)); }
.hero-art { min-height: 560px; align-items: center; }
.hero-main { width: min(300px, 68vw); position: relative; z-index: 2; transform: rotate(3deg); }
.hero-back {
  width: min(240px, 52vw); position: absolute; left: 50%; top: 30px; z-index: 1;
  transform: translateX(-92%) rotate(-9deg); opacity: 0.55;
  filter: brightness(0.65) drop-shadow(0 30px 60px rgba(0,0,0,0.5));
}
.devices { position: relative; display: flex; justify-content: center; padding: 8px 0 4px; }
.dev-front { width: min(280px, 62vw); position: relative; z-index: 2; transform: translateX(-30px) rotate(3deg); }
.dev-back {
  width: min(240px, 50vw); position: absolute; left: 50%; top: 26px; z-index: 1;
  transform: translateX(4%) rotate(-7deg); opacity: 0.6; filter: brightness(0.65);
}

/* ---- v2: mobile overflow hardening ----
   clip (not hidden) kills the iOS horizontal rubber-band that decorative
   absolutes (.glow) and the marquee track otherwise allow. */
html, body { overflow-x: clip; }
img, svg, video { max-width: 100%; }
.phone-shot { max-width: none; }        /* sized explicitly above */
img { height: auto; }
.wall { overflow: hidden; }

@media (max-width: 600px) {
  /* single straight phone render, no tilt, no reserved dead space */
  .hero-art { min-height: 0; }
  .hero-back { display: none; }
  .hero-main { width: min(250px, 64vw); transform: none; }
  .dev-back { display: none; }
  .dev-front { transform: none; }
}
