/* Colours are the game's (lumen/lumen_art.gd); the ink outline and hard shadow are its cards'. */
:root {
  color-scheme: light;
  --ink: #0a0a12;
  --soft: rgba(10, 10, 18, 0.62);
  --paper: #fafafc;
  --floor: #ededf5;
  --cyan: #16b4d8;
  --magenta: #e0249c;
  --amber: #f0a020;
  --lime: #78c81e;
  --shade: #7a3cd6;
  --deep: #0f0a1d;
  --line: 3px solid var(--ink);
  --pop: 6px 6px 0 var(--ink);
  --r: 22px;
  --wide: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }  /* the hero's blobs bleed past the edges */

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 18px/1.55 ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

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

h1, h2 { margin: 0; font-weight: 900; letter-spacing: -0.03em; line-height: 0.95; text-wrap: balance; }
h2 { font-size: clamp(36px, 5.4vw, 64px); }
p { margin: 0 0 16px; }

/* Nav */

.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(12px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
  background: rgba(250, 250, 252, 0.82);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(10, 10, 18, 0.08);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 20px; letter-spacing: -0.02em; }
.brand img { border-radius: 10px; border: 2px solid var(--ink); }
.nav-cta {
  padding: 9px 18px; border: var(--line); border-radius: 99px;
  background: var(--cyan); color: #fff; text-decoration: none; font-weight: 800; font-size: 15px;
  box-shadow: 3px 3px 0 var(--ink); transition: transform 0.12s, box-shadow 0.12s;
}
.nav-cta:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }

/* Hero */

.hero {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 40px;
  max-width: var(--wide); margin: 0 auto; padding: 56px 24px 72px;
}
.blobs { position: absolute; inset: -80px -20vw 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blobs i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.5; animation: drift 18s ease-in-out infinite alternate; }
.b1 { width: 420px; height: 420px; left: 8%; top: 4%; background: #8cf6ff; }
.b2 { width: 380px; height: 380px; right: 10%; top: 0; background: #ff9ee6; animation-delay: -6s !important; }
.b3 { width: 320px; height: 320px; right: 26%; bottom: -60px; background: #ffd664; animation-delay: -11s !important; }
.b4 { width: 280px; height: 280px; left: 30%; bottom: 0; background: #d7ff78; opacity: 0.35 !important; }
@keyframes drift { to { transform: translate(40px, 30px) scale(1.12); } }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font-weight: 800; font-size: 15px; color: var(--soft); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(120, 200, 30, 0.22); animation: ping 1.6s ease-out infinite; }
@keyframes ping { 50% { box-shadow: 0 0 0 9px rgba(120, 200, 30, 0); } }

h1 { font-size: clamp(56px, 8vw, 112px); padding-bottom: 4px; }
h1 span {
  display: block; margin-top: 6px; padding-bottom: 0.12em;  /* the gradient fill stops at the box: room for the y */
  font-size: 0.5em; line-height: 1.1; letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--shade), var(--magenta) 55%, var(--amber));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { max-width: 25em; margin: 26px 0 30px; font-size: 21px; line-height: 1.45; color: var(--soft); }
.lead b { color: var(--ink); font-weight: 900; }

.hero-art { position: relative; justify-self: center; }
/* Phone frame: the game is portrait 9:16. */

.phone {
  position: relative; margin: 0;
  aspect-ratio: 9 / 16; width: 100%;
  border: 4px solid var(--ink); border-radius: 30px; overflow: hidden;
  background: var(--floor); box-shadow: var(--pop);
}
.phone video { display: block; width: 100%; height: 100%; object-fit: cover; }
.phone::after { /* the gloss */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.22), transparent 34%);
}
.hero .phone { width: min(380px, 78vw); }
.tilt { transform: rotate(2.5deg); }

/* Sign-up */

.join { max-width: 400px; }
.pill {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; height: 58px; margin: 0 0 12px;
  border: var(--line); border-radius: 99px; background: #fff; color: var(--ink);
  font: inherit; font-size: 18px; font-weight: 800; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink); transition: transform 0.12s, box-shadow 0.12s;
}
.pill:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.pill:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.pill:focus-visible, .nav-cta:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.pill svg { width: 22px; height: 22px; flex: none; }
.pill.apple { background: var(--ink); color: #fff; }
.fine { margin: 4px 0 0; font-size: 14px; color: var(--soft); }

.join-busy { display: flex; align-items: center; gap: 14px; height: 58px; font-weight: 800; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 4px solid rgba(10, 10, 18, 0.15); border-top-color: var(--cyan);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.join-done {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  border: var(--line); border-radius: var(--r); background: #eaffd0; box-shadow: 4px 4px 0 var(--ink);
  animation: pop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.join-done strong { display: block; font-size: 20px; font-weight: 900; }
.join-done span { color: var(--soft); font-size: 15px; }
.tick { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--lime); color: #fff; border: var(--line); }
.tick svg { width: 26px; height: 26px; }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }
.join-error { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: #ffe3ef; color: #9a0f5e; font-size: 15px; font-weight: 700; }
[hidden] { display: none !important; }

/* Clips */

.reel { padding: 120px 24px; background: var(--floor); border-top: var(--line); }
.row {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 88px;
  max-width: 940px; margin: 0 auto;
}
.row + .row { margin-top: 140px; }
.row.flip { grid-template-columns: minmax(0, 1fr) auto; }
.row.flip .phone { order: 2; }
.row .phone { width: min(320px, 74vw); }
.row.flip .phone { transform: rotate(2deg); }
.row:not(.flip) .phone { transform: rotate(-2deg); }
.copy h2 { margin-bottom: 20px; }
.copy p { max-width: 24em; margin: 0; font-size: 21px; line-height: 1.5; color: var(--soft); }
.dots { display: none; }
.phone.dark { border-color: #000; background: #000; box-shadow: 6px 6px 0 var(--ink), 0 0 60px 6px rgba(150, 70, 255, 0.4); }

/* Final call */

.final { padding: 120px 24px 96px; }
.final-card {
  max-width: 640px; margin: 0 auto; padding: 48px 32px; text-align: center;
  border: var(--line); border-radius: 32px; background: #fff; box-shadow: 10px 10px 0 var(--ink);
}
.final-icon { margin: -110px auto 18px; border: 4px solid var(--ink); border-radius: 28px; box-shadow: 5px 5px 0 var(--ink); }
.final h2 { margin-bottom: 14px; }
.final p { color: var(--soft); }
.final .join { margin: 26px auto 0; text-align: left; }
.final .fine { text-align: center; }

footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: var(--wide); margin: 0 auto; padding: 28px 24px max(28px, env(safe-area-inset-bottom));
  font-size: 14px; color: var(--soft); font-weight: 600;
}
footer nav { display: flex; gap: 20px; }

/* Scroll-in */

.anim .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.anim .reveal.in { opacity: 1; transform: none; }

/* Narrow */

@media (max-width: 820px) {
  body { font-size: 17px; }
  .hero { grid-template-columns: 1fr; gap: 48px; padding: 32px 20px 64px; text-align: center; }
  .hero .join { margin-inline: auto; }
  .eyebrow { justify-content: center; }
  .hero .lead { margin-inline: auto; }
  /* The clips swipe sideways, the next one peeking in from the edge. */
  .reel { padding: 72px 0 44px; }
  .rows {
    position: relative; display: flex; gap: 16px;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    padding: 8px 9vw 20px; scrollbar-width: none;
  }
  .rows::-webkit-scrollbar { display: none; }
  .row, .row.flip {
    flex: 0 0 82vw; scroll-snap-align: center;
    grid-template-columns: 1fr; align-content: start; gap: 24px; text-align: center; justify-items: center;
  }
  .row + .row { margin-top: 0; }
  .anim .rows .reveal { opacity: 1; transform: none; }
  .row .copy { min-height: 9.6em; }
  .row h2 { font-size: 30px; margin-bottom: 12px; }
  .row .phone, .row.flip .phone { order: 2; width: min(250px, 100%); transform: none; }
  .copy p { margin-inline: auto; font-size: 17px; }
  .dots { display: flex; justify-content: center; gap: 4px; }
  .dots button { width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; }
  .dots button::after {
    content: ""; display: block; width: 10px; height: 10px; margin: auto;
    border: 2px solid var(--ink); border-radius: 99px; transition: width 0.2s, background 0.2s;
  }
  .dots button.on::after { width: 26px; background: var(--ink); }
  .lead { font-size: 18px; }
  .final { padding: 100px 20px 72px; }
  .final-card { padding: 40px 22px; box-shadow: 6px 6px 0 var(--ink); }
}

@media (max-width: 520px) {
  .pill { font-size: 17px; }
}

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