/* ExpensO marketing page — design tokens + layout.
   Dark-first (mirrors the app's own default look), with a real light mode
   and an in-page toggle that mirrors the app's own theme picker. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* light (default) */
  --ground: #f3f6f4;
  --ground-2: #eaf1ee;
  --surface: #ffffff;
  --surface-2: #f2f7f5;
  --border: rgba(20, 40, 34, 0.10);
  --border-strong: rgba(20, 40, 34, 0.18);
  --ink: #131c18;
  --ink-dim: #4c5c55;
  --ink-faint: #7c8b84;
  --accent: #0f7c62;
  --accent-ink: #ffffff;
  --accent-soft: rgba(15, 124, 98, 0.10);
  --brass: #a15a1e;
  --brass-soft: rgba(161, 90, 30, 0.10);
  --danger: #b3453b;
  --shadow: 0 20px 50px rgba(20, 40, 34, 0.12);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --serif: 'Fraunces', ui-serif, Georgia, serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0a0f0d;
    --ground-2: #0e1613;
    --surface: #121b18;
    --surface-2: #182420;
    --border: rgba(210, 230, 222, 0.10);
    --border-strong: rgba(210, 230, 222, 0.18);
    --ink: #eef5f1;
    --ink-dim: #a9bdb5;
    --ink-faint: #74897f;
    --accent: #5fe3c0;
    --accent-ink: #04211a;
    --accent-soft: rgba(95, 227, 192, 0.14);
    --brass: #e8b872;
    --brass-soft: rgba(232, 184, 114, 0.14);
    --danger: #f0857d;
    --shadow: 0 20px 60px rgba(0,0,0,0.45);
  }
}

:root[data-theme="light"] {
  --ground: #f3f6f4;
  --ground-2: #eaf1ee;
  --surface: #ffffff;
  --surface-2: #f2f7f5;
  --border: rgba(20, 40, 34, 0.10);
  --border-strong: rgba(20, 40, 34, 0.18);
  --ink: #131c18;
  --ink-dim: #4c5c55;
  --ink-faint: #7c8b84;
  --accent: #0f7c62;
  --accent-ink: #ffffff;
  --accent-soft: rgba(15, 124, 98, 0.10);
  --brass: #a15a1e;
  --brass-soft: rgba(161, 90, 30, 0.10);
  --danger: #b3453b;
  --shadow: 0 20px 50px rgba(20, 40, 34, 0.12);
}

:root[data-theme="dark"] {
  --ground: #0a0f0d;
  --ground-2: #0e1613;
  --surface: #121b18;
  --surface-2: #182420;
  --border: rgba(210, 230, 222, 0.10);
  --border-strong: rgba(210, 230, 222, 0.18);
  --ink: #eef5f1;
  --ink-dim: #a9bdb5;
  --ink-faint: #74897f;
  --accent: #5fe3c0;
  --accent-ink: #04211a;
  --accent-soft: rgba(95, 227, 192, 0.14);
  --brass: #e8b872;
  --brass-soft: rgba(232, 184, 114, 0.14);
  --danger: #f0857d;
  --shadow: 0 20px 60px rgba(0,0,0,0.45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  background-image:
    radial-gradient(700px 420px at 12% -6%, var(--accent-soft), transparent 60%),
    radial-gradient(600px 500px at 100% 12%, var(--brass-soft), transparent 55%);
  background-repeat: no-repeat;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

a { color: var(--accent); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; text-wrap: balance; margin: 0; color: var(--ink); }

p { margin: 0 0 1em; color: var(--ink-dim); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent);
}

/* ---------------------------------------------------------------- header */
header.site {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
header.site .bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-weight: 700; font-size: 1.1rem;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand .mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
}
.chipnav {
  display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; flex: 1; justify-content: flex-end;
}
.chipnav::-webkit-scrollbar { display: none; }
.chipnav a {
  flex: none; font-size: 0.86rem; color: var(--ink-dim); text-decoration: none;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border);
  white-space: nowrap;
}
.chipnav a:hover { color: var(--ink); border-color: var(--border-strong); }

.theme-toggle {
  flex: none; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--border-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 0.95rem var(--sans); text-decoration: none; cursor: pointer;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------------------------ hero */
.hero { padding: 64px 0 40px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }

.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); line-height: 1.12; margin: 0 0 18px; max-width: 18ch; }
.hero .hero-sub {
  font-family: var(--serif); font-weight: 500; color: var(--ink-dim);
  font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.4; max-width: 42ch;
  margin: 0 0 16px;
}
.hero .lede { font-size: 1.12rem; max-width: 46ch; }

/* One consistent pill treatment for every hero action/claim — two links,
   two informational badges — same size, same icon weight, differing only
   by fill so the primary action still stands out. */
.pill-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  font: 600 0.92rem var(--sans); text-decoration: none; cursor: default;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--border-strong);
  color: var(--ink); background: var(--surface); white-space: nowrap;
}
a.pill { cursor: pointer; }
.pill svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.pill-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pill-primary svg { color: var(--accent-ink); }
.pill-primary:hover { filter: brightness(1.06); }
a.pill:not(.pill-primary):hover { border-color: var(--accent); color: var(--accent); }

/* --------------------------------------------------------------- phones */
.phone {
  position: relative; border-radius: 34px; border: 1px solid var(--border-strong);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
  padding: 10px;
}
.phone img { border-radius: 24px; width: 100%; height: auto; }
.phone-lg { max-width: 320px; margin: 0 auto; }
.hero-visual { position: relative; }
.hero-visual::after {
  content: ""; position: absolute; inset: -40px; z-index: -1;
  background: radial-gradient(220px 220px at 50% 30%, var(--accent-soft), transparent 70%);
}

/* -------------------------------------------------------------- section */
section { padding: 64px 0; border-top: 1px solid var(--border); }
section.no-border { border-top: none; }
.section-head { max-width: 62ch; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 12px; }
.section-head p { font-size: 1.03rem; }

/* --------------------------------------------------------------- trust */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 22px;
}
.trust-card .icon {
  width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft);
  color: var(--accent); display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.trust-card .icon svg { width: 20px; height: 20px; }
.trust-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.trust-card p { font-size: 0.94rem; }
.trust-link { display: inline-block; margin-top: 26px; font-size: 0.95rem; font-weight: 600; }

.solution-callout {
  margin-top: 28px; padding: 24px 26px; border-radius: var(--radius-md);
  background: var(--accent-soft); border: 1px solid var(--border-strong);
}
.solution-callout p { color: var(--ink); font-size: 1rem; margin: 0; }
.solution-callout strong { color: var(--accent); }

/* ----------------------------------------------------------- feature acc */
.feature {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); margin-bottom: 14px; overflow: hidden;
}
.feature > summary {
  list-style: none; cursor: pointer; padding: 22px 24px;
  display: flex; align-items: center; gap: 16px;
}
.feature > summary::-webkit-details-marker { display: none; }
.feature .f-icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.feature .f-icon svg { width: 22px; height: 22px; }
.feature .f-head { flex: 1; min-width: 0; display: block; }
.feature .f-num { display: block; font-size: 0.78rem; color: var(--ink-faint); font-weight: 700; letter-spacing: 0.08em; }
.feature .f-title { display: block; font-family: var(--serif); font-size: 1.24rem; font-weight: 600; margin-top: 4px; }
.feature .f-teaser { display: block; font-size: 0.92rem; color: var(--ink-dim); margin-top: 5px; font-family: var(--sans); }
.feature .chev {
  flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; transition: transform 0.22s ease;
}
.feature .chev svg { width: 14px; height: 14px; }
.feature[open] .chev { transform: rotate(180deg); }

.feature .f-body { padding: 4px 24px 28px; border-top: 1px solid var(--border); }
.feature .f-content {
  display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; padding-top: 22px;
}
@media (max-width: 800px) { .feature .f-content { grid-template-columns: 1fr; } }
.feature .f-body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.feature .f-body li {
  display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; color: var(--ink);
}
.feature .f-body li svg { width: 17px; height: 17px; color: var(--accent); flex: none; margin-top: 2px; }
.feature .f-note { margin-top: 16px; font-size: 0.88rem; color: var(--ink-faint); }

.shot-gallery { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.shot-gallery .phone { flex: none; width: 190px; }
.shot-single { max-width: 260px; margin: 0 auto; }

.shot-toggle { display: flex; justify-content: center; margin-top: 14px; }
.shot-toggle .seg {
  display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px; gap: 2px;
}
.shot-toggle button {
  font: 600 0.82rem var(--sans); padding: 6px 14px; border-radius: 999px; border: none;
  background: transparent; color: var(--ink-dim); cursor: pointer;
}
.shot-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ----------------------------------------------------------------- guide */
.guide-zone { background: var(--surface-2); }
.guide-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.guide-list { min-width: 0; }
.guide-visual { position: sticky; top: 96px; }
@media (max-width: 900px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-visual { position: static; order: -1; max-width: 240px; margin: 0 auto 28px; }
}
.guide-item {
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  margin-bottom: 12px; overflow: hidden;
}
.guide-item > summary {
  list-style: none; cursor: pointer; padding: 18px 20px; display: flex; align-items: center; gap: 14px;
  font-family: var(--serif); font-weight: 600; font-size: 1.05rem;
}
.guide-item > summary::-webkit-details-marker { display: none; }
.guide-item .g-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brass-soft); color: var(--brass);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--sans); font-weight: 800; font-size: 0.82rem;
}
.guide-item .chev { margin-left: auto; }
.guide-body { padding: 0 20px 22px 64px; border-top: 1px solid var(--border); }
.guide-body p { font-size: 0.96rem; }
.guide-body h4 { font-family: var(--sans); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin: 18px 0 8px; }
.guide-body ol, .guide-body ul { margin: 0; padding-left: 1.2em; color: var(--ink); font-size: 0.95rem; display: grid; gap: 6px; }

/* -------------------------------------------------------------- security */
.sec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 700px) { .sec-grid { grid-template-columns: 1fr; } }
.sec-item {
  display: flex; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface);
}
.sec-item .icon {
  flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--brass-soft); color: var(--brass);
  display: inline-flex; align-items: center; justify-content: center;
}
.sec-item .icon svg { width: 19px; height: 19px; }
.sec-item h4 { font-size: 0.98rem; margin-bottom: 4px; color: var(--ink); font-family: var(--sans); font-weight: 700; }
.sec-item p { font-size: 0.9rem; margin: 0; }

/* ----------------------------------------------------------------- close */
.close-cta { text-align: center; padding: 70px 0; }
.close-cta h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); max-width: 20ch; margin: 0 auto 16px; }
.close-cta p { max-width: 50ch; margin: 0 auto 26px; font-size: 1.05rem; }

footer.site { border-top: 1px solid var(--border); padding: 40px 0 60px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer-brand { max-width: 34ch; }
.footer-brand .brand { margin-bottom: 10px; }
.footer-brand p { font-size: 0.88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px 28px; }
.footer-links a { font-size: 0.9rem; color: var(--ink-dim); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--border);
  font-size: 0.82rem; color: var(--ink-faint); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
