/* Mozaic website. Inspired by grail-app.com: black pages, one pastel chapter, giant high-contrast serif
   headlines, numbered chapters, floating 3D tiles. Our colours: the reds of the Mozaic logo and blush pink. */
:root {
  --bg: #000; --ink: #0b0b0c; --s1: #161618; --s2: #2c2c2e; --bd: #2c2c2e; --tx: #d9d9de; --mut: #8e8e93; --mut2: #636366;
  --red: #e3393b; --coral: #ec6262; --crimson: #9f2831; --ox: #63131b; --blush: #f6c9c8; --paper: #f2ede6; --green: #5bd68a;
  --max: 1280px;
  --display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, sans-serif;
  --serif: Newsreader, Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: #fff; font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }

/* the big serif, as on Grail */
.display { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: -0.035em; line-height: 0.92; font-size: clamp(44px, 8vw, 128px); }
.display.big { font-size: clamp(40px, 7.4vw, 116px); }
.display.mid { font-size: clamp(36px, 5vw, 76px); }
.display.center { text-align: center; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; padding: 14px 28px;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: 0.08em; font-size: 15px; }
.nav-line { justify-self: center; color: var(--tx); font-size: 13px; max-width: 420px; text-align: center; }
.nav-actions { display: flex; gap: 8px; align-items: center; justify-self: end; }
.join-btn { white-space: nowrap; text-decoration: none; background: #fff; color: #000; border-radius: 18px; padding: 8px 16px; font: 700 13px var(--sans); }
.lang { border: 0; background: var(--blush); color: #000; border-radius: 18px; padding: 8px 16px; font: 700 13px var(--sans); cursor: pointer; }

/* split-flap intro */
.intro { position: fixed; inset: 0; z-index: 50; background: #000; display: grid; place-items: center; transition: opacity 0.5s 0.15s; }
.intro.gone { opacity: 0; pointer-events: none; }
.board { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; width: min(460px, 86vw); }
.flap { position: relative; aspect-ratio: 1 / 1.14; border-radius: 4px; background: linear-gradient(#232325, #131315); overflow: hidden;
  display: grid; place-items: center; font-weight: 700; font-size: clamp(10px, 1.8vw, 19px); color: #f2f2f2; transition: transform 0.12s, translate 0.7s cubic-bezier(.5, 0, .9, .4), rotate 0.7s, opacity 0.7s; }
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 0.6px); height: 1.2px; background: #050505; }
.flap.logo { background-image: url(logo.svg); background-size: 500% 300%; background-repeat: no-repeat; }
.flap.flip { transform: scaleY(0.2); }
.flap.fall { translate: 0 110vh; opacity: 0.4; }

/* hero */
.hero { padding: 24px 0 80px; text-align: center; }
.hero-title { font-size: clamp(48px, 10.5vw, 168px); padding: 0 16px; }
/* hero cluster: one tile per topic, floating around the phone */
.cluster { position: relative; height: clamp(560px, 50vw, 740px); max-width: 1400px; margin: -1vw auto 0; }
.cluster::before { content: ""; position: absolute; inset: 15% 30%; background: radial-gradient(closest-side, rgba(227, 57, 59, 0.28), transparent); filter: blur(30px); }
.hero-phone { position: absolute; left: 50%; top: 50%; translate: -50% -50%; scale: 0.7; z-index: 5; }
.ctile { position: absolute; left: var(--x); top: var(--y); width: calc(var(--s) * clamp(72px, 9vw, 150px)); aspect-ratio: 1 / 1.07; translate: -50% -50%; rotate: var(--r);
  border: 0; padding: 0; border-radius: 16%; overflow: visible; background: none; cursor: pointer; z-index: var(--z); animation: float var(--d) ease-in-out infinite alternate; }
.ctile .face { position: absolute; inset: 0; border-radius: 16%; overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35); transition: translate 0.25s, box-shadow 0.25s; }
.ctile img { width: 100%; height: 100%; object-fit: cover; scale: 1.62; }
.ctile.alt img { rotate: 90deg; filter: saturate(0.8) brightness(1.12); }
.ctile.far { filter: blur(1.2px); opacity: 0.78; }
.ctile .name { position: absolute; left: 50%; bottom: 8%; translate: -50% 0; white-space: nowrap; font: 600 clamp(9px, 0.95vw, 12px) var(--sans); color: #fff;
  background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 3px 9px; border-radius: 10px; pointer-events: none; }
.ctile .tip { position: absolute; left: 50%; top: calc(100% + 10px); translate: -50% 4px; width: 200px; padding: 10px 12px; border-radius: 14px; background: rgba(22, 22, 24, 0.94);
  color: var(--tx); font: 13px/1.4 var(--sans); text-align: left; opacity: 0; pointer-events: none; transition: opacity 0.2s, translate 0.2s; rotate: calc(-1 * var(--r)); z-index: 30; }
.ctile .tip b { display: block; color: #fff; margin-bottom: 2px; }
.ctile:hover, .ctile:focus-visible { z-index: 40; filter: none; opacity: 1; animation-play-state: paused; outline: none; }
.ctile:hover .face, .ctile:focus-visible .face { translate: 0 -6px; box-shadow: 0 26px 50px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--blush); }
.ctile:hover .tip, .ctile:focus-visible .tip { opacity: 1; translate: -50% 0; }
@keyframes float { from { translate: -50% calc(-50% - 6px); } to { translate: -50% calc(-50% + 6px); } }
.hero-sub { max-width: 640px; margin: 12px auto 0; padding: 0 20px; color: var(--tx); font-size: 19px; }

/* phone mock (live HTML, so it can show real app content) */
.phone { width: 300px; height: 620px; border-radius: 46px; padding: 11px; background: #19191b; box-shadow: 0 0 0 1px #2c2c2e, 0 50px 100px rgba(0, 0, 0, 0.7), 0 0 120px rgba(227, 57, 59, 0.25); }
.screen { width: 100%; height: 100%; border-radius: 36px; background: #000; color: #fff; overflow: hidden; padding: 42px 13px 13px; position: relative; text-align: left; font-size: 13px; }
.screen h4 { margin: 0 0 10px; font: 700 25px var(--sans); }
.w { background: var(--s1); border-radius: 15px; padding: 11px; margin-bottom: 7px; }
.w.red { background: linear-gradient(90deg, #9e1c22, #3a0d10); }
.w small { display: block; color: var(--mut); font-size: 10.5px; }
.w b { display: block; font-size: 13.5px; margin: 2px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 7px; }
.grid2 .w { margin: 0; }
.live { display: inline-block; background: var(--red); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 4px; }
.tabbar { position: absolute; left: 9px; right: 9px; bottom: 9px; height: 52px; border-radius: 22px; background: rgba(28, 28, 30, 0.85); display: flex; justify-content: space-around; align-items: center; font-size: 10px; color: var(--mut); border: 1px solid rgba(255,255,255,0.1); }
.tabbar span.on { color: var(--red); font-weight: 600; }
.bars { display: flex; gap: 3px; align-items: center; height: 46px; margin: 14px 0; }
.bars i { flex: 1; border-radius: 3px; background: rgba(255,255,255,0.3); }
.bars i.on { background: var(--red); }
.blist { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; }
.blist li { display: flex; gap: 10px; padding: 8px 9px; border-radius: 10px; color: var(--mut); font-size: 12px; }
.blist li span { width: 30px; color: var(--mut2); }
.blist li.now { background: rgba(255,255,255,0.09); color: #fff; font-weight: 600; }

/* chapters */
.chapter { position: relative; padding: 110px 28px; }
.chapter > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.chapter-label { display: flex; justify-content: space-between; color: var(--tx); font-size: 13px; margin-bottom: 48px; }
.chapter-label span:first-child { font-weight: 600; }
.chapter-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; margin-top: 64px; }
.chapter-body p, .two p, .two-notes p { color: var(--tx); font-size: 17px; }
.scene { border-radius: 24px; width: 100%; height: auto; }
.scene.wide { margin: 56px auto; }

/* chapter 02 */
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-top: 64px; align-items: start; }
.card { background: var(--s1); border-radius: 26px; padding: 30px; }
.tag { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--mut); margin-bottom: 10px; }
.tag.green { color: var(--green); }
.story-card h3 { font-size: 30px; font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 16px; }
.coverage { display: flex; align-items: center; gap: 12px; color: var(--mut); font-size: 13px; margin-bottom: 18px; }
.coverage .bar { display: flex; width: 120px; height: 4px; border-radius: 2px; overflow: hidden; }
.coverage .bar i { background: var(--red); } .coverage .bar i.b { background: var(--crimson); } .coverage .bar i.c { background: var(--mut2); }
.ai-label { font-size: 12px; color: var(--mut2); margin-bottom: 10px; }
.ai-label span { border: 1px solid var(--red); color: var(--red); border-radius: 12px; padding: 3px 10px; font-weight: 600; margin-right: 8px; letter-spacing: 0.06em; }
.serif { font: 19px/1.6 var(--serif); color: var(--tx); }
.formats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { background: var(--s2); border-radius: 14px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.numbered { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; }
.numbered li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding-bottom: 28px; border-bottom: 1px solid var(--bd); }
.numbered b { font: 400 38px/1 var(--display); color: var(--blush); }
.numbered h3 { margin-bottom: 6px; }
.numbered p { color: var(--tx); }

/* chapter 03: blush, like Grail's lilac chapter, with a giant clock behind the phone */
.chapter.blush { background: linear-gradient(rgba(246, 201, 200, 0.62), rgba(246, 201, 200, 0.62)), url(images/bg-blush.jpg) center / cover; color: #120607; }
.chapter.blush .chapter-label { color: #4a1c1f; }
.timer-stage { position: relative; display: grid; place-items: center; margin: 40px auto 48px; min-height: 640px; }
.giant-time { position: absolute; font: 400 clamp(120px, 27vw, 380px)/1 var(--display); letter-spacing: -0.05em; color: rgba(99, 19, 27, 0.3); user-select: none; }
.two-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.chapter.blush .two-notes p { color: #3a1416; }

/* chapter 04: one tab at a time, like Grail's totems */
.chapter.smoke { background: #000 url(images/bg-smoke.jpg) center / cover; min-height: 100vh; overflow: hidden; }
.totem { position: relative; display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center; }
.totem-count { position: absolute; right: 0; top: -12px; font: 400 64px var(--display); color: #fff; }
.totem-name { font-size: clamp(64px, 14vw, 220px); position: relative; z-index: 2; mix-blend-mode: normal; }
.totem-img { width: min(520px, 80vw); height: auto; margin-top: -7vw; border-radius: 28px; -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 72%); mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 72%); }
.totem-text { max-width: 520px; color: var(--tx); font-size: 18px; margin-top: 8px; }
.totem-foot { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-top: 56px; flex-wrap: wrap; }
.tab-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-chips button { border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(0, 0, 0, 0.35); color: #fff; border-radius: 20px; padding: 9px 16px; font: 600 14px var(--sans); cursor: pointer; }
.tab-chips button[aria-selected="true"] { background: var(--blush); color: #000; border-color: var(--blush); }

/* chapter 05 */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.two h3 { margin-bottom: 10px; }
.two.narrow { max-width: 920px; margin-top: 56px; }

/* chapter 06: stats and the shapes band */
.stats { padding-bottom: 0; overflow: hidden; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 80px; }
.stat-row div { border-top: 1px solid var(--bd); padding-top: 14px; }
.stat-row span { display: block; color: var(--tx); font-size: 14px; }
.stat-row b { display: block; font: 400 clamp(48px, 6vw, 88px)/1.05 var(--display); letter-spacing: -0.03em; }
.small-note { color: var(--mut); font-size: 13px; margin-top: 28px; max-width: 640px; }
.stats .shapes { max-width: none; width: 120%; margin: 40px 0 0 -10%; height: auto; -webkit-mask-image: linear-gradient(transparent, #000 25%); mask-image: linear-gradient(transparent, #000 25%); }

/* chapter 07: light page with floating tiles */
.chapter.light { background: var(--paper); color: #0b0b0c; overflow: hidden; }
.chapter.light .chapter-label { color: #3a3a3c; }
.kicker { text-align: center; font-weight: 600; margin-bottom: 16px; }
.float-tile { position: absolute; width: clamp(110px, 14vw, 190px); mix-blend-mode: multiply; border-radius: 24px; }
.float-tile.t1 { left: 4%; top: 140px; rotate: -12deg; }
.float-tile.t2 { right: 4%; top: 120px; rotate: 9deg; }
.checks, .crosses { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.checks li, .crosses li { position: relative; padding-left: 30px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.crosses li::before { content: "✕"; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 10px; background: #0b0b0c; color: #fff; font-size: 10px; display: grid; place-items: center; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--bd); padding: 22px 0; max-width: 900px; }
.faq summary { cursor: pointer; font: 400 clamp(22px, 2.6vw, 34px)/1.15 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--mut); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--tx); margin-top: 12px; max-width: 720px; }

/* waitlist */
.join { max-width: 560px; margin: 32px auto 0; text-align: left; }
.join-row { display: flex; gap: 8px; padding: 6px; border-radius: 32px; background: #161618; border: 1px solid #2c2c2e; }
.join-row:focus-within { border-color: var(--blush); }
.join input[type=email] { flex: 1; min-width: 0; border: 0; background: none; color: #fff; font: 16px var(--sans); padding: 0 16px; outline: none; }
.join button { border: 0; border-radius: 26px; background: var(--blush); color: #000; font: 700 15px var(--sans); padding: 14px 22px; cursor: pointer; white-space: nowrap; }
.join button:disabled { opacity: 0.6; cursor: wait; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; color: var(--tx); font-size: 14px; cursor: pointer; }
.consent input { margin-top: 3px; accent-color: var(--red); width: 16px; height: 16px; flex: none; }
.join-msg { min-height: 24px; margin-top: 14px; font-size: 15px; text-align: center; }
.join-msg.ok { color: var(--green); } .join-msg.err { color: #ff8a8c; }
.join.done .join-row, .join.done .consent { display: none; }
.join.done .join-msg { font: 400 clamp(22px, 3vw, 32px)/1.2 var(--display); color: #fff; }
.join-privacy { color: var(--mut); font-size: 12px; text-align: center; margin-top: 6px; }
.join.done .join-privacy { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* closing */
.closing { padding: 40px 28px 120px; text-align: center; }
.closing-icon { width: min(560px, 90vw); height: auto; margin: 0 auto -40px; -webkit-mask-image: radial-gradient(circle, #000 50%, transparent 72%); mask-image: radial-gradient(circle, #000 50%, transparent 72%); }
.center-note { color: var(--tx); margin-top: 22px; }

.footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 28px; border-top: 1px solid var(--bd); color: var(--mut); font-size: 13px; }
.footer span:last-child { justify-self: end; }

@media (max-width: 900px) {
  .chapter { padding: 80px 18px; }
  .nav { grid-template-columns: auto 1fr; padding: 12px 16px; }
  .nav-line { display: none; }
  .nav-actions { justify-self: end; }
  .join-row { flex-direction: column; border-radius: 22px; }
  .join input[type=email] { padding: 12px 14px; }
  .chapter-body, .story-grid, .two, .two-notes { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cluster { height: 600px; margin-top: 8px; }
  .hero-phone { scale: 0.6; }
  .ctile { left: var(--mx); top: var(--my); width: calc(var(--ms) * 64px); }
  .ctile .tip { display: none; }
  .ctile.far { filter: none; opacity: 0.9; }
  .timer-stage { min-height: 560px; }
  .timer-stage .phone { scale: 0.85; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .float-tile { display: none; }
  .totem-count { font-size: 40px; }
  .footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer span:last-child { justify-self: center; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .flap { transition: none; } .intro { display: none; } .ctile { animation: none; } }
