/* ============================================================
   Veridraft — design system (Tool 1: editorial authority)
   Navy #0F1B33 · Antique gold #B8924A · Warm ivory #FAF8F4
   Playfair Display headings · Inter body · 8px spacing grid
   Radius: 12px cards · 8px buttons
   ============================================================ */

:root {
  --navy: #0F1B33;
  --navy-soft: #1B2C4F;
  --gold: #B8924A;
  --gold-dark: #96762F;
  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --text: #1A1F2B;
  --muted: #5A6070;
  --border: #E8E2D6;
  --critical: #A62B1F;
  --critical-bg: #FBF0EE;
  --warn: #8A6D1F;
  --warn-bg: #FBF5E1;
  --pass: #2E6B34;
  --pass-bg: #EFF6EF;
  --radius-card: 12px;
  --radius-btn: 8px;
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 760px; }

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 16px;
}
h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 1.9rem; font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 16px; }

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

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.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;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.monogram { display: inline-flex; line-height: 0; }
.monogram svg { display: block; }
.brand-name {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.01em;
}
.main-nav { display: flex; gap: 24px; }
.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}
.main-nav a:hover { color: var(--gold-dark); text-decoration: underline; }

/* ---------- Hero + tool ---------- */
.hero { padding: 64px 0 72px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin-bottom: 16px;
}
.lede {
  font-size: 1.13rem;
  color: var(--muted);
  max-width: 680px;
  margin-bottom: 40px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.tab {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
}
.tab:hover { border-color: var(--gold); color: var(--navy); }
.tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFFFFF;
}

.field-label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}
.field-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.field-row-start { margin-top: 16px; }
.field-grow { flex: 1 1 220px; }

input[type="text"],
input[type="url"],
select,
textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 12px 16px;
}
textarea { width: 100%; resize: vertical; }
input::placeholder, textarea::placeholder { color: #9AA0AE; }
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  outline: 3px solid var(--gold);
  outline-offset: 1px;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn-gold { background: var(--gold); color: #FFFFFF; }
.btn-gold:hover { background: var(--gold-dark); }

.field-note {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}
.field-note.is-error { color: var(--critical); font-weight: 500; }

/* ---------- Output boxes (shared component) ---------- */
.outputs {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.output-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  overflow: hidden;
}
.output-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.output-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--navy);
  padding-top: 6px;
}
.copy-btn {
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 88px;
  padding: 7px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--gold);
  background: #FFFFFF;
  color: var(--gold-dark);
  cursor: pointer;
}
.copy-btn:hover { background: var(--gold); color: #FFFFFF; }
.copy-btn.is-copied { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.output-body { padding: 16px; }
.output-body pre {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 500;
}
.mini-note { margin: 12px 0 0; font-size: 0.85rem; color: var(--muted); }

.honest-note {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  border-left: 3px solid var(--gold);
  padding-left: 12px;
}
.honest-note.center {
  border-left: none;
  padding-left: 0;
  text-align: center;
  max-width: 720px;
  margin: 32px auto 0;
}

.ai-note {
  margin-top: 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  color: var(--muted);
  background: var(--bg);
  font-size: 0.95rem;
}
.ai-note strong { color: var(--navy); }

/* ---------- Audit findings ---------- */
.audit-summary {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
  font-weight: 600;
  color: var(--navy);
}
.severity-group { margin-top: 24px; }
.severity-title {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 12px;
}
.severity-title.critical { color: var(--critical); }
.severity-title.warning { color: var(--warn); }
.severity-title.pass { color: var(--pass); }

.finding-card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 16px;
  margin-bottom: 12px;
}
.finding-card.critical { border-left-color: var(--critical); }
.finding-card.warning { border-left-color: var(--gold); }
.finding-card.pass { border-left-color: var(--pass); }
.finding-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
}
.finding-card p { margin: 0 0 8px; font-size: 0.95rem; }
.finding-evidence {
  font-size: 0.88rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  padding: 8px 12px;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.fix-box {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  overflow: hidden;
}
.fix-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  background: var(--pass-bg);
  border-bottom: 1px solid var(--border);
}
.fix-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pass);
  padding-top: 6px;
}
.fix-body { padding: 12px; }
.fix-body pre {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: #FFFFFF; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-lede { color: var(--muted); max-width: 640px; }
.section .outputs { margin-top: 32px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.step {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
  padding: 24px;
}
.step-num {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
}
.step p { color: var(--muted); margin: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 24px;
}
.card p { color: var(--muted); margin: 0; }

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--bg);
  padding: 16px 20px;
  margin-bottom: 12px;
}
.faq-item summary {
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  padding: 4px 0;
}
.faq-item p { color: var(--muted); margin: 8px 0 4px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy);
  padding: 72px 0;
  text-align: center;
}
.cta-band h2 { color: #FFFFFF; }
.cta-band p { color: #C9CFDB; margin-bottom: 24px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 40px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  margin-bottom: 40px;
}
.footer-brand strong { color: var(--navy); }
.footer-heading { font-size: 1.3rem; }
.more-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
.more-tool {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 20px;
}
.more-tool h3 { font-size: 1.05rem; margin-bottom: 8px; }
.more-tool p { color: var(--muted); font-size: 0.93rem; margin-bottom: 12px; }
.tool-state {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
}
.more-tool.is-here .tool-state { color: var(--gold-dark); border-color: var(--gold); }
.footer-small { margin-top: 40px; color: var(--muted); font-size: 0.88rem; }

/* ---------- Responsive (mobile-first refinements) ---------- */
@media (max-width: 760px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.55rem; }
  .hero { padding: 40px 0 48px; }
  .section { padding: 48px 0; }
  .cta-band { padding: 48px 0; }
  .steps, .cards, .more-tools { grid-template-columns: 1fr; }
  .tool-card { padding: 16px; }
  .tab { flex: 1 1 auto; padding: 10px 8px; }
  .field-row .btn { width: 100%; }
  .field-row select { flex: 1 1 auto; }
  .main-nav { gap: 16px; }
  .brand-name { font-size: 1.3rem; }
  .output-head { padding: 10px 12px; }
  .output-body { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
