/* ==========================================================================
   Electrical Dynamics, Inc. (EDI) & EDI Network Systems
   Elite Commercial & Institutional Engineering Design System (2026)
   Authentic EDI Palette:
   - Deep Cobalt / Royal Engineering Blue: #0a2547 / #003876 / #1e4976
   - EDI Conductor Copper-Orange: #ea580c (Hover: #c2410c)
   - UL Fire & Emergency Signal Red: #dc2626
   - Crisp Architectural White & Technical Slate: #ffffff / #f8fafc / #0f172a
   ========================================================================== */

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  background-color: #ffffff;
  color: #0f172a;
}

::selection {
  background-color: #ea580c;
  color: #ffffff;
}

/* Architectural Drafting & Blueprint Surfaces (Daylight-First) */
.bg-blueprint-grid {
  background-color: #f8fafc;
  background-image:
    linear-gradient(to right, rgba(0, 56, 118, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 56, 118, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
}

.bg-navy-blueprint {
  background-color: #0a2547;
  background-image:
    radial-gradient(circle at 80% 15%, rgba(0, 56, 118, 0.55) 0%, rgba(10, 37, 71, 0.98) 100%),
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
}

/* Sticky Header & Megamenu Spatial Anchor Architecture */
header.sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
}

@media (min-width: 1024px) {
  .nav-group-menu {
    position: static !important;
  }
  .nav-group-menu:hover > .megamenu-panel-unified,
  .nav-group-menu:focus-within > .megamenu-panel-unified,
  .megamenu-panel-unified.is-open {
    display: flex !important;
  }
}

.megamenu-panel-unified {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  width: 1040px;
  max-width: calc(100vw - 32px);
  min-height: 410px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 3px solid #ea580c;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 24px 60px -12px rgba(10, 37, 71, 0.32), 0 0 0 1px rgba(10, 37, 71, 0.08);
  display: none;
  flex-direction: column;
  justify-content: space-between;
  z-index: 100;
  overflow: hidden;
  white-space: normal;
}

.megamenu-panel-unified::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 0;
  right: 0;
  height: 18px;
  background: transparent;
}

.megamenu-grid-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 310px;
  gap: 1.5rem;
  padding: 1.35rem 1.5rem 1.15rem;
  flex: 1;
}

@media (min-width: 1024px) and (max-width: 1160px) {
  .megamenu-panel-unified {
    width: 960px;
  }
  .megamenu-grid-3col {
    grid-template-columns: 1fr 1fr 280px;
    gap: 1.1rem;
    padding: 1.1rem 1.1rem 0.9rem;
  }
}

.megamenu-bottom-bar {
  padding: 0.75rem 1.5rem;
  background-color: #f1f5f9;
  border-top: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  min-height: 46px;
  gap: 1rem;
}

/* Technical Spec Cards & Elevation */
.tech-card {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.tech-card:hover {
  border-color: #003876;
  box-shadow: 0 12px 28px -8px rgba(10, 37, 71, 0.14);
}

/* Technical Data Tables */
.eng-table th {
  background-color: #0a2547;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid #ea580c;
}

.eng-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.85rem;
  color: #1e293b;
  vertical-align: top;
}

.eng-table tr:nth-child(even) td {
  background-color: #f8fafc;
}

/* Accessible Focus Rings */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}

/* Light Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 5px;
  border: 2px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Print Stylesheet */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}
