/* ==========================================================================
   Devcon Haulage & Earthworks - stylesheet
   Vanilla CSS, mobile-first, no framework.
   ========================================================================== */

:root {
  /* Brand colours - sampled from the Devcon capability statement logo */
  --charcoal: #17181a;
  --charcoal-soft: #1f2123;
  --charcoal-line: #2c2e31;
  --taupe: #a7988d;
  --taupe-deep: #8b7c6f;
  --taupe-pale: #d9d0c6;
  --off-white: #f6f4f1;
  --white: #ffffff;
  --ink: #1c1c1c;
  --success: #4a7a52;
  --error: #b3453d;

  --font-heading: 'Arial Narrow', 'Roboto Condensed', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  --container-w: 1200px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);

  --radius: 2px;
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 800;
  margin: 0 0 0.5em;
  color: var(--charcoal);
}
p { margin: 0 0 1em; }
button { font-family: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--taupe);
  color: var(--charcoal);
  padding: 0.75em 1.25em;
  z-index: 200;
}
.skip-link:focus { left: 0; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.9em 1.9em;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--taupe);
  color: var(--charcoal);
}
.btn-primary:hover { background: var(--taupe-pale); }
.btn-outline {
  border-color: var(--taupe);
  color: var(--white);
}
.btn-outline:hover { background: var(--taupe); color: var(--charcoal); }
.btn-ghost {
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
.btn-block { width: 100%; text-align: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---------- Section headings ---------- */
.section-eyebrow {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--taupe-deep);
  margin-bottom: 0.75em;
}
.section-eyebrow--light { color: var(--taupe); }
.section-title { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.section-title--light { color: var(--white); }
.section-lead { max-width: 42em; color: #4a4a4a; font-size: 1.05rem; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--charcoal);
  border-bottom: 1px solid var(--charcoal-line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; height: 100%; }
.brand-logo { height: 42px; width: auto; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--white);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.primary-nav {
  position: fixed;
  inset: 76px 0 0 0;
  background: var(--charcoal);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 2rem clamp(1.25rem, 6vw, 3rem);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.primary-nav.is-open { transform: translateX(0); }
.primary-nav ul {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.nav-link {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--white);
  border-bottom: 1px solid var(--charcoal-line);
  padding-bottom: 0.75rem;
  display: inline-block;
}
.nav-cta { align-self: flex-start; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .primary-nav {
    position: static;
    inset: auto;
    transform: none;
    flex-direction: row;
    align-items: center;
    background: transparent;
    padding: 0;
    overflow: visible;
  }
  .primary-nav ul {
    flex-direction: row;
    gap: 2.25rem;
    margin-bottom: 0;
    margin-right: 2.25rem;
  }
  .nav-link {
    font-size: 0.95rem;
    border-bottom: none;
    padding-bottom: 0;
    position: relative;
  }
  .nav-link::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 2px;
    background: var(--taupe);
    transform: scaleX(0);
    transition: transform 0.2s ease;
  }
  .nav-link:hover::after { transform: scaleX(1); }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 70%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(15, 15, 16, 0.92) 0%, rgba(15, 15, 16, 0.72) 42%, rgba(15, 15, 16, 0.35) 75%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-block: 8rem 6rem;
}
.hero-title {
  color: var(--white);
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  line-height: 0.98;
  margin-bottom: 0.5em;
}
.hero-sub {
  max-width: 34em;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--taupe-pale);
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-diagonal {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 90px;
  background: var(--off-white);
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 100%);
  z-index: 1;
}
@media (min-width: 700px) {
  .hero-diagonal { height: 140px; }
}

/* ==========================================================================
   Services
   ========================================================================== */
.services { padding-block: 5rem; }
.service-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  margin-top: 3rem;
}
@media (min-width: 700px) {
  .service-cards { grid-template-columns: 1fr 1fr; }
}
.service-card {
  background: var(--white);
  border: 1px solid #e7e2db;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease;
}
.service-card:hover { transform: translateY(-4px); }
.service-card-media { aspect-ratio: 16 / 10; overflow: hidden; }
.service-card-media img { width: 100%; height: 100%; object-fit: cover; }
.service-card-body { padding: 1.75rem; }
.service-card-body h3 { font-size: 1.5rem; margin-bottom: 0.4em; }
.card-link {
  display: inline-block;
  margin-top: 0.5em;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--taupe-deep);
  border-bottom: 2px solid transparent;
}
.card-link:hover { border-color: var(--taupe-deep); }

/* ==========================================================================
   Why Devcon
   ========================================================================== */
.why-devcon {
  background: var(--charcoal);
  padding-block: 5rem;
  position: relative;
  clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
}
.pillar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
}
@media (min-width: 800px) {
  .pillar-grid { grid-template-columns: repeat(3, 1fr); }
}
.pillar { border-top: 3px solid var(--taupe); padding-top: 1.25rem; }
.pillar-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  color: var(--taupe);
  margin-bottom: 1rem;
}
.pillar-icon svg { width: 100%; height: 100%; }
.pillar h3 { color: var(--white); font-size: 1.4rem; }
.pillar p { color: #c9c5bf; }

/* ==========================================================================
   About
   ========================================================================== */
.about { padding-block: 6rem 5rem; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}
@media (min-width: 900px) {
  .about-grid { grid-template-columns: 1.15fr 0.85fr; }
}
.about-media {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.about-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}
.pull-quote {
  margin: 2rem 0;
  padding: 1.5rem 1.75rem;
  border-left: 4px solid var(--taupe);
  background: var(--white);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-stretch: condensed;
  color: var(--charcoal);
  box-shadow: var(--shadow-md);
}
.about-subhead { margin-top: 2rem; font-size: 1.15rem; }
.check-list li {
  position: relative;
  padding-left: 1.75em;
  margin-bottom: 0.6em;
}
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  background: var(--taupe);
}

/* ==========================================================================
   Safety strip
   ========================================================================== */
.safety-strip {
  position: relative;
  color: var(--white);
  overflow: hidden;
}
.safety-media { position: absolute; inset: 0; z-index: 0; }
.safety-media img { width: 100%; height: 100%; object-fit: cover; }
.safety-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 16, 17, 0.88), rgba(15, 16, 17, 0.8));
  z-index: 1;
}
.safety-inner { position: relative; z-index: 2; padding-block: 4.5rem; }
.safety-title {
  color: var(--white);
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  margin-bottom: 2rem;
}
.safety-points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 800px) {
  .safety-points { grid-template-columns: repeat(3, 1fr); }
}
.safety-point { border-top: 2px solid var(--taupe); padding-top: 1rem; }
.safety-point strong {
  display: block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1.1rem;
  margin-bottom: 0.35em;
}
.safety-point span { color: #d6d2cc; font-size: 0.95rem; }

/* ==========================================================================
   Service area
   ========================================================================== */
.service-area { padding-block: 5rem; }
.service-area-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}
@media (min-width: 800px) {
  .service-area-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}
.state-chips { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.state-chip {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7em 1.3em;
  background: var(--charcoal);
  color: var(--white);
  border-radius: var(--radius);
}
.state-chip--muted {
  background: transparent;
  color: var(--taupe-deep);
  border: 2px solid var(--taupe);
}

/* ==========================================================================
   CTA strip
   ========================================================================== */
.cta-strip {
  background: linear-gradient(120deg, var(--taupe-deep), var(--taupe));
  padding-block: 4rem;
}
.cta-inner { text-align: center; max-width: 40em; margin-inline: auto; }
.cta-inner h2 {
  color: var(--charcoal);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}
.cta-inner p { color: #2c2620; margin-bottom: 1.5rem; }
.cta-inner .btn-primary { background: var(--charcoal); color: var(--white); }
.cta-inner .btn-primary:hover { background: #000; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact { padding-block: 6rem; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 0.85fr 1.15fr; }
}
.contact-list { margin-top: 2rem; }
.contact-list li {
  border-top: 1px solid #ddd6cb;
  padding-block: 1rem;
}
.contact-list li:last-child { border-bottom: 1px solid #ddd6cb; }
.contact-label {
  display: block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--taupe-deep);
  margin-bottom: 0.3em;
}
.contact-list a { font-size: 1.15rem; }
.contact-list a:hover { color: var(--taupe-deep); }

.contact-form {
  background: var(--white);
  border: 1px solid #e7e2db;
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-md);
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-row { margin-bottom: 1.25rem; }
.form-row--half {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 560px) {
  .form-row--half { grid-template-columns: 1fr 1fr; }
}
label {
  display: block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.4em;
  color: var(--charcoal);
}
input, select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75em 0.9em;
  border: 1.5px solid #cfc8bc;
  border-radius: var(--radius);
  background: var(--off-white);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--taupe-deep);
  background: var(--white);
}
input:invalid[data-touched="true"], select:invalid[data-touched="true"], textarea:invalid[data-touched="true"] {
  border-color: var(--error);
}
.form-error {
  display: block;
  color: var(--error);
  font-size: 0.82rem;
  margin-top: 0.35em;
  min-height: 1.1em;
}
.form-status {
  margin-top: 1rem;
  font-weight: 600;
  text-align: center;
}
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--error); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--charcoal); color: #cfcbc4; }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-block: 4rem 3rem;
}
@media (min-width: 700px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-logo { height: 34px; width: auto; margin-bottom: 1rem; }
.footer-tagline {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--taupe);
  font-size: 0.95rem;
}
.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.footer-col li { margin-bottom: 0.6em; }
.footer-col a:hover { color: var(--taupe); }

.footer-bottom { border-top: 1px solid var(--charcoal-line); }
.footer-bottom-inner {
  padding-block: 1.5rem;
  font-size: 0.85rem;
  color: #918d87;
}

/* ==========================================================================
   Back to top
   ========================================================================== */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--charcoal);
  color: var(--white);
  border: 1px solid var(--charcoal-line);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.2s ease;
}
.back-to-top svg { width: 20px; height: 20px; }
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover { background: var(--taupe-deep); }
@media (min-width: 700px) {
  .back-to-top { right: 2rem; bottom: 2rem; }
}
