/* PurgePix site. Tokens mirror the app's DesignSystem/Theme.swift. */
:root {
  --cream: #fcf8ee;
  --lavender: #f0edff;
  --ink: #17141f;
  --ink-soft: #241f33;
  --text: #17141f;
  --muted: #5e5873;
  --card: #ffffff;
  --line: rgba(23, 20, 31, 0.08);
  --peri: #6673ff;
  --grape: #8f5cf7;
  --coral: #ff6b6b;
  --coral-deep: #e04252;
  --mint: #33cc99;
  --mint-deep: #0f9973;
  --sun: #ffb82e;
  --sun-deep: #fa851f;
  --sky: #4da3ff;
  --brand: linear-gradient(135deg, var(--peri), var(--grape));
  --bg: linear-gradient(180deg, var(--cream), var(--lavender));
  --shadow: 0 14px 34px rgba(23, 20, 31, 0.10), 0 2px 4px rgba(23, 20, 31, 0.05);
  --radius: 24px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --text: #f5f3fa;
    --muted: #a7a1b6;
    --card: #221e2e;
    --line: rgba(255, 255, 255, 0.08);
    --bg: linear-gradient(180deg, var(--ink), var(--ink-soft));
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--ink);
  background-image: var(--bg);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--peri); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.grad-text { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); background: color-mix(in srgb, var(--cream) 70%, transparent); border-bottom: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { .nav { background: color-mix(in srgb, var(--ink) 70%, transparent); } }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 22px; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.logo img { width: 36px; height: 36px; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; }
.nav-links a:hover { color: var(--text); }
.nav-links a.btn, .nav-links a.btn:hover { color: #fff; text-shadow: 0 1px 2px rgba(23, 20, 31, 0.25); }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* Buttons & pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 999px; font-weight: 800; font-size: 16px; text-decoration: none; color: #fff; background: var(--brand); box-shadow: 0 10px 24px rgba(102, 115, 255, 0.35); transition: transform .2s cubic-bezier(.3,1.6,.5,1), box-shadow .2s; border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn:active { transform: scale(0.96); }
.btn.small { padding: 9px 16px; font-size: 14px; }
.btn.ghost { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); box-shadow: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; background: color-mix(in srgb, var(--peri) 14%, transparent); color: var(--peri); }
.pill.sun { background: color-mix(in srgb, var(--sun-deep) 16%, transparent); color: var(--sun-deep); }
.pill.mint { background: color-mix(in srgb, var(--mint) 16%, transparent); color: var(--mint-deep); }
.pill.coral { background: color-mix(in srgb, var(--coral) 16%, transparent); color: var(--coral-deep); }

/* Sections */
section { padding: 84px 0; }
.eyebrow { font-weight: 900; text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; color: var(--grape); margin: 0 0 10px; }
h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(42px, 6.4vw, 72px); font-weight: 900; }
h2 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 900; margin-bottom: 14px; }
h3 { font-size: 21px; font-weight: 850; margin-bottom: 6px; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 40ch; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.muted { color: var(--muted); }

/* Hero */
.hero { padding: 56px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero .lede { margin: 20px 0 28px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; text-align: center; } .hero .lede { margin-left: auto; margin-right: auto; } .hero-ctas, .hero-note { justify-content: center; } }

/* Phone mock */
.phone-wrap { display: flex; justify-content: center; position: relative; }
.phone-wrap::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--grape) 45%, transparent), transparent 70%); top: 50%; left: 50%; transform: translate(-50%, -50%); filter: blur(10px); }
.phone { position: relative; width: 300px; height: 610px; border-radius: 52px; background: #0d0b12; padding: 12px; box-shadow: 0 40px 80px rgba(23, 20, 31, 0.35), inset 0 0 0 2px #2a2633; }
.screen { position: relative; height: 100%; border-radius: 41px; overflow: hidden; background: linear-gradient(180deg, #fcf8ee, #f0edff); color: #17141f; display: flex; flex-direction: column; padding: 46px 16px 18px; }
.island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; border-radius: 20px; background: #0d0b12; }
.app-head { display: flex; justify-content: space-between; align-items: center; }
.app-title { font-weight: 900; font-size: 24px; letter-spacing: -0.02em; }
.ring { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 14px; background: conic-gradient(var(--peri) calc(var(--used, 0) * 1%), #e4e2f3 0); position: relative; }
.ring::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fcf8ee; }
.ring span { position: relative; z-index: 1; }
.deck { position: relative; flex: 1; margin: 16px 2px 40px; }
.shot { position: absolute; inset: 0; background: #fff; border-radius: 22px; padding: 10px 10px 44px; box-shadow: 0 10px 24px rgba(23, 20, 31, 0.14); transform-origin: 50% 100%; transform: translateY(calc(var(--d, 0) * 14px)) scale(calc(1 - var(--d, 0) * 0.05)); transition: transform .5s cubic-bezier(.3,1.4,.5,1), opacity .35s; }
.shot.deep { opacity: 0; }
.shot.out-left { transform: translateX(-160%) rotate(-24deg); opacity: 0; transition: transform .45s ease-out, opacity .45s; }
.shot.out-right { transform: translateX(160%) rotate(24deg); opacity: 0; transition: transform .45s ease-out, opacity .45s; }
.pic { position: relative; height: 100%; border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, var(--s1), var(--s2)); }
.pic::before { content: ""; position: absolute; width: 58px; height: 58px; border-radius: 50%; background: var(--sunc); right: 22%; top: 18%; }
.pic::after { content: ""; position: absolute; inset: auto 0 0 0; height: 48%; background: var(--hill); clip-path: polygon(0 100%, 0 45%, 22% 18%, 45% 60%, 66% 30%, 100% 62%, 100% 100%); }
/* Corporate Memphis illustrations (assets/art/*.svg) replace the sun/hill. */
.pic.has-art { background-color: #fff; background-size: cover; background-position: center; background-repeat: no-repeat; }
.pic.has-art::before, .pic.has-art::after { content: none; }
.cap { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-weight: 800; font-size: 14px; color: #3a3548; }
.stamp { position: absolute; top: 26px; padding: 4px 10px; border: 4px solid; border-radius: 10px; font-weight: 900; font-size: 26px; letter-spacing: 0.04em; opacity: 0; transition: opacity .15s, transform .25s cubic-bezier(.3,1.8,.5,1); background: rgba(255,255,255,.75); z-index: 2; }
.stamp.keep { left: 20px; color: var(--mint-deep); border-color: var(--mint-deep); transform: rotate(-14deg) scale(1.4); }
.stamp.del { right: 20px; color: var(--coral-deep); border-color: var(--coral-deep); transform: rotate(14deg) scale(1.4); }
.shot.out-right .stamp.keep, .shot.out-left .stamp.del,
.shot.drag-right .stamp.keep, .shot.drag-left .stamp.del { opacity: 1; transform: rotate(var(--r, 0deg)) scale(1); }
.shot.drag-left, .shot.drag-right { transition: transform .55s cubic-bezier(.45,0,.4,1); }
.shot.drag-left .stamp, .shot.drag-right .stamp { transition: opacity .45s ease-in .1s, transform .35s cubic-bezier(.3,1.8,.5,1) .2s; }
/* Touch indicator, like the iOS Simulator's. */
.finger { position: absolute; left: 50%; top: 52%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: rgba(120, 120, 135, 0.42); border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 3px 10px rgba(23, 20, 31, 0.3), inset 0 0 0 6px rgba(255, 255, 255, 0.18);
  opacity: 0; transform: scale(1.5); pointer-events: none; z-index: 20;
  transition: opacity .2s ease, transform .2s ease; }
.finger.down { opacity: 1; transform: translateX(0) scale(1); }
.finger.drag-left, .finger.drag-right { opacity: 1; transition: transform .55s cubic-bezier(.45,0,.4,1), opacity .2s; }
.finger.drag-left { transform: translateX(-96px) scale(1); }
.finger.drag-right { transform: translateX(96px) scale(1); }
.finger.up { opacity: 0; transition: opacity .25s ease, transform .25s ease; }
.finger.up.drag-left { transform: translateX(-120px) scale(1.4); }
.finger.up.drag-right { transform: translateX(120px) scale(1.4); }
.stamp.keep { --r: -14deg; } .stamp.del { --r: 14deg; }
.controls { display: flex; justify-content: space-around; align-items: center; }
.round { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #fff; font-size: 24px; box-shadow: 0 8px 18px rgba(23,20,31,.12); transition: transform .25s cubic-bezier(.3,1.8,.5,1); }
.round.trash { border: 2px solid color-mix(in srgb, var(--coral) 45%, transparent); }
.round.heart { border: 2px solid color-mix(in srgb, var(--mint) 45%, transparent); }
.round.bump { transform: scale(0.86); }
.qchip { text-align: center; font-weight: 900; color: var(--coral-deep); font-size: 13px; line-height: 1.2; }
.qchip b { display: block; font-size: 20px; }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.stat { text-align: center; }
.stat .num { font-size: clamp(38px, 5vw, 56px); font-weight: 900; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .label { color: var(--muted); font-weight: 700; margin-top: 8px; }
.stat.blue .num { color: var(--sky); } .stat.sun .num { color: var(--sun-deep); } .stat.grape .num { color: var(--grape); }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }

/* Steps & features */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 40px; }
@media (max-width: 860px) { .grid3, .grid2 { grid-template-columns: 1fr; } }
.step-n { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; color: #fff; font-size: 20px; margin-bottom: 14px; }
.icon-blob { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; margin-bottom: 14px; }
.bg-coral { background: linear-gradient(135deg, var(--coral), var(--coral-deep)); }
.bg-mint { background: linear-gradient(135deg, var(--mint), var(--mint-deep)); }
.bg-brand { background: var(--brand); }
.bg-sun { background: linear-gradient(180deg, var(--sun), var(--sun-deep)); }
.soft-coral { background: color-mix(in srgb, var(--coral) 16%, transparent); }
.soft-mint { background: color-mix(in srgb, var(--mint) 16%, transparent); }
.soft-sun { background: color-mix(in srgb, var(--sun) 22%, transparent); }
.soft-grape { background: color-mix(in srgb, var(--grape) 16%, transparent); }
.soft-sky { background: color-mix(in srgb, var(--sky) 16%, transparent); }
.soft-peri { background: color-mix(in srgb, var(--peri) 16%, transparent); }

/* Gamification */
.streak-card { display: flex; gap: 20px; align-items: center; }
.flame { font-size: 64px; line-height: 1; animation: float 2.4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px) rotate(-3deg); } }
.big { font-size: 56px; font-weight: 900; line-height: 1; background: linear-gradient(180deg, var(--sun), var(--sun-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.week { display: flex; gap: 8px; margin-top: 14px; }
.week span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--muted); }
.week span.on { background: linear-gradient(180deg, var(--sun), var(--sun-deep)); color: #fff; }
.meter { height: 18px; border-radius: 999px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; margin: 16px 0 10px; }
.meter i { display: block; height: 100%; width: var(--fill, 0%); border-radius: 999px; background: linear-gradient(90deg, var(--sky), var(--grape)); transition: width 1.6s cubic-bezier(.2,.8,.2,1); }
.meter-row { display: flex; justify-content: space-between; color: var(--muted); font-weight: 700; font-size: 14px; }

/* Pricing */
.price-card { position: relative; }
.price-card.hot { border: 2px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--brand) border-box; }
.price { font-size: 46px; font-weight: 900; letter-spacing: -0.03em; margin: 8px 0 2px; }
.price small { font-size: 17px; color: var(--muted); font-weight: 700; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { padding: 6px 0 6px 30px; position: relative; font-weight: 600; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 900; color: #fff; background: var(--mint); }
.badge { position: absolute; top: -13px; right: 22px; }

/* CTA */
.cta { text-align: center; padding: 64px 26px; background: var(--brand); color: #fff; border-radius: 34px; box-shadow: 0 30px 60px rgba(102, 115, 255, 0.35); position: relative; overflow: hidden; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.85); font-size: 19px; margin: 0 auto 26px; max-width: 46ch; }
.cta .btn { background: #fff; color: var(--grape); }
.spark { position: absolute; color: #ffd84d; font-size: 34px; animation: twinkle 2.6s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(1.35) rotate(20deg); opacity: .7; } }

/* Footer */
footer { padding: 46px 0 56px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; font-weight: 700; }
footer a:hover { color: var(--text); }

/* Legal / support pages */
.doc { padding: 48px 0 24px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(36px, 5vw, 52px); margin-bottom: 8px; }
.doc h2 { font-size: 24px; margin: 38px 0 10px; }
.doc p, .doc li { color: var(--text); }
.doc .meta { color: var(--muted); font-weight: 700; margin-bottom: 28px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .card { margin: 22px 0; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px; margin: 12px 0; box-shadow: var(--shadow); }
details summary { cursor: pointer; font-weight: 850; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-weight: 900; color: var(--peri); transition: transform .25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 10px 0 0; color: var(--muted); }
.contact { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px) scale(.98); transition: opacity .6s ease, transform .7s cubic-bezier(.3,1.4,.5,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .flame, .spark { animation: none; }
  .shot, .finger, .stamp { transition: none !important; }
  .finger.drag-left { transform: translateX(-70px); }
  .finger.drag-right { transform: translateX(70px); }
}
