/* Prime: Legends Arena — site theme. Mirrors the app's Theme.swift (graphite + prime gold). */
:root {
  --bg: #0E0E10;
  --bg-2: #141416;
  --surface: #17171A;
  --surface-hi: #212127;
  --line: rgba(255,255,255,0.08);
  --gold: #F5C451;
  --gold-deep: #E0A82E;
  --text: #F2F5FA;
  --dim: #9AA4B2;
  --blue: #4A90E2;
  --purple: #A855F7;
  --green: #34C759;
  --red: #FF453A;
  --maxw: 1120px;
  --radius: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, 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);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  background: rgba(14,14,16,0.66);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: 0.02em; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 4px 14px rgba(0,0,0,0.5); }
.brand b { font-size: 15px; }
.brand span { color: var(--gold); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--dim); font-size: 14px; font-weight: 600; }
.nav a:hover { color: var(--text); text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: #171717; font-weight: 800; font-size: 14px;
  padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer;
  box-shadow: 0 6px 20px rgba(245,196,81,0.28);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 28px rgba(245,196,81,0.4); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.nav .menu-only { display: none; }

/* ---- Hero ---- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
/* Dark scrim over the left so the headline stays crisp and the 3D cards emerge on the right. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 6%, rgba(14,14,16,0.72) 32%, rgba(14,14,16,0) 62%);
}
@media (max-width: 760px) {
  .hero::after { background: linear-gradient(180deg, rgba(14,14,16,0) 30%, rgba(14,14,16,0.85) 55%, var(--bg) 78%); }
}
.hero::before { /* fallback + depth glow behind the canvas */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 70% 30%, rgba(245,196,81,0.16), transparent 70%),
    radial-gradient(50% 60% at 20% 80%, rgba(74,144,226,0.10), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}
.hero-inner { position: relative; z-index: 2; padding: 80px 0; max-width: 640px;
  transition: opacity .4s ease, transform .4s ease; }
/* When a card is being inspected, clear the copy out so the zoomed card owns the stage —
   fully hidden (not just dimmed) so no headline bleeds through the card. */
.hero.inspecting .hero-inner { opacity: 0; transform: translateX(-16px); pointer-events: none; }

/* Coverflow nav arrows — over the card side, hidden while inspecting. */
.hero-nav {
  position: absolute; bottom: 8%; z-index: 3;
  width: 46px; height: 46px; border-radius: 50%; display: none;
  align-items: center; justify-content: center; cursor: pointer;
  font-size: 26px; line-height: 1; padding-bottom: 3px;
  color: var(--text); background: rgba(23,23,26,0.66); backdrop-filter: blur(8px);
  border: 1px solid rgba(245,196,81,0.35); transition: background .2s, border-color .2s, opacity .3s;
}
.hero.has-arrows .hero-nav { display: flex; }
.hero-nav:hover { background: rgba(245,196,81,0.16); border-color: var(--gold); }
.hero-nav:disabled { opacity: 0.28; cursor: default; }
/* A centred pair tucked under the card cluster (right ~38% of the viewport). */
.hero-nav.prev { right: calc(38vw + 28px); }
.hero-nav.next { right: calc(38vw - 28px); }
.hero.inspecting .hero-nav { opacity: 0; pointer-events: none; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); background: rgba(245,196,81,0.10);
  border: 1px solid rgba(245,196,81,0.25); padding: 6px 12px; border-radius: 999px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 66px); line-height: 1.03; letter-spacing: -0.02em;
  font-weight: 850; margin: 22px 0 18px;
}
.hero h1 .g { background: linear-gradient(120deg, var(--gold), #FFE39A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(16px, 2.2vw, 20px); color: var(--dim); max-width: 30em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 30px; }
.appstore-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; border: 1px solid rgba(255,255,255,0.22); color: #fff;
  padding: 10px 18px; border-radius: 14px; font-weight: 700;
}
.appstore-badge:hover { text-decoration: none; border-color: rgba(255,255,255,0.5); }
.appstore-badge small { display: block; font-size: 10px; font-weight: 500; opacity: 0.8; letter-spacing: 0.04em; }
.appstore-badge b { font-size: 18px; line-height: 1; }
.hero .soon { font-size: 13px; color: var(--dim); }
.tap-hint { margin-top: 26px; font-size: 13px; color: var(--dim); opacity: 0.85;
  animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.hero.inspecting .tap-hint { opacity: 0; }

/* ---- Card inspector ---- */
.card-detail {
  position: absolute; z-index: 4; top: 50%; right: max(24px, calc((100vw - var(--maxw))/2 + 24px));
  width: 340px; transform: translateY(-50%) translateX(30px); opacity: 0; pointer-events: none;
  background: rgba(19,19,22,0.95); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(245,196,81,0.3); border-radius: 22px; padding: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6); transition: opacity .4s ease, transform .4s cubic-bezier(.2,.8,.2,1);
}
.card-detail.show { opacity: 1; transform: translateY(-50%) translateX(0); pointer-events: auto; }
.cd-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface-hi); color: var(--dim); font-size: 14px; cursor: pointer; }
.cd-close:hover { color: var(--text); border-color: var(--gold); }
.cd-top { display: flex; align-items: center; gap: 14px; }
.cd-ovr { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.cd-ovr b { font-size: 44px; font-weight: 900; color: var(--gold); }
.cd-ovr span { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; color: var(--dim); }
.cd-leg { font-size: 11px; font-weight: 900; letter-spacing: 0.12em; color: var(--gold);
  background: rgba(245,196,81,0.12); border: 1px solid rgba(245,196,81,0.3); padding: 5px 10px; border-radius: 999px; }
.card-detail h3 { font-size: 26px; margin: 16px 0 10px; letter-spacing: -0.01em; }
.cd-tags { display: flex; gap: 8px; margin-bottom: 20px; }
.cd-tags span { font-size: 12px; font-weight: 700; color: var(--dim);
  background: var(--surface-hi); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.cd-stats { display: grid; gap: 12px; }
.cd-stat { display: grid; grid-template-columns: 62px 1fr 30px; align-items: center; gap: 10px; }
.cd-stat label { font-size: 12px; color: var(--dim); }
.cd-stat .bar { height: 7px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; }
.cd-stat .bar i { display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold)); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.cd-stat b { font-size: 14px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.cd-lore { color: var(--dim); font-size: 13px; margin: 18px 0 14px; line-height: 1.5; font-style: italic; }
.cd-foot { color: var(--dim); font-size: 11px; border-top: 1px solid var(--line); padding-top: 14px; }
.cd-foot b { color: var(--gold); }
#hero-canvas { cursor: default; }
#hero-canvas.pointable { cursor: pointer; }

@media (max-width: 860px) {
  .card-detail { top: auto; bottom: 0; left: 0; right: 0; width: 100%; transform: translateY(30px);
    /* Solid sheet — reads as a panel even where backdrop-filter isn't supported. */
    background: rgba(16,16,19,0.98); border-radius: 22px 22px 0 0; border-bottom: 0;
    padding: 22px 24px calc(22px + env(safe-area-inset-bottom));
    box-shadow: 0 -24px 60px rgba(0,0,0,0.7); }
  .card-detail.show { transform: translateY(0); }
  .card-detail::before { content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
    width: 42px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.22); }
}

/* ---- Section scaffolding ---- */
section { position: relative; padding: 92px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head .kicker { color: var(--gold); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; font-size: 12px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.02em; margin: 12px 0 14px; line-height: 1.1; }
.section-head p { color: var(--dim); font-size: 17px; }

/* ---- Features ---- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: linear-gradient(180deg, var(--surface), var(--bg));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: border-color .2s ease, transform .2s ease;
}
.feature:hover { border-color: rgba(245,196,81,0.35); transform: translateY(-3px); }
.feature .ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(245,196,81,0.12); color: var(--gold); font-size: 22px; margin-bottom: 16px;
}
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--dim); font-size: 15px; }

/* ---- Showcase (device screenshots) ---- */
.showcase { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.shots { display: flex; gap: 26px; overflow-x: auto; padding: 8px 2px 24px; scroll-snap-type: x mandatory; }
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-thumb { background: var(--surface-hi); border-radius: 8px; }
.phone {
  flex: 0 0 auto; scroll-snap-align: center; width: 250px;
  border-radius: 38px; padding: 10px; background: #0b0b0d;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 30px 70px rgba(0,0,0,0.6), 0 0 0 1px rgba(245,196,81,0.06);
}
.phone img { border-radius: 30px; width: 100%; }
.phone figcaption { text-align: center; color: var(--dim); font-size: 13px; margin-top: 14px; font-weight: 600; }

/* ---- Membership band ---- */
.member {
  background:
    radial-gradient(70% 120% at 80% 0%, rgba(245,196,81,0.14), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--bg));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.member .grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.member ul { list-style: none; margin-top: 22px; display: grid; gap: 14px; }
.member li { display: flex; gap: 12px; align-items: flex-start; color: var(--text); }
.member li i { color: var(--gold); font-style: normal; font-size: 18px; line-height: 1.5; }
.member li span { color: var(--dim); font-size: 15px; }
.member li b { display: block; color: var(--text); font-size: 16px; }
.fairtag { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--green); background: rgba(52,199,89,0.12); padding: 4px 10px; border-radius: 999px; }
.member .card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-align: center;
}
.member .card .crown { font-size: 40px; }
.member .card .price { font-size: 42px; font-weight: 850; color: var(--gold); margin: 8px 0 2px; }
.member .card .price small { font-size: 16px; color: var(--dim); font-weight: 600; }
.member .card .note { color: var(--dim); font-size: 14px; }

/* ---- CTA band ---- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.02em; }
.cta-band p { color: var(--dim); font-size: 17px; margin: 12px auto 28px; max-width: 34em; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg); padding: 46px 0 60px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.site-footer .brand b { font-size: 14px; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { color: var(--dim); font-size: 14px; font-weight: 600; }
.foot-links a:hover { color: var(--text); text-decoration: none; }
.copy { color: var(--dim); font-size: 13px; width: 100%; border-top: 1px solid var(--line); padding-top: 22px; }

/* ---- Legal / support pages ---- */
.legal { max-width: 760px; margin: 0 auto; padding: 60px 24px 100px; }
.legal h1 { font-size: 34px; letter-spacing: -0.02em; }
.legal .sub { color: var(--dim); margin: 6px 0 30px; }
.legal h2 { font-size: 20px; margin: 38px 0 12px; }
.legal p, .legal li { color: #D7DCE4; font-size: 16px; }
.legal p, .legal ul, .legal ol { margin: 12px 0; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin: 7px 0; }
.legal strong { color: var(--text); }
.legal table { border-collapse: collapse; width: 100%; margin: 18px 0; font-size: 15px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { color: var(--gold); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.legal code { background: var(--surface-hi); padding: 1px 6px; border-radius: 5px; font-size: 0.9em; }
.legal .back { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 14px; margin-bottom: 8px; }

/* ---- Support cards ---- */
.faq { display: grid; gap: 14px; margin-top: 24px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px;
}
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--gold); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--dim); padding-bottom: 16px; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .features { grid-template-columns: 1fr 1fr; }
  .member .grid { grid-template-columns: 1fr; gap: 32px; }
  .nav a:not(.btn) { display: none; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .hero { min-height: 88vh; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
