/* ============================================================
   SEATTLE A.R.E. — Accountability Record Engine
   Design: Dark Investigative Editorial
   Colors: Navy #0D1117 | Teal #00B4D8 | White #F0F6FC | Steel #8B949E | Red #F85149
   Fonts: Playfair Display (headings) | Source Sans 3 (body) | Fira Code (data/labels)
   ============================================================ */

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

:root {
  --navy:    #0D1117;
  --navy-2:  #161B22;
  --navy-3:  #1C2333;
  --teal:    #00B4D8;
  --teal-dim:#0090AD;
  --white:   #F0F6FC;
  --steel:   #8B949E;
  --red:     #F85149;
  --amber:   #D97706;
  --border:  rgba(255,255,255,0.08);
  --teal-border: rgba(0,180,216,0.25);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;
  --font-mono:    'Fira Code', 'Fira Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
}

a { color: var(--teal); text-decoration: none; transition: color 0.15s; }
a:hover { color: #00C9F0; }

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

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container--wide { max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Navigation ── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s, border-color 0.3s;
}
#navbar.scrolled {
  background: rgba(13,17,23,0.97);
  border-color: rgba(0,180,216,0.15);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 1400px; margin: 0 auto; padding: 0 1.5rem;
}
.nav-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-logo-badge {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 4px;
  background: rgba(0,180,216,0.15);
  border: 1px solid rgba(0,180,216,0.4);
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500;
  color: var(--teal); letter-spacing: 0.05em;
}
.nav-logo-text { display: flex; flex-direction: column; }
.nav-logo-title {
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 700;
  color: var(--white); line-height: 1.1;
}
.nav-logo-sub {
  font-family: var(--font-mono); font-size: 0.52rem; color: var(--steel);
  letter-spacing: 0.15em; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 6px 12px; border-radius: 4px; font-size: 0.85rem;
  font-family: var(--font-body); color: var(--steel);
  transition: color 0.15s, background 0.15s; white-space: nowrap;
}
.nav-links a:hover { color: var(--white); }
.nav-links a.active {
  color: var(--teal); background: rgba(0,180,216,0.08); font-weight: 600;
}
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--steel); padding: 8px;
}
.nav-mobile {
  display: none; flex-direction: column;
  background: rgba(13,17,23,0.99);
  border-top: 1px solid rgba(0,180,216,0.12);
  padding: 12px 16px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 10px 12px; border-radius: 4px; font-size: 0.9rem;
  color: var(--steel); font-family: var(--font-body);
}
.nav-mobile a:hover, .nav-mobile a.active {
  color: var(--teal); background: rgba(0,180,216,0.08);
}

/* ── Section labels ── */
.section-label {
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 0.75rem;
}

/* ── Teal left-border accent ── */
.teal-border {
  border-left: 3px solid var(--teal);
  padding-left: 1rem;
}

/* ── Cards ── */
.card {
  background: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: rgba(0,180,216,0.35);
  box-shadow: 0 0 24px rgba(0,180,216,0.07);
}

/* ── Evidence tags ── */
.tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.1em; padding: 2px 8px; border-radius: 2px;
}
.tag-teal {
  background: rgba(0,180,216,0.12); color: var(--teal);
  border: 1px solid rgba(0,180,216,0.25);
}
.tag-red {
  background: rgba(248,81,73,0.12); color: var(--red);
  border: 1px solid rgba(248,81,73,0.25);
}
.tag-amber {
  background: rgba(217,119,6,0.12); color: var(--amber);
  border: 1px solid rgba(217,119,6,0.25);
}
.tag-steel {
  background: rgba(139,148,158,0.12); color: var(--steel);
  border: 1px solid rgba(139,148,158,0.25);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 4px; font-size: 0.9rem;
  font-family: var(--font-body); font-weight: 600; cursor: pointer;
  border: none; transition: all 0.2s;
}
.btn-primary {
  background: var(--teal); color: var(--navy);
}
.btn-primary:hover {
  background: #00C9F0; box-shadow: 0 0 16px rgba(0,180,216,0.4);
  color: var(--navy);
}
.btn-outline {
  background: transparent; color: var(--teal);
  border: 1px solid rgba(0,180,216,0.4);
}
.btn-outline:hover {
  background: rgba(0,180,216,0.08); border-color: var(--teal);
}

/* ── Stat numbers ── */
.stat-number {
  font-family: var(--font-display); font-size: 3rem;
  font-weight: 700; color: var(--teal); line-height: 1;
}
.stat-label {
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--steel); margin-top: 6px;
}

/* ── Divider ── */
.divider {
  border: none; border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ── Blockquote ── */
blockquote {
  border-left: 3px solid var(--teal); padding-left: 1.25rem;
  font-family: var(--font-display); font-style: italic;
  font-size: 1.1rem; color: var(--white); line-height: 1.7;
}

/* ── Tables ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--teal); padding: 10px 16px;
  border-bottom: 1px solid rgba(0,180,216,0.2);
  text-align: left; font-weight: 500;
}
.data-table td {
  padding: 12px 16px; font-size: 0.9rem; color: var(--white);
  border-bottom: 1px solid var(--border);
}
.data-table tr:hover td { background: rgba(0,180,216,0.04); }
.data-table .mono { font-family: var(--font-mono); font-size: 0.8rem; color: var(--steel); }

/* ── Scroll reveal ── */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Page hero ── */
.page-hero {
  padding: 120px 0 60px;
  border-bottom: 1px solid var(--border);
}
.page-hero .section-label { margin-bottom: 1rem; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1.25rem; }
.page-hero p {
  font-size: 1.1rem; color: var(--steel); max-width: 680px; line-height: 1.8;
}

/* ── Section spacing ── */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ── Footer ── */
footer {
  background: var(--navy);
  border-top: 1px solid rgba(0,180,216,0.12);
  padding: 64px 0 32px;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.5fr; gap: 3rem; }
.footer-brand-name {
  font-family: var(--font-display); font-size: 1.2rem;
  font-weight: 700; color: var(--white); margin-bottom: 4px;
}
.footer-brand-sub {
  font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--teal); letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-desc {
  font-size: 0.85rem; color: var(--steel); line-height: 1.7; max-width: 260px;
}
.footer-col-title {
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--teal); letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 0.85rem; color: var(--steel); }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.62rem; color: var(--steel);
  letter-spacing: 0.08em;
}

/* ── Progress bars ── */
.progress-bar {
  height: 6px; background: var(--navy-3); border-radius: 3px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--teal), #00C9F0);
  transition: width 1.2s ease;
}
.progress-fill.red { background: linear-gradient(90deg, var(--red), #ff6b63); }
.progress-fill.amber { background: linear-gradient(90deg, var(--amber), #f59e0b); }

/* ── Pipeline steps ── */
.pipeline-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
}
.pipeline-step {
  padding: 1.5rem 1rem; text-align: center;
  border-right: 1px solid rgba(0,180,216,0.15);
  position: relative;
}
.pipeline-step:last-child { border-right: none; }
.pipeline-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(0,180,216,0.1);
  border: 1px solid rgba(0,180,216,0.3);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.75rem; font-size: 1.2rem;
}
.pipeline-step-name {
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--teal); letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 4px;
}
.pipeline-step-desc {
  font-size: 0.78rem; color: var(--steel); line-height: 1.5;
}

/* ── Integrity rules list ── */
.rule-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.rule-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.9rem; color: var(--white);
}
.rule-list li::before {
  content: '✓'; color: var(--teal); font-family: var(--font-mono);
  font-size: 0.8rem; margin-top: 2px; flex-shrink: 0;
}
.rule-list li.rule-stop::before { content: '✗'; color: var(--red); }

/* ── Accordion ── */
.accordion-item {
  border-bottom: 1px solid var(--border);
}
.accordion-trigger {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 0; text-align: left;
  font-family: var(--font-display); font-size: 1.05rem;
  color: var(--white); font-weight: 600;
}
.accordion-trigger:hover { color: var(--teal); }
.accordion-trigger .chevron {
  font-size: 0.8rem; color: var(--teal); transition: transform 0.2s;
}
.accordion-trigger.open .chevron { transform: rotate(180deg); }
.accordion-body {
  display: none; padding-bottom: 1.25rem;
  font-size: 0.92rem; color: var(--steel); line-height: 1.8;
}
.accordion-body.open { display: block; }

/* ── Case study card ── */
.case-card {
  background: var(--navy-2); border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.case-card:hover {
  border-color: rgba(0,180,216,0.35);
  box-shadow: 0 0 24px rgba(0,180,216,0.07);
}
.case-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0,180,216,0.04);
}
.case-card-body { padding: 1.5rem; }
.case-record-id {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--teal); letter-spacing: 0.1em;
}

/* ── Metric callout ── */
.metric-callout {
  background: rgba(0,180,216,0.06);
  border: 1px solid rgba(0,180,216,0.2);
  border-radius: 6px; padding: 1.5rem;
  text-align: center;
}
.metric-callout .number {
  font-family: var(--font-display); font-size: 2.5rem;
  font-weight: 700; color: var(--teal); line-height: 1;
  margin-bottom: 6px;
}
.metric-callout .label {
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--steel); letter-spacing: 0.15em; text-transform: uppercase;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .pipeline-grid { grid-template-columns: repeat(3, 1fr); }
  .pipeline-step { border-bottom: 1px solid rgba(0,180,216,0.15); }
  .pipeline-step:nth-child(3) { border-right: none; }
  .pipeline-step:nth-child(4), .pipeline-step:nth-child(5), .pipeline-step:nth-child(6) { border-bottom: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .pipeline-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .stat-number { font-size: 2.2rem; }
  .page-hero { padding: 100px 0 48px; }
}
@media (max-width: 480px) {
  .pipeline-grid { grid-template-columns: 1fr; }
}
