/* ==========================================================================
   DocBridge · shared styles
   Palette: paper #FAF9F6 · ink #16233B · teal #0D9488 · thermal #E7E4DD
            slate #55607A · highlight #FFC940 · brick #C4553B
   Type:    Source Serif 4 (display) · Public Sans (body) · IBM Plex Mono (meta)
   ========================================================================== */

:root {
  --paper: #FAF9F6;
  --paper-deep: #F2F0EA;
  --ink: #16233B;
  --ink-soft: #2A3A58;
  --teal: #0D9488;
  --teal-dark: #0B7A70;
  --teal-tint: #E4F4F2;
  --thermal: #E7E4DD;
  --slate: #55607A;
  --highlight: #FFC940;
  --brick: #C4553B;
  --white: #FFFFFF;

  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 1px 2px rgba(22, 35, 59, 0.06), 0 6px 24px rgba(22, 35, 59, 0.07);
  --shadow-lift: 0 2px 4px rgba(22, 35, 59, 0.08), 0 14px 40px rgba(22, 35, 59, 0.12);
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; line-height: 1.3; }

.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--slate); max-width: 34em; }

/* Fax-header eyebrow · mono, like the header line a fax machine prints */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--teal); }

/* Highlighter swipe · used on at most one phrase per page */
.hl {
  background: linear-gradient(transparent 58%, var(--highlight) 58%, var(--highlight) 92%, transparent 92%);
  padding: 0 2px;
}

/* Mono metadata line (filenames, timestamps) */
.meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--slate); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); box-shadow: 0 6px 18px rgba(13, 148, 136, 0.32); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.btn-light { background: var(--white); color: var(--ink); border-color: var(--thermal); }
.btn-light:hover { border-color: var(--ink); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--thermal);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  color: var(--ink);
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--ink);
  position: relative;
  overflow: hidden;
  flex: none;
}
.logo-mark::before {
  content: "";
  position: absolute;
  left: 5px; right: 5px; top: 14px;
  height: 4px;
  border-radius: 2px;
  background: var(--teal);
}
.logo-mark::after {
  content: "";
  position: absolute;
  left: 9px; top: 7px;
  width: 14px; height: 18px;
  border-radius: 2px;
  background: var(--paper);
  opacity: 0.94;
  clip-path: polygon(0 0, 70% 0, 100% 25%, 100% 100%, 0 100%);
}

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { text-decoration: none; color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--teal-dark); border-bottom-color: var(--teal); }
.main-nav .btn { padding: 9px 18px; font-size: 0.88rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--thermal);
    padding: 8px 24px 20px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 4px; border-bottom: 1px solid var(--thermal); }
  .main-nav a[aria-current="page"] { border-bottom-color: var(--thermal); }
  .main-nav .btn { margin-top: 14px; justify-content: center; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Sections ---------- */

.section { padding: 88px 0; }
.section-tight { padding: 64px 0; }
.section-dark { background: var(--ink); color: var(--paper); }
.section-dark .lede { color: #B9C2D4; }
.section-dark .eyebrow { color: var(--highlight); }
.section-dark .eyebrow::before { background: var(--highlight); }
.section-deep { background: var(--paper-deep); }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .lede { margin: 14px auto 0; }
.section-head h2 + .lede { margin-top: 14px; }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Cards ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--thermal);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-card);
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

/* ---------- FILED stamp ---------- */

.stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-dark);
  border: 2px solid var(--teal-dark);
  border-radius: 4px;
  padding: 5px 12px;
  transform: rotate(-6deg);
  box-shadow: inset 0 0 0 2px var(--white), inset 0 0 0 3px var(--teal-dark);
  background: var(--white);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #AEB8CC;
  padding: 56px 0 32px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer .logo { color: var(--paper); margin-bottom: 14px; }
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7E8BA5;
  margin-bottom: 14px;
  font-weight: 500;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #C9D2E2; }
.site-footer a:hover { color: var(--white); }
.footer-note {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  font-size: 0.82rem;
  color: #7E8BA5;
}

/* ---------- Forms ---------- */

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--thermal);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); outline: none; }
.field textarea { min-height: 130px; resize: vertical; }
.field .hint { font-size: 0.8rem; color: var(--slate); margin-top: 5px; }

.form-status {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
}
.form-status.ok { display: block; background: var(--teal-tint); color: var(--teal-dark); border: 1px solid #BEE3DF; }
.form-status.err { display: block; background: #FBEAE5; color: var(--brick); border: 1px solid #F0CCC1; }

/* honeypot */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
