/* CMI Microwave — responsive styles */
:root {
  --bg: #0d1116;
  --bg-2: #141a21;
  --panel: #1b232d;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f4f6f8;
  --muted: #9aa6b4;
  --red: #e30613;
  --red-2: #ff3b3b;
  --ink: #111;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid #e6e8ec;
  padding-top: env(safe-area-inset-top);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 24px;
}

.brand img {
  height: 64px;
  width: auto;
  background: #fff;
}

.primary {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.92rem;
  font-weight: 600;
}
.primary a { text-decoration: none; color: #4b5563; }
.primary a:hover { color: var(--red); }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #d7dbe2;
  background: #fff;
  border-radius: 10px;
  padding: 0;
}
.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 10px;
  background: #222;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn:hover { background: var(--red-2); }
.btn-sm { padding: 10px 16px; font-size: 0.88rem; min-height: 40px; }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.35);
}

.hero {
  position: relative;
  min-height: 86vh;
  min-height: 86dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; background: #0b0f14; }
.hero-video,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero-video {
  display: block;
  background: #0b0f14;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8,10,14,0.62) 0%, rgba(8,10,14,0.22) 48%, rgba(8,10,14,0.08) 100%),
    linear-gradient(180deg, rgba(8,10,14,0.08), rgba(8,10,14,0.55));
}
.hero-video::-webkit-media-controls-panel {
  background: linear-gradient(transparent, rgba(0,0,0,0.45));
}
.hero-grid { position: relative; padding: 120px 0 72px; }
.hero-copy { max-width: 720px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffb4b4;
  margin: 0 0 12px;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 14px; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -0.02em; }
.lede { font-size: 1.12rem; color: #dbe3ec; max-width: 58ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 36px; }

.hero-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  margin: 0;
}
.hero-stats li {
  border-top: 1px solid rgba(255,255,255,0.18);
  padding-top: 12px;
}
.hero-stats strong { display: block; }
.hero-stats span { color: #c5ced8; font-size: 0.88rem; }

.strip {
  background: #11161c;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  color: var(--muted);
  text-align: center;
}
.strip p { margin: 0; }

.section { padding: 88px 0; }
.section.alt { background: var(--bg-2); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p:last-child { color: var(--muted); }

.cards, .service-grid, .contact-grid, .gallery {
  display: grid;
  gap: 16px;
}
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card, .service-grid article, .callout, .cta-panel, .contact-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card p, .service-grid p { color: var(--muted); margin: 0; }

.gallery {
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-auto-rows: minmax(220px, 280px);
  container-type: inline-size;
  container-name: gallery;
}
.gallery figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.gallery .wide { grid-column: 1 / 2; grid-row: 1 / 3; }
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  font-size: 0.82rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.service-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.service-grid h3 { font-size: 1.02rem; }

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: start;
}
.split p { color: #c8d3e0; }
.callout ul { margin: 0 0 16px; padding-left: 18px; color: var(--muted); }
.fine { color: var(--muted); font-size: 0.92rem; margin: 0; }

.contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contact-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.contact-card { text-decoration: none; min-height: 44px; }
.contact-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.site-footer {
  background: #fff;
  color: #4b5563;
  padding: 22px 0 calc(22px + env(safe-area-inset-bottom));
  font-size: 0.9rem;
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-row p { margin: 0; }
.footer-logo { height: 52px; width: auto; }

@media (max-width: 980px) {
  .cards.three,
  .service-grid,
  .split,
  .contact-grid,
  .hero-stats,
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .wide { grid-column: auto; grid-row: auto; min-height: 280px; }
  .gallery { grid-auto-rows: 240px; }
  .section { padding: 64px 0; }
  .hero-grid { padding: 96px 0 56px; }
}

@media (max-width: 720px) {
  .brand img { height: 50px; }
  .menu-toggle { display: block; }
  .primary {
    display: none;
    position: absolute;
    inset: calc(84px + env(safe-area-inset-top)) 16px auto;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    background: #fff;
    border: 1px solid #e6e8ec;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
  }
  .primary.open { display: flex; }
  .primary a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .cards.three,
  .service-grid,
  .split,
  .contact-grid,
  .hero-stats,
  .gallery { grid-template-columns: 1fr; }
  .hero {
    min-height: 92vh;
    min-height: 92dvh;
  }
  .hero-grid { padding: 72px 0 48px; }
  .section { padding: 52px 0; }
}

@container gallery (max-width: 700px) {
  .gallery {
    grid-template-columns: 1fr;
  }
  .gallery .wide {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-video { display: none; }
  .hero-media {
    background: #0b0f14 url("assets/kingman-poster.jpg") center 40% / cover no-repeat;
  }
}

.employee-link {
  margin: 22px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.employee-link a {
  color: #9aa6b4;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}
.employee-link a:hover { color: #fff; }
