/* ============================================
   KVAC ENVIRONMENTAL SERVICES — DESIGN SYSTEM
   Palette pulled directly from the fleet livery:
   ink black tank body, signal red decal, camo grey,
   hazard yellow striping, concrete site tones.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --ink: #16160F;
  --ink-soft: #232319;
  --red: #D81E2C;
  --red-dark: #A5151F;
  --camo-grey: #6B6B63;
  --hazard: #F5B700;
  --concrete: #EDEAE2;
  --concrete-dark: #DAD5C8;
  --steel: #40525C;
  --white: #FBFAF7;

  --display: 'Oswald', sans-serif;
  --body: 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--concrete);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
  font-weight: 600;
}

h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }

.mono { font-family: var(--mono); letter-spacing: 0.01em; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Hazard divider — signature element ---------- */
.hazard-strip {
  height: 14px;
  width: 100%;
  background: repeating-linear-gradient(
    135deg,
    var(--ink) 0px, var(--ink) 22px,
    var(--hazard) 22px, var(--hazard) 44px
  );
}
.hazard-strip.thin { height: 8px; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--ink);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--red);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1180px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
}
.brand-logo {
  height: 46px;
  width: auto;
  display: block;
}
@media (max-width: 500px) {
  .brand-logo { height: 36px; }
}
nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
}
nav a {
  font-family: var(--display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
nav a:hover, nav a.active { border-color: var(--red); color: var(--hazard); }
.nav-call {
  background: var(--red);
  color: var(--white);
  padding: 9px 18px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 2px;
  white-space: nowrap;
}
.nav-call:hover { background: var(--red-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  width: 34px;
  height: 30px;
  position: relative;
  flex-shrink: 0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--white);
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}
.nav-toggle span { top: 14px; }
.nav-toggle span::before { top: -9px; }
.nav-toggle span::after { top: 9px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); background: var(--hazard); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); background: var(--hazard); }

@media (max-width: 820px) {
  .nav-wrap { flex-wrap: wrap; }
  nav {
    order: 4;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  nav.nav-open { max-height: 400px; }
  nav ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 0 4px;
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 14px;
  }
  nav ul li { border-bottom: 1px solid rgba(255,255,255,0.08); }
  nav a { display: block; padding: 14px 2px; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  background: var(--ink);
  overflow: hidden;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.6;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(22,22,15,0.96) 10%, rgba(22,22,15,0.55) 55%, rgba(22,22,15,0.25) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  padding: 60px 24px 56px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}
.eyebrow {
  font-family: var(--mono);
  color: var(--hazard);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
}
.hero h1 { max-width: 780px; }
.hero p.lede {
  margin-top: 20px;
  max-width: 560px;
  font-size: 1.1rem;
  color: var(--concrete-dark);
}
.hero-ctas {
  margin-top: 34px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  padding: 15px 28px;
  border-radius: 2px;
  transition: transform 0.12s ease, background 0.15s ease;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: var(--ink-soft); }

/* ---------- Stat strip ---------- */
.stat-strip {
  background: var(--white);
  border-bottom: 1px solid var(--concrete-dark);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  padding: 36px 24px;
}
.stat-grid div + div { border-left: 1px solid var(--concrete-dark); }
.stat-num {
  font-family: var(--display);
  font-size: 2.2rem;
  color: var(--red);
}
.stat-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--steel);
  margin-top: 4px;
}
@media (max-width: 720px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .stat-grid div:nth-child(3) { border-left: none; }
}

/* ---------- Section basics ---------- */
section { padding: 88px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head .eyebrow { color: var(--red); }
.section-head h2 { margin-top: 10px; }
.section-head p { margin-top: 16px; color: var(--ink-soft); font-size: 1.05rem; }
.on-ink { background: var(--ink); color: var(--white); }
.on-ink .section-head p { color: var(--concrete-dark); }
.on-steel { background: var(--steel); color: var(--white); }

/* ---------- Services grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2px;
  background: var(--concrete-dark);
  border: 2px solid var(--ink);
}
.service-card {
  background: var(--white);
  padding: 32px 28px;
  position: relative;
}
.service-card .tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.service-card h3 { margin-top: 10px; }
.service-card p { margin-top: 12px; font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- Sector band ---------- */
.sector-band {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid rgba(255,255,255,0.15);
}
.sector-item {
  padding: 30px 20px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.15);
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.sector-item small {
  display: block;
  font-family: var(--mono);
  text-transform: none;
  color: var(--hazard);
  margin-top: 6px;
  font-size: 0.7rem;
}
@media (max-width: 900px) {
  .sector-band { grid-template-columns: repeat(2, 1fr); }
  .sector-item:nth-child(2n) { border-right: none; }
}

/* ---------- Capability plate (spec-plate signature) ---------- */
.plate {
  background: var(--ink);
  color: var(--white);
  border: 2px solid var(--camo-grey);
  padding: 40px;
  position: relative;
}
.plate::before {
  content: "KVAC-ENV";
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--camo-grey);
  letter-spacing: 0.1em;
}
.plate dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 0.9rem;
}
.plate dt { color: var(--hazard); text-transform: uppercase; letter-spacing: 0.06em; }
.plate dd { color: var(--concrete-dark); }

/* ---------- Two column ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}
.two-col img { border: 2px solid var(--ink); }

/* ---------- Cards list (about page values, capability points) ---------- */
.point-list { display: flex; flex-direction: column; gap: 22px; margin-top: 24px; }
.point {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--concrete-dark);
}
.point .num {
  font-family: var(--mono);
  color: var(--red);
  font-weight: 700;
  font-size: 1rem;
  padding-top: 3px;
}
.point h4 { font-family: var(--display); text-transform: uppercase; font-size: 1.05rem; }
.point p { margin-top: 6px; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.gallery-grid img { height: 260px; width: 100%; object-fit: cover; filter: grayscale(15%); }
.gallery-grid .g-wide { grid-column: span 2; }
@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid .g-wide { grid-column: span 1; }
}

/* ---------- Forms ---------- */
.form-wrap {
  background: var(--white);
  border: 2px solid var(--ink);
  padding: 40px;
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--steel);
  margin-bottom: 6px;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--concrete-dark);
  background: var(--concrete);
  font-family: var(--body);
  font-size: 0.95rem;
  border-radius: 2px;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}
.form-row textarea { resize: vertical; min-height: 120px; }

/* ---------- Contact info blocks ---------- */
.contact-block { display: flex; flex-direction: column; gap: 26px; }
.contact-item .tag { font-family: var(--mono); font-size: 0.7rem; color: var(--red); text-transform: uppercase; letter-spacing: 0.08em; }
.contact-item .val { font-family: var(--display); font-size: 1.4rem; margin-top: 6px; }
.contact-item .val a:hover { color: var(--red); }

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: var(--concrete-dark);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer-grid h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; }
.footer-grid ul a:hover { color: var(--hazard); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-family: var(--mono);
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--hazard);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

/* ---------- Site-by badge + modal ---------- */
.site-by-btn {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--concrete-dark);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-by-btn:hover { background: rgba(255,255,255,0.14); color: var(--white); }

.site-by-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(22,22,15,0.75);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.site-by-overlay.is-open { display: flex; }
.site-by-card {
  background: var(--ink);
  border: 2px solid var(--hazard);
  max-width: 360px;
  width: 100%;
  padding: 34px 30px;
  position: relative;
  text-align: center;
}
.site-by-card .close-x {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--concrete-dark);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.site-by-card .close-x:hover { color: var(--white); }
.site-by-card .badge-name {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 1.6rem;
  color: var(--white);
  letter-spacing: 0.02em;
}
.site-by-card .badge-name span { color: var(--red); }
.site-by-card .badge-tagline {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--hazard);
  margin-top: 8px;
}
.site-by-card p.badge-desc {
  margin-top: 18px;
  color: var(--concrete-dark);
  font-size: 0.92rem;
  line-height: 1.5;
}
.site-by-card .badge-call {
  display: inline-block;
  margin-top: 22px;
  background: var(--red);
  color: var(--white);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 24px;
  border-radius: 2px;
}
.site-by-card .badge-call:hover { background: var(--red-dark); }

.callout-strip {
  background: var(--red);
  color: var(--white);
  padding: 44px 0;
  text-align: center;
}
.callout-strip h3 { font-size: 1.6rem; }
.callout-strip p { margin-top: 8px; font-family: var(--mono); font-size: 0.95rem; }
.callout-strip .btn { margin-top: 22px; }

/* ---------- Scroll reveal (fail-safe: visible by default, JS only enhances) ---------- */
[data-reveal] {
  opacity: 1;
  transform: none;
}
[data-reveal].pre-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].pre-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal].pre-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Sticky mobile call bar ---------- */
.sticky-call {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 60;
  background: var(--red);
  color: var(--white);
  text-align: center;
  padding: 14px 0;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1rem;
  border-top: 3px solid var(--hazard);
}
@media (max-width: 720px) {
  .sticky-call { display: block; }
  body { padding-bottom: 54px; }
}

/* ---------- Service area chips ---------- */
.area-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.area-chips span {
  font-family: var(--mono);
  font-size: 0.85rem;
  border: 1px solid var(--camo-grey);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--white);
}

/* ---------- Comparison table ---------- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 2px solid var(--ink);
}
.compare-table th, .compare-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--concrete-dark);
  font-size: 0.95rem;
}
.compare-table th {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  background: var(--ink);
  color: var(--white);
}
.compare-table th { color: var(--white); }
.compare-table td { color: var(--ink); font-weight: 400; }
.compare-table td:first-child { font-weight: 600; }
.compare-table td.yes { color: var(--red); font-weight: 700; }
.compare-table tr:last-child td { border-bottom: none; }

/* ---------- Testimonials ---------- */
.testimonial-card {
  background: var(--white);
  border-left: 4px solid var(--red);
  padding: 28px 30px;
  color: var(--ink-soft);
}
.testimonial-card .who {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--steel);
  text-transform: uppercase;
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.testimonial-card .stars {
  color: var(--hazard);
  letter-spacing: 2px;
  font-size: 1rem;
  margin-bottom: 12px;
}
.testimonial-card .headline {
  font-family: var(--display);
  text-transform: uppercase;
  font-style: normal;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}
.testimonial-card blockquote {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ---------- Counter stat (animated) ---------- */
.stat-num[data-count] { font-variant-numeric: tabular-nums; }

