/* Haynes Engineering & Excavation */
:root {
  --orange: #f7671e;
  --orange-dark: #b94a0f;     /* accessible orange for text on light backgrounds */
  --charcoal: #191b1a;
  --charcoal-2: #242725;
  --ink: #222524;
  --muted: #5b605d;
  --line: #e3e1dc;
  --bg: #ffffff;
  --bg-alt: #f5f3ef;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-dark); }
a:hover { color: var(--charcoal); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .6em; color: var(--charcoal); }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--orange); color: var(--charcoal); padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.icon { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.15em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.4em; border-radius: 6px; border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-sm { padding: .5em 1em; font-size: .95rem; }
.btn-primary { background: var(--orange); color: var(--charcoal); }
.btn-primary:hover { background: #ff8240; color: var(--charcoal); }
.btn-primary:disabled { background: #c9c6c0; color: #555; cursor: not-allowed; }
.btn-outline { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }
.btn-outline-dark { border-color: var(--charcoal); color: var(--charcoal); }

.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700;
  color: var(--orange-dark); margin-bottom: .6em;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--charcoal); border-bottom: 3px solid var(--orange);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }
.brand img { width: 118px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { color: #e9e7e3; text-decoration: none; font-weight: 600; }
.site-nav a:not(.btn):hover { color: var(--orange); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle .bar { display: block; width: 26px; height: 3px; margin: 5px 0; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(4) { transform: translateY(-8px) rotate(-45deg); }

/* Hero */
.hero { background: linear-gradient(160deg, var(--charcoal) 0%, var(--charcoal-2) 100%); color: #e9e7e3; padding: 72px 0 80px; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--orange); }
.hero-inner { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.lead { font-size: 1.15rem; color: #cfccc6; max-width: 38em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 0; }
.tagline { font-weight: 800; letter-spacing: .16em; text-transform: uppercase; font-size: clamp(1.15rem, 2vw, 1.6rem); line-height: 1.2; color: var(--orange); margin: 0 0 18px; text-align: center; }
.hero-media { margin: 0; }
.hero-media img { border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0,0,0,.45); width: 100%; height: auto; }

/* Stats */
.stats { background: var(--orange); color: var(--charcoal); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-grid > div { padding: 22px 16px; text-align: center; display: flex; flex-direction: column; }
.stats-grid > div + div { border-left: 1px solid rgba(25,27,26,.2); }
.stats strong { font-size: 1.2rem; font-weight: 800; }
.stats span { font-size: .92rem; }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--charcoal); color: #dedbd5; }
.section-dark h2 { color: #fff; }
.section-dark .eyebrow { color: var(--orange); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p:last-child { color: var(--muted); }
.section-dark .section-head p:last-child { color: #bdb9b2; }

/* Service cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--orange);
  border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow);
}
.card-icon { width: 38px; height: 38px; fill: none; stroke: var(--orange-dark); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 14px; }
.card p { color: var(--muted); font-size: .97rem; margin: 0; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.project { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.project img { aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.project figcaption { padding: 14px 16px 18px; display: flex; flex-direction: column; }
.project figcaption strong { color: var(--charcoal); }
.project figcaption span { color: var(--muted); font-size: .95rem; }

/* About */
.about { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.about-media { margin: 0; }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.checklist li { display: flex; gap: .6em; align-items: flex-start; font-weight: 600; }
.checklist .icon { color: var(--orange-dark); stroke-width: 3; margin-top: .25em; }

/* Credentials (future) */
.credentials { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 0 0 28px; }
.credentials div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.credentials dt { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.credentials dd { margin: 4px 0 0; font-weight: 600; }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.quotes blockquote {
  margin: 0; padding: 26px 28px; background: var(--charcoal-2);
  border-left: 4px solid var(--orange); border-radius: var(--radius);
}
.quotes p { color: #e9e7e3; font-size: 1.02rem; }
.quotes p::before { content: "\201C"; }
.quotes p::after { content: "\201D"; }
.quotes footer { color: var(--orange); font-weight: 700; }
.quotes footer::before { content: "\2014\00a0"; }

/* FAQ */
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-weight: 700; font-size: 1.08rem; color: var(--charcoal);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; font-weight: 400; color: var(--orange-dark);
}
details[open] summary::after { content: "\2212"; }
details p { color: var(--muted); padding-right: 40px; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
.info-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.info-list li { display: flex; gap: .75em; align-items: flex-start; font-weight: 600; }
.info-list .icon { color: var(--orange-dark); width: 1.3em; height: 1.3em; margin-top: .1em; }
.info-list a { color: var(--charcoal); text-decoration: none; font-size: 1.15rem; }
.info-list a:hover { color: var(--orange-dark); }
.contact-form {
  background: #fff; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; }
.field label { font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field label span { color: var(--orange-dark); }
.field input, .field textarea {
  font: inherit; font-size: 1rem; padding: .7em .8em; border: 1px solid #c9c6c0; border-radius: 6px;
  background: #fff; color: var(--ink); width: 100%;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--orange-dark); box-shadow: 0 0 0 3px rgba(247,103,30,.25); }
.field textarea { resize: vertical; min-height: 140px; }
.field .invalid { border-color: #b3261e; }
.form-status { margin: 14px 0 0; font-weight: 600; min-height: 1.5em; }
.form-status.ok { color: #1f6f3a; }
.form-status.err { color: #b3261e; }
.form-status.note { color: var(--muted); }

/* Footer */
.site-footer { background: var(--charcoal); color: #bdb9b2; padding: 56px 0 0; font-size: .97rem; border-top: 3px solid var(--orange); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 36px; }
.site-footer img { width: 130px; margin-bottom: 16px; }
.site-footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: #e9e7e3; text-decoration: none; display: inline-flex; align-items: center; gap: .4em; }
.site-footer a:hover { color: var(--orange); }
.footer-bottom { border-top: 1px solid #333634; padding: 18px 20px; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer-bottom p { margin: 0; font-size: .88rem; }
.site-footer .credit { gap: .5em; font-size: .85rem; color: #bdb9b2; }
.site-footer .credit img { width: 28px; height: 35px; }
.site-footer .credit:hover { color: #fff; }

/* Simple content pages (privacy) */
.prose h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.prose .muted { color: var(--muted); }
.site-footer .footer-bottom:first-child { border-top: 0; padding-top: 0; }
.site-footer:has(.footer-bottom:first-child) { padding-top: 18px; }

/* Staging banner (only injected on the staging site) */
.staging-banner {
  background: repeating-linear-gradient(45deg, #ffd23f, #ffd23f 14px, #f5c400 14px, #f5c400 28px);
  color: #111; text-align: center; font-weight: 700; padding: 8px 16px; font-size: .9rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .projects { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--charcoal); border-bottom: 3px solid var(--orange); padding: 8px 20px 20px;
  }
  .site-nav.open { display: flex; }
  .site-nav.site-nav-static { display: flex; position: static; flex-direction: row; align-items: center; gap: 16px; padding: 0; border: 0; background: none; }
  .site-nav.site-nav-static a:not(.btn) { padding: 0; border: 0; }
  .site-nav.site-nav-static .btn { margin-top: 0; }
  .site-nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid #333634; }
  .site-nav .btn { margin-top: 14px; justify-content: center; }
  .header-inner { position: relative; }
  .hero { padding: 48px 0 56px; }
  .hero-inner, .about, .contact { grid-template-columns: 1fr; gap: 36px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid > div:nth-child(3) { border-left: 0; }
  .stats-grid > div:nth-child(n+3) { border-top: 1px solid rgba(25,27,26,.2); }
  .quotes { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .cards, .projects, .checklist, .field-row { grid-template-columns: 1fr; }
  .field-row { gap: 0; }
  .contact-form { padding: 22px 18px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
