/* The game website: white, big headlines in the balloon face Bagel Fat One, SF for smaller headings on Apple
   devices with Inter everywhere else, and the game's own colours as accents. Served as a static asset next to
   the pages site.ts renders. */
:root {
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --line: #e5e5ea;
  --soft: #f5f5f7;
  --felt: #1d2c30;
  --felt-hi: #2e474b;
  --cream: #fbf2e1;
  --lacquer: #d23a2c;
  --honey: #e5a531;
  --jade: #3a9b78;
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  --balloon: 'Bagel Fat One', var(--display);
  --text: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --nav: 56px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 17px/1.55 var(--text);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--lacquer); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.03em; line-height: 1.06; margin: 0; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 20; height: var(--nav);
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.nav-in { max-width: 1120px; height: 100%; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 18px/1 var(--display); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav a.link { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav a.link:hover { color: var(--ink); }

/* buttons */
.cta {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; border-radius: 999px;
  background: var(--ink); color: #fff; font: 600 17px/1 var(--text); text-decoration: none; border: 0;
}
.cta.small { padding: 9px 16px; font-size: 14px; }
.cta.soon { background: var(--soft); color: var(--ink); }

/* the fixed WebGL layer the phone is drawn in; the page scrolls over it */
#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
main, footer { position: relative; z-index: 2; }

/* hero */
.hero { position: relative; text-align: center; padding: 72px 16px 0; }
.eyebrow { font: 600 15px/1 var(--text); color: var(--lacquer); letter-spacing: 0; margin-bottom: 16px; }
.hero h1 { font-size: clamp(40px, 7.4vw, 88px); }
.hero .lead { font-size: clamp(18px, 2.2vw, 22px); color: var(--ink-2); max-width: 34ch; margin: 18px auto 30px; line-height: 1.32; letter-spacing: -0.022em; text-wrap: balance; }
.hero-phone { position: relative; margin: 48px auto 0; height: min(68vh, 680px); aspect-ratio: 71.9 / 150; }
.bead { position: absolute; width: 64px; height: 64px; will-change: transform; z-index: 3; pointer-events: none; }
.bead.b1 { left: 9%; top: 300px; width: 88px; height: 88px; }
.bead.b2 { right: 11%; top: 220px; }
.bead.b3 { left: 18%; top: 620px; width: 48px; height: 48px; }
.bead.b4 { right: 17%; top: 560px; width: 96px; height: 96px; }
.bead.b5 { left: 4%; top: 820px; width: 40px; height: 40px; }
.bead.b6 { right: 5%; top: 900px; width: 56px; height: 56px; }

/* the static phone shown before (or instead of) the 3D one: no WebGL, or the script still loading */
.flat {
  width: 100%; height: 100%; border-radius: 15% / 7.2%; background: #0b0b0c; padding: 2.4%;
  box-shadow: 0 0 0 1.5px #cdb89b, 0 40px 80px -30px rgba(29, 44, 48, 0.45);
}
.flat img { width: 100%; height: 100%; object-fit: cover; border-radius: 13% / 6.2%; }
.gl .flat { visibility: hidden; }

/* headlines: a squishy balloon face in a candy colour, extruded downwards like the game's lollies */
.pop {
  --c: var(--lacquer); --d: #8f2318;
  font-family: var(--balloon); font-weight: 400; letter-spacing: -0.005em; line-height: 1.08; color: var(--c);
  text-shadow:
    0 0.012em 0 var(--d), 0 0.024em 0 var(--d), 0 0.036em 0 var(--d), 0 0.048em 0 var(--d), 0 0.06em 0 var(--d),
    0 0.09em 0.06em rgba(29, 44, 48, 0.18), 0 0.16em 0.3em rgba(29, 44, 48, 0.14);
}
.pop.red { --c: #d8402f; --d: #8f2318; }
.pop.jade { --c: #3a9b78; --d: #1f5e48; }
.pop.indigo { --c: #4a5fb0; --d: #2b3a78; }
.pop.cream { --c: #fbf2e1; --d: #b8874e; }

/* the scroll story: steps on the left, the sticky phone on the right */
.story { max-width: 1120px; margin: 80px auto 0; padding: 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.story-phone-col { position: relative; }
.story-phone { position: sticky; top: calc(var(--nav) + (100vh - var(--nav)) / 2 - min(36vh, 340px)); height: min(72vh, 680px); aspect-ratio: 71.9 / 150; margin: 0 auto; }
.step { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; max-width: 440px; }
.step .tag { font: 600 14px/1 var(--text); color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.step .tag i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.step h2 { font-size: clamp(30px, 3.8vw, 46px); }
.step p { color: var(--ink-2); font-size: 19px; line-height: 1.4; letter-spacing: -0.018em; margin: 16px 0 0; }
.step .flat-mobile { display: none; }

/* the research behind the calm */
.science { max-width: 1120px; margin: 40px auto 64px; padding: 0 16px; }
.science-head { text-align: center; margin-bottom: 40px; }
.science-head h2 { font-size: clamp(32px, 4.4vw, 52px); }
.science-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fact { background: var(--soft); border-radius: 24px; padding: 28px 26px; display: flex; flex-direction: column; }
.fact h3 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.fact p { color: #3a3a3c; margin: 12px 0 20px; }
.fact cite { margin-top: auto; font-style: normal; font-size: 13px; line-height: 1.4; color: var(--ink-2); }


/* gallery of the rendered art */
.gallery { max-width: 1120px; margin: 24px auto 0; padding: 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.shot { margin: 0; border-radius: 28px; overflow: hidden; background: var(--felt); position: relative; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.shot:hover img { transform: scale(1.03); }
.shot.wide { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.shot.tall { aspect-ratio: 4 / 5; }
.shot figcaption { position: absolute; left: 28px; bottom: 24px; right: 28px; color: var(--cream); font: 600 20px/1.3 var(--display); letter-spacing: -0.02em; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5); }

/* closing call to action */
.closing { text-align: center; padding: 140px 16px 40px; }
.closing img { width: 112px; height: 112px; border-radius: 26px; margin: 0 auto 28px; box-shadow: 0 24px 48px -20px rgba(29, 44, 48, 0.5); }
.closing h2 { font-size: clamp(36px, 5.4vw, 64px); }
.closing p { color: var(--ink-2); font-size: 21px; margin: 16px 0 32px; }

/* reveal on scroll */
.js .rise { opacity: 0; transform: translateY(32px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .rise.in { opacity: 1; transform: none; }

/* text pages: privacy and support */
.doc { max-width: 720px; margin: 0 auto; padding: 72px 16px 40px; }
.doc h1 { font-size: clamp(36px, 6vw, 56px); margin-bottom: 12px; }
.doc .meta { color: var(--ink-2); margin: 0 0 32px; }
.doc h2 { font-size: 26px; letter-spacing: -0.02em; margin: 48px 0 10px; }
.doc p, .doc li { color: #3a3a3c; }
.doc ul { padding-left: 22px; }
.doc li { margin: 8px 0; }
.faq { background: var(--soft); border-radius: 20px; padding: 22px 24px; margin: 14px 0; }
.faq strong { font: 600 19px/1.3 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.faq p { margin: 8px 0 0; }
.mail { display: inline-flex; margin-top: 8px; }

footer { border-top: 1px solid var(--line); margin-top: 80px; }
.foot { max-width: 1120px; margin: 0 auto; padding: 28px 16px 40px; display: flex; gap: 20px; flex-wrap: wrap; color: var(--ink-2); font-size: 13px; }
.foot span { margin-right: auto; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }

@media (max-width: 820px) {
  .nav-in { gap: 16px; }
  .nav .cta { display: none; }
  .hero { padding-top: 48px; }
  .hero-phone { height: min(64vh, 560px); margin-top: 36px; }
  .bead.b1 { left: -14px; top: 360px; width: 64px; height: 64px; }
  .bead.b2 { right: -8px; top: 300px; width: 52px; height: 52px; }
  .bead.b3 { left: 6%; top: 760px; }
  .bead.b4 { right: -18px; top: 640px; width: 72px; height: 72px; }
  .bead.b5, .bead.b6 { display: none; }
  /* one column: the phone stays near the top while each step's text scrolls up beneath it */
  .story { grid-template-columns: 1fr; margin-top: 48px; gap: 0; }
  /* as tall as the phone so it stops at the end of the story, with the space taken back so the steps start at the top */
  .story-phone-col { order: -1; position: sticky; top: calc(var(--nav) + 12px); height: min(52svh, 480px); margin-bottom: calc(-1 * min(52svh, 480px)); z-index: 0; }
  .story-phone { position: relative; top: 0; height: 100%; }
  .step { min-height: 92svh; justify-content: flex-end; padding-bottom: 6svh; max-width: none; }
  .step-text {
    background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border-radius: 24px; padding: 22px 22px 24px; box-shadow: 0 10px 40px -18px rgba(0, 0, 0, 0.25);
  }
  .step h2 { font-size: 28px; }
  .step p { font-size: 17px; margin-top: 10px; }
  .science-grid { grid-template-columns: 1fr; gap: 14px; }
  .science-head { margin-bottom: 28px; }
  .gallery { grid-template-columns: 1fr; gap: 16px; }
  .shot.wide { aspect-ratio: 4 / 3; }
  .shot figcaption { left: 20px; bottom: 18px; font-size: 17px; }
  .closing { padding-top: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .rise { opacity: 1; transform: none; transition: none; }
}
