:root {
  --indigo: #5856D6;
  --indigo-dark: #4B49C0;
  --ink: #1C1C1E;
  --muted: #6E6E73;
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --line: #E5E5EA;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--indigo); text-decoration: none; }
.container { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 460px; }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; }
.brand .dot { width: 26px; height: 26px; border-radius: 8px; background: var(--indigo); display: grid; place-items: center; color: #fff; }
.nav a.link { color: var(--ink); margin-left: 18px; font-size: 15px; }

/* Buttons */
.btn { display: inline-block; border: none; cursor: pointer; font-size: 16px; font-weight: 600;
  padding: 13px 22px; border-radius: 999px; background: var(--indigo); color: #fff; transition: .15s; }
.btn:hover { background: var(--indigo-dark); }
.btn.secondary { background: transparent; color: var(--indigo); border: 1.5px solid var(--indigo); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.block { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: .5; cursor: default; }

/* Hero */
.hero { text-align: center; padding: 72px 0 56px; }
.hero h1 { font-size: 48px; line-height: 1.08; letter-spacing: -1px; margin: 0 0 16px; }
.hero p { font-size: 20px; color: var(--muted); max-width: 620px; margin: 0 auto 28px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 40px 0; }
.section h2 { font-size: 30px; letter-spacing: -.5px; text-align: center; margin: 0 0 28px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 8px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.ic { width: 38px; height: 38px; border-radius: 10px; background: rgba(88,86,214,.12); color: var(--indigo);
  display: grid; place-items: center; font-size: 20px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 720px; margin: 0 auto; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; text-align: center; }
.plan.pro { border: 2px solid var(--indigo); }
.plan .price { font-size: 34px; font-weight: 700; margin: 10px 0; }
.plan .per { color: var(--muted); font-size: 14px; }
.plan ul { text-align: left; padding-left: 18px; color: var(--muted); font-size: 15px; }

/* Auth / panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; margin: 40px auto; }
.panel h1 { font-size: 26px; margin: 0 0 6px; }
.panel .sub { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.field { width: 100%; padding: 13px 14px; font-size: 16px; border: 1px solid var(--line);
  border-radius: 12px; margin-bottom: 12px; background: #fff; }
.tabs { display: flex; gap: 6px; background: var(--bg); padding: 4px; border-radius: 12px; margin-bottom: 18px; }
.tabs button { flex: 1; border: none; background: transparent; padding: 9px; border-radius: 9px; cursor: pointer; font-size: 14px; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.note { color: var(--muted); font-size: 13px; text-align: center; margin-top: 14px; }
.error { background: #FDECEC; color: #B3261E; font-size: 14px; line-height: 1.4;
  padding: 11px 14px; border: 1px solid #F4C7C5; border-radius: 12px; margin: 0 0 14px; }
.row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: none; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(88,86,214,.12); color: var(--indigo); }
.badge.pro { background: var(--indigo); color: #fff; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 13px; }

/* States & feedback (UX heuristics: status visibility, error recovery) */
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--indigo);
  border-radius: 50%; animation: spin .7s linear infinite; margin: 8px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { text-align: center; color: var(--muted); padding: 24px 0; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 200; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #D8302F; }
.skeleton { background: linear-gradient(90deg,#eee,#f5f5f5,#eee); background-size: 200% 100%;
  animation: sh 1.2s infinite; border-radius: 8px; height: 14px; }
@keyframes sh { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.search { width: 100%; padding: 11px 14px; font-size: 15px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; }
.iconbtn { background: none; border: none; cursor: pointer; color: var(--indigo); font-size: 14px; padding: 4px 6px; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
@media (prefers-reduced-motion: reduce) { .spinner, .skeleton { animation: none; } }

footer { color: var(--muted); font-size: 14px; text-align: center; padding: 40px 0; }

/* ============ Landing (Apple-style, scroll-driven) ============ */
.lp { background: #000; color: #f5f5f7; --e: cubic-bezier(.16,1,.3,1); --e-spring: cubic-bezier(.34,1.3,.5,1); }
.lp-wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* Scroll progress bar */
.lp-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 100;
  background: linear-gradient(90deg,#6E6BF0,#A78BFA); box-shadow: 0 0 12px rgba(124,121,240,.6); }

/* Original logo (sparkle, matches app icon) */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.logo-tile { width: 30px; height: 30px; border-radius: 9px; background: var(--indigo);
  display: grid; place-items: center; box-shadow: 0 6px 16px rgba(88,86,214,.4); }
.logo-tile svg { width: 19px; height: 19px; fill: #fff; }
.logo-word { font-size: 19px; letter-spacing: -.3px; }

/* Sticky translucent nav */
.lp-nav { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(180%) blur(20px);
  background: rgba(0,0,0,.55); border-bottom: 1px solid rgba(255,255,255,.08); }
.lp-nav .lp-wrap { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.lp-nav .logo-word { color: #f5f5f7; }
.lp-nav a { color: #d2d2d7; font-size: 14px; margin-left: 22px; transition: color .2s; }
.lp-nav a:hover { color: #fff; }

/* Hero */
.lp-hero { position: relative; min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; overflow: hidden; padding: 80px 22px 0; }
.aurora { position: absolute; inset: -20% -10% auto -10%; height: 80%; z-index: 0; filter: blur(90px); opacity: .55; }
.aurora i { position: absolute; display: block; width: 50vw; height: 50vw; border-radius: 50%; }
.aurora .x1 { background: #6E6BF0; top: -10%; left: 5%; }
.aurora .x2 { background: #9D7BFF; top: 0; right: 0; }
.aurora .x3 { background: #4F46C9; bottom: -20%; left: 30%; }
.lp-hero > * { position: relative; z-index: 1; }
.lp-eyebrow { font-size: 15px; letter-spacing: .3px; color: #a78bfa; font-weight: 600; margin-bottom: 14px; }
.lp-title { font-size: clamp(44px, 8vw, 92px); line-height: .98; letter-spacing: -2px; font-weight: 700; margin: 0; }
.lp-title .grad { background: linear-gradient(180deg,#fff, #b9b6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-sub { font-size: clamp(18px,2.4vw,24px); color: #c7c7cf; max-width: 620px; margin: 22px auto 30px; }
.lp-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.lp-btn { display: inline-block; padding: 14px 26px; border-radius: 999px; font-size: 17px; font-weight: 600; cursor: pointer; }
.lp-btn.primary { background: #fff; color: #000; }
.lp-btn.primary:hover { background: #e8e8ed; }
.lp-btn.link { color: #a78bfa; }
.lp-herologo { width: 76px; height: 76px; border-radius: 20px; background: var(--indigo);
  display: grid; place-items: center; margin: 0 auto 26px; box-shadow: 0 20px 50px rgba(88,86,214,.5); }
.lp-herologo svg { width: 46px; height: 46px; fill: #fff; }

/* iPhone device */
.device { width: 290px; aspect-ratio: 290/600; border-radius: 46px; padding: 11px;
  background: linear-gradient(160deg,#2a2a2e,#0d0d0f); box-shadow: 0 40px 90px rgba(80,70,200,.35), inset 0 0 0 1px rgba(255,255,255,.08); }
.device .scr { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #F2F2F7; color: #1c1c1e; }
.notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 95px; height: 26px; background: #000; border-radius: 16px; z-index: 3; }
.s-pad { padding: 44px 16px 16px; text-align: left; }
.s-h1 { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.s-sub { font-size: 12px; color: #8e8e93; margin: 2px 0 14px; }
.s-card { background: #fff; border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.s-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.s-row .d { width: 9px; height: 9px; border-radius: 50%; background: var(--indigo); }
.s-row .d.g { background: #c7c7cc; }
.s-row .t { margin-left: auto; color: #8e8e93; font-size: 13px; }
.s-row .t.now { color: var(--indigo); font-weight: 600; }
.s-sug { background: rgba(88,86,214,.12); color: #36348a; border-radius: 14px; padding: 11px 13px; font-size: 13px; margin-bottom: 12px; }
.s-bar { display: flex; align-items: center; gap: 8px; background: #fff; border:1px solid #ececf0; border-radius: 22px; padding: 9px 9px 9px 14px; font-size: 14px; color: #8e8e93; }
.s-send { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; background: var(--indigo); color:#fff; display:grid; place-items:center; }

/* Big editorial statements */
.lp-statement { min-height: 78svh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 60px 22px; }
.lp-statement.light { background: #fff; color: #1d1d1f; }
.lp-statement h2 { font-size: clamp(34px, 6vw, 68px); line-height: 1.05; letter-spacing: -1.5px; font-weight: 700; max-width: 900px; margin: 0; }
.lp-statement .accent { color: var(--indigo); }
.lp-statement p { font-size: clamp(17px,2vw,21px); color: #6e6e73; max-width: 560px; margin: 22px auto 0; }

/* Pinned product walkthrough */
.lp-pin { position: relative; height: 360svh; background: #0a0a0c; }
.lp-pin-inner { position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; max-width: 1080px; margin: 0 auto; padding: 0 22px; gap: 20px; }
.lp-steps { position: relative; }
.lp-step { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transform: translateY(20px); transition: opacity .5s, transform .5s; }
.lp-step.active { opacity: 1; transform: none; }
.lp-step .n { color: #a78bfa; font-weight: 700; font-size: 14px; letter-spacing: 1px; }
.lp-step h3 { font-size: clamp(30px,4vw,46px); line-height: 1.05; letter-spacing: -1px; margin: 10px 0 12px; }
.lp-step p { color: #c7c7cf; font-size: 18px; max-width: 420px; margin: 0; }
.lp-stage { display: grid; place-items: center; }
.lp-screen { position: absolute; opacity: 0; transform: scale(.96); transition: opacity .5s, transform .5s; }
.lp-screen.active { opacity: 1; transform: none; }

/* Pricing */
.lp-price { background: #fff; color: #1d1d1f; padding: 100px 22px; text-align: center; }
.lp-price h2 { font-size: clamp(32px,5vw,56px); letter-spacing: -1px; margin: 0 0 40px; }
.lp-plans { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.lp-plan { width: 300px; text-align: left; border-radius: 22px; padding: 28px; border: 1px solid #e5e5ea; background: #fbfbfd; }
.lp-plan.pro { background: #0a0a0c; color: #fff; border: none; box-shadow: 0 30px 70px rgba(88,86,214,.3); }
.lp-plan h3 { margin: 0; font-size: 22px; }
.lp-plan .p { font-size: 40px; font-weight: 700; letter-spacing: -1px; margin: 12px 0 2px; }
.lp-plan .per { color: #8e8e93; font-size: 14px; }
.lp-plan ul { list-style: none; padding: 0; margin: 18px 0 22px; font-size: 15px; }
.lp-plan li { padding: 7px 0; border-top: 1px solid rgba(128,128,128,.18); }

/* Privacy moment */
.lp-priv { background: #0a0a0c; text-align: center; padding: 110px 22px; }
.lp-priv .glyph { width: 64px; height: 64px; border-radius: 18px; background: rgba(167,139,250,.14);
  color: #a78bfa; display: grid; place-items: center; font-size: 30px; margin: 0 auto 22px; }
.lp-priv h2 { font-size: clamp(30px,4.5vw,52px); letter-spacing: -1px; margin: 0 0 14px; }
.lp-priv p { color: #c7c7cf; font-size: 19px; max-width: 600px; margin: 0 auto; }
.lp-priv .glyph svg { stroke: #a78bfa; }
.lp-trust { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px;
  margin: 34px auto 0; color: #98989d; font-size: 14px; font-weight: 500; }
.lp-trust i { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.25); }
.appstore.soon { cursor: default; opacity: .8; }
.appstore.soon:hover { transform: none; }

/* Closing CTA band */
.lp-end { background: linear-gradient(135deg, #5B59D6, #7C5CFF); color: #fff; text-align: center; padding: 116px 22px; }
.lp-end h2 { font-size: clamp(32px,5vw,58px); letter-spacing: -1px; margin: 0 0 14px; }
.lp-end p { color: rgba(255,255,255,.86); font-size: 19px; margin: 0 0 30px; }
.lp-end .lp-btn.primary { background: #fff; color: #1d1d1f; }
.lp-end .lp-btn.primary:hover { background: #eee; transform: translateY(-2px); }

/* Download / App Store band */
.lp-store { background: linear-gradient(135deg, #5B59D6, #7C5CFF); color: #fff; text-align: center; padding: 116px 22px; }
.lp-store h2 { font-size: clamp(32px,5vw,56px); letter-spacing: -1px; margin: 0 0 12px; }
.lp-store p { color: rgba(255,255,255,.88); font-size: 19px; margin: 0 0 30px; }
.appstore { display: inline-flex; align-items: center; gap: 12px; background: #000; color: #fff;
  padding: 12px 22px; border-radius: 14px; transition: transform .25s var(--e-spring); }
.appstore:hover { transform: translateY(-2px); }
.appstore .apple { width: 26px; height: 26px; fill: #fff; }
.appstore span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.appstore small { font-size: 11px; opacity: .9; }
.appstore b { font-size: 19px; font-weight: 600; }

/* Dark auth / admin pages (body.lp) */
.lp .auth-wrap { min-height: calc(100svh - 54px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lp .panel { background: #101013; border: 1px solid rgba(255,255,255,.08); color: #f5f5f7; }
.lp .panel h1 { color: #f5f5f7; }
.lp .panel .sub, .lp .note { color: #98989d; }
.lp .field { background: #1c1c1f; border: 1px solid rgba(255,255,255,.12); color: #fff; }
.lp .tabs { background: #1c1c1f; }
.lp .tabs button { color: #98989d; }
.lp .tabs button.active { background: #000; color: #fff; box-shadow: none; }
.lp .row { border-color: rgba(255,255,255,.08); }
.lp .badge { background: rgba(167,139,250,.16); color: #c4b5fd; }
.lp .badge.pro { background: var(--indigo); color: #fff; }
.lp .btn.ghost { background: #1c1c1f; color: #fff; border-color: rgba(255,255,255,.14); }
.lp .stat { background: #101013; border: 1px solid rgba(255,255,255,.08); }
.lp .card { background: #101013; border: 1px solid rgba(255,255,255,.08); }
.lp table th, .lp table td { border-color: rgba(255,255,255,.08); }
.lp .plan { background: #1c1c1f; border: 1px solid rgba(255,255,255,.12); color: #f5f5f7; }
.lp .plan.pro { border: 2px solid var(--indigo); }
.lp .per { color: #98989d; }
.lp-wrap-page { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
/* Pinned progress dots */
.lp-dots { display: flex; gap: 10px; margin-top: 30px; }
.lp-dots span { width: 28px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.18); transition: background .4s var(--e), width .4s var(--e); }
.lp-dots span.on { background: #a78bfa; width: 44px; }

/* Multi-column footer */
.lp-foot { background: #000; color: #86868b; padding: 72px 22px 36px; border-top: 1px solid rgba(255,255,255,.08); }
.lp-foot-grid { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; align-items: start; text-align: left; }
.lp-foot-grid > div { text-align: left; }
.lp-foot .logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.lp-foot h4 { color: #f5f5f7; font-size: 13px; font-weight: 600; margin: 0 0 14px; }
.lp-foot a { color: #86868b; font-size: 15px; transition: color .2s; }
.lp-foot a:hover { color: #fff; }
.lp-foot .col a { display: block; padding: 6px 0; }
.lp-foot .tag { color: #86868b; font-size: 15px; line-height: 1.5; max-width: 300px; margin: 0; }
.lp-foot-bottom { max-width: 1080px; margin: 44px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; font-size: 13px; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) {
  .lp-foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .lp-foot-grid > :first-child { grid-column: 1 / -1; }
}

/* ---- Motion primitives (spring-like easing, choreographed) ---- */
@keyframes lpUp { from { opacity: 0; transform: translateY(34px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes auroraDrift { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(46px,34px) scale(1.18); } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

@media (prefers-reduced-motion: no-preference) {
  .lp-up { animation: lpUp 1s var(--e) both; }
  .lp-d1 { animation-delay: .12s; } .lp-d2 { animation-delay: .26s; } .lp-d3 { animation-delay: .40s; } .lp-d4 { animation-delay: .56s; }
  .lp-herologo { animation: lpUp 1s var(--e) both, floaty 7s ease-in-out 1.1s infinite; }
  .aurora i { animation: auroraDrift 18s ease-in-out infinite; will-change: transform; }
  .aurora .x2 { animation-duration: 24s; animation-direction: reverse; }
  .aurora .x3 { animation-duration: 30s; }

  /* Reveal: rise + scale with expo easing; children stagger */
  .reveal { opacity: 0; transform: translateY(40px) scale(.97); transition: opacity .9s var(--e), transform .9s var(--e); will-change: transform, opacity; }
  .reveal.in { opacity: 1; transform: none; }
  .reveal .stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--e), transform .7s var(--e); }
  .reveal.in .stagger > * { opacity: 1; transform: none; }
  .reveal.in .stagger > *:nth-child(2) { transition-delay: .08s; }
  .reveal.in .stagger > *:nth-child(3) { transition-delay: .16s; }
  .reveal.in .stagger > *:nth-child(4) { transition-delay: .24s; }

  .lp-btn { transition: transform .25s var(--e-spring), background .2s, box-shadow .25s; }
  .lp-btn.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255,255,255,.18); }
  .lp-btn:active { transform: scale(.96); }
}
@media (max-width: 720px) {
  .lp-pin-inner { grid-template-columns: 1fr; text-align: center; }
  .lp-steps { height: 220px; } .lp-step p { margin: 0 auto; } .lp-dots { justify-content: center; }
}
