/* Ludo Dynasty marketing site — palette and type lifted directly from the app's own
   design system (mobile/src/theme/theme.ts, "Neon Midnight Stadium") so the site and
   the product feel like one thing. */

:root {
  --bg: #0b1326;
  --bg-alt: #060e20;
  --surface: #131b2e;
  --surface-hi: #171f33;
  --surface-hi2: #222a3d;

  --text: #dae2fd;
  --text-muted: #b7ac93;
  --outline: #3a3324;

  --gold: #fbbf24;
  --gold-light: #ffe1a7;
  --gold-ink: #402d00;

  --blue: #0566d9;
  --blue-light: #adc6ff;

  --mint: #50e0a5;
  --mint-light: #71fdbf;

  --violet: #a855f7;
  --violet-light: #d9b8ff;

  --piece-red: #ef4444;
  --piece-green: #10b981;
  --piece-yellow: #fbbf24;
  --piece-blue: #3b82f6;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

.icon-sprite {
  display: none;
}

.mode-icon {
  background: none;
  flex-shrink: 0;
  margin-top: 6px;
}

.mode-icon-gold { color: var(--gold); }
.mode-icon-mint { color: var(--mint); }
.mode-icon-blue { color: var(--blue-light); }
.mode-icon-violet { color: var(--violet-light); }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 56px);
}

h1, h2, h3 {
  font-family: "Outfit", sans-serif;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 19, 38, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(58, 51, 36, 0.5);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 12px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--gold-light);
}

.nav-cta {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  padding: 6px;
  cursor: pointer;
}

@media (min-width: 720px) {
  .nav-cta {
    display: inline-flex;
  }
}

@media (max-width: 719px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: var(--surface);
    border-bottom: 1px solid var(--outline);
    padding: 8px clamp(20px, 5vw, 56px) 16px;
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
  }
  .nav-links[data-open="true"] {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 10px 0;
    width: 100%;
  }
  .nav-toggle {
    display: inline-flex;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--gold-ink);
  border-bottom: 3px solid #6c4f00;
}

.btn-secondary {
  background: var(--surface-hi2);
  color: var(--text);
  border-bottom: 3px solid #000000;
  border-bottom-color: #05080f;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--outline);
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.55;
  cursor: default;
  filter: none !important;
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.82rem;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(56px, 9vw, 108px) clamp(48px, 7vw, 88px);
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 640px;
  background: radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.14), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(5, 102, 217, 0.18), transparent 50%);
  pointer-events: none;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  align-items: center;
  position: relative;
}

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1.05fr 0.85fr;
  }
}

.hero-copy h1 {
  font-weight: 900;
  font-size: clamp(2.4rem, 5.6vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin-top: 14px;
}

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

.hero-sub {
  margin-top: 18px;
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.trust-line {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.trust-line svg {
  flex-shrink: 0;
  color: var(--mint);
}

.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-frame.hero-phone {
  width: min(240px, 66vw);
  animation: float 5s ease-in-out infinite;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.hero-piece {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

.hero-piece::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.p1 { background: var(--piece-red); top: -6px; left: 8%; animation: float 4.5s ease-in-out infinite; }
.p2 { background: var(--piece-green); bottom: 8%; right: -10px; animation: float 5.5s ease-in-out infinite 0.4s; }
.p3 { background: var(--piece-blue); bottom: -10px; left: 18%; animation: float 5s ease-in-out infinite 0.8s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-45deg); }
  50% { transform: translateY(-14px) rotate(-45deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-phone,
  .hero-piece {
    animation: none;
  }
}

/* ---------- Section scaffolding ---------- */

section {
  padding-block: clamp(48px, 7vw, 88px);
}

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.section-head h2 {
  font-weight: 800;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  margin-top: 10px;
}

.section-head p {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 1rem;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--outline), transparent);
  border: none;
}

/* ---------- Games (Ludo / SnL) ---------- */

.games-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .games-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.game-card {
  background: var(--surface-hi);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 30px);
  position: relative;
  overflow: hidden;
}

.game-card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}

.game-card.ludo .tag {
  color: var(--gold-ink);
  background: var(--gold);
}

.game-card.snl .tag {
  color: #003824;
  background: var(--mint);
}

.game-card h3 {
  margin-top: 14px;
  font-size: 1.4rem;
  font-weight: 800;
}

.game-card p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.board-motif {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 150px;
  height: 150px;
  border-radius: 24px;
  opacity: 0.16;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
}

.board-motif span {
  border: 1px solid currentColor;
}

.game-card.ludo .board-motif { color: var(--gold); }
.game-card.snl .board-motif { color: var(--mint); }

/* ---------- Feature grid ---------- */

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

.feature-card {
  background: var(--surface-hi);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

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

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hi2);
  color: var(--gold);
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
}

.feature-card p {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---------- Modes strip ---------- */

.modes-strip {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.mode-pill {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.mode-pill .dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mode-pill h4 {
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0;
}

.mode-pill p {
  margin-top: 4px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* ---------- Auto-update ---------- */

.update-panel {
  background: linear-gradient(135deg, var(--surface-hi), var(--surface));
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .update-panel {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
  }
}

.update-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-badge {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--mint-light), var(--mint) 60%, #007a54 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #003824;
  box-shadow: 0 20px 50px -18px rgba(80, 224, 165, 0.5);
}

.update-steps {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.update-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.update-steps .num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-hi2);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-steps p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.update-steps strong {
  color: var(--text);
}

/* ---------- Download ---------- */

.download-panel {
  background: var(--surface-hi);
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 52px);
  text-align: center;
}

.download-panel h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 800;
}

.download-panel .version-tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-hi2);
  padding: 4px 12px;
  border-radius: 999px;
}

.download-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.download-note {
  margin-top: 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- Changelog ---------- */

.changelog {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.changelog-entry {
  background: var(--surface-hi);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  padding: 20px 22px;
}

.changelog-entry .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.changelog-entry .ver {
  font-weight: 800;
  color: var(--gold);
}

.changelog-entry .date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.changelog-entry ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: grid;
  gap: 6px;
}

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

footer {
  border-top: 1px solid var(--outline);
  padding-block: 36px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-fine {
  margin-top: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 70ch;
  opacity: 0.85;
}

/* ---------- Screenshot showcase ---------- */

.showcase-row {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  grid-template-columns: 1fr;
  align-items: center;
}

.showcase-row + .showcase-row {
  margin-top: clamp(48px, 7vw, 84px);
}

@media (min-width: 860px) {
  .showcase-row {
    grid-template-columns: 1fr 1fr;
  }
  .showcase-row.reverse .showcase-art {
    order: 2;
  }
}

.showcase-art {
  display: flex;
  justify-content: center;
}

.showcase-copy .eyebrow {
  margin-bottom: 4px;
}

.showcase-copy h3 {
  font-weight: 800;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  margin-top: 8px;
}

.showcase-copy > p {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 46ch;
}

.showcase-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  max-width: 46ch;
}

.showcase-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
}

.showcase-list svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--mint);
}

/* Phone frame — the shared shell every recreated screen sits inside. */

.phone-frame {
  width: min(248px, 62vw);
  aspect-ratio: 9 / 19.5;
  background: #060a14;
  border-radius: 38px;
  padding: 8px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04);
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 74px;
  height: 18px;
  background: #060a14;
  border-radius: 0 0 14px 14px;
  z-index: 5;
}

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

/* Real screenshots, dropped straight into the phone frame. */

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

/* The Ludo board screenshot has a dev-only toast near the bottom (Metro connection
   status) that isn't part of the real UI — masked with a solid strip matching the
   app's own background rather than re-cropping the source image. */
.shot-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18%;
  background: var(--bg);
  pointer-events: none;
}

/* ---------- Reveal-on-scroll ---------- */

[data-reveal] {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}
