/* ==========================================================================
   Missionite — shared design system
   Owned by Worker A. Consumers must only use the documented contract classes:
   .container .nav .nav-links .btn .btn-primary .btn-ghost .card .section
   .section-alt .h-hero .h-section .muted .field .label .input .form-error
   .form-note .table .badge .footer
   Page-specific composition belongs in a small <style> in that page's <head>.
   Light theme throughout.
   ========================================================================== */

:root {
  --accent:        #1F4E79;   /* deep blue */
  --accent-hover:  #173B5C;   /* darker */
  --accent-tint:   #EAF0F6;   /* light tint */
  --text:          #1C232B;
  --muted:         #5C6873;
  --hairline:      #E3E7EB;
  --bg:            #FFFFFF;
  --bg-alt:        #F7F9FA;
  --error:         #B42318;

  --maxw:          1080px;
  --radius-btn:    10px;
  --radius-card:   12px;
  --radius-input:  9px;

  --shadow-soft:   0 1px 2px rgba(28,35,43,.04), 0 8px 24px rgba(28,35,43,.05);
}

/* ---- Reset-ish base --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.015em; margin: 0 0 .5em; }

p { margin: 0 0 1rem; }

/* ---- Layout ----------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.section       { padding-block: clamp(48px, 7vw, 88px); }
.section-alt   {
  padding-block: clamp(48px, 7vw, 88px);
  background: var(--bg-alt);
  border-block: 1px solid var(--hairline);
}

/* ---- Type helpers ----------------------------------------------------- */
.h-hero {
  font-size: clamp(28px, 4.6vw, 46px);
  line-height: 1.14;
  font-weight: 500;
  letter-spacing: -0.022em;
  margin: 0;
}
.h-section {
  font-size: clamp(20px, 2.8vw, 30px);
  line-height: 1.22;
  font-weight: 500;
  letter-spacing: -0.018em;
  margin: 0;
}
.muted { color: var(--muted); }

/* ---- Navigation ------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  min-height: 66px;
  padding-block: .55rem;
  flex-wrap: wrap;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.nav-brand img { width: 28px; height: 28px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}
.nav-links a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: .98rem;
  transition: color .15s ease;
}
.nav-links a:not(.btn):hover { color: var(--text); }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  padding: .62rem 1.3rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-btn);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease,
              color .16s ease, transform .06s ease, box-shadow .16s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-ghost {
  background: var(--bg);
  border-color: var(--hairline);
  color: var(--accent);
}
.btn-ghost:hover { background: var(--accent-tint); border-color: var(--accent); }

/* ---- Cards ------------------------------------------------------------ */
.card {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 1.45rem 1.5rem;
}

/* ---- Forms ------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.label { font-size: .9rem; font-weight: 500; color: var(--text); }
.input {
  font: inherit;
  font-size: 1rem;
  width: 100%;
  padding: .68rem .85rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-input);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder { color: #9AA5AF; }
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.form-error { color: var(--error); font-size: .9rem; margin: 0; }
.form-note  { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---- Table ------------------------------------------------------------ */
.table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.table th, .table td {
  text-align: left;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.table th {
  font-weight: 500;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.table tr:last-child td { border-bottom: 0; }

/* ---- Badge ------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-size: .8rem;
  font-weight: 500;
  line-height: 1;
  padding: .35em .72em;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent);
}
.badge::before {
  content: "";
  width: .5em; height: .5em;
  border-radius: 50%;
  background: currentColor;
}

/* ---- Footer ----------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--hairline);
  background: var(--bg);
  padding-block: 2.1rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--muted);
  font-size: .92rem;
}
.footer-brand img { width: 22px; height: 22px; }
.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .92rem;
  transition: color .15s ease;
}
.footer-links a:hover { color: var(--text); }

/* ---- Focus rings ------------------------------------------------------ */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.input:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

/* ---- Small screens: nav wraps gracefully (no JS hamburger) ------------ */
@media (max-width: 720px) {
  .nav-inner { min-height: 0; }
  .nav-links { gap: 1.1rem; width: 100%; }
  .btn { padding: .58rem 1.15rem; }
  .table { font-size: .9rem; }
  .table th, .table td { padding: .6rem .7rem; }
}

/* Phones: a touch smaller base + tighter gutters so nothing feels oversized. */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding-inline: 18px; }
  .card { padding: 1.2rem 1.2rem; }
}

/* ---- Print: sane legal pages ------------------------------------------ */
@media print {
  .nav, .footer, .no-print { display: none !important; }
  body { font-size: 11.5pt; color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
  .section, .section-alt {
    padding-block: 0;
    background: #fff;
    border: 0;
  }
  .container { max-width: none; padding-inline: 0; }
  .card { border: 1px solid #bbb; break-inside: avoid; }
}
