/* Lilac website: same palette as the app (theme.ts dark), Poppins, rounded, soft motion. */
:root {
  --bg: #0b0a0f;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-solid: #16141d;
  --line: rgba(255, 255, 255, 0.09);
  --ink: #f4f2fa;
  --muted: #a39db3;
  --violet: #a78bfa;
  --violet-strong: #8b5cf6;
  --good: #4ade80;
  --gradient: linear-gradient(135deg, #8b5cf6, #6d28d9);
  --card: linear-gradient(135deg, #a78bfa, #7c3aed 55%, #4c1d95);
  --radius: 28px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* The violet glow behind every page, like the app's Backdrop. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vmax 60vmax at 0% 0%, rgba(91, 43, 181, 0.55), transparent 60%),
    radial-gradient(50vmax 50vmax at 100% 45%, rgba(46, 26, 85, 0.9), transparent 60%);
  pointer-events: none;
}
a { color: inherit; }
img, canvas { max-width: 100%; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 20px; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(11, 10, 15, 0.6); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -0.5px; text-decoration: none; }
.brand canvas { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 999px; border: 0; font: 600 15.5px 'Poppins', system-ui, sans-serif; color: #fff; text-decoration: none; cursor: pointer; background: var(--gradient); box-shadow: 0 12px 30px -10px rgba(124, 58, 237, 0.7); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(124, 58, 237, 0.85); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.small { height: 40px; padding: 0 18px; font-size: 14px; }
.btn.ghost { background: var(--surface); box-shadow: none; border: 1px solid var(--line); }
.btn svg { width: 18px; height: 18px; transition: transform .25s; }
.btn:hover svg { transform: translateX(3px); }

/* Hero */
.hero { padding-block: 64px 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(167, 139, 250, 0.14); color: var(--violet); font-size: 12.5px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.05; letter-spacing: -2px; margin: 18px 0 18px; font-weight: 700; }
h1 em, h2 em { font-style: normal; color: var(--violet); }
.lead { color: var(--muted); font-size: 18px; max-width: 30em; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fine { color: var(--muted); font-size: 13.5px; margin-top: 14px; }

/* Phone mock with the app's home screen */
.phone-stage { position: relative; display: grid; place-items: center; min-height: 560px; }
.phone-stage .halo { position: absolute; width: 120%; aspect-ratio: 1; background: radial-gradient(circle, rgba(124, 58, 237, 0.4), transparent 62%); filter: blur(10px); pointer-events: none; }
.phone { position: relative; text-align: left; width: 300px; padding: 14px; border-radius: 46px; background: #121019; border: 1px solid var(--line); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), inset 0 0 0 6px #1b1824; animation: float 7s ease-in-out infinite; }
.screen { border-radius: 34px; overflow: hidden; background: var(--bg); padding: 18px 14px 20px; display: grid; gap: 10px; position: relative; isolation: isolate; }
.screen::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 70% at 0% 0%, rgba(91, 43, 181, 0.55), transparent 60%); }
.notch { width: 90px; height: 22px; border-radius: 999px; background: #000; margin: 0 auto 6px; }
.hi { font-weight: 600; font-size: 20px; letter-spacing: -0.4px; }
.hi small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 0; }
.hero-card { position: relative; overflow: hidden; border-radius: 22px; padding: 16px; background: #1a1625; border: 1px solid var(--line); }
.hero-card canvas { position: absolute; right: -30px; top: -26px; width: 130px; height: 130px; }
.label { font-size: 9.5px; letter-spacing: 1px; color: var(--muted); font-weight: 600; }
.big { font-size: 34px; font-weight: 600; letter-spacing: -1px; line-height: 1.15; }
.big span { font-size: 17px; color: var(--muted); }
.meter { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); margin-top: 10px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #a78bfa, #e9d5ff); transition: width 1.6s cubic-bezier(.2, .8, .2, 1); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { border-radius: 16px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); font-size: 10.5px; color: var(--muted); }
.tile b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.bars i { flex: 1; border-radius: 5px; background: rgba(255, 255, 255, 0.14); height: 8%; transition: height 1s cubic-bezier(.2, .8, .2, 1); }
.bars i.on { background: var(--gradient); }
.goal-mini { border-radius: 16px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); font-size: 11px; display: grid; gap: 7px; }
.goal-mini div { display: flex; justify-content: space-between; font-weight: 600; }
.goal-mini div span { color: var(--violet); }
.track { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.track i { display: block; height: 100%; width: 0; background: var(--gradient); border-radius: 4px; transition: width 1.8s cubic-bezier(.2, .8, .2, 1); }

/* Sections */
section { padding-block: 72px; scroll-margin-top: 40px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
h2 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.12; letter-spacing: -1.2px; margin: 14px 0 12px; font-weight: 700; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { position: relative; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step .num { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--gradient); margin-bottom: 16px; }
.step h3, .feature h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
.step p, .feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .35s, background .35s; }
.feature:hover { transform: translateY(-4px); border-color: rgba(167, 139, 250, 0.35); background: rgba(167, 139, 250, 0.06); }
.icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(167, 139, 250, 0.16); color: var(--violet); margin-bottom: 16px; }
.icon svg { width: 22px; height: 22px; }

/* Pricing */
.toggle { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); margin: 0 auto 30px; }
.toggle button { position: relative; z-index: 1; border: 0; background: none; color: var(--muted); font: 600 14px 'Poppins', system-ui, sans-serif; padding: 10px 22px; border-radius: 999px; cursor: pointer; transition: color .3s; }
.toggle button[aria-pressed='true'] { color: #fff; }
.toggle .pill-bg { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--gradient); box-shadow: 0 8px 20px -8px rgba(124, 58, 237, 0.8); transition: transform .45s cubic-bezier(.3, 1.3, .5, 1); }
.toggle[data-plan='yearly'] .pill-bg { transform: translateX(100%); }
.pricing-center { text-align: center; }
.plan { max-width: 420px; margin: 0 auto; text-align: left; position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1.5px solid var(--line); transition: border-color .4s, transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s; }
.plan.active { border-color: var(--violet-strong); box-shadow: 0 24px 50px -24px rgba(124, 58, 237, 0.7); transform: translateY(-4px); }
.plan h3 { margin: 0; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.badge { display: inline-block; transition: opacity .35s, transform .45s cubic-bezier(.3, 1.4, .5, 1); font-size: 11px; font-weight: 600; color: #fff; padding: 3px 10px; border-radius: 999px; background: var(--gradient); }
.badge.off { opacity: 0; transform: scale(.5); }
span[data-field] { display: inline-block; }
.swap { animation: swap-in .4s cubic-bezier(.2, .8, .2, 1); }
@keyframes swap-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.price { font-variant-numeric: tabular-nums; font-size: 44px; font-weight: 700; letter-spacing: -1.5px; margin: 14px 0 2px; }
.price [data-field] { font-size: 15px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan .note { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 9px; font-size: 14.5px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li svg { flex: none; width: 18px; height: 18px; color: var(--good); margin-top: 3px; }
.plan .btn { width: 100%; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
details { border-radius: 22px; background: var(--surface); border: 1px solid var(--line); padding: 0 22px; transition: background .3s, border-color .3s; }
details[open] { background: rgba(167, 139, 250, 0.06); border-color: rgba(167, 139, 250, 0.3); }
summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ''; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
details[open] summary::after { transform: rotate(225deg) translateY(-3px); }
details .answer { overflow: hidden; }
details p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }

/* Waitlist */
.cta { position: relative; overflow: hidden; border-radius: 36px; padding: 56px 28px; text-align: center; background: var(--card); box-shadow: 0 40px 80px -40px rgba(91, 33, 182, 0.9); }
.cta canvas { position: absolute; right: -120px; top: -120px; width: 260px; height: 260px; opacity: 0.5; pointer-events: none; }
.cta h2 { margin-top: 0; position: relative; }
.cta p { position: relative; color: rgba(255, 255, 255, 0.85); max-width: 32em; margin: 0 auto 26px; }
.waitlist { position: relative; display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.waitlist input { flex: 1; min-width: 0; height: 52px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(11, 10, 15, 0.35); color: #fff; font: 400 15px 'Poppins', system-ui, sans-serif; padding: 0 20px; transition: border-color .25s, background .25s; }
.waitlist input::placeholder { color: rgba(255, 255, 255, 0.6); }
.waitlist input:focus { outline: none; border-color: #fff; background: rgba(11, 10, 15, 0.5); }
.waitlist .btn { background: #fff; color: #4c1d95; box-shadow: none; flex: none; }
.form-msg { position: relative; min-height: 24px; margin-top: 14px; font-size: 14px; font-weight: 600; color: #fff; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.form-msg.show { opacity: 1; transform: none; }

/* Footer */
footer { padding-block: 40px 56px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 28px; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--ink); }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding-block: 48px 72px; }
.legal h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -1.2px; margin-bottom: 6px; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 30px; }
.legal .summary { padding: 20px 22px; border-radius: 22px; background: rgba(167, 139, 250, 0.08); border: 1px solid rgba(167, 139, 250, 0.25); margin-bottom: 28px; }
.legal .summary p { margin: 0; }
.legal h2 { font-size: 22px; letter-spacing: -0.4px; margin: 34px 0 10px; }
.legal p, .legal li { color: #cfcade; font-size: 15.5px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--violet); }

/* Email confirmed page */
.done { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 20px; background: radial-gradient(90% 60% at 50% 0%, rgba(91, 43, 181, 0.45), transparent 70%); }
.done-card { position: relative; overflow: hidden; width: 100%; max-width: 440px; padding: 40px 28px; border-radius: 36px; text-align: center; background: #16141d; border: 1px solid var(--line); box-shadow: 0 40px 80px -40px rgba(91, 33, 182, 0.9); }
.done-card .orb { position: absolute; right: -110px; top: -110px; width: 260px; height: 260px; opacity: 0.45; pointer-events: none; }
.done-card h1 { position: relative; font-size: clamp(26px, 6vw, 32px); letter-spacing: -0.8px; line-height: 1.2; margin: 22px 0 10px; }
.done-card p { position: relative; color: var(--muted); font-size: 15.5px; margin: 0 0 26px; }
.done-card .btn { width: 100%; }
.done-card .fine { margin: 14px 0 0; }
.seal { position: relative; width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--gradient); box-shadow: 0 16px 36px -12px rgba(124, 58, 237, 0.9); }
.seal svg { width: 36px; height: 36px; }
.ready .seal path { stroke-dasharray: 24; stroke-dashoffset: 24; }
.seal.in path { animation: draw .5s .35s cubic-bezier(.2, .8, .2, 1) forwards; }
.seal.warn { background: rgba(252, 211, 77, 0.14); color: #fcd34d; box-shadow: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done .bad, .failed .done .ok { display: none; }
.failed .done .bad { display: block; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
/* If site.js never runs (blocked or failed to load), show everything after a moment instead of a blank page. */
.js:not(.ready) .reveal { animation: reveal-anyway .6s 2.5s forwards; }
@keyframes reveal-anyway { to { opacity: 1; transform: none; } }

@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1deg); } }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .phone-stage { min-height: 0; padding-top: 12px; }
  .steps, .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  section { padding-block: 56px; }
  .steps, .features { grid-template-columns: 1fr; }
  .waitlist { flex-direction: column; }
  .waitlist input { flex: none; }
  .cta canvas { right: -150px; top: -150px; }
  .waitlist .btn { width: 100%; }
  .phone { width: 270px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .ready .seal path { stroke-dashoffset: 0; }
}
