/* Advanced Excavating, Inc. — design system
   Palette from the fleet: Kenworth red, iron, concrete.
   Type: Barlow superfamily (highway-signage DIN heritage). */

:root {
  --red: #C41E24;
  --red-dark: #9E1A1F;
  --iron: #17181A;
  --iron-2: #212327;
  --iron-line: #33363B;
  --paper: #F1F0EC;
  --card: #FFFFFF;
  --ink: #1C1D1F;
  --mute: #55564F;
  --line: #DDDBD3;
  --on-dark: #F4F3EF;
  --on-dark-mute: #A8AAA3;
  --cut: 3.5rem;
  --disp: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --label: "Barlow Semi Condensed", "Barlow", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem; /* sticky header clearance for anchored focus targets */
}

body {
  overflow-x: clip; /* no horizontal scroll on any viewport */
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- a11y utilities ---------- */
.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 200;
  background: var(--red); color: #fff;
  padding: .75rem 1.25rem;
  font: 600 1rem var(--label);
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
.on-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible {
  outline-color: #FFB4B7;
}

/* ---------- type ---------- */
h1, h2, h3 {
  font-family: var(--disp);
  text-transform: uppercase;
  line-height: 1.02;
  letter-spacing: .005em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 7.5vw, 5.5rem); }
h2 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.65rem); letter-spacing: .02em; }

p { max-width: 62ch; }

a { color: inherit; }

/* Equipment-plate eyebrow — like the model plates on the machines */
.plate {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font: 600 .8125rem/1 var(--label);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid currentColor;
  padding: .45rem .8rem .4rem;
  margin-bottom: 1.25rem;
}
.on-dark .plate { color: #E86A6E; }

.lede { font-size: 1.25rem; color: var(--mute); max-width: 56ch; }
.on-dark .lede { color: var(--on-dark-mute); }

/* ---------- layout ---------- */
.wrap { max-width: 76rem; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }

section { padding-block: clamp(4.5rem, 9vw, 7.5rem); }

.on-dark { background: var(--iron); color: var(--on-dark); }

/* The bench cut — graded-slope diagonal, one consistent angle site-wide */
.cut-bottom { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - var(--cut))); }
.cut-top    { margin-top: calc(-1 * var(--cut)); padding-top: calc(var(--cut) + clamp(4.5rem, 9vw, 7.5rem)); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--iron);
  color: var(--on-dark);
  border-top: 4px solid var(--red);
  border-bottom: 1px solid var(--iron-line);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 4.5rem;
}
.brand {
  font: 700 1.5rem/1 var(--disp);
  text-transform: uppercase;
  letter-spacing: .02em;
  text-decoration: none;
  display: flex; align-items: center; gap: .55rem;
  white-space: nowrap;
}
.brand-script { height: 2.7rem; width: auto; display: block; }
.brand em { font-style: normal; color: var(--red); }
.brand .inc { font: 600 .7rem var(--label); letter-spacing: .22em; color: var(--on-dark-mute); }

.site-nav ul { display: flex; gap: .25rem; list-style: none; }
.site-nav a {
  display: block;
  font: 600 1.05rem/1 var(--label);
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--on-dark-mute);
  padding: .9rem 1rem;
  border-bottom: 3px solid transparent;
  transition: color .18s;
}
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--red); }

.header-cta { display: flex; align-items: center; gap: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font: 700 1.05rem/1 var(--disp);
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
  border: 2px solid transparent;
  padding: .95rem 1.6rem .85rem;
  min-height: 3rem;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .12s;
}
.btn:active { transform: translateY(1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-ghost { border-color: var(--iron-line); color: var(--on-dark); }
.btn-ghost:hover { border-color: var(--on-dark); }
.btn-iron { background: var(--iron); color: var(--on-dark); }
.btn-iron:hover { background: var(--iron-2); }

/* mobile nav */
.nav-toggle {
  display: none;
  background: none; border: 2px solid var(--iron-line);
  color: var(--on-dark);
  padding: .6rem .8rem;
  cursor: pointer;
}
.nav-toggle .bars { display: block; width: 22px; height: 2px; background: currentColor; position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor;
  transition: transform .2s;
}
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }

@media (max-width: 56rem) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; inset: 100% 0 auto 0;
    background: var(--iron);
    border-bottom: 1px solid var(--iron-line);
    display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: .75rem 1rem 1.25rem; }
  .site-nav a { padding: 1rem .5rem; border-bottom: none; border-left: 3px solid transparent; }
  .site-nav a[aria-current="page"] { border-left-color: var(--red); }
  .header-phone-label { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: var(--iron);
  color: var(--on-dark);
  padding: 0;
}
.hero-media {
  position: absolute; inset: 0;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,16,17,0) 42%, rgba(15,16,17,.72) 78%, rgba(15,16,17,.92) 100%),
    linear-gradient(78deg, rgba(15,16,17,.93) 0%, rgba(15,16,17,.78) 38%, rgba(15,16,17,.28) 72%, rgba(15,16,17,.15) 100%);
}
.hero-inner {
  position: relative;
  padding-block: clamp(6rem, 13vw, 11rem) clamp(8rem, 15vw, 12.5rem);
  max-width: 46rem;
}
.hero h1 span { display: block; }
.hero h1 .accent { color: #E86A6E; }
.hero .lede { color: #D8D7D0; margin-top: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 2.5rem;
  margin-top: 3rem;
  font-family: var(--label);
}
.hero-facts div { border-left: 3px solid var(--red); padding-left: 1rem; }
.hero-facts strong { display: block; font: 700 1.6rem/1.1 var(--disp); }
.hero-facts span { font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-mute); }

/* ---------- service cards ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 56rem) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
@media (min-width: 40rem) and (max-width: 56rem) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }

.svc-card {
  background: var(--card);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  text-decoration: none;
  transition: border-color .18s, transform .18s;
}
.svc-card:hover { border-color: var(--red); transform: translateY(-3px); }
.svc-card .ph { aspect-ratio: 16 / 10; overflow: hidden; }
.svc-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s cubic-bezier(.32,.72,0,1); }
.svc-card:hover .ph img { transform: scale(1.04); }
.svc-card .body { padding: 1.5rem 1.5rem 1.75rem; flex: 1; display: flex; flex-direction: column; gap: .6rem; }
.svc-card .tag { font: 600 .75rem var(--label); letter-spacing: .18em; color: var(--red); text-transform: uppercase; }
.svc-card p { color: var(--mute); font-size: 1rem; flex: 1; }
.svc-card .more { font: 700 1rem var(--disp); text-transform: uppercase; letter-spacing: .05em; color: var(--ink); }
.svc-card:hover .more { color: var(--red); }

/* ---------- section headers ---------- */
.sec-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.sec-head.split {
  max-width: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}

/* ---------- dark stats band ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  border-top: 1px solid var(--iron-line);
  padding-top: 2.5rem; margin-top: 3rem;
}
@media (max-width: 56rem) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stats strong { display: block; font: 700 clamp(2.4rem, 4vw, 3.4rem)/1 var(--disp); color: #fff; }
.stats span { font: 500 .95rem var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-mute); }

/* ---------- fleet strip ---------- */
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(19rem, 1fr);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
}
.strip figure { scroll-snap-align: start; }
.strip img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.strip figcaption { font: 600 .85rem var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); padding-top: .6rem; }

/* ---------- service area ---------- */
.area-list { display: flex; flex-wrap: wrap; gap: .75rem; list-style: none; margin-top: 1.75rem; }
.area-list li {
  font: 600 1.1rem var(--disp); text-transform: uppercase; letter-spacing: .05em;
  border: 1px solid var(--iron-line);
  padding: .7rem 1.1rem .6rem;
}
.area-list li.hq { border-color: var(--red); color: #fff; }
.area-list li.hq small { color: #E86A6E; font: inherit; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--red); color: #fff; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { max-width: 22ch; }
.cta-band .btn-iron:hover { background: #000; }
.cta-band a.phone-xl {
  font: 700 clamp(1.8rem, 3.5vw, 2.6rem)/1 var(--disp);
  text-decoration: none;
  border-bottom: 3px solid rgba(255,255,255,.4);
}
.cta-band a.phone-xl:hover { border-bottom-color: #fff; }

/* ---------- page hero (interior pages) ---------- */
.page-hero {
  background: var(--iron); color: var(--on-dark);
  position: relative;
  padding-block: clamp(4rem, 8vw, 6.5rem) clamp(5.5rem, 10vw, 8rem);
}
.page-hero.has-img { padding-block: clamp(5rem, 10vw, 8rem) clamp(6.5rem, 12vw, 10rem); }
.page-hero .hero-media::after {
  background: linear-gradient(78deg, rgba(15,16,17,.94) 0%, rgba(15,16,17,.8) 45%, rgba(15,16,17,.35) 100%);
}
.page-hero .wrap { position: relative; max-width: 76rem; }
.page-hero p { color: var(--on-dark-mute); font-size: 1.2rem; margin-top: 1rem; }

/* ---------- service detail rows ---------- */
.svc-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}
.svc-row:first-of-type { border-top: none; }
.svc-row.flip .media { order: 2; }
@media (max-width: 56rem) {
  .svc-row { grid-template-columns: 1fr; }
  .svc-row.flip .media { order: 0; }
}
.svc-row .media { border: 1px solid var(--line); background: #fff; padding: .5rem; }
.svc-row .media img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.svc-row h3 { margin-bottom: .75rem; }
.svc-row p { color: var(--mute); }
.svc-row ul { list-style: none; margin-top: 1.1rem; display: grid; gap: .5rem; }
.svc-row li { padding-left: 1.4rem; position: relative; color: var(--ink); }
.svc-row li::before {
  content: ""; position: absolute; left: 0; top: .52em;
  width: .7rem; height: .18rem; background: var(--red);
}

/* ---------- about ---------- */
.two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
@media (max-width: 56rem) { .two-col { grid-template-columns: 1fr; } }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 56rem) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }

.value-list { list-style: none; display: grid; gap: 1.5rem; margin-top: 2rem; }
.value-list li { border-left: 3px solid var(--red); padding-left: 1.25rem; }
.value-list strong { display: block; font: 700 1.25rem var(--disp); text-transform: uppercase; letter-spacing: .03em; }
.value-list span { color: var(--mute); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
@media (max-width: 56rem) { .contact-grid { grid-template-columns: 1fr; } }

.info-block { display: grid; gap: 1.75rem; margin-top: 2rem; }
.info-block > div { border-top: 1px solid var(--line); padding-top: 1.25rem; }
.info-block h3 { font-size: 1.15rem; color: var(--red); margin-bottom: .35rem; }
.info-block a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.phone-big { font: 700 2rem/1.1 var(--disp); text-decoration: none; }
.phone-big:hover { color: var(--red); }

form { display: grid; gap: 1.25rem; background: var(--card); border: 1px solid var(--line); padding: clamp(1.5rem, 3vw, 2.5rem); }
.field { display: grid; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 40rem) { .field-row { grid-template-columns: 1fr; } }
label { font: 600 .95rem var(--label); letter-spacing: .04em; text-transform: uppercase; }
label .req { color: var(--red); }
input, select, textarea {
  font: 400 1.0625rem var(--body);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: .85rem 1rem;
  min-height: 3rem;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--iron); }
textarea { resize: vertical; min-height: 8rem; }
.form-note { font-size: .9rem; color: var(--mute); }
.form-success {
  display: none;
  border: 1px solid var(--red);
  background: #FBF1F1;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
}
.form-success.show { display: block; }

.map-frame { border: 1px solid var(--line); background: #fff; padding: .5rem; margin-top: 3.5rem; }
.map-frame iframe { width: 100%; height: 24rem; border: 0; display: block; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--iron); color: var(--on-dark);
  border-top: 4px solid var(--red);
  padding-block: 4rem 2.5rem;
  font-size: .98rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 56rem) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 40rem) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: 1.05rem; letter-spacing: .14em; color: var(--on-dark-mute); margin-bottom: 1rem; font-family: var(--label); font-weight: 600; }
.site-footer ul { list-style: none; display: grid; gap: .55rem; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: #E86A6E; }
.site-footer address { font-style: normal; color: var(--on-dark-mute); }
.site-footer address strong { color: var(--on-dark); }
.footer-legal {
  border-top: 1px solid var(--iron-line);
  margin-top: 3rem; padding-top: 1.5rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--on-dark-mute); font-size: .9rem;
}

/* ---------- legal pages ---------- */
.legal-body { max-width: 46rem; }
.legal-body h2 { font-size: 1.5rem; margin: 2.5rem 0 .75rem; }
.legal-body p, .legal-body li { color: var(--mute); }
.legal-body ul { padding-left: 1.25rem; margin-top: .5rem; }

/* ---------- reveal motion ---------- */
.reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity .7s cubic-bezier(.32,.72,0,1), transform .7s cubic-bezier(.32,.72,0,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .svc-card, .svc-card .ph img, .btn { transition: none; }
}

@media (max-width: 40rem) {
  :root { --cut: 2rem; }
  .hero-actions .btn { width: 100%; }
  .site-header .bar { gap: .75rem; }
  .brand { font-size: 1.2rem; }
  .brand-script { height: 2rem; }
  .brand .inc { display: none; }
  .header-cta { gap: .6rem; }
  .header-cta .btn { font-size: .95rem; padding: .7rem .8rem .6rem; }
  .cta-band .wrap { display: grid; gap: 1.5rem; }
}
