/* ==========================================================================
   Breakglass — shared design system (vanilla CSS, no build step)
   Aesthetic: emergency signage ("break glass in case of emergency"), not
   hacker-green-on-black, not generic SaaS. Alarm red rationed to CTAs,
   risk states and one deliberate dark "plaque" band. Sharp corners only.
   ========================================================================== */

:root {
  /* type */
  --font-display: 'Space Grotesk', 'Arial Black', sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;

  /* light theme (default) */
  --bg: #f6f6f3;
  --bg-elevated: #ffffff;
  --text: #15171a;
  --text-muted: #52565c;
  --border: #dcddd8;
  --border-strong: #15171a;

  --accent: #d7263d;
  --accent-dark: #a81a2d;
  --accent-ink: #ffffff;

  --safe: #2f9e44;
  --warn: #c97a00;
  --danger: #d7263d;

  --radius: 2px;
  --nav-height: 68px;
  --max-w: 1180px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121314;
    --bg-elevated: #1b1c1e;
    --text: #ecedea;
    --text-muted: #a8aba6;
    --border: #33353a;
    --border-strong: #ecedea;

    --accent: #ea4a5e;
    --accent-dark: #ff6678;
    --accent-ink: #15171a;

    --safe: #49c96d;
    --warn: #f0a83b;
    --danger: #ea4a5e;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0;
}

p { margin: 0; color: var(--text-muted); max-width: 65ch; }

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

@media (min-width: 768px) {
  .wrap { padding: 0 32px; }
}

/* -------------------------------------------------------------------------
   Nav
   ------------------------------------------------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logo .mark {
  width: 10px;
  height: 14px;
  background: var(--accent);
  display: inline-block;
  transform: skewX(-8deg);
}

@media (max-width: 400px) {
  .logo {
    font-size: 0.64rem;
    letter-spacing: -0.02em;
    gap: 6px;
  }
  .logo .mark { width: 8px; }
}

.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.nav-links a:hover { color: var(--text); }

@media (min-width: 900px) {
  .nav-links { display: flex; }
}

.nav-cta {
  flex-shrink: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.16,1,0.3,1), background 0.15s, border-color 0.15s;
}

.btn:active { transform: translateY(1px) scale(0.98); }

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

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

.btn-block { width: 100%; }

/* -------------------------------------------------------------------------
   Sections & headings
   ------------------------------------------------------------------------- */

section { padding: 72px 0; }
@media (min-width: 768px) { section { padding: 96px 0; } }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.h-section {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  max-width: 24ch;
}

.lede {
  margin-top: 14px;
  font-size: 1.05rem;
  max-width: 52ch;
}

/* -------------------------------------------------------------------------
   Icons (hand-rolled geometric sprite, no icon-library available offline)
   ------------------------------------------------------------------------- */

.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* -------------------------------------------------------------------------
   Chip / tag (sharp, not pill — matches shape lock)
   ------------------------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  background: var(--bg-elevated);
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-col h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.footer-col a {
  display: block;
  padding: 6px 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.footer-col a:hover { color: var(--text); }

.footer-base {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
}

/* -------------------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
