/* =========================================================================
   DeFlock Irvine — styles
   Plain CSS, no build step. Dark-first with a calm, civic palette.
   ========================================================================= */

:root {
  --bg:        #0b1120;
  --bg-alt:    #0f172a;
  --bg-dark:   #060a14;
  --surface:   #131c31;
  --surface-2: #1b2743;
  --border:    #24314f;
  --text:      #e6ecf6;
  --text-dim:  #9fb0c9;
  --text-mute: #6f819e;
  --accent:    #38bdf8;   /* sky */
  --accent-2:  #f43f5e;   /* alert rose */
  --accent-3:  #fbbf24;   /* verify amber */
  --good:      #34d399;
  --mixed:     #fbbf24;
  --bad:       #fb7185;
  --maxw:      1120px;
  --radius:    14px;
  --shadow:    0 10px 30px rgba(0,0,0,.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 750; letter-spacing: -0.01em; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 999;
  background: var(--accent); color: #04121e; padding: 10px 16px;
  border-radius: 8px; font-weight: 700; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

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

/* =============================== HEADER =============================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,17,32,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-text { font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-text strong { color: var(--accent); font-weight: 800; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: var(--text-dim); font-weight: 600; font-size: .95rem;
  padding: 8px 12px; border-radius: 8px;
}
.site-nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-cta { background: var(--accent); color: #04121e !important; }
.nav-cta:hover { background: #7dd3fc; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none;
  border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================== HERO =============================== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 400px at 80% -10%, rgba(56,189,248,.16), transparent 60%),
    radial-gradient(700px 400px at 0% 0%, rgba(244,63,94,.12), transparent 55%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-inner { padding: clamp(56px, 10vw, 120px) 0 clamp(48px, 8vw, 90px); max-width: 820px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .18em; font-size: .8rem;
  color: var(--accent); font-weight: 700; margin: 0 0 14px;
}
.hero h1 { font-size: clamp(2.4rem, 6.5vw, 4.4rem); font-weight: 820; margin-bottom: .3em; }
.hero h1 .hl { color: var(--accent-2); }
.lede { font-size: clamp(1.08rem, 2.2vw, 1.35rem); color: var(--text-dim); max-width: 660px; }
.hero-map { margin: 34px 0 10px; }
.hero-map iframe {
  display: block; width: 100%; height: 460px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.hero-map-cap { font-size: .82rem; color: var(--text-mute); margin: 10px 0 0; }
.hero-map-cap a { color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 18px; }
.hero-note { font-size: .85rem; color: var(--text-mute); margin: 0; }

@media (max-width: 680px) {
  .hero-map iframe { height: 340px; }
}

/* =============================== BUTTONS =============================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 10px; font-weight: 700; font-size: 1rem;
  cursor: pointer; border: 1px solid transparent; transition: transform .12s ease, background .15s ease, border-color .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #04121e; }
.btn-primary:hover { background: #7dd3fc; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { padding: 9px 16px; font-size: .9rem; }

/* =============================== STATS =============================== */
.stats { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  padding: 8px 0;
}
.stat { padding: 30px clamp(14px, 2.5vw, 26px); border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat-num { display: block; font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 820; color: var(--accent); letter-spacing: -0.02em; }
.stat-num sup { color: var(--accent-3); font-size: .5em; top: -.8em; }
.stat[data-verify] .stat-num { color: var(--accent-3); }
.stat-label { display: block; color: var(--text-dim); font-size: .95rem; margin: 6px 0 4px; }
.stat-src { display: block; color: var(--text-mute); font-size: .8rem; }
a.stat-src:hover { color: var(--accent); }

/* =============================== SECTIONS =============================== */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--bg-dark); }
.section-eyebrow {
  text-transform: uppercase; letter-spacing: .16em; font-size: .78rem;
  color: var(--accent); font-weight: 700; margin: 0 0 12px;
}
.section h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); max-width: 18ch; margin-bottom: .6em; }

.prose { max-width: 70ch; color: var(--text-dim); font-size: 1.06rem; }
.prose p { margin: 0 0 1.1em; }
.prose strong { color: var(--text); }
.callout {
  background: var(--surface); border-left: 3px solid var(--accent-3);
  padding: 16px 20px; border-radius: 0 10px 10px 0; margin-top: 1.4em !important;
  font-size: .98rem;
}

.verify {
  color: #04121e; background: var(--accent-3); font-weight: 700;
  font-size: .74em; padding: 1px 7px; border-radius: 20px; white-space: nowrap;
  vertical-align: middle; letter-spacing: .01em;
}

/* =============================== CARDS =============================== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-icon { font-size: 1.8rem; margin-bottom: 12px; }
.card h3 { font-size: 1.15rem; margin-bottom: .5em; }
.card p { margin: 0; color: var(--text-dim); font-size: .97rem; }
.card em { color: var(--text); font-style: italic; }

/* =============================== TABLE =============================== */
.table-scroll { overflow-x: auto; margin-top: 36px; border-radius: var(--radius); border: 1px solid var(--border); }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; background: var(--surface); }
.compare th, .compare td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--border); vertical-align: top; font-size: .96rem; }
.compare thead th { background: var(--surface-2); color: var(--text); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.compare tbody th { color: var(--text); font-weight: 700; width: 30%; }
.compare td { color: var(--text-dim); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare .yes   { color: var(--good); }
.compare .mixed { color: var(--mixed); }
.compare .no    { color: var(--bad); }
.compare .yes strong, .compare .mixed strong, .compare .no strong { color: inherit; }
.table-note { margin-top: 16px; color: var(--text-mute); font-size: .9rem; }

/* =============================== LINKS GRID =============================== */
.links-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.link-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; color: var(--text);
  transition: border-color .15s, transform .15s;
}
.link-card:hover { border-color: var(--accent); transform: translateY(-3px); text-decoration: none; }
.link-card h3 { font-size: 1.05rem; color: var(--accent); margin-bottom: .4em; }
.link-card p { margin: 0; color: var(--text-dim); font-size: .92rem; }

/* =============================== ACTION =============================== */
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.action-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column;
}
.action-card h3 { font-size: 1.12rem; }
.action-card p { color: var(--text-dim); font-size: .95rem; }
.action-card .micro { font-size: .85rem; color: var(--text-mute); margin-top: auto; }
.action-card .micro a { color: var(--accent); }
.template {
  white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem; line-height: 1.5; background: var(--bg-dark); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin: 6px 0 14px;
  max-height: 320px; overflow-y: auto;
}
.copy-btn { align-self: flex-start; }
.copy-btn.copied { background: var(--good); color: #04121e; border-color: var(--good); }

/* =============================== FOOTER =============================== */
.site-footer { background: var(--bg-dark); border-top: 1px solid var(--border); padding: 56px 0 40px; }
.footer-inner { display: grid; gap: 28px; }
.footer-brand p { color: var(--text-mute); max-width: 42ch; margin: 8px 0 0; font-size: .95rem; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 48px; }
.footer-cols h4 { color: var(--text); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.footer-cols nav, .footer-cols div { display: flex; flex-direction: column; gap: 8px; }
.footer-cols a { color: var(--text-dim); font-size: .95rem; }
.footer-cols a:hover { color: var(--accent); }
.disclaimer { color: var(--text-mute); font-size: .84rem; max-width: 80ch; border-top: 1px solid var(--border); padding-top: 22px; margin: 8px 0 0; }
.copyleft { color: var(--text-mute); font-size: .82rem; margin: 0; }

/* =============================== RESPONSIVE =============================== */
@media (max-width: 900px) {
  .cards, .links-grid, .action-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat { border-bottom: 1px solid var(--border); }
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 12px clamp(18px, 4vw, 40px) 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .18s ease;
  }
  .site-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 12px; }
  .nav-cta { text-align: center; margin-top: 4px; }
  .cards, .links-grid, .action-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat, .stat:nth-child(2) { border-right: 0; }
}
