/* Purgia - colours follow the app's ThemeManager (dark by default, light when the OS prefers it or when chosen) */
:root {
  --bg: #0b0e12;
  --surface: #141920;
  --surface-2: #1a2029;
  --line: #262d36;
  --text: #e6edf3;
  --muted: #8d99a6;
  --accent: #3dd9c5;
  --accent-2: #0ea5a0;
  --accent-soft: #11302d;
  --btn: #2ec4b3;
  --btn-text: #04211f;
  --warn: #f2b252;
  --danger: #ff7b7b;
  --ok: #4ade9a;
  --radius: 16px;
  --font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f5f7;
    --surface: #ffffff;
    --surface-2: #f7fafb;
    --line: #e1e7eb;
    --text: #0f1a1f;
    --muted: #5e6b77;
    --accent: #0b7a75;
    --accent-2: #075e5a;
    --accent-soft: #d3f4ee;
    --btn: #0b7a75;
    --btn-text: #ffffff;
    --warn: #b45309;
    --danger: #c62828;
    --ok: #047857;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f2f5f7;
  --surface: #ffffff;
  --surface-2: #f7fafb;
  --line: #e1e7eb;
  --text: #0f1a1f;
  --muted: #5e6b77;
  --accent: #0b7a75;
  --accent-2: #075e5a;
  --accent-soft: #d3f4ee;
  --btn: #0b7a75;
  --btn-text: #ffffff;
  --warn: #b45309;
  --danger: #c62828;
  --ok: #047857;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .9em; background: var(--accent-soft); padding: .1em .4em; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.1rem; }
section { padding: 72px 0 0; }
.wrap { width: min(1100px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.sub { color: var(--muted); max-width: 60ch; margin: -6px 0 28px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: .95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.tools { display: flex; gap: 8px; }
.pill {
  font: inherit; font-size: .8rem; font-weight: 600;
  color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 4px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.pill:hover { border-color: var(--accent); }
.pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Hero */
.hero {
  padding: 88px 0 40px;
  background:
    radial-gradient(800px 400px at 85% 10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(600px 300px at 0% 100%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: .9rem; margin: 0 0 14px; }
h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 800; }
.grad { background: linear-gradient(90deg, var(--accent), #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36ch; margin: 0 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.meta { color: var(--muted); font-size: .9rem; margin-top: 14px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: 1rem;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { color: var(--btn-text); background: linear-gradient(135deg, color-mix(in srgb, var(--btn) 85%, #fff), var(--btn) 60%); box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--btn) 70%, transparent); }
.btn-primary:hover { box-shadow: 0 12px 30px -8px color-mix(in srgb, var(--btn) 85%, transparent); }
.btn-ghost { color: var(--text); border: 1px solid var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-lg { padding: 16px 28px; font-size: 1.1rem; }
.btn small { font-weight: 400; opacity: .75; }

/* Demo window */
.demo {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 30px 80px -30px #000a, 0 0 0 1px color-mix(in srgb, var(--accent) 15%, transparent);
  overflow: hidden;
}
.demo-head { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.demo-title { margin-left: 10px; font-size: .85rem; color: var(--muted); }
.demo-body { padding: 22px 24px 24px; }
.demo-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.demo-total b { font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.demo-total span { font-size: .85rem; color: var(--muted); }
.bar { height: 6px; background: var(--line); border-radius: 6px; margin: 12px 0 16px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 6px; transition: width .35s; }
.cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cats li {
  display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 10px;
  font-size: .9rem; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid transparent;
  transition: border-color .3s, opacity .3s;
}
.cats li.pending { opacity: .45; }
.cats li.now { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.cats .box { width: 16px; height: 16px; border-radius: 4px; background: var(--btn); display: grid; place-items: center; }
.cats .box svg { width: 11px; height: 11px; fill: none; stroke: var(--btn-text); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cats .size { font-family: var(--mono); font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.demo-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: .85rem; }
.demo-foot .ok { color: var(--ok); font-weight: 600; }
.fake-btn { white-space: nowrap; font-size: .85rem; font-weight: 600; color: var(--btn-text); background: var(--btn); border-radius: 8px; padding: 6px 14px; }

/* Why */
.why p { font-size: 1.25rem; max-width: 62ch; margin: 0 auto; text-align: center; color: var(--muted); }
.why strong { color: var(--text); font-weight: 600; }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: border-color .2s, transform .2s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); transform: translateY(-2px); }
.ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); margin-bottom: 18px; }
.ico svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card ul { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .97rem; }
.card li { padding: 6px 0 6px 22px; position: relative; }
.card li::before { content: ""; position: absolute; left: 2px; top: .95em; width: 8px; height: 8px; border-radius: 3px; background: var(--accent); opacity: .7; }

/* Numbers strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat b { display: block; font-size: 1.6rem; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .92rem; }

/* Safety */
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.sec strong { font-size: 1rem; }
.sec span { color: var(--muted); font-size: .92rem; }
.note { margin-top: 20px; color: var(--muted); }

/* Good to know */
.know { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.k { border-left: 3px solid var(--line); padding: 4px 0 4px 18px; }
.k p { margin: 0; color: var(--muted); font-size: .95rem; }
.k-imp { border-color: var(--accent); }
.k-warn { border-color: var(--warn); }

/* Download */
.dl {
  text-align: center; padding: 56px 32px; border-radius: 24px;
  background:
    radial-gradient(500px 220px at 50% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    var(--surface);
  border: 1px solid var(--line);
}
.dl img { margin: 0 auto 18px; }
.dl > p { margin: 0 0 24px; }
.dl .small { margin: 14px 0 0; }
.dl-alt { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; text-align: left; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.steps > div { min-width: 0; }
.steps p { margin: 4px 0 10px; color: var(--muted); font-size: .95rem; }
.code { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px 8px 12px; }
.code code { background: none; padding: 0; font-size: .82rem; overflow-x: auto; white-space: nowrap; flex: 1; min-width: 0; }
.copy { font: inherit; font-size: .8rem; color: var(--text); background: var(--accent-soft); border: 0; border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.copy:hover { background: var(--btn); color: var(--btn-text); }

/* Footer */
.foot { margin-top: 80px; border-top: 1px solid var(--line); padding: 28px 0; font-size: .9rem; color: var(--muted); }
.foot-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.foot p { margin: 0; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero-grid, .cards, .know, .steps { grid-template-columns: 1fr; }
  .sec-grid, .stats { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 56px; }
  .nav-links a:not(:last-child) { display: none; }
}
@media (max-width: 520px) {
  .sec-grid, .stats { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
