/* ===================================================
   KADESH ELECTRICAL CONCEPTS — GLOBAL CSS
   Aesthetic: Technical Minimal · Engineer Blueprint
   Light base · Electric blue · Monospace precision
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,600;1,300&family=IBM+Plex+Sans:wght@300;400;500;600&family=Familjen+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* Palette */
  --paper:    #f4f5f2;
  --paper2:   #edeee9;
  --paper3:   #e5e6e0;
  --ink:      #111410;
  --ink2:     #2c2e28;
  --ink3:     #505548;
  --ink4:     #8a8f80;
  --rule:     rgba(17,20,16,0.08);
  --rule2:    rgba(17,20,16,0.14);

  --blue:     #1a56ff;
  --blue-lt:  #3d6fff;
  --blue-dim: rgba(26,86,255,0.1);
  --blue-rule:rgba(26,86,255,0.18);

  --yellow:   #e8c840;   /* secondary accent — live wire */
  --red:      #d63030;   /* warning / danger markers */

  /* Typography */
  --font-head: 'Familjen Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max-w:    1200px;
  --nav-h:    68px;
  --r:        2px;       /* almost-zero radius — technical feel */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Blueprint grid overlay across whole page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Faint major grid lines every 200px */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--rule2) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule2) 1px, transparent 1px);
  background-size: 200px 200px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  background: var(--paper);
  border-bottom: 1px solid var(--rule2);
  transition: box-shadow 0.3s;
}

.nav.scrolled {
  box-shadow: 0 1px 0 var(--rule2), 0 4px 24px rgba(17,20,16,0.06);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border: 2px solid var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.logo-mark::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--blue);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%);
}

.logo-mark::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 2px;
  background: var(--yellow);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}

.logo-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: var(--blue);
  text-transform: uppercase;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink3);
  padding: 0.4rem 0.75rem;
  border: 1px solid transparent;
  transition: all 0.15s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
  border-color: var(--blue-rule);
  background: var(--blue-dim);
}

.nav-cta {
  background: var(--blue) !important;
  color: #fff !important;
  border-color: var(--blue) !important;
  font-weight: 600 !important;
  margin-left: 0.5rem;
}

.nav-cta:hover {
  background: var(--blue-lt) !important;
  border-color: var(--blue-lt) !important;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--rule2);
  padding: 2rem 2.5rem;
  transform: translateY(-110%);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
  z-index: 999;
}

.mobile-menu.open { transform: translateY(0); }

.mobile-menu ul { display: flex; flex-direction: column; gap: 1.5rem; }

.mobile-menu a {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  border: none;
  transition: all 0.18s;
  position: relative;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border: 1px solid var(--blue);
}

.btn-primary:hover {
  background: var(--blue-lt);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(26,86,255,0.25);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule2);
}

.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-lg { padding: 0.9rem 2rem; font-size: 0.85rem; }

/* ===== LABELS / TAGS ===== */
.label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1.25rem;
}

.label::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--blue);
}

/* ===== HEADINGS ===== */
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; color: var(--ink); }

.display {
  font-size: clamp(2.75rem, 5.5vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.0;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.accent { color: var(--blue); }

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1), transform 0.6s cubic-bezier(0.22,1,0.36,1);
}

.reveal.visible { opacity: 1; transform: none; }

/* ===== CROSSHAIR CORNERS (decorative) ===== */
.crosshair {
  position: relative;
}

.crosshair::before,
.crosshair::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--blue-rule);
  border-style: solid;
}

.crosshair::before {
  top: -1px; left: -1px;
  border-width: 1px 0 0 1px;
}

.crosshair::after {
  bottom: -1px; right: -1px;
  border-width: 0 1px 1px 0;
}

/* ===== PAGE HERO ===== */
.page-hero {
  padding: calc(var(--nav-h) + 5rem) 0 4rem;
  background: var(--paper);
  border-bottom: 1px solid var(--rule2);
  position: relative;
}

.page-hero h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.page-hero p {
  color: var(--ink3);
  font-size: 1.05rem;
  max-width: 500px;
  line-height: 1.7;
}

/* ===== SPEC TAG ===== */
.spec-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--blue-rule);
  background: var(--blue-dim);
  color: var(--blue);
}

/* ===== SECTION DIVIDER ===== */
.sec-div {
  height: 1px;
  background: var(--rule2);
  position: relative;
  margin: 0;
}

.sec-div::before {
  content: attr(data-label);
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  color: var(--ink4);
  background: var(--paper);
  padding: 0 0.5rem;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 5rem 0 2rem;
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 5rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2rem;
}

.footer-brand .logo-name { color: var(--paper); }
.footer-brand .logo-mark { border-color: var(--blue); }
.footer-brand p {
  color: rgba(244,245,242,0.45);
  font-size: 0.9rem;
  margin: 1.5rem 0;
  max-width: 260px;
  line-height: 1.7;
}

.footer-socials { display: flex; gap: 0.5rem; }

.footer-socials a {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(244,245,242,0.4);
  transition: all 0.2s;
}

.footer-socials a:hover { border-color: var(--blue); color: var(--blue); }

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244,245,242,0.3);
  margin-bottom: 1.25rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.65rem; }

.footer-col a {
  font-size: 0.875rem;
  color: rgba(244,245,242,0.55);
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--blue); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: rgba(244,245,242,0.25);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .nav { padding: 0 1.5rem; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-top { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .container { padding: 0 1.25rem; }
  .footer-links { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}
