/* marblesmash.com — landing page. Separate from the game (www/style.css). */
@font-face { font-family: "Outfit"; src: url("/fonts/outfit.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --bg: #05061a;
  --bg2: #0a0d2b;
  --ink: #f2f3ff;
  --dim: #a3a9d6;
  --line: rgba(160, 170, 255, .14);
  --panel: rgba(18, 21, 58, .62);
  --gold: #ffd76a;
  --orange: #ff9a4a;
  --cyan: #3ef0ff;
  --display: "Outfit", "Avenir Next", "Futura", system-ui, sans-serif;
  --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --r: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 var(--font);
  background-image:
    radial-gradient(1200px 700px at 85% -10%, rgba(120, 70, 255, .18), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(255, 140, 60, .10), transparent 60%),
    radial-gradient(1000px 800px at 50% 110%, rgba(40, 200, 255, .08), transparent 60%);
}
html, body { overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #1a1000; padding: 8px 14px; border-radius: 10px; z-index: 99; font-weight: 800; }
.skip:focus { left: 12px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px max(20px, calc((100vw - var(--wrap)) / 2));
  background: rgba(5, 6, 26, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon { border-radius: 9px; box-shadow: 0 2px 10px rgba(80, 90, 255, .35); }
.brand-word, .foot-brand span { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: .01em; }
.brand-word b, .foot-brand b { background: linear-gradient(180deg, #fff1cf, #ffb35a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--dim); text-decoration: none; font-weight: 700; font-size: 15px; transition: color .2s; }
.nav a:hover { color: var(--ink); }
.top-cta {
  text-decoration: none; font-weight: 800; font-size: 15px; color: #2a1200;
  padding: 9px 18px; border-radius: 999px;
  background: linear-gradient(180deg, #ffd59a, #ff9a4a); box-shadow: 0 4px 18px rgba(255, 140, 60, .35), inset 0 1px 0 rgba(255,255,255,.6);
}

/* ---------- hero ---------- */
.hero {
  position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px;
  max-width: var(--wrap); margin: 0 auto; padding: 72px 20px 56px; min-height: min(860px, 92vh);
}
.hero-sky {
  position: absolute; inset: -80px calc(50% - 50vw) 0; z-index: -1; pointer-events: none;
  background: url("/img/title.webp") 72% 40% / cover no-repeat;
  opacity: .32; filter: saturate(115%);
  -webkit-mask-image: radial-gradient(70% 70% at 70% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 70% 45%, #000 20%, transparent 75%);
}
.eyebrow { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .32em; text-transform: uppercase; color: #ffcf8a; }
.eyebrow i { width: 34px; height: 1px; background: linear-gradient(90deg, transparent, #ffcf8a); }
.eyebrow i:last-child { transform: scaleX(-1); }
.wordmark { margin: 14px 0 22px; font-weight: 900; font-size: clamp(64px, 10.5vw, 132px); line-height: .86; letter-spacing: -.02em; text-transform: uppercase; }
.wordmark span {
  display: block;
  background: linear-gradient(180deg, #fffaf0 0%, #ffe3b0 38%, #ffb35a 78%, #f0782a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 5px 0 #6a2c0e) drop-shadow(0 18px 30px rgba(255, 130, 50, .35));
}
.lede { font-size: clamp(18px, 1.6vw, 21px); color: #d8dbff; max-width: 34ch; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; min-width: 196px;
  padding: 11px 20px 11px 16px; border-radius: 16px; text-decoration: none;
  background: #000; color: #fff; border: 1px solid rgba(255,255,255,.28);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.store svg { width: 28px; height: 28px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.1; }
.store small { font-size: 11px; font-weight: 700; letter-spacing: .02em; opacity: .85; }
.store strong { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
a.store:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(120, 140, 255, .25); border-color: rgba(255,255,255,.6); }
.store.soon { background: rgba(255,255,255,.04); border-style: dashed; border-color: rgba(255,255,255,.22); cursor: default; }
.store.soon small { color: var(--gold); opacity: 1; }
.ticks { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 22px 0 0; padding: 0; color: var(--dim); font-weight: 700; font-size: 15px; }
.ticks li::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #7ff6ff 35%, #1593c9 80%); box-shadow: 0 0 10px rgba(62,240,255,.6); vertical-align: 1px; }

/* phone + live demo */
.hero-stage { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.08; }
.orbit-ring { position: absolute; inset: 4% -4%; border-radius: 50%; border: 1px solid rgba(255, 210, 140, .22); transform: rotateX(68deg) rotate(-12deg); box-shadow: 0 0 60px rgba(255, 170, 80, .15), inset 0 0 40px rgba(255, 170, 80, .1); }
.phone {
  position: relative; margin: 0; width: min(330px, 74vw); aspect-ratio: 9 / 19.2;
  border-radius: 48px; padding: 11px;
  background: linear-gradient(145deg, #2c2f55, #0d0f26 40%, #1c1f44);
  box-shadow: 0 40px 90px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08), inset 0 0 0 2px rgba(255,255,255,.06), 0 0 120px rgba(255, 150, 70, .18);
  transform: rotate(-4deg); animation: bob 7s ease-in-out infinite;
}
.phone::before { content: ""; position: absolute; top: 22px; left: 50%; width: 92px; height: 26px; transform: translateX(-50%); background: #000; border-radius: 20px; z-index: 2; }
.phone-screen {
  position: relative; height: 100%; border-radius: 38px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
  background: radial-gradient(120% 70% at 50% 45%, #2a1608 0%, #0d0b22 55%, #05061a 100%);
}
.demo-hud { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 62px 22px 0; font-weight: 800; font-size: 13px; }
.demo-world { color: #ffb37a; }
.demo-count { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border-radius: 99px; background: rgba(255,255,255,.07); font-family: var(--display); font-size: 16px; }
.demo-count i { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #fff, #ffe08a 25%, #ff8a3d 70%, #5a1d0a); }
.demo-count.pop { animation: pop .35s ease; }
#demo { width: 100%; aspect-ratio: 1; margin-top: 10%; }
.demo-goal { width: 78%; margin-top: 6%; font-weight: 800; font-size: 12px; color: #c9cdf3; }
.demo-goal span { display: flex; justify-content: space-between; margin-bottom: 6px; }
.demo-goal em { font-style: normal; color: #ffcf8a; }
.demo-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.demo-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ff9a4a, #ffd76a); box-shadow: 0 0 12px rgba(255,190,90,.7); transition: width .4s ease; }
.demo-tray { margin-top: auto; margin-bottom: 26px; width: 86%; display: flex; justify-content: space-around; padding: 16px 0; border-radius: 22px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.t { width: 42px; height: 22px; border-radius: 10px 10px 6px 6px; }
.t1 { background: linear-gradient(#ff7a92, #e8304f); }
.t2 { background: linear-gradient(#ffe07a, #f2a91a); width: 28px; }
.t3 { background: linear-gradient(#8ff07a, #2fbf3a); width: 52px; }
.float { position: absolute; border-radius: 50%; animation: drift 9s ease-in-out infinite; }
.float::after { content: ""; position: absolute; left: 22%; top: 16%; width: 34%; height: 22%; border-radius: 50%; background: rgba(255,255,255,.85); filter: blur(1px); transform: rotate(-30deg); }
.m1 { width: 64px; height: 64px; top: 8%; right: 6%; background: radial-gradient(circle at 35% 30%, #fff 0, #ffe1a1 18%, #ff9a4a 55%, #5d1c06 100%); box-shadow: 0 0 40px rgba(255,150,70,.5); }
.m2 { width: 40px; height: 40px; bottom: 16%; left: 2%; background: radial-gradient(circle at 35% 30%, #fff 0, #b9f8ff 20%, #2cc5ea 55%, #082a52 100%); box-shadow: 0 0 30px rgba(62,240,255,.45); animation-delay: -3s; }
.m3 { width: 26px; height: 26px; top: 30%; left: 8%; background: radial-gradient(circle at 35% 30%, #fff 0, #e6c8ff 20%, #9b5cff 55%, #26084f 100%); animation-delay: -5s; }
.m4 { width: 34px; height: 34px; bottom: 8%; right: 14%; background: radial-gradient(circle at 35% 30%, #fff 0, #ffc4d0 20%, #ff4f6d 55%, #4a0616 100%); animation-delay: -7s; }

/* ---------- facts ---------- */
.facts { max-width: var(--wrap); margin: 0 auto; padding: 8px 20px 40px; }
.facts dl { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.facts div { padding: 26px 22px; text-align: center; }
.facts div + div { border-left: 1px solid var(--line); }
.facts dt { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 4vw, 48px); line-height: 1; background: linear-gradient(180deg, #fff, #ffc26e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.facts dd { margin: 8px 0 0; color: var(--dim); font-weight: 700; font-size: 15px; }

/* ---------- sections ---------- */
section { scroll-margin-top: 80px; }
.how, .worlds, .figures, .faq { max-width: var(--wrap); margin: 0 auto; padding: 88px 20px 24px; }
.sec-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.kicker { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: var(--cyan); }
.sec-head h2, .fair h2, .final h2 { font-size: clamp(34px, 4.4vw, 54px); font-weight: 800; margin: 12px 0 14px; }
.sec-head p:last-child { color: var(--dim); font-size: 18px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; padding: 30px 28px 32px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); counter-increment: s; }
.step::before { content: "0" counter(s); position: absolute; top: 24px; right: 26px; font-family: var(--display); font-weight: 800; font-size: 15px; color: rgba(255,255,255,.25); }
.step-art { width: 108px; height: 108px; margin-bottom: 18px; overflow: visible; }
.step h3 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.step p { color: var(--dim); }
.drag { animation: place 3.2s cubic-bezier(.5,0,.2,1) infinite; }
.spin { transform-origin: 60px 60px; animation: spin 6s linear infinite; }
.drop { animation: drop 2.4s cubic-bezier(.5,0,.6,1) infinite; }

.world-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.world-grid li {
  position: relative; padding: 26px 26px 24px; border-radius: var(--r); overflow: hidden;
  background: linear-gradient(160deg, hsla(var(--h), 90%, 60%, .16), rgba(16, 18, 50, .7) 55%);
  border: 1px solid hsla(var(--h), 90%, 70%, .22);
  transition: transform .25s ease, border-color .25s;
}
.world-grid li::after { content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, hsla(var(--h), 100%, 75%, .55), hsla(var(--h), 90%, 50%, 0) 70%); }
.world-grid li:hover { transform: translateY(-4px); border-color: hsla(var(--h), 90%, 70%, .5); }
.w-n { font-family: var(--display); font-weight: 800; font-size: 14px; color: hsl(var(--h), 95%, 72%); letter-spacing: .1em; }
.world-grid h3 { font-size: 30px; font-weight: 800; margin: 6px 0 8px; }
.world-grid p { color: #c9cdf3; }
.w-lv { display: inline-block; margin-top: 16px; font-size: 13px; font-weight: 800; color: var(--dim); padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.06); }

.figure-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.figure-grid li {
  padding: 18px 18px 22px; border-radius: var(--r); text-align: center;
  background: radial-gradient(90% 70% at 50% 40%, hsla(var(--h), 90%, 55%, .16), rgba(12, 14, 40, .75) 70%);
  border: 1px solid var(--line);
}
.figure-grid img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 20px 30px rgba(0,0,0,.5)); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.figure-grid li:hover img { transform: scale(1.04) rotate(-1deg); }
.figure-grid h3 { font-size: 22px; font-weight: 800; margin-top: 6px; }
.figure-grid p { color: var(--dim); font-weight: 700; font-size: 15px; }
.gold-note { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 26px; color: #e9dcb4; font-weight: 700; text-align: center; }
.gold-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #fff, #ffe9a0 25%, #e8a91c 65%, #5a3a00); box-shadow: 0 0 16px rgba(255, 210, 90, .6); }

.fair { max-width: var(--wrap); margin: 0 auto; padding: 88px 20px 24px; }
.fair-card {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center;
  padding: 48px; border-radius: 30px;
  background: linear-gradient(135deg, rgba(62, 240, 255, .10), rgba(120, 90, 255, .10) 50%, rgba(255, 150, 70, .08));
  border: 1px solid rgba(160, 200, 255, .2);
}
.fair-card header > p:last-child { color: var(--dim); font-size: 18px; }
.fair-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fair-list li { padding: 14px 18px 14px 50px; position: relative; border-radius: 14px; background: rgba(5, 6, 26, .45); color: #cfd3f7; }
.fair-list li::before { content: ""; position: absolute; left: 17px; top: 18px; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #a6ffb0 25%, #2fbf3a 65%, #0b3d12); }
.fair-list b { color: var(--ink); }

.faq-list { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border-radius: 16px; background: var(--panel); border: 1px solid var(--line); transition: border-color .2s; }
.faq details[open] { border-color: rgba(255, 215, 106, .35); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; position: relative; font-family: var(--display); font-weight: 700; font-size: 19px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 400; color: var(--gold); transition: transform .25s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: #c9cdf3; }

.final { max-width: 760px; margin: 0 auto; padding: 110px 20px 90px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.final-icon { border-radius: 26px; box-shadow: 0 20px 60px rgba(90, 100, 255, .45); animation: bob 6s ease-in-out infinite; }
.final h2 { margin-top: 26px; }
.final > p { color: var(--dim); font-size: 19px; }
.final .stores { justify-content: center; }

.foot { border-top: 1px solid var(--line); padding: 36px max(20px, calc((100vw - var(--wrap)) / 2)) 44px; display: grid; grid-template-columns: auto 1fr; gap: 16px 30px; align-items: center; color: var(--dim); font-size: 14px; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.foot-brand img { border-radius: 8px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; justify-self: end; }
.foot nav a { text-decoration: none; font-weight: 700; }
.foot nav a:hover { color: var(--ink); }
.foot > p { grid-column: 1 / -1; font-size: 13px; opacity: .75; }

/* reveal on scroll (only when JS runs) */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .rv.in { opacity: 1; transform: none; }

@keyframes bob { 0%,100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes drift { 0%,100% { transform: translate(0,0); } 50% { transform: translate(8px,-16px); } }
@keyframes pop { 50% { transform: scale(1.18); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes place { 0%,15% { transform: translate(-14px,-22px); opacity: .0; } 30% { opacity: 1; } 60%,100% { transform: translate(6px,14px); opacity: 1; } }
@keyframes drop { 0% { transform: translateY(-10px); opacity: 0; } 20% { opacity: 1; } 70%,100% { transform: translateY(14px); opacity: 0; } }

@media (max-width: 960px) {
  .nav { display: none; }
  .top-cta { margin-left: auto; }
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 44px; gap: 10px; min-height: 0; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .lede { margin: 0 auto; }
  .stores, .ticks { justify-content: center; }
  .hero-stage { width: 100%; max-width: 440px; margin: 10px auto 0; }
  .facts dl { grid-template-columns: repeat(2, 1fr); }
  .facts div:nth-child(3) { border-left: 0; }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .steps, .world-grid { grid-template-columns: 1fr; }
  .figure-grid { grid-template-columns: repeat(2, 1fr); }
  .fair-card { grid-template-columns: 1fr; padding: 30px 22px; }
  .foot { grid-template-columns: 1fr; }
  .foot nav { justify-self: start; }
  .how, .worlds, .figures, .faq, .fair { padding-top: 64px; }
}
@media (max-width: 520px) {
  .hero { padding-top: 34px; }
  .eyebrow { letter-spacing: .2em; font-size: 12px; }
  .eyebrow i { width: 18px; }
  .lede { font-size: 17px; }
  .stores { gap: 10px; width: 100%; justify-content: center; }
  .store { min-width: 0; flex: 1 1 0; max-width: 220px; padding: 10px 12px; gap: 8px; justify-content: center; }
  .store svg { width: 22px; height: 22px; }
  .store strong { font-size: 17px; }
  .store small { font-size: 10px; }
  .figure-grid { gap: 10px; }
  .figure-grid li { padding: 10px 10px 16px; }
  .figure-grid h3 { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; }
}
