:root {
  --bg: #03030b;
  --text: #f2f3ff;
  --muted: rgba(220, 224, 255, 0.62);
  --line: rgba(255, 255, 255, 0.09);
  --cyan: #38a0ff;
  --violet: #9452ff;
}

* { box-sizing: border-box; margin: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

.spacer { height: 650vh; }

a { color: inherit; text-decoration: none; }

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 500; letter-spacing: 0.02em; }
/* Logo phasing: two offset echoes that twitch out of register, like the hero face.
   Idle: three short bursts every 3.2s. Hover: continuous skitter with slice tears. */
.logo { overflow: visible; }
.logo .core { color: #eef2ff; filter: drop-shadow(0 0 3px rgba(120, 170, 255, .7)); animation: core-flicker 3.2s steps(1) infinite; }
.logo .echo { mix-blend-mode: screen; opacity: .75; }
.logo .echo-a { color: #38c8ff; animation: phase-a 3.2s steps(1) infinite; }
.logo .echo-b { color: #b04cff; animation: phase-b 3.2s steps(1) infinite; }
@keyframes phase-a {
  0%   { transform: translate(-1.8px, 0); }
  18%  { transform: translate(-4px, .5px); opacity: .9; }
  20%  { transform: translate(-1px, -1px); }
  22%  { transform: translate(-1.8px, 0); opacity: .75; }
  52%  { transform: translate(-3px, -.5px); }
  53%  { transform: translate(-5.5px, .5px); opacity: .9; }
  55%  { transform: translate(-2px, 0); }
  57%  { transform: translate(-1.8px, 0); opacity: .75; }
  84%  { transform: translate(-2.8px, .8px); }
  86%  { transform: translate(-1.8px, 0); }
}
@keyframes phase-b {
  0%   { transform: translate(1.5px, .3px); }
  18%  { transform: translate(3px, -.6px); }
  20%  { transform: translate(5px, 1px); opacity: .9; }
  22%  { transform: translate(1.5px, .3px); opacity: .75; }
  52%  { transform: translate(4.5px, 0); opacity: .9; }
  54%  { transform: translate(2px, -1px); }
  57%  { transform: translate(1.5px, .3px); opacity: .75; }
  84%  { transform: translate(3.5px, 0); }
  86%  { transform: translate(1.5px, .3px); }
}
@keyframes core-flicker {
  0%   { opacity: 1; transform: none; }
  20%  { opacity: .5; transform: translate(.6px, 0); }
  22%  { opacity: 1; transform: none; }
  53%  { opacity: .45; transform: translate(-.8px, 0); clip-path: inset(40% 0 35% 0); }
  55%  { opacity: 1; transform: none; clip-path: none; }
}

.brand:hover .echo-a { animation: skitter-a .42s steps(1) infinite; }
.brand:hover .echo-b { animation: skitter-b .42s steps(1) infinite; }
.brand:hover .core { animation: skitter-core .42s steps(1) infinite; }
@keyframes skitter-a {
  0%   { transform: translate(-3px, 0); opacity: .9; }
  17%  { transform: translate(-6.5px, .8px); }
  33%  { transform: translate(-1px, -1px); }
  50%  { transform: translate(-5px, 0); }
  67%  { transform: translate(-2.5px, 1.2px); }
  83%  { transform: translate(-7px, -.5px); }
}
@keyframes skitter-b {
  0%   { transform: translate(3.5px, .5px); opacity: .9; }
  17%  { transform: translate(1px, -1px); }
  33%  { transform: translate(6px, 0); }
  50%  { transform: translate(2px, 1px); }
  67%  { transform: translate(7px, -.8px); }
  83%  { transform: translate(3px, 0); }
}
@keyframes skitter-core {
  0%   { transform: none; clip-path: none; opacity: 1; }
  17%  { transform: translate(1.2px, 0); clip-path: inset(0 0 55% 0); }
  33%  { transform: translate(-1px, 0); clip-path: inset(45% 0 0 0); opacity: .7; }
  50%  { transform: none; clip-path: none; opacity: 1; }
  67%  { transform: translate(-1.5px, 0); clip-path: inset(30% 0 40% 0); }
  83%  { transform: translate(.8px, 0); clip-path: none; opacity: .8; }
}
@media (prefers-reduced-motion: reduce) {
  .logo .echo, .logo .core, .brand:hover .echo, .brand:hover .core { animation: none; }
}

.nav nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); font-size: 15px; }
.link { color: var(--muted); transition: color .2s; }
.link:hover { color: var(--text); }

/* Hero is fixed; main.js fades it out as scrolling starts. */
.hero {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 63vh;
}
.tagline, .tag-slot {
  font-size: clamp(24px, 6.2vw, 64px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
}
.tag-slot { visibility: hidden; }
/* Positioned every scroll by main.js; starts where .tag-slot sits. */
.tagline {
  position: fixed;
  left: 50%;
  top: 63vh;
  z-index: 6;
  margin: 0;
  pointer-events: none;
  transform: translate(-50%, 0);
  transform-origin: 50% 50%;
  text-shadow: 0 0 30px rgba(120, 140, 255, .45);
}
.tagline .fold { display: inline-block; overflow: hidden; vertical-align: bottom; white-space: pre; }
/* The tagline lands on the slogan and takes its place. */
.explain h2.handoff { color: transparent; text-shadow: none; }
.hero .scroll-cue { margin-top: 5vh; }

.cta {
  pointer-events: auto;
  margin-top: 36px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #0a0a18;
  font-weight: 500;
  font-size: 18px;
  padding: 16px 52px;
  border-radius: 999px;
  box-shadow: 0 0 40px rgba(148, 120, 255, .35);
  transition: transform .2s, box-shadow .2s;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 0 60px rgba(120, 160, 255, .55); }

button.cta { border: 0; font: inherit; font-weight: 500; font-size: 18px; cursor: pointer; }
.no-thanks {
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(220, 224, 255, .35);
  transition: color .2s, text-decoration-color .2s;
}
.no-thanks:hover { color: var(--text); text-decoration-color: currentColor; }
.google { pointer-events: auto; margin-top: 22px; color: var(--muted); font-size: 16px; display: inline-flex; gap: 10px; align-items: center; }
.google:hover { color: var(--text); }
.g {
  font-weight: 700;
  background: conic-gradient(from -45deg, #ea4335 0 25%, #4285f4 0 50%, #34a853 0 75%, #fbbc05 0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.scroll-cue {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  font-size: clamp(15px, 1.4vw, 19px);
  font-weight: 300;
  letter-spacing: .55em;
  text-indent: .55em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 0 18px rgba(120, 170, 255, .7);
  animation: breathe 3.6s ease-in-out infinite;
}
.scroll-cue i { width: 1px; height: 40px; background: linear-gradient(#cfe0ff, transparent); animation: drop 2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }



.nogl { position: fixed; inset: auto 0 40% 0; text-align: center; color: var(--muted); }

@media (max-width: 640px) {
  .hero { padding-top: 58vh; }
  .brand { font-size: 20px; }
  .cta { padding: 14px 36px; font-size: 16px; }
}

/* Explanation: a normal section after the scroll story. */
.explain {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 16px 12vh;
  text-align: center;
  background: linear-gradient(to bottom, transparent 0%, rgba(3, 3, 11, .75) 55%, rgba(3, 3, 11, .9));
}
.pillars {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
}
/* Cards: the tag is always shown; clicking expands the detail underneath. */
.pillar {
  width: 260px;
  display: grid;
  grid-template-rows: auto 0fr;
  padding: 14px 22px;
  border: 1px solid rgba(160, 150, 255, .45);
  border-radius: 22px;
  font: inherit;
  text-align: center;
  color: var(--text);
  background: rgba(10, 10, 30, .55);
  box-shadow: 0 0 18px rgba(130, 110, 255, .25), inset 0 0 12px rgba(120, 160, 255, .12);
  cursor: pointer;
  transition: grid-template-rows .35s ease, border-color .2s, box-shadow .2s, background .2s;
}
.pillar:hover { border-color: rgba(190, 180, 255, .8); box-shadow: 0 0 26px rgba(130, 110, 255, .45), inset 0 0 12px rgba(120, 160, 255, .18); }
.pillar:focus-visible { outline: 2px solid #9fb4ff; outline-offset: 3px; }
.pillar[aria-expanded="true"] { grid-template-rows: auto 1fr; background: rgba(16, 14, 44, .75); border-color: rgba(190, 180, 255, .8); }
.pillar .tag { font-size: clamp(15px, 1.35vw, 18px); font-weight: 400; }
.pillar .detail { overflow: hidden; }
.pillar .detail > .inner {
  display: block;
  opacity: 0;
  transition: opacity .25s;
}
.pillar[aria-expanded="true"] .detail > .inner { opacity: 1; transition-delay: .12s; }
.pillar .line {
  display: block;
  padding-top: 10px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 300;
  color: var(--muted);
}

/* Wordless app previews: neon on accents only, flat legible surfaces. */
.preview {
  margin-top: 14px;
  padding: 10px;
  border-radius: 14px;
  background: #0b0b1f;
  border: 1px solid rgba(255, 255, 255, .08);
  display: grid;
  gap: 8px;
  text-align: left;
}
.preview .row { display: flex; align-items: center; gap: 8px; height: 26px; }
.preview svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.preview .av { width: 24px; height: 24px; color: #b07cff; filter: drop-shadow(0 0 3px currentColor); }
.preview .av .f { fill: currentColor; stroke: none; }
.preview .av.h1 { color: #ff7ad9; }
.preview .av.h2 { color: #6fc3ff; }
.preview .av.h3 { color: #7dffc4; }
.preview .ic { width: 16px; height: 16px; color: #9fb4ff; }
.preview .sk { display: block; height: 6px; border-radius: 3px; background: rgba(220, 224, 255, .18); flex: 0 1 auto; }
.preview .pg { margin-left: auto; flex: none; width: 46px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.preview .pg i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #6fc3ff, #b07cff); box-shadow: 0 0 6px #8f9cff; }
.preview .head { padding-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.preview .step .box { flex: none; width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid rgba(220, 224, 255, .3); display: grid; place-items: center; }
.preview .step .ck { width: 12px; height: 12px; color: #7dffc4; stroke-width: 2.6; }
.preview .step.done .box { border-color: #7dffc4; }
.preview .step.done .sk { background: rgba(220, 224, 255, .1); }
.preview .step.next { margin: 0 -6px; padding: 0 6px; border-radius: 8px; background: rgba(111, 195, 255, .08); box-shadow: inset 0 0 0 1px rgba(111, 195, 255, .45), 0 0 12px rgba(111, 195, 255, .25); }
.preview .step.next .box { border-color: #6fc3ff; box-shadow: 0 0 6px #6fc3ff; }
.preview .step.next .sk { background: rgba(200, 230, 255, .4); }
.preview .like { margin-left: auto; color: rgba(220, 224, 255, .35); }
.preview .like.on { color: #ff7ad9; fill: currentColor; filter: drop-shadow(0 0 3px currentColor); }

/* While a card is open, the scene steps back so the app preview reads as real. */
#gl, #thoughts { transition: opacity .35s; }
body.peek #gl { opacity: .3; }
body.peek #thoughts { opacity: .15; }
@media (prefers-reduced-motion: reduce) { .pillar, .pillar .detail > .inner, #gl, #thoughts { transition: none; } }
.explain h2 { margin-top: 32px; font-size: clamp(30px, 4vw, 54px); font-weight: 400; letter-spacing: -0.02em; }
.explain .cta { margin-top: 40px; }

/* Thought bubbles: positioned every frame by main.js to follow the faces. */
#thoughts { position: fixed; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
#thoughts > * { position: absolute; left: 0; top: 0; will-change: transform, opacity; }
.bubble, .trail {
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: rgba(6, 8, 26, .45);
  box-shadow: 0 0 10px currentColor, inset 0 0 10px rgba(120, 140, 255, .25);
}
.bubble { animation: blob 6s ease-in-out infinite; }
@keyframes blob {
  0%, 100% { border-radius: 48% 52% 46% 54% / 55% 47% 53% 45%; }
  50%      { border-radius: 54% 46% 52% 48% / 46% 54% 46% 54%; }
}
.thing svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 3px currentColor); }
.thing.glyph { display: flex; align-items: center; justify-content: center; font-weight: 500; line-height: 1; text-shadow: 0 0 6px currentColor; }
