/* ═══════════════════════════════════════════════════
   APERLOCK — Site-wide styles
   Brand: #58a6ff blue / #0f1117 near-black / Syne + DM Mono
   ═══════════════════════════════════════════════════ */

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

:root {
  --ink:       #0f1117;
  --ink2:      #13181f;
  --ink3:      #1a2030;
  --blue:      #58a6ff;
  --blue-dim:  rgba(88,166,255,0.10);
  --blue-mid:  rgba(88,166,255,0.22);
  --blue-glow: rgba(88,166,255,0.18);
  --muted:     #8b949e;
  --muted2:    #6b7280;
  --white:     #ffffff;
  --rule:      rgba(88,166,255,0.13);
  --rule2:     rgba(255,255,255,0.07);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--white);
  font-family: 'Syne', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── NOISE LAYER ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── NAVIGATION ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 0 2.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15,17,23,0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-wordmark {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
}
.nav-wordmark em { color: var(--blue); font-style: normal; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }

.nav-cta {
  background: var(--blue);
  color: var(--ink) !important;
  font-family: 'Syne', sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
  padding: 8px 18px;
  border-radius: 6px;
  transition: opacity 0.2s !important;
}
.nav-cta:hover { opacity: 0.88; }

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-dropdown { position: relative; padding-bottom: 0.9rem; margin-bottom: -0.9rem; }
.nav-dropdown-trigger { cursor: pointer; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  margin-top: 0.9rem;
  background: var(--ink2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.4rem 0;
  min-width: 190px;
  list-style: none;
  z-index: 210;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu li a {
  display: block;
  padding: 0.55rem 1.1rem;
  white-space: nowrap;
}

/* ── SHARED SECTION ATOMS ── */
.eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  display: block;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.section-title em { font-style: normal; color: var(--blue); }

.section-sub {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--muted);
  line-height: 1.6;
  max-width: 580px;
}
.section-sub strong { color: var(--white); font-style: normal; font-family: 'Syne', sans-serif; font-weight: 600; }

/* ── STAT STRIP ── */
.stat-strip {
  display: flex;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}
.stat-cell {
  flex: 1;
  padding: 1.1rem 1.5rem;
  background: rgba(255,255,255,0.025);
  text-align: center;
}
.stat-cell .n {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.04em;
  display: block;
  line-height: 1;
}
.stat-cell .l {
  font-family: 'DM Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

/* ── EMAIL CAPTURE ── */
.capture-row {
  display: flex;
  gap: 8px;
  max-width: 440px;
}
.capture-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--blue-mid);
  border-radius: 8px;
  padding: 11px 16px;
  font-family: 'Syne', sans-serif;
  font-size: 0.9rem;
  color: var(--white);
  outline: none;
  transition: border-color 0.2s;
}
.capture-input::placeholder { color: rgba(255,255,255,0.22); }
.capture-input:focus { border-color: var(--blue); }
.capture-btn {
  background: var(--blue);
  color: var(--ink);
  border: none;
  border-radius: 8px;
  padding: 11px 22px;
  font-family: 'Syne', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.1s;
}
.capture-btn:hover { opacity: 0.9; }
.capture-btn:active { transform: scale(0.98); }
.capture-note {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.6rem;
}
.capture-note a { color: var(--blue); text-decoration: none; }

/* ── FOOTER ── */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rule);
  padding: 3rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 3rem;
}
.footer-brand-col .nav-wordmark { margin-bottom: 0.6rem; display: block; }
.footer-tagline {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 320px;
  font-weight: 400;
}
.footer-links-col {
  display: flex;
  gap: 3rem;
}
.footer-link-group h4 {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}
.footer-link-group ul { list-style: none; display: grid; gap: 0.55rem; }
.footer-link-group a {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 400;
}
.footer-link-group a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid var(--rule2);
  padding: 1.2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-legal {
  font-family: 'DM Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--muted2);
}

/* ── PROOF BAR ── */
.proof-bar {
  position: relative; z-index: 1;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  background: rgba(255,255,255,0.015);
}
.proof-item {
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.proof-dot {
  width: 5px; height: 5px;
  background: var(--blue);
  border-radius: 50%;
  animation: pulse-dot 2.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .site-nav { padding: 0 1.25rem; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(15,17,23,0.97);
    padding: 1.5rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--rule);
  }
  .stat-strip { flex-wrap: wrap; }
  .stat-cell { min-width: 45%; }
  .nav-dropdown-menu {
    display: block;
    position: static;
    border: none;
    background: none;
    padding: 0.3rem 0 0 1rem;
    margin-top: 0.6rem;
  }
  .nav-dropdown-menu li a { padding: 0.4rem 0; }
  .capture-row { flex-direction: column; }
  .site-footer { grid-template-columns: 1fr; gap: 2rem; }
  .footer-links-col { flex-wrap: wrap; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .proof-bar { gap: 1rem; padding: 1rem 1.25rem; }
}

/* ── CAPABILITY BRIEF LINKS ──
   Used wherever a page states a capability that /briefs describes in full.
   Deliberately quiet: it is a way further in for the reader who wants the
   mechanism, not another call to action competing with the buttons. */
.brief-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.brief-link:hover { border-bottom-color: var(--blue); }

/* The same link where it follows a block rather than sitting inside a card. */
.brief-note {
  max-width: 820px;
  margin: 2rem auto 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--rule);
  background: var(--ink2);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}
.brief-note a { color: var(--blue); text-decoration: none; border-bottom: 1px solid var(--blue-mid); }
.brief-note a:hover { border-bottom-color: var(--blue); }
