/* ============ RPM ENGINEERING SERVICES — SITE STYLES (DARK) ============ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --red: #E11D38;
  --red-dark: #B81226;
  --red-soft: #FF3B58;

  /* Dark theme tokens */
  --bg: #07080B;            /* page background */
  --bg-2: #0E1014;          /* elevated surface */
  --bg-3: #14171D;          /* card */
  --bg-4: #1B1F26;          /* hover / contrast */
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);

  --ink: #F5F5F5;           /* primary text */
  --ink-2: #D9DBE0;          /* secondary text */
  --ink-3: #A6A9B0;          /* body text */
  --muted: #6F7480;          /* low-emphasis */
  --muted-2: #4D525B;
  --white: #FFFFFF;

  /* Legacy aliases used in inner-page <style> blocks — remap to dark */
  --paper: var(--bg-2);
  --paper-2: var(--bg-3);
  --paper-3: var(--bg-4);
  --rule: var(--line);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', monospace;

  --maxw: 1280px;
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; background: var(--bg); }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ===== TYPOGRAPHY ===== */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.02;
  text-transform: none;
  color: var(--ink);
}
.h1 { font-size: clamp(40px, 5.6vw, 84px); }
.h2 { font-size: clamp(32px, 4.4vw, 60px); }
.h3 { font-size: clamp(24px, 2.8vw, 38px); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}
.label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.mono { font-family: var(--font-mono); letter-spacing: -0.005em; color: var(--ink-2); }
.mono-xs {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ===== LAYOUT ===== */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.section { padding: 96px 0; background: var(--bg); }
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
}

/* ===== NAV (DARK) ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: #07080b;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); height: 100%; margin: 0 auto;
  padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* Use the light logo on every page now (entire site is dark) */
.nav .brand img {
  content: url('../assets/rpm-logo-light.png');
  height: 46px !important; width: auto !important; max-height: 46px; display: block;
}
@media (max-width: 600px) { .nav .brand img { height: 36px !important; max-height: 36px; } }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link {
  font-size: 13px; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3);
  padding: 6px 0; position: relative;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 1.5px; background: var(--red);
}
.nav-cta {
  display: inline-flex !important; align-items: center;
  font-size: 12px;
  background: var(--red); color: var(--white) !important;
  padding: 12px 20px; font-size: 11px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  transition: background 0.15s;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.nav-cta:hover { background: var(--red-dark); }

.nav-menu-btn { display: none; }
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-cta { padding: 10px 14px; font-size: 10px; }
  .nav-menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: 1px solid var(--line-2);
  }
  .nav-menu-btn span { width: 14px; height: 1.5px; background: var(--ink); position: relative; }
  .nav-menu-btn span::before, .nav-menu-btn span::after {
    content: ''; position: absolute; left: 0; width: 14px; height: 1.5px; background: var(--ink);
  }
  .nav-menu-btn span::before { top: -5px; }
  .nav-menu-btn span::after { top: 5px; }
  .nav-inner.open .nav-links {
    display: flex; flex-direction: column; position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 24px 32px; gap: 18px; align-items: flex-start;
  }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-ghost-light { border: 1px solid rgba(255,255,255,0.4); color: var(--white); }
.btn-ghost-light:hover { background: var(--white); color: var(--bg); border-color: var(--white); }
.btn-arrow::after {
  content: '→'; font-family: var(--font-mono); font-size: 14px; letter-spacing: 0;
}

/* ===== HERO PAGE HEAD (legacy) ===== */
.page-head {
  background: var(--bg-2);
  padding: 80px 0 96px;
  position: relative;
  overflow: hidden;
}
.page-head .eyebrow { margin-bottom: 32px; display: block; }
.page-head .lede {
  max-width: 560px; margin-top: 32px;
  color: var(--ink-3); font-size: 16px; line-height: 1.6;
  border-left: 2px solid var(--red); padding-left: 20px;
}
.page-index {
  position: absolute; right: 32px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(80px, 14vw, 200px);
  color: transparent; -webkit-text-stroke: 1px var(--line);
  letter-spacing: -0.04em; line-height: 1; user-select: none;
  pointer-events: none;
}
@media (max-width: 768px) { .page-index { display: none; } }

/* ===== CARDS / RULES ===== */
.card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  padding: 32px;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.card:hover { border-color: var(--line-2); background: var(--bg-4); }
.rule-top { border-top: 2px solid var(--red); }

/* ===== FORM ===== */
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--line);
  padding: 14px 16px;
  font: 400 14px/1.5 var(--font-sans);
  color: var(--ink);
  letter-spacing: 0.02em;
  transition: border-color 0.15s, background 0.15s;
}
.field input::placeholder, .field textarea::placeholder {
  color: var(--muted); text-transform: none; font-size: 13px; letter-spacing: 0;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--red); background: var(--bg-4);
}
.field.error input, .field.error textarea {
  border-color: var(--red); background: rgba(225,29,56,0.08);
}
.field-error { color: var(--red); font-size: 11px; margin-top: 6px; letter-spacing: 0.04em; }

/* ===== FOOTER ===== */
.footer {
  background: #04050A;
  color: var(--ink-3);
  padding: 64px 0 36px;
  font-size: 12px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 48px; align-items: flex-start;
}
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 600px) { .footer-inner { grid-template-columns: 1fr; gap: 28px; } }

.footer-brand { display: block; max-width: 200px; }
.footer-brand img { height: 44px !important; width: auto !important; max-height: 44px; max-width: 100%; display: block; margin-bottom: 18px; }
.footer-tag { font-size: 12px; color: var(--ink-3); line-height: 1.6; max-width: 280px; }
.footer-copy { margin-top: 20px; color: var(--muted-2); font-size: 11px; letter-spacing: 0.04em; }

.footer-col-title {
  font-size: 10px; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--red); margin-bottom: 14px;
  font-family: var(--font-mono);
}
.footer-info { font-size: 13px; line-height: 1.75; color: var(--ink-3); }
.footer-info a { color: var(--ink-3); transition: color 0.15s; }
.footer-info a:hover { color: var(--white); }

/* ===== REVEAL ===== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s, transform 0.6s; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ===== UTILITIES ===== */
.red { color: var(--red); }
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.flex { display: flex; }
.aic { align-items: center; }
.jcsb { justify-content: space-between; }
.gap-sm { gap: 12px; } .gap-md { gap: 24px; } .gap-lg { gap: 48px; }

/* Placeholder (striped) image — dark by default */
.ph {
  background:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,0.025) 0 10px,
      rgba(255,255,255,0.05) 10px 20px),
    var(--bg-3);
  display: grid; place-items: center;
  color: var(--muted); font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  aspect-ratio: 4/3;
}
.ph.dark {
  background:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,0.04) 0 10px,
      rgba(255,255,255,0.07) 10px 20px),
    #181818;
  color: #888;
}

/* CTA band */
.cta-band {
  background: #04050A; color: var(--white);
  padding: 96px 0; text-align: center;
  position: relative; overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cta-band.dark { background: #04050A; }
.cta-band h2 { margin-bottom: 28px; }
.cta-band .cta-actions { display: inline-flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.cta-band-watermark {
  position: absolute; right: 24px; bottom: -24px;
  font-family: var(--font-display); font-weight: 700;
  font-size: 220px; color: rgba(225,29,56,0.06);
  letter-spacing: -0.05em; line-height: 1; user-select: none; pointer-events: none;
}

/* ============ EDITORIAL PAGE HEAD (interior pages — quiet) ============ */
.phead {
  position: relative;
  padding: 96px 0 64px;
  background: var(--bg);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.phead-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 11fr;
  gap: 48px;
  align-items: end;
  position: relative;
  z-index: 2;
}
.phead-meta {
  display: flex; flex-direction: column; gap: 14px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.phead-meta-row { display: flex; flex-direction: column; }
.phead-meta .mono-xs { color: var(--muted); }
.phead-meta strong {
  font-family: var(--font-display); font-weight: 500;
  font-size: 13px; letter-spacing: 0.04em; text-transform: none;
  color: var(--ink); margin-top: 2px;
}
.phead-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 24px;
}
.phead-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(40px, 5.6vw, 78px);
  line-height: 1.05; letter-spacing: -0.02em;
  text-transform: none; color: var(--ink);
}
.phead-title .red { color: var(--red); }
.phead-lede {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  margin-top: 40px; padding-top: 28px;
  border-top: 1px solid var(--line);
}
.phead-lede p {
  font-size: 15px; line-height: 1.7; color: var(--ink-3); max-width: 480px;
}
.phead-index {
  position: absolute;
  top: 28px; right: 32px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.16em; color: var(--muted);
  z-index: 2;
}
@media (max-width: 900px) {
  .phead { padding: 80px 0 64px; }
  .phead-grid { grid-template-columns: 1fr; gap: 24px; }
  .phead-lede { grid-template-columns: 1fr; gap: 24px; margin-top: 32px; padding-top: 24px; }
  .phead-meta { border-top: none; border-left: 2px solid var(--red); padding: 0 0 0 12px; flex-direction: row; flex-wrap: wrap; gap: 20px; }
  .phead-index { display: none; }
}

/* ============ EDITORIAL SECTION HEAD ============ */
.esect { padding: 120px 0; background: var(--bg); }
.esect.dark { background: var(--bg); color: var(--ink); }
.esect.paper { background: var(--bg-2); }
.esect-grid {
  max-width: var(--maxw); margin: 0 auto; padding: 0 32px;
  display: grid; grid-template-columns: 3fr 9fr; gap: 64px;
  align-items: start;
}
.esect-aside { position: sticky; top: calc(var(--nav-h) + 32px); }
.esect-num {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
  color: var(--red); margin-bottom: 20px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
  display: inline-block;
}
.esect-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1; letter-spacing: -0.018em;
  text-transform: none;
  margin-bottom: 20px;
  color: var(--ink);
}
.esect-kicker {
  font-size: 14.5px; line-height: 1.65;
  color: var(--ink-3); max-width: 340px;
}
.esect.dark .esect-kicker { color: var(--ink-3); }
.esect.dark .esect-num { color: var(--red); }
@media (max-width: 900px) {
  .esect { padding: 72px 0; }
  .esect-grid { grid-template-columns: 1fr; gap: 40px; }
  .esect-aside { position: static; }
}


/* ============================================================
   SHARED HOME-LANGUAGE STYLES (used on all pages)
   ============================================================ */

/* ============ FULL-BLEED HERO ============ */
.zhero {
  position: relative;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  min-height: 88vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 140px 0 60px;
}
.zhero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 75% 40%, rgba(225,29,56,0.18), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(225,29,56,0.08), transparent 40%),
    linear-gradient(135deg, #07080B 0%, #0E1014 60%, #14060A 100%);
}
.zhero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 70% 50%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 50%, black 20%, transparent 75%);
}
.zhero-inner { position: relative; z-index: 2; max-width: var(--maxw); }
.zhero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-2);
  margin-bottom: 36px;
  padding: 8px 14px; border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.02); backdrop-filter: blur(6px);
  white-space: nowrap;
}
.zhero-eyebrow .dot { width: 6px; height: 6px; background: var(--red); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity: 0.3 } }
.zhero-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(48px, 7.4vw, 108px);
  line-height: 1;
  letter-spacing: -0.022em;
  text-transform: none;
  max-width: 1100px;
  margin-bottom: 32px;
  color: var(--ink);
}
.zhero-lede {
  max-width: 540px; color: var(--ink-3);
  font-size: 17px; line-height: 1.6; margin-bottom: 36px;
}
.zhero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 56px; }

.zhero-specs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line);
  max-width: 760px;
}
.zhero-spec { background: rgba(7,8,11,0.85); padding: 22px 24px; backdrop-filter: blur(10px); }
.zhero-spec-v {
  font-family: var(--font-display); font-weight: 600;
  font-size: 26px; letter-spacing: -0.018em;
  margin-top: 6px; color: var(--ink);
}
.zhero-spec-v span { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 2px; }
@media (max-width: 700px) {
  .zhero-specs { grid-template-columns: repeat(2, 1fr); }
  .zhero { min-height: auto; padding: 120px 0 40px; }
}

.zhero-ticker {
  position: relative; z-index: 2;
  margin-top: 56px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0; overflow: hidden;
  background: rgba(0,0,0,0.4);
}
.zhero-ticker-track {
  display: flex; gap: 32px; align-items: center;
  white-space: nowrap; animation: ticker 60s linear infinite;
  width: fit-content;
}
.zhero-ticker-track span {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; color: var(--ink-3);
  text-transform: uppercase;
}
.zhero-ticker-track span:nth-child(even) { color: var(--red); font-size: 6px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============ ZINTRO ============ */
.zintro { background: var(--bg); }
.zintro-inner {
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 72px; align-items: start;
}
.zintro-title {
  font-family: var(--font-display); font-weight: 500;
  text-transform: none; letter-spacing: -0.022em;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.05; margin-top: 20px; color: var(--ink);
}
.zintro-body p { font-size: 17px; line-height: 1.7; color: var(--ink-3); }
.zintro-kvs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.zintro-k {
  font-family: var(--font-display); font-weight: 500;
  font-size: 40px; letter-spacing: -0.022em; color: var(--ink);
}
.zintro-l {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-top: 8px;
}
@media (max-width: 900px) {
  .zintro-inner { grid-template-columns: 1fr; gap: 32px; }
  .zintro-kvs { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .zintro-k { font-size: 30px; }
}

/* ============ ZSECT HEADERS ============ */
.zsect-dark { background: var(--bg-2); color: var(--ink); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.zsect-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px; margin-bottom: 48px; flex-wrap: wrap;
}
.zsect-head-link {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-2);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 4px; transition: all 0.15s;
}
.zsect-head-link:hover { color: var(--red); border-color: var(--red); }

/* ============ INDUSTRIES ============ */
.zindustries {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.zindustry {
  position: relative;
  background-color: var(--bg-3);
  background-size: cover; background-position: center;
  min-height: 460px;
  padding: 32px;
  color: var(--white);
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid var(--line);
  transition: transform 0.3s, border-color 0.3s;
  overflow: hidden;
}
.zindustry::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.zindustry:hover { transform: translateY(-3px); border-color: var(--red); }
.zindustry-num {
  position: relative; z-index: 1;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.18em; color: rgba(255,255,255,0.55);
}
.zindustry-body { position: relative; z-index: 1; }
.zindustry-body h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.012em; line-height: 1.04;
  margin: 8px 0 16px; text-transform: none;
  overflow-wrap: break-word;
}
.zindustry-body p {
  font-size: 14px; line-height: 1.65; color: rgba(255,255,255,0.78);
  margin-bottom: 20px; max-width: 340px;
}
.zindustry-cta {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--red);
}
@media (max-width: 900px) { .zindustries { grid-template-columns: 1fr; } }

/* ============ CAPABILITIES ============ */
.zcaps-section { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.zsect-head.light .eyebrow { color: var(--red); }
.zcaps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.zcap {
  background: var(--bg-3); padding: 32px;
  border: 1px solid var(--line);
  margin-left: -1px; margin-top: -1px;
  display: flex; flex-direction: column;
  transition: background 0.2s, transform 0.2s;
  min-height: 280px;
  color: var(--ink);
}
.zcap:hover { background: var(--bg-4); border-color: var(--line-2); }
.zcap:hover svg * { stroke: var(--red) !important; }

.zcap-top { display: flex; justify-content: space-between; align-items: start; margin-bottom: 24px; }
.zcap-top svg * { stroke: var(--ink-2); }
.zcap-top svg [stroke="#C8102E"], .zcap-top svg [stroke="#0A0A0A"] { stroke: var(--ink-2); }
.zcap-top .mono-xs { color: var(--red); letter-spacing: 0.18em; }
.zcap h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 20px; letter-spacing: -0.012em; text-transform: none;
  margin-bottom: 12px; color: var(--ink);
}
.zcap p { font-size: 14px; color: var(--ink-3); line-height: 1.6; flex: 1; }
.zcap-spec {
  display: flex; justify-content: space-between;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.zcap-spec span:first-child { color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; font-size: 10.5px; font-weight: 500; font-family: var(--font-mono); }
.zcap-spec .mono { color: var(--ink); font-weight: 500; }
@media (max-width: 900px) { .zcaps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .zcaps { grid-template-columns: 1fr; } }

/* ============ QUALITY BAND ============ */
.zquality {
  background: var(--bg); color: var(--ink);
  padding: 96px 0; position: relative; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.zquality::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 10% 50%, rgba(225,29,56,0.12), transparent 40%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 64px);
}
.zquality-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.zquality-right { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.zcert {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-left: 2px solid var(--red);
  padding: 24px;
}
.zcert-name {
  font-family: var(--font-display); font-weight: 500;
  font-size: 22px; letter-spacing: -0.005em; color: var(--ink);
  margin-bottom: 6px;
}
.zcert-l { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
@media (max-width: 900px) { .zquality-inner { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- TRUSTED ---------- */
.trusted { background: var(--bg); padding: 48px 0; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); }
.trusted-inner { display: flex; align-items: center; gap: 48px; flex-wrap: wrap; }
.trust-logos { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; flex: 1; }
.trust-logo {
  font-family: var(--font-display); font-weight: 500;
  font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3);
}
.trust-sep { width: 4px; height: 4px; background: var(--line-2); border-radius: 50%; }
@media (max-width: 700px) { .trust-sep { display: none; } }


/* ============================================================
   GLOBAL DARK OVERRIDES
   for inner-page <style> blocks that hard-coded light colors
   ============================================================ */

/* Force all generic body backgrounds to be dark — soft override */
section { background: var(--bg); }
section.zsect-dark, section.zsect-dark * { /* already dark, no-op */ }

/* Inner page card surfaces that referenced --white directly */
.q-head, .qpol-grid, .qpol-card, .cert-card, .insp-cell,
.satmap-wrap, .contact-form-card, .partner, .partner3,
.machine-card, .sector, .insp-table, .q9, .qcert,
.cap-card, .cap-cell, .ind-card, .ind-row, .stack-card {
  background: var(--bg-3) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

.q-head { background: var(--bg) !important; }

/* Heading override — display-style headings inside per-page blocks */
.q-head h1, .q-head h2, .q-head h3,
.qpol-card strong,
.cert-info h4, .partner-name, .partner3-name,
.machine-card h4, .sector h3, .ind-row h3, .ind-card h4,
.stack-card h4, .cap-card h4, .cap-cell h4,
.q9 h4, .insp-cell h4, .qcert h4 {
  color: var(--ink) !important;
}

.q-head p, .qpol-card p, .cert-info p,
.machine-card p, .sector p, .ind-card p, .ind-row p,
.stack-card p, .cap-card p, .cap-cell p, .q9 p,
.insp-cell p, .qcert p, .partner-bio, .partner3-bio,
.qpol-lede {
  color: var(--ink-3) !important;
}

.qpol-grid, .insp-table { border-color: var(--line) !important; }

.qpol-divider-rule { background: var(--line) !important; }
.q-head-rule { background: var(--red) !important; }

/* Tables / grids using grays */
.partner-photo, .partner3-photo {
  background:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,0.03) 0 10px,
      rgba(255,255,255,0.06) 10px 20px),
    var(--bg-4) !important;
}

/* Cert download button — invert on dark */
.cert-dl {
  border-color: var(--red) !important; color: var(--red) !important;
}
.cert-dl:hover { background: var(--red) !important; color: var(--white) !important; }

/* Dark sections in inner pages */
.section[style*="background: var(--paper)"],
.section[style*="background:var(--paper)"] {
  background: var(--bg-2) !important;
}

/* Generic "white" hardcoded cards via inline style won't auto-flip — that's why
   we exposed --white not as bg but kept it as #fff. We instead remap --paper. */

/* HQ card (contact) was already dark — keep it but make it more cohesive */
.hq-card { background: var(--bg-3) !important; border: 1px solid var(--line); }

/* Satellite map */
.satmap { background: #050609 !important; }

/* Form on dark background */
.contact-form-card { background: var(--bg-2) !important; border-color: var(--line) !important; }

/* Partner divider rules in dark */
.partners-grid .partner, .partners3 .partner3 { box-shadow: none !important; }

/* Ensure red accent visibility */
.red { color: var(--red); }

/* Selection */
::selection { background: var(--red); color: var(--white); }
