/* Tokens and type from docs/design-system.md#theme (dark only, Raleway 400/500, flat surfaces, no glow). */
@font-face {
  font-family: Raleway;
  src: url('/fonts/Raleway-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Raleway;
  src: url('/fonts/Raleway-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #151719;
  --card: #202326;
  --card-2: #25282c;
  --text: #e8eaed;
  --secondary: #9da4ab;
  --accent: #b9e58c;
  --accent-pressed: #a6d17b;
  --on-accent: #151719;
  --hairline: #34393e;
  --control-border: #69727a;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 Raleway, system-ui, sans-serif;
  font-variant-numeric: oldstyle-nums proportional-nums;
}

h1, h2, h3 { font-weight: 500; margin: 0; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ---------- Shared chrome ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  /* bar spans the screen; logo and menu line up with the .wrap content column (1120px) */
  padding: 12px max(20px, calc((100% - 1120px) / 2 + 20px));
  background: rgba(21, 23, 25, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 18px; text-decoration: none; }
.wordmark img { border-radius: 8px; transition: transform .4s var(--ease); }
.wordmark:hover img { transform: rotate(-12deg) scale(1.08); }
.bar nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.bar nav a:not(.btn) { position: relative; color: var(--secondary); text-decoration: none; transition: color .2s; }
.bar nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.bar nav a:not(.btn):hover { color: var(--text); }
.bar nav a:not(.btn):hover::after { transform: scaleX(1); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 500;
  text-decoration: none;
  transition: background .2s, transform .25s var(--ease);
}
.btn:hover { background: var(--accent-pressed); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 14px; }

footer {
  padding: 32px 20px;
  border-top: 1px solid var(--hairline);
  color: var(--secondary);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
footer a { text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--accent); }
footer small { max-width: 44em; font-size: 12px; }

main { overflow-x: clip; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
section { padding: 96px 0; scroll-margin-top: 64px; }
.eyebrow { display: inline-block; color: var(--accent); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); }
.section-head p, .lead { color: var(--secondary); margin-top: 14px; font-size: 17px; }

.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks svg { flex: none; margin-top: 4px; }

/* ---------- Device: prototype screens already include the phone bezel ---------- */
.device {
  position: relative;
  width: 280px;
  aspect-ratio: 397 / 844;
  border-radius: 12% / 5.7%;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 40px 80px rgba(0, 0, 0, .5);
  transition: transform .5s var(--ease);
  will-change: transform;
}
.device img { width: 100%; height: 100%; object-fit: cover; }
/* Every screen shows prototype sample data; say so on the phone itself. */
.device::after {
  content: 'Sample data';
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: .4%;
  translate: -50% 0;
  padding: 1px 10px;
  border-radius: 999px;
  background: rgba(21, 23, 25, .85);
  border: 1px solid var(--hairline);
  color: var(--secondary);
  font-size: 10px;
  letter-spacing: .04em;
  white-space: nowrap;
  pointer-events: none;
}
.stack img { position: absolute; inset: 0; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 80px; }
.hero h1 { font-size: clamp(36px, 5.8vw, 60px); line-height: 1.08; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { color: var(--secondary); font-size: 18px; margin-top: 20px; max-width: 32em; }

.badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.badge {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 168px;
  padding: 8px 16px;
  border: 1px solid var(--control-border);
  border-radius: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color .25s, transform .25s var(--ease), background .25s;
}
.badge.soon { cursor: default; }
.badge:not(.soon):hover { border-color: var(--accent); background: var(--card); transform: translateY(-3px); }
.badge small { display: block; color: var(--secondary); font-weight: 400; font-size: 11px; }
.center .badges { justify-content: center; }


/* ---------- Marquee ---------- */
.marquee { padding: 28px 0; border-block: 1px solid var(--hairline); overflow: hidden; }
.marquee p { text-align: center; color: var(--secondary); font-size: 13px; margin-bottom: 16px; }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track { gap: 12px; padding-right: 12px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 8px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  color: var(--secondary);
  white-space: nowrap;
  transition: color .2s, border-color .2s, background .2s;
}
.chip i { width: 34px; height: 34px; border-radius: 10px; background: var(--card); display: grid; place-items: center; font-style: normal; }
.chip b { font-weight: 500; color: var(--secondary); }
.chip:hover { color: var(--text); border-color: var(--accent); background: var(--card); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Cards ---------- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--card);
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .3s, transform .3s var(--ease), background .3s;
}
.card:hover { border-color: var(--accent); transform: translateY(-6px); background: var(--card-2); }
.card h3 { font-size: 18px; }
.card p { color: var(--secondary); font-size: 15px; }
.icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--card-2);
  color: var(--accent);
  margin-bottom: 4px;
  transition: transform .4s var(--ease), background .3s, color .3s;
}
.card:hover .icon { transform: rotate(-8deg) scale(1.08); background: var(--accent); color: var(--on-accent); }

/* ---------- Numbers ---------- */
.numbers { padding: 56px 0; background: var(--card); }
.numbers .grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); text-align: center; }
.num { font-size: clamp(40px, 6vw, 56px); font-weight: 500; color: var(--accent); line-height: 1.1; }
.numbers p { color: var(--secondary); margin-top: 6px; }

/* ---------- Gmail flow: frames and step list play in sync (12s, 4 x 3s) ---------- */
.flow { display: grid; grid-template-columns: auto 1fr; gap: 72px; align-items: center; }
.flow-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: step; }
.flow-steps li {
  position: relative;
  padding: 18px 20px 18px 64px;
  border-radius: 16px;
  border: 1px solid var(--hairline);
  color: var(--secondary);
  animation: step-on 12s infinite both;
}
.flow-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card-2);
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
}
.flow-steps h3 { font-size: 17px; color: var(--text); margin-bottom: 2px; }
.flow-steps li:nth-child(2) { animation-delay: 3s; }
.flow-steps li:nth-child(3) { animation-delay: 6s; }
.flow-steps li:nth-child(4) { animation-delay: 9s; }
/* Starts "off" so steps waiting on their delay are not lit (fill-mode backwards uses 0%). */
@keyframes step-on {
  0%, 29%, 100% { background: transparent; border-color: var(--hairline); }
  3%, 25% { background: var(--card); border-color: var(--accent); }
}

.frames img { animation: frame 12s infinite both; }
.frames img:nth-child(2) { animation-delay: 3s; }
.frames img:nth-child(3) { animation-delay: 6s; }
.frames img:nth-child(4) { animation-delay: 9s; }
@keyframes frame {
  0% { opacity: 0; transform: scale(1.03); }
  4%, 25% { opacity: 1; transform: none; }
  29%, 100% { opacity: 0; }
}

/* ---------- Features: sticky phone, screens switch with the text ---------- */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.showcase-phone { position: sticky; top: calc(50vh - 260px); height: 600px; display: flex; justify-content: center; align-self: start; }
.showcase-phone .stack img { opacity: 0; transform: translateY(24px) scale(.97); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.showcase-phone .stack img.on { opacity: 1; transform: none; }
.sc-step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; opacity: .35; transition: opacity .4s; }
.sc-step.on { opacity: 1; }
.sc-step h3 { font-size: clamp(26px, 3.4vw, 34px); }
.sc-step > p { color: var(--secondary); margin-top: 14px; font-size: 17px; max-width: 30em; }
.sc-step .checks li { color: var(--secondary); }
.sc-step .device { display: none; }

/* ---------- Two-column showcase rows (widget, privacy) ---------- */
.row { display: grid; grid-template-columns: 1fr auto; gap: 72px; align-items: center; }
.row.flip { grid-template-columns: auto 1fr; }
.trust { background: var(--card); }
.trust .card { background: var(--bg); }
.trust .card:hover { background: var(--bg); }
.trust .grid { grid-template-columns: repeat(2, 1fr); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 760px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid transparent; border-radius: 14px; padding: 0 20px; transition: background .2s, border-color .2s; }
.faq details:hover { border-color: var(--hairline); }
.faq details[open] { background: var(--card-2); border-color: var(--hairline); }
.faq summary { cursor: pointer; font-weight: 500; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 22px; line-height: 1; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--secondary); padding-bottom: 18px; }

/* ---------- Final CTA ---------- */
.cta-box { background: var(--card); border-radius: 28px; padding: 64px 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.cta-box .happy { width: 104px; height: 104px; transition: transform .5s var(--ease); }
.cta-box:hover .happy { transform: translateY(-8px) rotate(-6deg); }
.cta-box h2 { font-size: clamp(28px, 4.4vw, 44px); max-width: 16em; }
.cta-box p { color: var(--secondary); }

/* ---------- Scroll reveal (only when JS runs) ---------- */
.js [data-reveal] { opacity: 0; transition: opacity .9s var(--ease), transform .9s var(--ease), translate .9s var(--ease), rotate .9s var(--ease); }
.js [data-reveal=""], .js [data-reveal="up"] { translate: 0 32px; }
.js [data-reveal="left"] { translate: -80px 0; rotate: -4deg; }
.js [data-reveal="right"] { translate: 80px 0; rotate: 4deg; }
.js [data-reveal].in { opacity: 1; translate: none; rotate: none; }
.js [data-delay="1"] { transition-delay: .12s; }
.js [data-delay="2"] { transition-delay: .24s; }
.js [data-delay="3"] { transition-delay: .36s; }

/* ---------- Text pages: privacy, terms, delete account, support ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 40px 20px 56px; }
.doc h1 { font-size: 28px; margin-bottom: 8px; }
.doc .updated { color: var(--secondary); font-size: 14px; margin-bottom: 32px; }
.doc h2 { font-size: 18px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--secondary); }
.doc p + p, .doc ul + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 20px; margin: 8px 0 0; display: grid; gap: 6px; }
.doc strong { color: var(--text); font-weight: 500; }
.doc a { color: var(--accent); }
.doc code { font-size: 14px; background: var(--card); padding: 1px 6px; border-radius: 6px; }
.table-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--hairline); border-radius: 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc th, .doc td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.doc th { color: var(--text); font-weight: 500; background: var(--card); }
.doc td { color: var(--secondary); }
.doc tr:last-child td { border-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .flow, .row, .row.flip, .showcase { grid-template-columns: 1fr; gap: 40px; }
  .row .device, .flow .device { margin: 0 auto; }
  .row:not(.flip) > :last-child { order: -1; }
  .showcase-phone { display: none; }
  .sc-step { min-height: 0; opacity: 1; gap: 0; padding-bottom: 56px; }
  .sc-step .device { display: block; order: 1; margin: 28px auto 0; width: 250px; }
  .trust .grid { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .bar nav a:not(.btn) { display: none; }
  .device { width: 240px; }
}

/* Reduced Motion: no decorative movement (docs/design-system.md#motion-and-loop) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; translate: none; rotate: none; }
  .frames img:not(:first-child) { display: none; }
  .flow-steps li:first-child { border-color: var(--accent); background: var(--card); }
}

/* QR: only where a phone camera is the second device (desktop) */
.qr { display: flex; align-items: center; gap: 16px; margin-top: 24px; text-align: left; }
.qr img { border-radius: 12px; background: #fff; padding: 8px; box-sizing: content-box; }
.qr p { max-width: 14em; font-size: 15px; }
@media (hover: none), (max-width: 900px) { .qr { display: none; } }
.trust-line { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--secondary); font-size: 14px; }
.trust-line svg { flex: none; color: var(--accent); }


/* ---------- Hero: centred copy, then the phone + Gmail scene (main.js sets data-state) ----------
   idle: phone alone in the middle · open: phone slides left, Gmail opens right and the search runs ·
   filter: non-billing mail drops out · fly: billing mail flies into the app · results · ready */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero-head { text-align: center; }
.hero-head .hero-sub { margin-left: auto; margin-right: auto; }
.hero-head .checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; }
.hero-head .badges, .hero-head .trust-line { justify-content: center; }
.hero-head h1 { font-size: clamp(34px, 4.6vw, 54px); }
.proof { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; font-size: 15px; font-weight: 500; color: var(--text); }
.proof li { display: flex; align-items: center; gap: 7px; }
.proof svg { flex: none; color: var(--accent); }
.hero-head .hero-sub { margin-top: 14px; font-size: 18px; }
.hero-head .badges { margin-top: 24px; }

/* Demo steps: the active one fills over its duration (main.js sets .on, .done and --d) */
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 36px 0 0; padding: 0; color: var(--secondary); font-size: 14px; }
.steps li {
  counter-increment: s; padding-top: 14px; transition: color .3s;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 0 / 0 3px, linear-gradient(var(--hairline), var(--hairline)) no-repeat 0 0 / 100% 3px;
}
.steps li::before { content: counter(s, decimal-leading-zero) "  "; color: var(--accent); font-weight: 500; white-space: pre; }
.steps li.on { color: var(--text); background-size: 100% 3px, 100% 3px; transition: color .3s, background-size var(--d, 3s) linear; }
.steps li.done { color: var(--text); background-size: 100% 3px, 100% 3px; }
.stage { position: relative; height: 724px; margin-top: 32px; }

/* Phone: the app's prototype screenshots (bezel included), stacked; % positions are measured on the 611 x 1300 images */
.phone {
  position: absolute; z-index: 2; top: 0; left: 50%; width: 340px; aspect-ratio: 611 / 1300; translate: -50% 0;
  transition: left 1.1s var(--ease), translate 1.1s var(--ease), opacity .5s, scale .5s var(--ease);
}
.stage:not([data-state="idle"]) .phone { left: 6%; translate: 0 0; }
.ps { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; transition: opacity .45s, visibility .45s; }
.ps-results img { width: 100%; height: 100%; }
.stage[data-state="idle"] .ps-connect,
.stage[data-state="open"] .ps-discover, .stage[data-state="filter"] .ps-discover,
.stage[data-state="fly"] .ps-results, .stage[data-state="results"] .ps-results,
.stage[data-state="ready"] .ps-ready { opacity: 1; visibility: visible; }
/* the two found rows start hidden under the list card's colour and show as each email lands */
.cover { position: absolute; left: 8.3%; width: 83.5%; top: 60.5%; height: 11.2%; background: #1f2326; transition: opacity .35s; }
.cover + .cover { top: 71.9%; height: 11.2%; }
.cover.off { opacity: 0; }
.slot { position: absolute; left: 8%; width: 84%; top: 60.4%; height: 11.4%; }
.slot:nth-of-type(2) { top: 71.8%; }
.slot:nth-of-type(3) { top: 81%; height: 2%; } /* the third row is below the fold, as in the app */

/* tap targets sit on the screenshot's own buttons */
.go { position: absolute; left: 7.3%; width: 85.4%; top: 73.8%; height: 5.7%; padding: 0; border: 0; border-radius: 999px; background: transparent; cursor: pointer; }
.go.save { top: 86.5%; height: 5.2%; display: none; }
.stage[data-state="results"] .go.save { display: block; }
.go.outlook { top: 80.7%; }
.stage:not([data-state="idle"]) .go.connect, .stage:not([data-state="idle"]) .go.outlook { display: none; }
.go:focus-visible, .replay:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
.go { box-shadow: 0 0 0 3px rgba(185, 229, 140, .6); }
.go::before {
  content: attr(data-hint); position: absolute; left: 50%; bottom: calc(100% + 12px); translate: -50% 0; white-space: nowrap;
  background: var(--text); color: var(--bg); font-size: 12px; padding: 7px 12px; border-radius: 999px; animation: hint-bob 1.6s ease-in-out infinite;
}
.go::after { content: ""; position: absolute; left: 50%; bottom: calc(100% + 6px); translate: -50% 0; border: 6px solid transparent; border-top-color: var(--text); border-bottom: 0; animation: hint-bob 1.6s ease-in-out infinite; }
.go.outlook::before, .go.outlook::after { content: none; } /* one hint is enough; it would cover the Gmail button */
}
/* autoplay: a finger tap on the button (main.js adds .tap) */
.go.tap { animation: tap-press .65s var(--ease); }
.go.tap::before { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(255, 255, 255, .55); animation: tap-dot .65s ease-out forwards; }
@keyframes tap-press { 40% { scale: .96; } }
@keyframes tap-dot { 0% { scale: .3; opacity: 0; } 30% { scale: 1; opacity: 1; } 100% { scale: 2.2; opacity: 0; } }
@keyframes hint-bob { 50% { transform: translateY(-4px); } }

.replay { position: absolute; left: 50%; top: calc(100% + 16px); translate: -50% 0; display: none; border: 1px solid var(--control-border); border-radius: 999px; padding: 10px 20px; background: transparent; color: var(--text); font: 500 14px/1 Raleway, sans-serif; cursor: pointer; }
.replay:hover { border-color: var(--accent); }
.stage[data-state="ready"] .replay { display: block; }
.push {
  position: absolute; z-index: 4; top: 9%; left: 50%; width: 84%; display: flex; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 18px; background: rgba(37, 40, 44, .97); border: 1px solid var(--hairline);
  font-size: 12px; line-height: 1.35; translate: -50% -20px; opacity: 0; transition: opacity .5s, translate .6s var(--ease);
}
.push img { width: 32px; height: 32px; border-radius: 8px; }
.push strong { display: block; font-weight: 500; font-size: 13px; }
.push span, .push small { display: block; color: var(--secondary); }
.push small { font-size: 9px; letter-spacing: .04em; }
.stage[data-state="ready"] .push { translate: -50% 0; opacity: 1; transition-delay: .9s; }

/* Gmail window */
.gmail {
  position: absolute; z-index: 1; top: 64px; right: 0; width: 56%; overflow: hidden;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 18px; box-shadow: 0 30px 60px rgba(0, 0, 0, .4);
  opacity: 0; translate: 60px 0; scale: .96; pointer-events: none;
  transition: opacity .6s .35s, translate .8s .35s var(--ease), scale .8s .35s var(--ease);
}
.stage:not([data-state="idle"]) .gmail { opacity: 1; translate: 0 0; scale: 1; }
.stage[data-state="ready"] .gmail { opacity: .35; transition-delay: 0s; }
.gbar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--card-2); border-bottom: 1px solid var(--hairline); }
.gbar i { width: 10px; height: 10px; border-radius: 50%; background: var(--hairline); }
.gbar span { margin: 0 auto; padding: 3px 14px; border-radius: 999px; background: var(--bg); color: var(--secondary); font-size: 11px; }
.ghead { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--hairline); }
.ghead .gm { flex: none; width: 22px; height: 22px; }
.ghead small { flex: none; color: var(--secondary); font-size: 11px; border: 1px solid var(--hairline); border-radius: 999px; padding: 2px 9px; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: var(--bg); color: var(--secondary); font-size: 12px; overflow: hidden; }
.search svg { flex: none; }
.q { white-space: nowrap; overflow: hidden; color: var(--text); }
.caret { flex: none; width: 1px; height: 14px; background: var(--accent); animation: blink 1s steps(1) infinite; margin-left: -6px; }
@keyframes blink { 50% { opacity: 0; } }
.gl { list-style: none; margin: 0; padding: 4px 0; }
.mail {
  position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 9px 16px; max-height: 76px; font-size: 13px; line-height: 1.35; overflow: hidden;
  transition: max-height .55s var(--ease), padding .55s var(--ease), opacity .35s, background .4s;
}
.mail > div { min-width: 0; }
.mail strong, .mail span, .mail small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail strong { font-weight: 500; font-size: 14px; }
.mail small { color: var(--secondary); font-size: 12px; }
.mail time { align-self: start; color: var(--secondary); font-size: 12px; transition: opacity .3s; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); font-style: normal; font-weight: 500; font-size: 13px; color: #fff; }
.av img { width: 18px; height: 18px; }
.mail.out { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; }
.mail.hit { background: rgba(185, 229, 140, .07); box-shadow: inset 3px 0 var(--accent); }
.mail.hit time { opacity: 0; }
.mail.bill::after {
  content: attr(data-tag); position: absolute; right: 16px; top: 9px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 500; opacity: 0; transition: opacity .35s;
}
.mail.hit::after { opacity: 1; }
.mail.sent { opacity: .45; }
.mail.sent::after { content: "Added to Renewless"; background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.gfoot { padding: 10px 16px 14px; color: var(--secondary); font-size: 12px; border-top: 1px solid var(--hairline); }

/* A billing email on its way into the app (main.js clones it into the stage) */
.flyer time { display: none; }
.flyer { position: absolute; z-index: 5; margin: 0; list-style: none; border-radius: 14px; background: #2a2f2b; box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 3px 0 var(--accent); pointer-events: none; }

/* Wide screens: copy on the left, the phone on the right; on Connect the copy fades and the scene takes the full width */
/* Hero polish: soft glow and dot grid behind the copy, words and points arrive one by one on load */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: -160px; height: 820px; pointer-events: none;
  background: radial-gradient(560px 380px at 22% 32%, rgba(185, 229, 140, .13), transparent 70%), radial-gradient(460px 340px at 82% 26%, rgba(185, 229, 140, .08), transparent 70%);
  animation: glow 12s ease-in-out infinite alternate;
}
.hero::after {
  content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 0; height: 640px; pointer-events: none;
  background: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.4px) 0 0 / 26px 26px;
  mask-image: radial-gradient(70% 80% at 50% 20%, #000, transparent 75%);
}
@keyframes glow { to { transform: translate(40px, 30px) scale(1.08); } }
.kicker { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 22px; padding: 6px 14px 6px 11px; border: 1px solid var(--hairline); border-radius: 999px; background: rgba(255, 255, 255, .03); color: var(--secondary); font-size: 13px; }
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(185, 229, 140, .6); } 100% { box-shadow: 0 0 0 8px rgba(185, 229, 140, 0); } }
.hero h1 .w { display: inline-block; animation: word-in .9s var(--ease) calc(.15s + var(--i) * .09s) both; }
.hero h1 em .w {
  background: linear-gradient(100deg, var(--accent) 35%, #effbe2 50%, var(--accent) 65%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: word-in .9s var(--ease) calc(.15s + var(--i) * .09s) both, shimmer 7s linear 1.6s infinite;
}
@keyframes word-in { from { opacity: 0; transform: translateY(26px); filter: blur(8px); } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -200% 0; } }
.hero-head > .kicker, .hero-head > .hero-sub, .hero-head > .badges { animation: rise .8s var(--ease) both; }
.hero-head > .kicker { animation-delay: 0s; }
.hero-head > .hero-sub { animation-delay: .6s; }
.hero-head > .badges { animation-delay: .75s; }
@keyframes bob { 50% { translate: 0 -10px; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.proof li { animation: rise .7s var(--ease) both; }
.proof li:nth-child(1) { animation-delay: .8s; } .proof li:nth-child(2) { animation-delay: .9s; } .proof li:nth-child(3) { animation-delay: 1s; } .proof li:nth-child(4) { animation-delay: 1.1s; }
.proof li path:only-child { stroke-dasharray: 24; animation: draw .5s ease-out both; }
.proof li:nth-child(1) path { animation-delay: 1.1s; } .proof li:nth-child(2) path { animation-delay: 1.2s; } .proof li:nth-child(3) path { animation-delay: 1.3s; }
@keyframes draw { from { stroke-dashoffset: 24; } }
.proof-wrap { position: relative; }
.orb { display: none; }
.demo-head { text-align: center; margin-top: 96px; }
.demo-head .kicker { margin-bottom: 16px; }
.demo-head h2 { font-size: clamp(28px, 3.2vw, 38px); }
.demo-head p:last-child { color: var(--secondary); margin-top: 10px; }

/* Wide screens: heading and sub on the left, the points as a list on the right; the scene below */
@media (min-width: 981px) {
  .hero-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; }
  .hero-head { text-align: left; }
  .hero-head h1 em { display: block; }
  .hero-head .hero-sub { margin: 20px 0 0; }
  .hero-head .badges { justify-content: flex-start; }
  .hero-top { align-items: center; padding-top: 24px; }
  .proof-wrap { flex: none; margin-right: 32px; animation: rise .9s var(--ease) .5s both; }
  .proof {
    flex-direction: column; gap: 16px; margin: 0; padding: 30px 34px; border: 1px solid transparent; border-radius: 22px; font-size: 18px;
    background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(140deg, rgba(185, 229, 140, .7), var(--hairline) 35%, var(--hairline) 70%, rgba(185, 229, 140, .4)) border-box;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 60px rgba(185, 229, 140, .06);
  }
  /* service logos floating around the card */
  .orb { position: absolute; z-index: 1; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--hairline); box-shadow: 0 14px 30px rgba(0, 0, 0, .45); animation: rise .8s var(--ease) both, bob 6s ease-in-out infinite; }
  .orb img { width: 26px; height: 26px; }
  .o1 { top: -28px; left: -30px; animation-delay: 1.2s, 1.2s; }
  .o2 { top: -22px; right: -34px; width: 44px; height: 44px; animation-delay: 1.3s, 2.4s; }
  .o3 { bottom: -26px; right: -18px; animation-delay: 1.4s, .6s; }
  .o4 { bottom: -30px; left: 36px; width: 44px; height: 44px; animation-delay: 1.5s, 3s; }
  .orb + .orb img { width: 24px; height: 24px; }
  .proof li { gap: 12px; }
  .proof svg { width: 16px; height: 16px; padding: 5px; box-sizing: content-box; border-radius: 50%; background: rgba(185, 229, 140, .12); }
}
@media (max-width: 980px) {
  /* No room side by side: Gmail opens over the phone, then the mail flies down into it */
  .stage { height: auto; display: grid; justify-items: center; }
  .phone, .stage:not([data-state="idle"]) .phone { position: relative; left: auto; translate: none; width: min(340px, 100%); }
  .stage { padding-bottom: 64px; }
  .stage[data-state="open"] .phone, .stage[data-state="filter"] .phone { opacity: .25; scale: .94; }
  .gmail { top: 40px; left: 0; right: 0; width: auto; max-width: 520px; margin: 0 auto; translate: 0 30px; z-index: 3; }
  .stage[data-state="fly"] .gmail, .stage[data-state="results"] .gmail, .stage[data-state="ready"] .gmail { opacity: 0; transition-delay: 0s; }
}
@media (max-width: 560px) {
  .proof { gap: 8px 16px; font-size: 14px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 28px; font-size: 13px; }
  .demo-head { margin-top: 64px; }
  .stage { margin-top: 40px; }
  .gmail { top: 20px; }
  .ghead small { display: none; }
  .mail { padding: 9px 12px; }
}
