/*
 * Expensieve marketing site styles.
 *
 * Standalone from the app's own static/theme.css — this file is never
 * loaded by templates/*.html and must stay that way. The site is deployed
 * separately at the expensieve.app root domain.
 */

:root {
  --canvas: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-2: #47556b;
  --muted: #64748b;
  --brand: #4f46e5;
  --brand-hover: #4338ca;
  --brand-soft: #eef2ff;
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -12px rgba(15, 23, 42, .12);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0b1120;
    --surface: #131b2e;
    --border: #29354c;
    --text: #e2e8f0;
    --text-2: #cbd5e1;
    --muted: #94a3b8;
    --brand: #6366f1;
    --brand-hover: #818cf8;
    --brand-soft: #1c2444;
    --on-accent: #0b1120;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 20px 48px -20px rgba(0, 0, 0, .6);
  }
}

:root[data-theme="dark"] {
  --canvas: #0b1120;
  --surface: #131b2e;
  --border: #29354c;
  --text: #e2e8f0;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --brand: #6366f1;
  --brand-hover: #818cf8;
  --brand-soft: #1c2444;
  --on-accent: #0b1120;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 20px 48px -20px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", ui-sans-serif, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { text-wrap: balance; letter-spacing: -0.02em; margin: 0; }

a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; padding: 11px 20px; font-weight: 700; font-size: 0.9rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
}

/* ---------- Hero band: deliberately dark regardless of theme ---------- */
.hero-wrap { position: relative; }

.hero-edge {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 100px));
  transform: translateY(4px);
}

.hero-band {
  position: relative; z-index: 2;
  background: #0b1120; color: #e7ecf6;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 100px));
  padding-bottom: 100px;
}

.hero-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(560px circle at 50% 0%, rgba(99, 102, 241, .22), transparent 60%);
  pointer-events: none;
}

header {
  max-width: 1160px; margin: 0 auto; padding: 26px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; z-index: 2;
}

.brandmark { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: #e7ecf6; }

.brandmark .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  display: flex; align-items: center; justify-content: center; color: #fff;
}

nav.top { display: flex; align-items: center; gap: 26px; }
nav.top a { color: #b7c1d9; text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.btn-primary { background: #6366f1; color: #fff; }
.btn-ghost-dark { color: #e7ecf6; border-color: #263250; }

.hero { max-width: 900px; margin: 0 auto; padding: 96px 24px 36px; text-align: center; position: relative; z-index: 2; }

.hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 800; line-height: 1.02; }

.hero h1 span {
  background: linear-gradient(135deg, #818cf8, #a5b4fc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero p.lede { max-width: 46ch; margin: 22px auto 0; font-size: 1.12rem; color: #b7c1d9; line-height: 1.6; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 34px; }

/* ---------- Everything below the hero: light/dark-aware body ---------- */
.features { max-width: 1120px; margin: 0 auto; padding: 16px 24px 88px; }
.features > h2 { font-size: clamp(1.8rem, 2.6vw, 2.3rem); font-weight: 800; max-width: 20ch; }
.features > p { color: var(--text-2); margin: 14px 0 0; max-width: 52ch; font-size: 1.02rem; }

.grid3 {
  margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
}

.card { background: var(--surface); padding: 28px; }

.card .ic {
  width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}

.card h3 { font-size: 1.02rem; font-weight: 700; }
.card p { margin: 8px 0 0; color: var(--text-2); font-size: 0.92rem; line-height: 1.6; }

footer {
  max-width: 1120px; margin: 0 auto; padding: 40px 24px 60px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--border);
}

footer > div { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: flex-end; }
footer a { color: var(--muted); text-decoration: none; white-space: nowrap; }

/* ---------- Simple content page (privacy policy) ---------- */
.page-header { max-width: 760px; margin: 0 auto; padding: 64px 24px 0; }
.page-header .eyebrow { color: var(--brand); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }
.page-header h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 800; margin-top: 10px; }
.page-header p.updated { color: var(--muted); margin-top: 12px; font-size: 0.92rem; }

.doc { max-width: 760px; margin: 0 auto; padding: 40px 24px 96px; line-height: 1.7; }
.doc h2 { font-size: 1.2rem; font-weight: 700; margin-top: 40px; }
.doc h2:first-child { margin-top: 0; }
.doc p { color: var(--text-2); margin: 12px 0 0; }
.doc ul { color: var(--text-2); margin: 12px 0 0; padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc a { color: var(--brand); }

/* ---------- Guide pages ---------- */
.doc .callout {
  margin: 24px 0 0; padding: 16px 18px;
  background: var(--brand-soft); border: 1px solid var(--border);
  border-left: 3px solid var(--brand); border-radius: 12px;
  color: var(--text-2); font-size: 0.94rem;
}

.doc .callout strong { color: var(--text); }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; }

.doc h2.part {
  margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border);
  font-size: 1.35rem;
}

.doc h2.part:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc h2.part .step-range { display: block; color: var(--brand); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 6px; }

/* Numbered steps on a vertical rail. The counter spans the whole page, so
   Part 2 keeps counting from where Part 1 stopped. */
.doc.guide { counter-reset: step; }
.steps { list-style: none; margin: 28px 0 0; padding: 0; }

.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 34px 52px;
  margin-left: 15px;
  border-left: 2px solid var(--border);
}

.steps > li:last-child { border-left-color: transparent; padding-bottom: 4px; }

.steps > li::before {
  content: counter(step);
  position: absolute; left: -16px; top: -4px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #fff;
  font-size: 0.85rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.steps > li > p { margin: 0; color: var(--text-2); }
.steps > li > p strong { color: var(--text); font-weight: 700; }
.steps .aside { display: block; margin-top: 8px; color: var(--muted); font-size: 0.88rem; }

figure.shot {
  margin: 16px 0 0;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); padding: 10px; overflow: hidden;
}

figure.shot img { display: block; width: 100%; height: auto; border-radius: 6px; }

@media (max-width: 860px) {
  .grid3 { grid-template-columns: 1fr; }
  nav.top a:not(.btn) { display: none; }
  .steps > li { padding-left: 34px; margin-left: 13px; }
  .steps > li::before { width: 26px; height: 26px; left: -14px; font-size: 0.78rem; }
}

/* Side by side, the footer's copyright and links wrap into each other on a
   phone. Stack them instead once there isn't room for both on one line. */
@media (max-width: 620px) {
  footer { flex-direction: column; align-items: flex-start; gap: 14px; }
  footer > div { justify-content: flex-start; }
}
