/* ──────────────────────────────────────────────────────────────────────────
   jacqueslatour.ca — paper theme
   A showcase for signed-and-verified web documents.

   Palette:
     ink       #2a2a28    — body text
     muted     #6b6860    — secondary text
     paper     #fdfbf6    — page background
     vellum    #f6f1e4    — cards, panels
     rule      #e4dfd2    — borders, separators
     pass      #1f6f43    — valid / verified
     fail      #a5322a    — invalid / tampered
     warn      #b57a1b    — unverified / unreachable
   ────────────────────────────────────────────────────────────────────────── */

:root {
  --ink: #2a2a28;
  --muted: #6b6860;
  --paper: #fdfbf6;
  --vellum: #f6f1e4;
  --rule: #e4dfd2;
  --pass: #1f6f43;
  --fail: #a5322a;
  --warn: #b57a1b;

  --font-serif: "Source Serif 4", "Source Serif Pro", ui-serif, Georgia, "Times New Roman", serif;
  --font-sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 4px;
  --measure: 42rem;

  /* Override popover defaults so the widget inherits our theme */
  --tdv-pass: var(--pass);
  --tdv-fail: var(--fail);
  --tdv-warn: var(--warn);
  --tdv-accent: var(--pass);
  --tdv-bg: var(--vellum);
  --tdv-ink: var(--ink);
  --tdv-muted: var(--muted);
  --tdv-rule: var(--rule);
  --tdv-radius: 4px;
  --tdv-font: var(--font-sans);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.2rem); line-height: 1.1; }
h2 { font-size: clamp(1.4rem, 1.5vw + 1rem, 2rem); line-height: 1.2; margin-top: 2.5rem; }
h3 { font-size: 1.15rem; line-height: 1.3; }

p { margin: 0 0 1rem; }
a { color: var(--pass); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

code, pre, .mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}
code { background: rgba(0,0,0,0.04); padding: 0.05em 0.3em; border-radius: 3px; }
pre  { background: var(--vellum); border: 1px solid var(--rule); border-radius: var(--radius);
       padding: 0.9rem 1rem; overflow-x: auto; line-height: 1.5; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* ── Trust bar (top-of-page identity strip) ────────────────────────────── */
.trust-bar {
  background: var(--ink);
  color: #f7f3e7;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.trust-bar .container {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding-top: 0.45rem; padding-bottom: 0.45rem;
}
.trust-bar .dot { width: 7px; height: 7px; border-radius: 50%; background: #6fd19a; display: inline-block; }
.trust-bar code { background: rgba(255,255,255,0.08); color: #f7f3e7; font-size: 0.82em; }

/* ── Navigation ────────────────────────────────────────────────────────── */
.nav {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.nav .container {
  display: flex; align-items: center; gap: 2rem;
  padding-top: 1rem; padding-bottom: 1rem;
}
.nav-logo {
  font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 0.55rem;
}
.nav-logo .seal {
  width: 1.6rem; height: 1.6rem; border: 1.5px solid var(--pass); color: var(--pass);
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 700;
}
.nav-links { list-style: none; display: flex; gap: 1.5rem; margin: 0 0 0 auto; padding: 0; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.95rem;
  border-bottom: 1.5px solid transparent; padding-bottom: 2px;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); border-color: var(--ink); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 0.3rem;
}
.nav-toggle span {
  display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0;
}

@media (max-width: 620px) {
  .nav .container { flex-wrap: wrap; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-links {
    width: 100%; flex-direction: column; gap: 0.4rem; margin: 0.8rem 0 0;
    display: none;
  }
  .nav-links.open { display: flex; }
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { padding: 4rem 0 3rem; }
.hero .eyebrow {
  color: var(--pass); font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero h1 { margin-bottom: 1rem; max-width: 22ch; }
.hero .subtitle {
  font-size: 1.12rem; color: var(--muted); max-width: var(--measure);
  margin-bottom: 2rem;
}
.hero .hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.hero .hero-actions .tdv-btn { font-size: 0.95rem; padding: 0.55em 1em; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.45em;
  font: inherit; font-size: 0.95rem; font-weight: 600; line-height: 1;
  padding: 0.65em 1.15em; border-radius: var(--radius); cursor: pointer;
  text-decoration: none; border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: #3d3d3a; border-color: #3d3d3a; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); }

/* ── Pillars (3-state comparison) ──────────────────────────────────────── */
.pillars {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem; margin: 2.5rem 0;
}
.pillar {
  background: var(--vellum); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 1.5rem;
}
.pillar .pillar-icon {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 0.9rem; font-size: 1rem; font-weight: 700;
}
.pillar.is-pass { border-left: 3px solid var(--pass); }
.pillar.is-pass .pillar-icon { background: var(--pass); color: #fff; }
.pillar.is-fail { border-left: 3px solid var(--fail); }
.pillar.is-fail .pillar-icon { background: var(--fail); color: #fff; }
.pillar.is-warn { border-left: 3px solid var(--warn); }
.pillar.is-warn .pillar-icon { background: var(--warn); color: #fff; }
.pillar h3 { margin-top: 0; font-size: 1.1rem; }
.pillar p { font-size: 0.95rem; color: var(--muted); margin-bottom: 0.9rem; }
.pillar .pillar-action { font-size: 0.9rem; font-weight: 600; }

/* ── Document gallery cards ────────────────────────────────────────────── */
.btn-sm { font-size: 0.85rem; padding: 0.5em 0.9em; }

.doc-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.25rem; margin: 2.5rem 0;
}
.doc-card {
  display: flex; flex-direction: column;
  background: var(--vellum); border: 1px solid var(--rule);
  border-left: 3px solid var(--pass);
  border-radius: var(--radius); padding: 1.5rem;
}
.doc-card .cat {
  font-family: var(--font-sans); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--pass);
  margin-bottom: 0.5rem;
}
.doc-card h3 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.doc-card .issuer { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.75rem; }
.doc-card p { font-size: 0.95rem; color: var(--muted); margin-bottom: 1.25rem; }
.doc-card .doc-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ── Section headings ──────────────────────────────────────────────────── */
.section { margin: 4rem auto; }
.section-lede {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  border-top: 1px solid var(--rule); padding-top: 1rem; margin-bottom: 0.5rem;
}

/* ── Document / press-release layout ──────────────────────────────────── */
.document {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 2.5rem 2rem;
  max-width: 44rem; margin: 0 auto;
  box-shadow: 0 1px 0 rgba(0,0,0,0.03), 0 8px 28px rgba(0,0,0,0.04);
}
.document .doc-header {
  border-bottom: 1px solid var(--rule); padding-bottom: 1rem; margin-bottom: 1.5rem;
}
.document .doc-kicker {
  color: var(--muted); font-size: 0.75rem; letter-spacing: 0.15em;
  text-transform: uppercase; margin-bottom: 0.5rem;
}
.document h1 {
  font-size: 2rem; line-height: 1.2; margin: 0 0 0.5rem;
  font-family: var(--font-serif);
}
.document .byline { color: var(--muted); font-size: 0.9rem; }
.document p, .document li { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.65; }
.document h2, .document h3 { font-family: var(--font-serif); }
.document ul, .document ol { padding-left: 1.4rem; }

/* ── Verify strip (attached below document) ───────────────────────────── */
.verify-strip {
  max-width: 44rem; margin: 1rem auto 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem;
  padding: 0.9rem 1rem; border: 1px dashed var(--rule);
  border-radius: var(--radius); background: var(--vellum);
  font-size: 0.9rem; color: var(--muted);
}
.verify-strip strong { color: var(--ink); }
.verify-strip .spacer { flex: 1; min-width: 1rem; }

/* ── Status banner (above a doc page) ─────────────────────────────────── */
.banner {
  max-width: 44rem; margin: 0 auto 1rem; border-radius: var(--radius);
  padding: 0.75rem 1rem; font-size: 0.9rem;
  display: flex; align-items: flex-start; gap: 0.75rem;
}
.banner.is-pass { background: rgba(31,111,67,0.08); border: 1px solid rgba(31,111,67,0.25); color: #184f31; }
.banner.is-fail { background: rgba(165,50,42,0.08); border: 1px solid rgba(165,50,42,0.25); color: #782419; }
.banner.is-warn { background: rgba(181,122,27,0.10); border: 1px solid rgba(181,122,27,0.28); color: #7c5412; }
.banner .banner-icon { font-weight: 700; line-height: 1.2; }

/* ── Prose (how-it-works, about) ──────────────────────────────────────── */
.prose { max-width: var(--measure); }
.prose p, .prose li { font-size: 1.03rem; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose li { margin-bottom: 0.4rem; }

.callout {
  border-left: 3px solid var(--pass); background: var(--vellum);
  padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.98rem;
}
.callout.is-warn { border-left-color: var(--warn); }
.callout.is-fail { border-left-color: var(--fail); }

/* ── Step list ─────────────────────────────────────────────────────────── */
.steps { list-style: none; padding: 0; counter-reset: step; margin: 1.5rem 0; }
.steps > li {
  counter-increment: step; position: relative;
  padding: 1rem 1rem 1rem 3.2rem; margin-bottom: 0.75rem;
  background: var(--vellum); border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.steps > li::before {
  content: counter(step); position: absolute; left: 0.9rem; top: 0.9rem;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-serif); font-weight: 700; font-size: 0.95rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.steps h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 4rem; padding: 2rem 0;
  border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.88rem;
}
.site-footer .container { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: baseline; }
.site-footer .foot-nav { display: flex; gap: 1rem; flex-wrap: wrap; margin-left: auto; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ── Utility ───────────────────────────────────────────────────────────── */
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }   .mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
