/* ==========================================================================
   OwnVouch — Topograph design system
   Same tokens as the app (lib/theme/app_theme.dart): warm sand paper,
   contour-line texture, terracotta accent, Zilla Slab + Azeret Mono.
   Shared by the landing page and every legal/support page.
   ========================================================================== */

:root {
  /* surfaces */
  --sand: #EFE6D6;
  --paper: #F8F2E6;
  --parchment: #E6DAC5;
  --line: #DDD2C0;

  /* ink */
  --ink: #2B2520;
  --ink-deep: #1E1A16;
  --ink-raised: #3A322B;
  --muted: #7A6E62;
  --muted-on-ink: #B8AA98;

  /* accent + semantic */
  --terracotta: #C8663D;
  --terracotta-light: #E58B62;
  --moss: #3D7A5A;
  --ochre: #B07A2A;
  --rust: #9E3B2E;

  /* role tokens */
  --bg: var(--sand);
  --surface: var(--paper);
  --surface-2: var(--parchment);
  --border: var(--line);
  --text: var(--ink);
  --text-muted: var(--muted);
  --accent: var(--terracotta);
  --accent-ink: #FFFFFF;
  --ph-bg: rgba(176, 122, 42, 0.16);
  --ph-border: var(--ochre);
  --ph-text: #8A5A1F;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink-deep);
    --surface: var(--ink);
    --surface-2: var(--ink-raised);
    --border: #4A4038;
    --text: #F2EAD9;
    --text-muted: var(--muted-on-ink);
    --accent: var(--terracotta-light);
    --accent-ink: #241A14;
    --ph-bg: rgba(229, 139, 98, 0.14);
    --ph-border: var(--terracotta-light);
    --ph-text: #F0C9A8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: var(--ink-deep);
  --surface: var(--ink);
  --surface-2: var(--ink-raised);
  --border: #4A4038;
  --text: #F2EAD9;
  --text-muted: var(--muted-on-ink);
  --accent: var(--terracotta-light);
  --accent-ink: #241A14;
  --ph-bg: rgba(229, 139, 98, 0.14);
  --ph-border: var(--terracotta-light);
  --ph-text: #F0C9A8;
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Zilla Slab', Georgia, 'Times New Roman', serif;
  line-height: 1.5;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.mono { font-family: 'Azeret Mono', ui-monospace, Menlo, monospace; }

/* Brand wordmark: Unbounded 600, per ownvouch-logo/README.md */
.wordmark {
  font-family: 'Unbounded', 'Zilla Slab', sans-serif;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.eyebrow {
  font-family: 'Azeret Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; background: var(--ink);
  color: var(--paper); padding: 10px 16px; border-radius: 8px; z-index: 100;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Azeret Mono', monospace; font-weight: 600; font-size: 13px;
  letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
  padding: 14px 26px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--terracotta); color: #fff; }
.btn-primary:hover { background: var(--terracotta-light); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--terracotta); color: var(--terracotta); }

/* ---------- site header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 20px 0; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand .logo-mark { width: 22px; height: 34px; display: flex; align-items: flex-end; }
.brand .logo-mark img { width: 100%; height: auto; }
.brand .wordmark { font-size: 19px; color: var(--text); }
.brand .wordmark span { color: var(--terracotta); }

/* Swap logo mark art with theme: light art on light backgrounds, reversed art on dark */
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

.site-nav { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none; color: var(--text); font-size: 16px;
}
.site-nav a:hover { color: var(--terracotta); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 80px; }
.site-footer .top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px;
  padding: 48px 0 32px;
}
.site-footer .col h4 { margin: 0 0 14px; }
.site-footer .col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer .col a { text-decoration: none; color: var(--text-muted); font-size: 15px; }
.site-footer .col a:hover { color: var(--terracotta); }
.site-footer .brand-blurb { max-width: 34ch; color: var(--text-muted); font-size: 14.5px; margin-top: 12px; }
.site-footer .bottom {
  border-top: 1px solid var(--border); padding: 18px 0 32px;
  color: var(--text-muted); font-size: 12.5px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
@media (max-width: 720px) {
  .site-footer .top { grid-template-columns: 1fr 1fr; }
}

/* ---------- legal / doc pages ---------- */
.legal-shell { padding: 8px 0 0; }
.legal-banner {
  margin: 24px 0; padding: 16px 18px; border-radius: 14px;
  background: var(--ph-bg); border: 1px solid var(--ph-border);
}
.legal-banner .eyebrow { color: var(--ph-text); display: block; margin-bottom: 6px; }
.legal-banner p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.6; max-width: 74ch; }

.legal-layout { display: grid; grid-template-columns: 220px 1fr; gap: 36px; padding: 12px 0 80px; align-items: start; }
@media (max-width: 820px) { .legal-layout { grid-template-columns: 1fr; } }

.legal-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 820px) {
  .legal-nav { position: static; flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
}
.legal-nav a {
  display: block; padding: 9px 12px; border-radius: 10px; text-decoration: none;
  color: var(--text-muted); font-size: 14px; white-space: nowrap; border: 1px solid transparent;
}
.legal-nav a:hover { background: var(--surface); color: var(--text); }
.legal-nav a[aria-current="page"] { background: var(--surface); color: var(--text); border-color: var(--border); font-weight: 600; }

.doc {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 36px clamp(20px, 4vw, 52px); margin-bottom: 28px;
}
.doc .eff-date { color: var(--text-muted); font-size: 13px; margin-bottom: 26px; }
.doc h1 { font-size: clamp(26px, 3.6vw, 34px); margin-bottom: 4px; line-height: 1.15; }
.doc h2 { font-size: 19px; margin: 34px 0 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.doc h2:first-of-type { border-top: none; padding-top: 0; margin-top: 22px; }
.doc p { font-size: 15.5px; line-height: 1.7; max-width: 70ch; margin: 0 0 14px; }
.doc ul { margin: 0 0 16px; padding-left: 22px; max-width: 68ch; }
.doc li { font-size: 15.5px; line-height: 1.65; margin-bottom: 8px; }
.doc strong { color: var(--text); }
.doc a { color: var(--accent); }
.callout { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; border: 1px solid var(--border); }
.callout p { margin: 0; }

.ph {
  display: inline-block; font-family: 'Azeret Mono', monospace; font-size: 12.5px;
  background: var(--ph-bg); border: 1px dashed var(--ph-border); color: var(--ph-text);
  padding: 1px 7px; border-radius: 6px; font-weight: 600; letter-spacing: .2px;
}

/* ---------- landing page ---------- */
.hero {
  position: relative; overflow: hidden; padding: 96px 0 72px;
  background-image: repeating-radial-gradient(circle at 20% 30%, transparent 0, transparent 38px, var(--line) 39px, var(--line) 40px, transparent 41px);
  background-size: 100% 100%;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(38px, 6vw, 58px); line-height: 1.06; margin: 18px 0 22px; }
.hero h1 .accent { color: var(--terracotta); display: block; }
.hero p.lede { font-size: 18px; line-height: 1.6; max-width: 46ch; color: var(--text-muted); margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--text-muted); }

.certificate {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 26px 28px; max-width: 420px; margin-left: auto;
}
.certificate .cert-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.certificate .cert-id { font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 12px 0; margin: 14px 0 18px; }
.certificate dl { margin: 0; }
.certificate .row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; gap: 12px; }
.certificate dt { font-family: 'Azeret Mono', monospace; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted); }
.certificate dd { margin: 4px 0 0; font-size: 17px; font-weight: 600; text-align: left; }
.certificate .status { color: var(--moss); }
.certificate .custody { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.certificate .custody-trail { font-family: 'Azeret Mono', monospace; font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.certificate .custody-trail .you { background: var(--ink); color: var(--paper); padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.custody-mark { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--terracotta); display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; }
.custody-mark::before { content: ""; position: absolute; inset: 6px; border: 1px dashed var(--terracotta); border-radius: 50%; opacity: .5; }

section.band { padding: 72px 0; }
section.band.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band-head { max-width: 56ch; margin-bottom: 44px; }
.band-head h2 { font-size: clamp(28px, 4vw, 38px); margin: 10px 0 14px; }
.band-head p { color: var(--text-muted); font-size: 16.5px; line-height: 1.6; margin: 0; }

.lookup-form { display: flex; gap: 10px; max-width: 480px; margin: 22px 0 10px; flex-wrap: wrap; }
.lookup-form input {
  flex: 1; min-width: 200px; font-family: 'Azeret Mono', monospace; font-size: 15px;
  padding: 13px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
.lookup-hint { font-size: 13px; color: var(--text-muted); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step .num { font-family: 'Azeret Mono', monospace; font-size: 13px; color: var(--terracotta); font-weight: 600; margin-bottom: 10px; display: block; }
.step h3 { font-size: 21px; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 15px; line-height: 1.6; margin: 0; }

.ceremony-card {
  background: var(--ink); color: var(--paper); border-radius: 20px; padding: 34px 36px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.ceremony-card .eyebrow { color: var(--muted-on-ink); }
.ceremony-card h3 { color: #fff; font-size: 22px; margin: 8px 0 4px; }
.ceremony-card p { color: var(--muted-on-ink); margin: 0; font-size: 15px; }
.ceremony-badge {
  font-family: 'Azeret Mono', monospace; font-size: 12px; letter-spacing: .6px;
  border: 1px solid var(--terracotta-light); color: var(--terracotta-light);
  padding: 8px 14px; border-radius: 999px; white-space: nowrap;
}

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--text-muted); font-size: 14.5px; line-height: 1.6; margin: 0; }

.faq-list { max-width: 760px; display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 4px 22px;
}
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 0; margin: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 17px; font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border);
  position: relative;
}
.faq-item summary .plus::before, .faq-item summary .plus::after {
  content: ""; position: absolute; background: var(--accent);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.faq-item summary .plus::before { width: 10px; height: 1.6px; }
.faq-item summary .plus::after { width: 1.6px; height: 10px; transition: transform .15s ease; }
.faq-item[open] summary .plus::after { transform: translate(-50%, -50%) rotate(90deg) scaleY(0); }
.faq-item p { color: var(--text-muted); font-size: 15px; line-height: 1.65; margin: 0 0 20px; max-width: 66ch; }

.cta-band { text-align: center; padding: 88px 0; }
.cta-band h2 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 16px; }
.cta-band p { color: var(--text-muted); max-width: 48ch; margin: 0 auto 30px; font-size: 16.5px; }
.cta-band .hero-ctas { justify-content: center; }
