/* ==========================================================================
   WES network — Wolff Electronic Systems
   Palette sampled from brand logo: deep navy + teal + slate gray
   ========================================================================== */

:root {
  --navy-900: #0a2540;
  --navy-800: #0e3457;
  --navy-700: #14456f;
  --teal-500: #14969b;
  --teal-400: #21b4ac;
  --teal-300: #5cd0c4;
  --slate-500: #64748b;
  --slate-300: #a9b4c2;
  --ink: #16232f;
  --paper: #f7f8f4;
  --paper-alt: #eef1eb;
  --white: #ffffff;
  --border: #e2e5dd;

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;

  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(10,37,64,.06), 0 1px 1px rgba(10,37,64,.04);
  --shadow-md: 0 8px 24px -8px rgba(10,37,64,.18);
  --shadow-lg: 0 24px 48px -16px rgba(10,37,64,.28);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; color: var(--navy-900); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
button { font: inherit; }

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy-900);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--teal-400), var(--teal-500));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,.5);
  color: inherit;
}
.header-cta .btn-primary { color: #fff; }
.hero .btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(247,248,244,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease, background-color .3s ease;
}
.site-header.scrolled {
  border-color: var(--border);
  box-shadow: 0 1px 0 rgba(10,37,64,.03);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark { border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy-900);
  letter-spacing: .01em;
}
.brand-name em { font-style: normal; font-weight: 500; color: var(--slate-500); }
.brand-sub { font-size: .68rem; color: var(--slate-500); font-weight: 500; letter-spacing: .02em; }

.main-nav { display: flex; gap: 30px; }
.main-nav a {
  font-size: .93rem;
  font-weight: 500;
  color: var(--navy-800);
  position: relative;
  padding: 4px 0;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--teal-500);
  transition: right .2s ease;
}
.main-nav a:hover::after { right: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 22px; background: var(--navy-900); margin: 0 auto; transition: transform .25s ease, opacity .25s ease; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 160px 0 0;
  background: linear-gradient(160deg, var(--navy-900) 0%, #0c2e4d 55%, var(--navy-800) 100%);
  color: #fff;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; opacity: .35; color: var(--teal-400); }
.circuit-svg { width: 100%; height: 100%; }
.circuit-lines path { opacity: .55; }
.circuit-dots circle { opacity: .8; }

.hero-inner { position: relative; max-width: 800px; padding-bottom: 90px; }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal-300);
  margin-bottom: 16px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  font-weight: 700;
  max-width: 15ch;
}
.hero-lead {
  font-size: 1.1rem;
  color: rgba(255,255,255,.78);
  max-width: 56ch;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.stat-bar { position: relative; background: rgba(255,255,255,.06); border-top: 1px solid rgba(255,255,255,.12); }
.stat-bar-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 28px 24px;
}
.stat { display: flex; flex-direction: column; gap: 4px; text-align: center; }
.stat-value { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: #fff; }
.stat-label { font-size: .78rem; color: rgba(255,255,255,.65); }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--paper-alt); }
.section-lead { max-width: 62ch; font-size: 1.05rem; color: var(--slate-500); margin-bottom: 48px; }
.section > .wrap > h2, .about h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); max-width: 20ch; }

/* ---------- Card grid (services) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(20,150,155,.12), rgba(10,37,64,.08));
  color: var(--teal-500);
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.08rem; margin-bottom: 10px; }
.card p { color: var(--slate-500); font-size: .95rem; margin: 0; }

/* ---------- Pillars (approach) ---------- */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 20px;
}
.pillar-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--teal-500);
  opacity: .55;
  margin-bottom: 10px;
}
.pillar h3 { font-size: 1.05rem; margin-bottom: 8px; }
.pillar p { color: var(--slate-500); font-size: .93rem; margin: 0; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 50px;
  align-items: center;
}
.about-copy p:not(.eyebrow) { color: var(--slate-500); font-size: 1.03rem; }
.about-mark {
  justify-self: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

/* ---------- Contact ---------- */
.section-dark {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-800));
  color: #fff;
}
.section-dark h2 { color: #fff; }
.section-dark .section-lead,
.contact-copy p:not(.eyebrow) { color: rgba(255,255,255,.72); }
.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 60px;
  align-items: start;
}
.contact-copy h2 { max-width: 14ch; }
.contact-email a {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--teal-300);
  border-bottom: 1.5px solid rgba(92,208,196,.4);
  padding-bottom: 2px;
}
.contact-email a:hover { border-color: var(--teal-300); }

.contact-form {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  gap: 18px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: .85rem; font-weight: 500; color: rgba(255,255,255,.8); }
.form-row input, .form-row textarea {
  background: rgba(255,255,255,.95);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 14px;
  font: inherit;
  color: var(--ink);
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--teal-400);
  box-shadow: 0 0 0 3px rgba(33,180,172,.25);
}
.form-submit { justify-self: start; margin-top: 4px; }
.form-note { font-size: .88rem; color: var(--teal-300); min-height: 1.2em; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.7); padding: 44px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
.brand-footer .brand-name { color: #fff; }
.brand-footer .brand-sub { color: rgba(255,255,255,.55); }
.footer-nav { display: flex; gap: 22px; }
.footer-nav a { font-size: .88rem; color: rgba(255,255,255,.72); }
.footer-nav a:hover { color: #fff; }
.footer-copy { font-size: .8rem; color: rgba(255,255,255,.5); width: 100%; text-align: center; margin: 8px 0 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-mark { order: -1; width: 200px; padding: 26px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px 28px;
    gap: 18px;
  }
  .site-header.nav-open .header-cta {
    display: block;
    position: absolute;
    top: calc(76px + 210px);
    left: 24px; right: 24px;
  }
  .site-header.nav-open .header-cta .btn { display: flex; width: 100%; }

  .hero { padding-top: 130px; }
  .stat-bar-inner { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .pillar-grid { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
}
