/* Pa-Budget landing page. Same "Malachite & Copper" tokens as the app
   (lib/core/theme.dart). Fonts are the ones the app ships, served from the
   app's own assets: no third-party requests. */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/assets/assets/google_fonts/Inter-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/assets/assets/google_fonts/Inter-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/assets/assets/google_fonts/Inter-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 600; font-display: swap; src: url('/assets/assets/google_fonts/BricolageGrotesque-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 700; font-display: swap; src: url('/assets/assets/google_fonts/BricolageGrotesque-Bold.ttf') format('truetype'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('/assets/assets/google_fonts/JetBrainsMono-Medium.ttf') format('truetype'); }

:root {
  --bg: #E9E3D7; --surface: #F0EBE1; --surface-2: #E3DCCE; --line: #D2C8B5;
  --ink: #15211C; --muted: #55615A;
  --malachite: #126B4B; --malachite-soft: #CBE3D4; --on-malachite: #FFFFFF;
  --copper: #9A4E17; --copper-bright: #C9712B; --on-copper: #FFF6EC;
  --zambezi: #285F92; --ring: #126B4B; --ring-copper: #9A4E17; --ring-opacity: 0.09;
  --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1411; --surface: #111A16; --surface-2: #19251F; --line: #233129;
    --ink: #E8EFEA; --muted: #8FA39A;
    --malachite: #2BB37E; --malachite-soft: #12432F; --on-malachite: #04221A;
    --copper: #E08A3C; --copper-bright: #E8964A; --on-copper: #2E1500;
    --zambezi: #5AA9E6; --ring: #2BB37E; --ring-copper: #E08A3C; --ring-opacity: 0.11;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1411; --surface: #111A16; --surface-2: #19251F; --line: #233129;
  --ink: #E8EFEA; --muted: #8FA39A;
  --malachite: #2BB37E; --malachite-soft: #12432F; --on-malachite: #04221A;
  --copper: #E08A3C; --copper-bright: #E8964A; --on-copper: #2E1500;
  --zambezi: #5AA9E6; --ring: #2BB37E; --ring-copper: #E08A3C; --ring-opacity: 0.11;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
}
a { color: var(--malachite); }
img, svg { display: block; max-width: 100%; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 40rem; }
.eyebrow { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--copper); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 12px;
  font: 600 1rem var(--body); text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, .theme-toggle:focus-visible, a:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.btn-copper { background: var(--copper); color: var(--on-copper); }
.btn-copper:hover { box-shadow: 0 10px 30px -12px var(--copper); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.badge-soon {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px;
  border: 1px dashed var(--line); color: var(--muted); font-size: .9rem;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 700 1.3rem var(--display); }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-actions .btn { padding: 10px 16px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.theme-toggle svg { width: 20px; height: 20px; }
@media (max-width: 820px) { .nav { display: none; } .header-actions { margin-left: auto; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.rings { position: absolute; inset: auto; pointer-events: none; color: var(--ring); opacity: var(--ring-opacity); }
.rings .copper { color: var(--ring-copper); }
.hero .rings { width: 1500px; height: 1500px; right: -620px; top: -700px; animation: drift 120s linear infinite; }
@keyframes drift { to { transform: rotate(360deg); } }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--malachite); }
.hero h1 .copper { color: var(--copper); }
.hero .lead { margin: 22px 0 32px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding: 0; list-style: none; }
.chips li {
  font-family: var(--mono); font-size: .78rem; padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: color-mix(in srgb, var(--surface) 70%, transparent);
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }

/* Device mockups (pure HTML/CSS, mirroring the real app) */
.devices { position: relative; min-height: 520px; }
.desktop {
  position: absolute; right: -40px; top: 30px; width: 560px; border-radius: 14px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.45);
}
.desktop-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.desktop-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.desktop-body { display: grid; grid-template-columns: 130px 1fr; min-height: 320px; }
.side { border-right: 1px solid var(--line); padding: 14px 10px; font-size: .78rem; display: grid; gap: 4px; align-content: start; }
.side .on { background: var(--malachite-soft); color: var(--ink); border-radius: 8px; }
.side span { padding: 6px 8px; color: var(--muted); }
.side .add { background: var(--copper); color: var(--on-copper); border-radius: 8px; text-align: center; margin-bottom: 8px; }
.desk-main { padding: 14px; }
.desk-main h4 { margin: 0 0 10px; font: 700 1rem var(--display); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--bg); }
.tile small { display: block; color: var(--muted); font-size: .68rem; }
.tile b { font: 500 .85rem var(--mono); }
.need { color: var(--malachite); } .want { color: var(--copper); } .save { color: var(--zambezi); }
.pace { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--bg); }
.phone {
  position: absolute; left: 0; bottom: -10px; width: 250px; border-radius: 34px; padding: 12px;
  background: #0C1411; border: 7px solid #1d2622; box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
  color: #E8EFEA; overflow: hidden;
}
.phone .rings { width: 420px; height: 420px; right: -200px; top: -190px; color: #2BB37E; opacity: .16; }
.phone small { color: #8FA39A; font-size: .7rem; }
.phone h5 { margin: 2px 0 10px; font: 700 1.15rem var(--display); position: relative; }
.phone .card { position: relative; background: #111A16; border: 1px solid #233129; border-radius: 14px; padding: 12px; }
.phone .big { font: 500 1.35rem var(--mono); color: #2BB37E; }
.bar3 { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: #233129; margin-top: 10px; }
.bar3 i:nth-child(1) { width: 48%; background: #2BB37E; } .bar3 i:nth-child(2) { width: 22%; background: #E08A3C; } .bar3 i:nth-child(3) { width: 8%; background: #5AA9E6; }
.phone .row { display: flex; justify-content: space-between; background: #111A16; border-radius: 10px; padding: 8px 10px; margin-top: 6px; font-size: .78rem; }
.phone .row .mono { font-size: .76rem; }
@media (max-width: 900px) {
  .devices { min-height: 0; display: grid; place-items: center; }
  .desktop { display: none; }
  .phone { position: relative; left: auto; bottom: auto; }
}

/* Sections */
section { padding: 88px 0; position: relative; }
.section-head { max-width: 46rem; margin-bottom: 44px; }
.section-head .lead { margin-top: 14px; }
.band { background: var(--surface); border-block: 1px solid var(--line); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  transition: transform .25s ease, border-color .25s ease;
}
.feature:hover { transform: translateY(-4px); border-color: var(--malachite); }
.feature .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: var(--malachite-soft); color: var(--malachite);
}
.feature .icon.copper { background: color-mix(in srgb, var(--copper) 18%, transparent); color: var(--copper); }
.feature .icon svg { width: 22px; height: 22px; }
.feature p { color: var(--muted); margin: 8px 0 0; font-size: .97rem; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding-top: 56px; }
.steps li::before {
  counter-increment: step; content: '0' counter(step);
  position: absolute; top: 0; left: 0; font: 500 2rem var(--mono); color: var(--copper);
}
.steps p { color: var(--muted); margin: 8px 0 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before {
  content: ''; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--malachite) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat;
}
@media (max-width: 820px) { .privacy { grid-template-columns: 1fr; } }

.faq { max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font: 600 1.12rem var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 4px; top: 14px; font: 500 1.5rem var(--mono); color: var(--copper);
  transition: transform .25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }

.final {
  text-align: center; overflow: hidden; border-radius: 28px; padding: 72px 24px; position: relative;
  background: var(--malachite); color: var(--on-malachite);
}
.final .rings { width: 1100px; height: 1100px; left: -500px; bottom: -760px; color: #FFFFFF; opacity: .12; }
.final h2, .final p, .final .cta-row { position: relative; }
.final p { opacity: .85; max-width: 34rem; margin: 14px auto 28px; }
.final .cta-row { justify-content: center; }

.site-footer { padding: 40px 0 56px; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* Scroll reveal: content is visible by default; JS opts in to the effect. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .rings { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .feature { transition: none; }
}

/* Static legal pages (privacy.html, terms.html, delete-account.html) */
.legal { max-width: 760px; padding: 56px 0 72px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 8px 0 18px; }
.legal h2 { font-size: 1.35rem; margin: 40px 0 10px; }
.legal p { color: var(--ink); margin: 0 0 12px; }
.legal .lead { color: var(--muted); }
