:root {
  --ink: #f5f3ff;
  --soft: rgba(245, 243, 255, .64);
  --faint: rgba(245, 243, 255, .4);
  --glass: rgba(16, 12, 34, .55);
  --line: rgba(255, 255, 255, .12);
  --accent: #ff8fc4;
  --night: #0a0820;
}

* { box-sizing: border-box; }
html { background: var(--night); color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  background: transparent; /* the world behind shows through */
  color: var(--ink);
  font: 400 15px/1.5 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ---------- the world behind the page ---------- */

.world { position: fixed; inset: 0; z-index: -1; overflow: hidden; container-type: size; }
.world > * { position: absolute; }
/* main.js tilts each layer on its own; as separate layers they're drawn once and only slide. */
.aurora, .stars, .moon, .world .layer, .fireflies, .leaves, .cover .scene > * { will-change: transform; }
/* Focus wanders between these (main.js sets each one's blur); this eases each pull. */
.moon, .world .layer, .leaves svg { transition: filter 2.2s cubic-bezier(.45, 0, .2, 1); }
.sky {
  inset: 0;
  background:
    radial-gradient(70% 55% at 50% 0%, #3a1f6e 0%, transparent 70%),
    radial-gradient(120% 80% at 50% 100%, #1d1342 0%, transparent 60%),
    linear-gradient(#0d0a26, #140e33 55%, #0a0820);
}
.aurora { inset: -6% -6% auto; width: 112%; height: 80%; mix-blend-mode: screen; --u: max(.07cqw, .08cqh); }
.band { position: absolute; inset: 0; width: 100%; height: 100%; }
.band-1 { transform-origin: 50% calc(280 * var(--u)); animation: wave 16s ease-in-out infinite alternate; }
.band-2 { transform-origin: 50% calc(393 * var(--u)); animation: wave 21s ease-in-out -7s infinite alternate-reverse; }
@keyframes wave {
  from { transform: translateX(-3%) skewX(-6deg) scaleY(.92); }
  to { transform: translateX(3%) skewX(6deg) scaleY(1.12); }
}

.stars { inset: 0 0 35% 0; }
.stars i { position: absolute; inset: 0; animation: twinkle 3.6s ease-in-out infinite; }
.stars svg { position: absolute; fill: #fff; animation: sparkle 5s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(255, 210, 240, .8)); }
@keyframes twinkle { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes sparkle { 0%, 100% { opacity: .2; transform: scale(.6) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

.moon {
  left: 46%; top: 13%; width: clamp(56px, 6vw, 96px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #fff8ec 0 30%, #f6e5ce 62%, #e9cfb2 100%);
  box-shadow: 0 0 40px 10px rgba(255, 230, 205, .28), 0 0 140px 50px rgba(255, 150, 210, .16);
}
/* Now and then a shooting star (main.js sends it), its bright head first. */
.meteor {
  position: absolute; left: 0; top: 0; width: 140px; height: 1.6px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 228, 244, .85) 80%, #fff);
  box-shadow: 0 0 8px rgba(255, 210, 236, .55); transform-origin: 100% 50%;
}

.moon::after { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 64% 60%, rgba(180, 150, 130, .35) 0 9%, transparent 10%),
              radial-gradient(circle at 40% 66%, rgba(180, 150, 130, .28) 0 6%, transparent 7%),
              radial-gradient(circle at 56% 34%, rgba(180, 150, 130, .22) 0 5%, transparent 6%); }

.layer { left: -3%; width: 106%; height: 100%; bottom: 0; }
/* Each hill's viewBox starts at --top of the 1600x1000 night; its height keeps the night's scale. */
.world .layer { --u: max(.06625cqw, .1cqh); height: calc((1000 - var(--top)) * var(--u)); }
.world .far { --top: 520; }
.world .mid { --top: 620; }
.world .near { --top: 420; }
/* --u is the scale the whole 1600x1000 night would have, sliced to fill 112% of the width. */
.leaves { inset: 0; --u: max(.07cqw, .1cqh); }
.leaves svg {
  position: absolute;
  left: calc(50% + (var(--x) - 800) * var(--u)); top: calc(100% - (1000 - var(--y)) * var(--u));
  width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u));
  transform-origin: calc((var(--ox) - var(--x)) * var(--u)) calc((var(--oy) - var(--y)) * var(--u));
}
.sway { animation: sway 7s ease-in-out infinite alternate; }
.sway-b { animation-duration: 5.5s; animation-delay: -2s; }
.sway-c { animation-duration: 8s; }
.sway-d { animation-duration: 6s; animation-delay: -3s; }
.sway-e { animation-duration: 9s; }
@keyframes sway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }

.fireflies { inset: 40% 0 0 0; }
.fireflies span {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: #ffe2a0; box-shadow: 0 0 10px 3px rgba(255, 200, 110, .7);
  animation: float var(--d, 9s) ease-in-out var(--delay, 0s) infinite alternate, glow 2.6s ease-in-out var(--delay, 0s) infinite;
}
@keyframes float { to { transform: translate(var(--dx, 40px), var(--dy, -60px)); } }
@keyframes glow { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

.grain {
  inset: 0; opacity: .07; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- frame ---------- */

/* Header and tagline belong to the first screen and scroll away with it. */
.top, .bottom {
  position: absolute; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px clamp(20px, 3vw, 40px);
  pointer-events: none;
}
.top { top: 0; }
.bottom { top: calc(100svh - 112px); align-items: flex-end; }
.top > *, .bottom > * { pointer-events: auto; }
.wordmark {
  font: 800 clamp(30px, 3.4vw, 46px)/1 'Bricolage Grotesque', sans-serif;
  font-variation-settings: 'wdth' 85;
  letter-spacing: -.02em;
  text-shadow: 0 2px 24px rgba(10, 8, 32, .5);
}
nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); font-weight: 500; font-size: 14px; }
nav a:not(.pill), .made a, .end a { position: relative; color: var(--soft); transition: color .2s; }
nav a:not(.pill)::after, .made a::after, .end a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
nav a:not(.pill):hover, .made a:hover, .end a:hover { color: var(--ink); }
nav a:not(.pill):hover::after, .made a:hover::after, .end a:hover::after { transform: scaleX(1); transform-origin: left; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: var(--ink); color: #160d33; font-weight: 600;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
}
.pill svg { width: 14px; height: 14px; fill: currentColor; }
.pill:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(255, 143, 196, .7); }
.tagline { margin: 0; max-width: 22ch; font: 500 clamp(18px, 1.7vw, 24px)/1.25 Inter, sans-serif; letter-spacing: -.01em; text-shadow: 0 2px 20px rgba(5, 4, 12, .6); }
.made { margin: 0; font-size: 13px; color: var(--faint); }

/* ---------- the cover ---------- */

.hero {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center end;
  padding: 120px clamp(20px, 9vw, 160px) 120px 20px;
}
.demo { display: flex; flex-direction: column; align-items: center; gap: 14px; perspective: 1200px; }
.cover {
  position: relative; width: min(340px, 76vw); aspect-ratio: 1080 / 1272;
  border-radius: 34px; overflow: hidden; background: #0b0918;
  container-type: inline-size;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 0 1px var(--line), inset 0 0 0 1px rgba(255, 255, 255, .06);
  transition: box-shadow .4s;
  will-change: transform;
}
.cover:hover { box-shadow: 0 50px 110px -30px rgba(255, 95, 168, .4), 0 0 0 1px rgba(255, 255, 255, .2); }
.scene { position: absolute; inset: 0; overflow: hidden; }
.scene > * { position: absolute; }
.scene .sky { inset: -8%; }
.scene .glow {
  inset: -10% -20% 30%;
  background:
    radial-gradient(40% 30% at 30% 30%, rgba(255, 95, 168, .7), transparent 70%),
    radial-gradient(45% 30% at 75% 22%, rgba(93, 107, 255, .65), transparent 70%),
    radial-gradient(40% 25% at 55% 45%, rgba(47, 214, 195, .4), transparent 70%);
  animation: shimmer 14s ease-in-out infinite alternate;
}
@keyframes shimmer { from { opacity: .75; } to { opacity: 1; } }
.scene .stars { inset: 0 0 40% 0; }
.scene .near { z-index: 1; }

/* The Razr's flash and lenses, where they sit on the cover. */
.lens b { position: absolute; z-index: 3; border-radius: 50%; background: #030305; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .24), 0 0 0 1px rgba(0, 0, 0, .6); transform: translate(-50%, -50%); }
.lens b:nth-child(1) { left: 49.1%; top: 87.3%; width: 6.1%; aspect-ratio: 1; }
.lens b:nth-child(2) { left: 65.3%; top: 87.3%; width: 19%; aspect-ratio: 1; }
.lens b:nth-child(3) { left: 85.6%; top: 87.3%; width: 19%; aspect-ratio: 1; }

/* The clock, in each face's own type and place; its tilt runs against the scene's. */
.clock {
  inset: 0; z-index: 0; color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}
.cover.front .clock { z-index: 2; }
.clock[data-face="gif"] { display: none; }
.clock .date { position: absolute; letter-spacing: .16em; font-size: 3.6cqi; }
.clock .time { position: absolute; line-height: .9; }

.clock[data-face="airy"] .date { left: 0; right: 0; top: 27%; text-align: center; font: 400 4.2cqi Outfit, sans-serif; letter-spacing: .18em; }
.clock[data-face="airy"] .time { left: 0; right: 0; top: 32%; text-align: center; font: 200 31cqi/1 Outfit, sans-serif; letter-spacing: -.01em; }

.clock[data-face="classic"] .time { left: 0; right: 0; top: 24%; text-align: center; font: 360 29cqi/1 Fraunces, serif; letter-spacing: -.02em; }
.clock[data-face="classic"] .date { left: 0; right: 0; top: 52%; text-align: center; font: 600 5.6cqi Fraunces, serif; letter-spacing: 0; }

.clock[data-face="poster"] .date { left: 10%; top: 16%; font: 600 4.4cqi 'Bricolage Grotesque', sans-serif; letter-spacing: .1em; }
.clock[data-face="poster"] .time { left: 9%; top: 21%; font: 800 38cqi/.86 'Bricolage Grotesque', sans-serif; font-variation-settings: 'wdth' 75; letter-spacing: -.02em; }

.clock[data-face="mono"] .time { left: 10%; top: 11%; font: 400 14cqi/1 'Space Mono', monospace; letter-spacing: -.02em; }
.clock[data-face="mono"] .date { left: 10%; top: 29%; font: 400 4cqi 'Space Mono', monospace; letter-spacing: .08em; }
.clock[data-face="mono"] .date::before { content: ""; display: block; width: 9cqi; height: 1px; background: rgba(255, 255, 255, .55); margin-bottom: 3.5cqi; }

/* ---------- the panel under the cover ---------- */

.panel {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 8px; border-radius: 18px;
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 0 0 1px var(--line), 0 20px 40px -24px rgba(0, 0, 0, .8);
}
.faces { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.faces button {
  appearance: none; border: 0; cursor: pointer;
  padding: 7px 12px; border-radius: 9px; background: transparent;
  color: var(--soft); font: 500 13px Inter, sans-serif;
  transition: background .2s, color .2s, transform .2s;
}
.faces button:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.faces button[aria-checked="true"] { color: #160d33; background: var(--ink); }
.faces button:active { transform: scale(.96); }
.behind { display: flex; align-items: center; gap: 10px; padding: 0 6px 0 8px; font-size: 13px; color: var(--soft); cursor: pointer; user-select: none; }
.behind input { position: absolute; opacity: 0; pointer-events: none; }
.behind i { position: relative; width: 38px; height: 23px; border-radius: 999px; background: rgba(255, 255, 255, .18); transition: background .25s; }
.behind i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.behind input:checked + i { background: #34c759; }
.behind input:checked + i::after { transform: translateX(15px); }
.behind input:focus-visible + i, .faces button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- below the fold ---------- */

.features {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  margin: 0 clamp(20px, 3vw, 40px); border-radius: 22px; overflow: hidden;
  background: var(--line);
  box-shadow: 0 0 0 1px var(--line);
}
.features article {
  padding: 30px 26px 34px; background: rgba(10, 8, 26, .74);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: background .3s;
}
.features article:hover { background: rgba(28, 18, 58, .8); }
.features span { font: 500 12px 'Space Mono', monospace; color: var(--accent); letter-spacing: .08em; }
.features h2 { margin: 16px 0 8px; font: 700 21px/1.15 'Bricolage Grotesque', sans-serif; letter-spacing: -.01em; }
.features p { margin: 0; color: var(--soft); }

/* The faces, as small covers. */
.gallery { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 130px clamp(20px, 3vw, 40px) 0; text-align: center; }
.kicker { margin: 0; font: 500 12px 'Space Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.gallery h2, .cta h2 {
  margin: 14px 0 10px; font: 800 clamp(30px, 4.4vw, 54px)/1.04 'Bricolage Grotesque', sans-serif;
  font-variation-settings: 'wdth' 85; letter-spacing: -.02em; text-shadow: 0 2px 30px rgba(5, 4, 12, .6);
  text-wrap: balance;
}
.lede { margin: 0 auto; max-width: 42ch; color: var(--soft); font-size: 16px; text-wrap: balance; }
.minis { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 1.8vw, 24px); margin-top: 48px; padding-top: 10px; }
.mini {
  appearance: none; border: 0; padding: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  color: var(--soft); font: 500 14px Inter, sans-serif; transition: color .2s;
}
.mini .screen {
  position: relative; display: block; width: 100%; aspect-ratio: 1080 / 1272;
  border-radius: clamp(16px, 2vw, 24px); overflow: hidden; background: #0b0918; container-type: inline-size;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), 0 0 0 1px var(--line);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s;
}
.mini .scene * { animation: none !important; }
/* As on the phone, a clock the cat would hide comes in front; Poster shows it tucked behind. */
.mini:not([data-face="poster"]) .clock { z-index: 2; }
.mini:hover, .mini[aria-pressed="true"] { color: var(--ink); }
.mini:hover .screen { transform: translateY(-8px); box-shadow: 0 44px 70px -30px rgba(255, 95, 168, .45), 0 0 0 1px rgba(255, 255, 255, .22); }
.mini[aria-pressed="true"] .screen { box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), 0 0 0 2px rgba(255, 255, 255, .85); }
.mini:focus-visible { outline: none; }
.mini:focus-visible .screen { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Each one its own night. */
.mini[data-face="airy"] .scene { filter: hue-rotate(-38deg); }
.mini[data-face="classic"] .scene { filter: hue-rotate(30deg) saturate(1.1); }
.mini[data-face="mono"] .scene { filter: saturate(.3) brightness(.92); }
.mini[data-face="gif"] .scene { filter: hue-rotate(-100deg) saturate(.9); }

/* Last word. */
.cta { position: relative; z-index: 2; padding: 140px 20px 20px; text-align: center; }
.cta p { margin: 20px 0 0; color: var(--faint); font-size: 13px; text-wrap: balance; }
.cta .ask { margin-top: 8px; color: var(--soft); font-size: 14px; }
.cta .ask a { color: var(--ink); border-bottom: 1px solid rgba(255, 255, 255, .3); transition: border-color .2s; }
.cta .ask a:hover { border-color: var(--ink); }
.pill--big { margin-top: 14px; padding: 14px 24px; font-size: 16px; gap: 10px; }
.pill--big svg { width: 16px; height: 16px; }

.end {
  display: flex; gap: 22px; align-items: center; justify-content: center; flex-wrap: wrap;
  padding: 56px 20px 64px; font-size: 13px; color: var(--faint);
}

/* ---------- smaller screens ---------- */

@media (max-width: 900px) {
  .hero { place-items: center; padding: 110px 16px 150px; }
  .features { grid-template-columns: 1fr 1fr; margin: 0 16px; }
  .gallery { padding: 100px 0 0; }
  .gallery > :not(.minis) { padding: 0 16px; }
  .minis {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 36%;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 10px 16px 6px;
  }
  .minis::-webkit-scrollbar { display: none; }
  .mini { scroll-snap-align: center; }
  .cta { padding-top: 110px; }
  .bottom { top: calc(100svh - 120px); padding: 0 16px; }
  .moon { left: 70%; }
}
@media (max-width: 560px) {
  .top { padding: 20px 16px; }
  nav a[href="#features"] { display: none; }
  .pill { padding: 8px 13px; }
  .features { grid-template-columns: 1fr; }
  .minis { grid-auto-columns: 56%; }
  .bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .band, .stars i, .stars svg, .sway, .fireflies span, .scene .glow { animation: none; }
}

/* ---------- privacy page ---------- */

.doc-page { background: radial-gradient(120% 60% at 50% -10%, #2a1450 0%, #0a0820 60%) fixed, var(--night); }
.top--page { position: sticky; background: linear-gradient(#0a0820f2 60%, #0a082000); }
.doc { max-width: 680px; margin: 0 auto; padding: 40px 20px 20px; }
.doc .kicker { margin: 0; font: 500 12px 'Space Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.doc h1 { margin: 10px 0 6px; font: 800 clamp(34px, 6vw, 52px)/1.05 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; }
.doc .updated { margin: 0 0 32px; color: var(--faint); font-size: 14px; }
.doc h2 { margin: 36px 0 10px; font: 700 21px/1.2 'Bricolage Grotesque', sans-serif; }
.doc p, .doc li { color: rgba(245, 243, 255, .78); line-height: 1.65; }
.doc ul { padding-left: 20px; }
.doc li { margin: 8px 0; }
.doc b { color: var(--ink); font-weight: 600; }
.doc a { color: var(--accent); }
.doc a:hover { text-decoration: underline; }
.doc code { font: 13px 'Space Mono', monospace; background: rgba(255, 255, 255, .08); padding: 2px 6px; border-radius: 6px; }
