:root {
  --font-mono: 'DM Mono', monospace;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --radius: 10px;
  --radius-lg: 14px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── DARK ── */
[data-theme="dark"] {
  --bg-body: #08090d;
  --bg-surface: #0f1117;
  --bg-card: #151720;
  --bg-input: #1a1c28;
  --bg-elevated: #1e2030;
  --border-subtle: #252838;
  --border-default: #2e3148;

  --accent: #3b82f6;
  --accent-hover: #5b9aff;
  --accent-dim: rgba(59,130,246,0.15);
  --accent-glow: rgba(59,130,246,0.25);
  --accent-text: #3b82f6;

  --cta-green: #10b981;
  --cta-green-hover: #34d399;
  --cta-green-dim: rgba(16,185,129,0.12);

  --forenzy-red: #ef4444;
  --forenzy-red-dim: rgba(239,68,68,0.12);

  --danger: #f43f5e;
  --danger-dim: rgba(244,63,94,0.12);
  --warning: #f59e0b;
  --warning-dim: rgba(245,158,11,0.12);
  --success: #10b981;
  --success-dim: rgba(16,185,129,0.12);
  --info-blue: #38bdf8;
  --info-blue-dim: rgba(56,189,248,0.12);

  --text-primary: #eaecf5;
  --text-secondary: #8b8fa8;
  --text-muted: #565a72;
  --text-inverse: #08090d;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 24px var(--accent-dim);

  --terminal-bg: #0a0b10;
  --grid-opacity: 0.04;
  --scanline-opacity: 0.012;
  --logo-glow: 0 0 40px var(--accent-dim);
  --gate-gradient: linear-gradient(180deg, transparent 0%, #08090d 70%);
}

/* ── LIGHT ── */
[data-theme="light"] {
  --bg-body: #f4f5f9;
  --bg-surface: #edeef4;
  --bg-card: #ffffff;
  --bg-input: #f0f1f6;
  --bg-elevated: #ffffff;
  --border-subtle: #e0e2ec;
  --border-default: #d0d3e0;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-dim: rgba(37,99,235,0.08);
  --accent-glow: rgba(37,99,235,0.12);
  --accent-text: #2563eb;

  --cta-green: #059669;
  --cta-green-hover: #047857;
  --cta-green-dim: rgba(5,150,105,0.08);

  --forenzy-red: #dc2626;
  --forenzy-red-dim: rgba(220,38,38,0.08);

  --danger: #e11d48;
  --danger-dim: rgba(225,29,72,0.08);
  --warning: #d97706;
  --warning-dim: rgba(217,119,6,0.08);
  --success: #059669;
  --success-dim: rgba(5,150,105,0.08);
  --info-blue: #0284c7;
  --info-blue-dim: rgba(2,132,199,0.08);

  --text-primary: #1a1d2e;
  --text-secondary: #5c6078;
  --text-muted: #9496a8;
  --text-inverse: #ffffff;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 24px var(--accent-dim);

  --terminal-bg: #f7f8fc;
  --grid-opacity: 0.035;
  --scanline-opacity: 0;
  --logo-glow: none;
  --gate-gradient: linear-gradient(180deg, transparent 0%, #f4f5f9 70%);
}

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

.grid-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: var(--grid-opacity);
  z-index: 0;
  pointer-events: none;
}

/* NAVBAR — Production Match */
.fnav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-sm);
}

.fnav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 32px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-display);
  transition: background var(--transition), border-color var(--transition);
}

.fnav-top a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.fnav-top a:hover { color: var(--accent-text); }

.fnav-top-contacts {
  display: flex;
  gap: 18px;
  align-items: center;
}

.fnav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 64px;
  max-width: 1280px;
  margin: 0 auto;
}

.fnav-logo img {
  height: 34px;
  width: auto;
  transition: filter var(--transition);
}

[data-theme="dark"] .fnav-logo img { filter: brightness(0) invert(1); }
[data-theme="light"] .fnav-logo img { filter: none; }

.fnav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  font-family: var(--font-display);
}

.fnav-item {
  position: relative;
}

.fnav-item > a,
.fnav-item > span {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.fnav-item > a:hover,
.fnav-item > span:hover,
.fnav-item:hover > a,
.fnav-item:hover > span {
  background: var(--accent-dim);
  color: var(--accent-text);
}

.fnav-chevron {
  font-size: 9px;
  opacity: 0.5;
  transition: transform 0.2s;
}

.fnav-item:hover .fnav-chevron { transform: rotate(180deg); }

/* Dropdown */
.fnav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 100;
  transition: background var(--transition), border-color var(--transition);
}

.fnav-item:hover > .fnav-dropdown { display: block; }

.fnav-dropdown a {
  display: block;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
}

.fnav-dropdown a:hover {
  background: var(--accent-dim);
  color: var(--accent-text);
}

/* Mega dropdown for Services */
.fnav-mega {
  display: none;
  position: absolute;
  top: 100%;
  left: -100px;
  width: 680px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  z-index: 100;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 16px;
}

.fnav-item:hover > .fnav-mega { display: grid; }

.fnav-mega-col-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-text);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 6px;
  font-family: var(--font-display);
}

.fnav-mega a {
  display: block;
  padding: 5px 0;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1.4;
}

.fnav-mega a:hover { color: var(--accent-text); }

/* Get Quote CTA in nav */
.fnav-cta {
  padding: 8px 18px !important;
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  transition: all 0.2s !important;
}

.fnav-cta:hover {
  background: var(--accent-hover) !important;
  box-shadow: var(--shadow-glow) !important;
}

.fnav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Hamburger */
.fnav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.fnav-burger span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.3s;
}

/* Mobile nav */
.fnav-mobile {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-card);
  z-index: 999;
  padding: 80px 24px 24px;
  overflow-y: auto;
  animation: fadeSlideIn 0.3s ease;
}

.fnav-mobile.open { display: block; }

.fnav-mobile-close {
  position: absolute;
  top: 20px; right: 24px;
  background: none; border: none;
  font-size: 28px; color: var(--text-primary);
  cursor: pointer;
}

.fnav-mobile a {
  display: block;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-display);
}

@media (max-width: 900px) {
  .fnav-links { display: none; }
  .fnav-burger { display: flex; }
  .fnav-top { padding: 6px 16px; font-size: 10px; }
  .fnav-top-contacts { gap: 10px; }
  .fnav-main { padding: 0 16px; }
}

/* FOOTER — Production Match */
.ffoot {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  padding: 40px 32px 24px;
  margin-top: 48px;
  transition: background var(--transition), border-color var(--transition);
}

.ffoot-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
}

@media (max-width: 700px) {
  .ffoot-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .ffoot-inner { grid-template-columns: 1fr; }
  .ffoot { padding: 32px 20px 20px; }
}

.ffoot-brand-logo {
  height: 30px;
  width: auto;
  margin-bottom: 14px;
  transition: filter var(--transition);
}

[data-theme="dark"] .ffoot-brand-logo { filter: brightness(0) invert(1); }
[data-theme="light"] .ffoot-brand-logo { filter: none; }

.ffoot-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 280px;
  margin-bottom: 14px;
}

.ffoot-contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ffoot-contacts a {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  transition: color 0.2s;
}

.ffoot-contacts a:hover { color: var(--accent-text); }

.ffoot-col-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  transition: color var(--transition);
}

.ffoot-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ffoot-links a {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-display);
  transition: color 0.2s;
}

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

.ffoot-bottom {
  max-width: 1280px;
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  transition: border-color var(--transition);
}

.theme-toggle button.toggle-track {
  border: none;
  padding: 0;
  display: block;
  font: inherit;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
