/* ReceiptVault — public site.
   Tokens mirror constants/theme.ts: warm paper, ink blue, teal verification,
   amber deadlines, and the redaction bar that is the product's one true image. */

:root {
  --ink: #183B56;
  --ink-deep: #102A3D;
  --muted: #52606D;
  --faint: #7B8794;
  --paper: #F7F5F0;
  --paper-2: #F1EFEA;
  --card: #FFFFFF;
  --line: #D8DEE4;
  --teal: #2A9D8F;
  --teal-deep: #20786E;
  --teal-soft: #E6F7F5;
  --amber: #E9A23B;
  --amber-soft: #FEF5E7;
  --red: #C94C4C;
  --mask: #17212B;
  --shadow: 0 18px 48px rgba(24, 59, 86, 0.10);
  --radius: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E8EDF2;
    --ink-deep: #FFFFFF;
    --muted: #A9B4C0;
    --faint: #8794A1;
    --paper: #0E1620;
    --paper-2: #131C27;
    --card: #17212B;
    --line: #2A3643;
    --teal-soft: #11302E;
    --amber-soft: #2E2417;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  }
}

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--teal-deep); }
@media (prefers-color-scheme: dark) { a { color: #4FC9BA; } }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
section[id] { scroll-margin-top: 90px; }

.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  backdrop-filter: blur(14px);
}
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-weight: 800; letter-spacing: -0.02em; font-size: 1.05rem;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center; flex: none;
}
.brand-mark svg { width: 21px; height: 21px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 600; }
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-contact { color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 10px 17px; }
.nav-contact span { margin-left: 5px; }

/* ---------- hero ---------- */
.hero { padding: 78px 0 76px; overflow: hidden; background: radial-gradient(circle at 79% 28%, rgba(42,157,143,.11), transparent 34rem); }
.hero-grid { display: grid; grid-template-columns: 1.03fr .97fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 22px; padding: 8px 13px; border-radius: 999px;
  background: var(--teal-soft); color: var(--teal-deep);
  font-size: .75rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
@media (prefers-color-scheme: dark) { .eyebrow { color: #4FC9BA; } }
h1 { font-size: clamp(2.7rem, 5.7vw, 4.45rem); line-height: 1.06; letter-spacing: -0.055em; margin: 0 0 23px; }
.title-accent { color: var(--teal-deep); }
.hero-copy > p:not(.eyebrow):not(.microcopy) { font-size: 1.09rem; color: var(--muted); margin: 0 0 30px; max-width: 36rem; line-height: 1.75; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 21px; border-radius: 999px;
  background: var(--teal); color: #fff; text-decoration: none;
  font-weight: 700; font-size: .95rem; border: 1px solid var(--ink);
}
.button { border-color: var(--teal); }
.button:hover { background: var(--teal-deep); border-color: var(--teal-deep); }
.button.secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
.button.secondary:hover { border-color: var(--ink); background: var(--paper-2); }
.microcopy { margin-top: 23px; font-size: .84rem; color: var(--muted); }

/* Real app screens in the same paper/card treatment as the Android vault. */
.hero-visual { position: relative; min-height: 650px; display: flex; align-items: center; justify-content: center; }
.hero-visual::before { content: ""; position: absolute; inset: 14% 3% 10%; border-radius: 50%; background: var(--teal-soft); filter: blur(2px); }
.screen { position: absolute; overflow: hidden; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 29px; box-shadow: 0 28px 70px rgba(24,59,86,.2); }
.screen img { display: block; width: 100%; height: auto; border-radius: 23px; }
.screen-vault { width: 270px; left: 5%; top: 2%; transform: rotate(-6deg); }
.screen-detail { width: 230px; right: 2%; top: 13%; transform: rotate(7deg); }
.visual-note { position: absolute; z-index: 2; bottom: 9%; left: 0; display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--muted); line-height: 1.25; font-size: .79rem; }
.visual-note strong { color: var(--ink); font-size: .9rem; }
.visual-note-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-deep); font-weight: 800; }
.benefit-strip { border-block: 1px solid var(--line); background: var(--card); }
.benefit-grid { display: flex; justify-content: space-between; gap: 20px; padding-block: 20px; color: var(--ink); font-size: .91rem; font-weight: 700; }
.benefit-grid > span { display: inline-flex; align-items: center; gap: 10px; }
.benefit-grid > span > span { display: grid; place-items: center; width: 30px; height: 30px; background: var(--teal-soft); color: var(--teal-deep); border-radius: 8px; font-size: 1.15rem; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section.alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-label {
  margin: 0 0 10px; font-size: .74rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
}
.section h2 { font-size: clamp(1.8rem, 3.5vw, 2.55rem); letter-spacing: -0.045em; margin: 0 0 14px; line-height: 1.14; }
.section-intro { color: var(--muted); max-width: 44rem; margin: 0 0 34px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-tile {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: 0 3px 12px rgba(24,59,86,.04);
}
.card-tile .num {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding-bottom: 19px; border-bottom: 1px solid var(--line);
  font-size: 1.6rem; font-weight: 800; letter-spacing: -.04em; color: var(--teal-deep);
}
.card-tile .num span { font-size: .69rem; letter-spacing: .12em; color: var(--faint); }
@media (prefers-color-scheme: dark) { .card-tile .num { color: #4FC9BA; } }
.card-tile h3 { font-size: 1.12rem; margin: 22px 0 8px; letter-spacing: -0.025em; }
.card-tile p { margin: 0; color: var(--muted); font-size: .94rem; }

/* ---------- honesty callout ---------- */
.truth {
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius); padding: 38px 42px; box-shadow: var(--shadow);
}
.truth h2 { margin-top: 0; }
.truth p { color: var(--muted); margin: 0; max-width: 46rem; }
.truth-badge {
  background: var(--mask); color: #fff; border-radius: 10px;
  padding: 18px 20px; font-weight: 800; font-size: .88rem;
  line-height: 1.35; text-align: center; white-space: nowrap;
}

/* ---------- faq ---------- */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 44px; align-items: start; }
details {
  border-bottom: 1px solid var(--line); padding: 18px 0;
}
summary {
  cursor: pointer; font-weight: 700; font-size: .98rem; min-height: 28px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--teal-deep); font-weight: 700; font-size: 1.2rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin: 12px 0 0; font-size: .94rem; }

/* ---------- footer ---------- */
footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 44px 0 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.footer-copy { color: var(--muted); font-size: .9rem; max-width: 30rem; margin: 14px 0 0; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 600; }
.footer-links a:hover { color: var(--ink); }
.legal-line { margin-top: 30px; font-size: .82rem; color: var(--faint); }

/* ---------- legal documents ---------- */
.doc { width: min(800px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 100px; }
.doc h1 { font-size: clamp(2.2rem, 4vw, 3rem); margin: 0 0 6px; }
.doc .updated { color: var(--faint); font-size: .9rem; margin-bottom: 30px; }
.doc h2 {
  font-size: 1.16rem; margin: 38px 0 10px;
  border-bottom: 1px solid var(--line); padding-bottom: 8px; letter-spacing: -0.015em;
}
.doc h3 { font-size: 1rem; margin: 22px 0 6px; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 7px; }
.doc .back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 24px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font-size: .92rem; font-weight: 700; text-decoration: none; }
.doc .back:hover { border-color: var(--ink); }
.doc-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 24px; margin: 22px 0;
}
.doc-card.accent { border-left: 4px solid var(--teal); }
.doc-card.warn { border-left: 4px solid var(--amber); }
.table-wrap { overflow-x: auto; margin: 14px 0; }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: top; }
th { color: var(--faint); font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.placeholder {
  background: rgba(201, 76, 76, .12); border: 1px dashed var(--red);
  color: var(--red); padding: 2px 7px; border-radius: 4px; font-size: .88em; font-weight: 700;
}
.doc-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); }
.doc-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 700; }
.doc-links a:hover { border-color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .faq, .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .grid-3 { grid-template-columns: 1fr; }
  .truth { grid-template-columns: 1fr; }
  .truth-badge { justify-self: start; }
  .hero { padding: 52px 0 22px; }
  .hero-visual { min-height: 650px; max-width: 530px; width: 100%; margin: 0 auto; }
  .section { padding: 64px 0; }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 32px, 1120px); }
  .nav { min-height: 68px; }
  .nav-links { gap: 8px; }
  .nav-links a:not(.nav-contact) { display: none; }
  .nav-links .nav-contact { padding: 9px 13px; font-size: .82rem; }
  .hero-grid { gap: 10px; }
  .hero-visual { min-height: 530px; }
  .screen-vault { width: min(56vw, 215px); left: 4%; top: 2%; }
  .screen-detail { width: min(46vw, 185px); right: 4%; top: 13%; }
  .visual-note { left: 1%; bottom: 3%; }
  .benefit-grid { flex-wrap: wrap; justify-content: flex-start; gap: 12px 20px; padding-block: 16px; }
  .benefit-grid > span { font-size: .81rem; }
  .benefit-grid > span > span { width: 25px; height: 25px; }
  .truth { padding: 25px; }
  .doc { width: calc(100% - 32px); padding-top: 32px; }
}
@media (max-width: 370px) {
  .brand { font-size: .95rem; }
  .brand-mark { width: 34px; height: 34px; }
  .hero-visual { min-height: 460px; }
  .screen-vault { width: 53vw; }
  .screen-detail { width: 44vw; }
  .actions .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html, html:focus-within { scroll-behavior: auto; }
}
