/* =====================================================================
   Rams Contracting, Ltd. - one-page marketing site
   Order: tokens > base > utilities > header > sections (page order)
          > lightbox > responsive
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --orange: #F0A552;
  --orange-dark: #DE8E3A;
  --orange-text: #B8732A;
  --brown: #765229;
  --charcoal: #262622;
  --ink: #1D1D1A;
  --text: #5A5A54;
  --cream: #F8F5F0;
  --line: #E5DFD5;
  --white: #FFFFFF;
  --error: #C2452D;

  --font-heading: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-pad: clamp(80px, 11vw, 150px);
  --header-h: 84px;
  --header-h-scrolled: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.is-locked {
  overflow: hidden;
}

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

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--brown);
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.25;
}

/* Breathing room between a heading and the copy that follows it */
h1 + p,
h2 + p,
h2 + ul,
h2 + div {
  margin-top: 1.4rem;
}

p {
  margin: 0 0 1.2em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
}

section[id],
footer[id] {
  scroll-margin-top: 80px;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  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: 16px;
  top: -100px;
  z-index: 300;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--white);
  font: 600 0.85rem/1 var(--font-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- 3. Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
  background: var(--white);
}

.section--cream {
  background: var(--cream);
}

.section--dark {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.75);
}

.section--dark h2,
.section--dark h3 {
  color: var(--white);
}

.section--compact {
  padding-block: clamp(64px, 8vw, 110px);
}

.section--bordered {
  border-top: 1px solid var(--line);
}

.h2-sm {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.5rem;
  font: 600 0.78rem/1 var(--font-heading);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange-text);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  flex-shrink: 0;
  background: var(--orange);
}

.hero .eyebrow,
.section--dark .eyebrow {
  color: var(--orange);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 0.8rem/1 var(--font-heading);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease), opacity 0.25s ease;
}

.btn-primary {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.btn-ghost {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-outline {
  background: transparent;
  border-color: var(--orange);
  color: var(--orange);
}

.btn-outline:hover {
  background: var(--orange);
  color: var(--ink);
}

/* Shared media frames */
.media-frame {
  margin: 0;
  overflow: hidden;
  background: var(--cream);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-portrait {
  aspect-ratio: 4 / 5;
}

.media-landscape {
  aspect-ratio: 4 / 3;
}

/* Two-column layout used by several sections */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
}

.split-media {
  position: relative;
}

/* Scroll reveal (only hidden when JavaScript is running) */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Cards keep a separate, undelayed border transition for hover */
.js .service-card.reveal {
  transition: opacity 0.8s var(--ease) var(--d, 0s), transform 0.8s var(--ease) var(--d, 0s), border-color 0.3s ease;
}

.js .service-card.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 4. Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: height 0.35s var(--ease), background-color 0.35s ease, box-shadow 0.35s ease;
}

.site-header.is-scrolled {
  height: var(--header-h-scrolled);
  background: var(--white);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: block;
  line-height: 0;
  position: relative;
  z-index: 110;
}

.logo-img {
  height: 58px;
  width: auto;
  transition: height 0.35s var(--ease);
}

.logo-img--color {
  display: none;
}

.site-header.is-scrolled .logo-img--white {
  display: none;
}

.site-header.is-scrolled .logo-img--color {
  display: block;
}

.site-header.is-scrolled .logo-img {
  height: 48px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(28px, 3.2vw, 48px);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(22px, 2.6vw, 40px);
  list-style: none;
}

.nav-link {
  position: relative;
  padding: 8px 0;
  font: 500 0.82rem/1 var(--font-heading);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--white);
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.site-header.is-scrolled .nav-link {
  color: var(--ink);
}

.nav-cta {
  padding: 12px 24px;
  font-size: 0.76rem;
}

.site-header.is-scrolled .nav-cta {
  color: var(--orange-text);
}

.site-header.is-scrolled .nav-cta:hover {
  color: var(--ink);
}

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--header-h) + 60px) 120px;
  color: var(--white);
  background-color: var(--charcoal);
  background-image:
    linear-gradient(180deg, rgba(20, 20, 18, 0.55) 0%, rgba(20, 20, 18, 0.35) 40%, rgba(20, 20, 18, 0.75) 100%),
    url("../images/hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-content {
  max-width: 760px;
}

.hero h1 {
  color: var(--white);
}

.hero-lead {
  max-width: 600px;
  margin-top: 1.75rem;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2.5rem;
}

.hero .btn-primary:hover {
  color: var(--ink);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font: 500 0.7rem/1 var(--font-heading);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
}

.scroll-cue-line {
  position: relative;
  width: 1px;
  height: 44px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
}

.scroll-cue-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 40%;
  background: var(--white);
  transform: translateY(-100%);
  animation: scroll-cue 2.2s var(--ease) infinite;
}

@keyframes scroll-cue {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(250%);
  }
}

/* ---------- 6. Approach ---------- */
.approach-overlay {
  position: absolute;
  left: -6%;
  bottom: -7%;
  width: 42%;
  border: 8px solid var(--white);
  background: var(--white);
}

.approach-overlay img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.statement {
  margin: 2.5rem 0;
  padding-left: 24px;
  border-left: 3px solid var(--orange);
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--brown);
}

.lead-in {
  font-weight: 500;
  color: var(--ink);
}

.split-text .btn {
  margin-top: 0.5rem;
}

/* ---------- 7. Services ---------- */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.section-head--split {
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  gap: 60px;
}

.section-head--split > div {
  max-width: 640px;
}

.section-intro {
  max-width: 400px;
  margin: 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  display: flex;
  flex-direction: column;
  padding: 40px;
  background: var(--white);
  border: 1px solid var(--line);
  transition: border-color 0.3s ease;
}

.service-card:hover {
  border-color: var(--orange);
}

.service-num {
  display: block;
  margin-bottom: 2rem;
  font: 500 3rem/1 var(--font-heading);
  color: var(--orange);
}

.service-card h3 {
  margin-bottom: 14px;
}

.service-card p {
  margin: 0;
}

/* ---------- 8. Gallery (centrepiece) ---------- */
.gallery-head {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.gallery-sub {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

.gallery-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.gallery-arrow {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.gallery-arrow svg,
.lightbox-nav svg,
.lightbox-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-arrow:not(:disabled):hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.gallery-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.gallery-counter {
  min-width: 84px;
  text-align: center;
  font: 500 0.95rem/1 var(--font-heading);
  letter-spacing: 0.14em;
  color: var(--white);
}

.gallery-track {
  list-style: none;
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding-block: 4px;
  padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
  /* Snap slides to the padded edge so the first photo lines up with the page content */
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-track.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.gallery-slide {
  flex: 0 0 auto;
  height: clamp(320px, 62vh, 620px);
  scroll-snap-align: start;
}

.gallery-item {
  position: relative;
  display: block;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #111;
  color: inherit;
  cursor: zoom-in;
}

.gallery-item img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
  -webkit-user-drag: none;
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 56px 20px 18px;
  background: linear-gradient(180deg, rgba(20, 20, 18, 0) 0%, rgba(20, 20, 18, 0.78) 100%);
  color: var(--white);
  font: 500 0.85rem/1.3 var(--font-heading);
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s var(--ease);
}

.gallery-item:focus-visible .gallery-caption {
  opacity: 1;
  transform: none;
}

@media (hover: hover) {
  .gallery-track {
    cursor: grab;
  }

  .gallery-item:hover img {
    transform: scale(1.04);
  }

  .gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: none;
  }
}

@media (hover: none) {
  .gallery-caption {
    opacity: 1;
    transform: none;
    padding: 40px 14px 12px;
    font-size: 0.72rem;
  }
}

.gallery-progress {
  position: relative;
  height: 2px;
  margin-top: 44px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
}

.gallery-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--orange);
}

/* ---------- 9. Fleet ---------- */
.feature-list {
  list-style: none;
  border-bottom: 1px solid var(--line);
}

.feature-item {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.feature-item h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
  color: var(--ink);
}

.feature-item p {
  margin: 0;
}

/* ---------- 10. Projects ---------- */
.project-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  list-style: none;
  margin-top: 0.5rem;
}

.project-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font: 500 1.05rem/1.3 var(--font-heading);
  color: var(--ink);
}

.project-list li::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background: var(--orange);
}

/* ---------- 11. About ---------- */
.about-intro {
  max-width: 820px;
  margin: 0 auto clamp(56px, 7vw, 96px);
  text-align: center;
}

.about-intro .eyebrow {
  justify-content: center;
}

.pull-quote {
  margin: 0 0 clamp(64px, 8vw, 110px);
  padding: clamp(48px, 7vw, 96px);
  background: var(--charcoal);
  color: var(--white);
}

.pull-quote::before,
.pull-quote-body::before {
  content: "\201C";
  display: block;
  height: 0.6em;
  margin-bottom: 0.2em;
  font: 500 clamp(5rem, 9vw, 8rem)/1 var(--font-heading);
  color: var(--orange);
}

.pull-quote blockquote {
  margin: 0;
  max-width: 980px;
}

.pull-quote--photo {
  display: grid;
  grid-template-columns: minmax(240px, 380px) 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.pull-quote--photo::before {
  content: none;
}

.pull-quote-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
}

@media (max-width: 860px) {
  .pull-quote--photo {
    grid-template-columns: 1fr;
  }

  .pull-quote-photo {
    max-width: 320px;
  }
}

.pull-quote blockquote p {
  margin: 0;
  font: 400 clamp(1.4rem, 2.6vw, 2rem)/1.4 var(--font-heading);
  color: var(--white);
}

.pull-quote figcaption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 36px;
}

.pull-quote cite {
  font: 600 1rem/1.2 var(--font-heading);
  font-style: normal;
  letter-spacing: 0.04em;
  color: var(--white);
}

.quote-role {
  font: 600 0.75rem/1.2 var(--font-heading);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
}

.about-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
}

.about-columns h3 {
  margin-bottom: 16px;
}

/* One remaining column: centre it instead of leaving it in half the grid */
.about-columns--single {
  grid-template-columns: 1fr;
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

/* Keep the fleet photo in view beside the long tools list on wide screens */
#fleet .split {
  align-items: start;
}

#fleet .media-frame {
  position: sticky;
  top: 110px;
}

/* ---------- 12. Certifications ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  list-style: none;
}

.cert-tile {
  display: flex;
  align-items: center;
  min-height: 92px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--white);
  font: 500 0.98rem/1.35 var(--font-heading);
  color: var(--ink);
}

/* ---------- 12b. Careers (full-bleed photo band) ---------- */
.careers {
  position: relative;
  color: var(--white);
  background-color: var(--charcoal);
  background-image:
    linear-gradient(90deg, rgba(20, 20, 18, 0.88) 0%, rgba(20, 20, 18, 0.7) 55%, rgba(20, 20, 18, 0.35) 100%),
    url("../images/gallery/05-demolition-5.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.careers-content {
  max-width: 640px;
}

.careers .eyebrow {
  color: var(--orange);
}

.careers h2 {
  color: var(--white);
}

.careers-lead {
  margin-top: 1.75rem;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
}

.careers-content .btn {
  margin-top: 2.5rem;
}

/* ---------- 13. Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(40px, 7vw, 110px);
  align-items: start;
}

.contact-intro p {
  max-width: 460px;
}

.location {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  font: 500 1rem/1.4 var(--font-heading);
  color: var(--ink);
}

.location svg {
  flex-shrink: 0;
  color: var(--brown);
}

.location--phone {
  display: flex;
  margin-top: 12px;
}

.location--phone a {
  color: inherit;
  text-decoration: none;
}

.location--phone a:hover,
.location--phone a:focus-visible {
  color: var(--brown);
}

.footer-col .footer-phone {
  margin-top: 10px;
}

.footer-phone a {
  color: inherit;
  text-decoration: none;
}

.footer-phone a:hover,
.footer-phone a:focus-visible {
  color: var(--orange);
}

.contact-card {
  padding: clamp(28px, 4vw, 56px);
  background: var(--white);
  border: 1px solid var(--line);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.field label {
  font: 500 0.85rem/1.2 var(--font-heading);
  letter-spacing: 0.04em;
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  font: 400 16px/1.4 var(--font-body);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #A3A196;
  opacity: 1;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231D1D1A' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  cursor: pointer;
}

.field select:invalid {
  color: #8A8A82;
}

.field select option {
  color: var(--ink);
}

.field textarea {
  min-height: 150px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--orange);
  outline-offset: 0;
  border-color: transparent;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea {
  border-color: var(--error);
}

.field-error {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--error);
}

.form-status {
  margin: 0 0 20px;
  padding: 12px 16px;
  background: var(--cream);
  border-left: 3px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

.form-status:empty {
  display: none;
}

.form-status.is-error {
  border-left-color: var(--error);
  color: var(--error);
}

.form-actions {
  margin-top: 8px;
}

.form-success {
  padding: 16px 0;
}

.form-success:focus {
  outline: none;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
  font: 600 1.6rem/1 var(--font-heading);
}

.form-success h3 {
  margin-bottom: 12px;
  font-size: 1.6rem;
}

.form-success p {
  margin: 0;
}

/* ---------- 14. Footer ---------- */
.site-footer {
  padding-top: clamp(72px, 8vw, 110px);
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr auto;
  gap: 48px;
  align-items: start;
}

.footer-brand img {
  width: auto;
  height: 56px;
  margin-bottom: 24px;
}

.footer-brand p {
  max-width: 340px;
  margin: 0;
}

.footer-heading {
  margin-bottom: 18px;
  font: 600 0.78rem/1 var(--font-heading);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
}

.footer-col p,
.footer-address {
  margin: 0;
  font-style: normal;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
}

.footer-links li + li {
  margin-top: 10px;
}

.footer-links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-col--cta .btn {
  white-space: normal;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 72px;
  padding-block: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 0;
}

/* ---------- 15. Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 32px;
  background: rgba(15, 15, 13, 0.94);
  color: var(--white);
  animation: lightbox-in 0.3s ease;
}

@keyframes lightbox-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.lightbox-close:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin: 0;
  max-width: 100%;
}

.lightbox-img {
  width: auto;
  height: auto;
  max-width: min(92vw, calc(100vw - 240px));
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  font: 500 0.85rem/1.3 var(--font-heading);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

.lightbox-counter {
  color: var(--orange);
  letter-spacing: 0.14em;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.lightbox-prev {
  left: 0;
}

.lightbox-next {
  right: 0;
}

.lightbox-nav:not(:disabled):hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ---------- 16. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal,
  .js .service-card.reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 17. Responsive ---------- */

/* <= 1100px: tighter gaps */
@media (max-width: 1100px) {
  .split {
    gap: 60px;
  }

  .service-card {
    padding: 32px;
  }

  .footer-grid {
    gap: 36px;
  }

  /* Five header links: pull them in slightly so they fit beside the logo and CTA */
  .nav-list {
    gap: 22px;
  }

  .nav-link {
    letter-spacing: 0.08em;
  }
}

/* 768px to 1024px: tablet. Inline nav stays on one row with tighter spacing */
@media (min-width: 768px) and (max-width: 1024px) {
  .primary-nav {
    gap: 16px;
  }

  .nav-list {
    gap: 16px;
  }

  .nav-link {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }

  .nav-cta {
    padding: 10px 16px;
    font-size: 0.7rem;
  }

  .logo-img,
  .site-header.is-scrolled .logo-img {
    height: 44px;
  }
}

/* <= 960px: tablet. Single-column layouts */
@media (max-width: 960px) {
  .split {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .media-portrait {
    aspect-ratio: 4 / 3;
  }

  .section-head--split {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .section-intro {
    max-width: 560px;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-grid > .service-card:last-child {
    grid-column: 1 / -1;
  }

  .cert-grid {
    grid-template-columns: 1fr 1fr;
  }

  #fleet .media-frame {
    position: static;
  }

  .about-columns {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-intro p {
    max-width: 600px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .gallery-slide {
    height: min(50vh, 520px);
  }

  .lightbox-img {
    max-width: min(92vw, calc(100vw - 200px));
  }
}

/* <= 767px: phones. Two-row header: logo + Contact Us on top, all links in a swipeable row below */
@media (max-width: 767px) {
  :root {
    --header-h: 96px;
    --header-h-scrolled: 96px;
  }

  section[id],
  footer[id] {
    scroll-margin-top: 100px;
  }

  .header-inner {
    flex-wrap: wrap;
    row-gap: 2px;
  }

  .logo-img,
  .site-header.is-scrolled .logo-img {
    height: 40px;
  }

  .primary-nav {
    display: contents;
  }

  .nav-cta {
    order: 2;
    margin-left: auto;
    padding: 9px 16px;
    font-size: 0.68rem;
  }

  .nav-list {
    order: 3;
    flex: 0 0 100%;
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-list::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    font-size: 0.66rem;
    letter-spacing: 0.04em;
  }
}

/* <= 640px: phones */
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .section {
    padding-block: 72px;
  }

  .gallery-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo-img,
  .site-header.is-scrolled .logo-img {
    height: 40px;
  }

  .site-header.is-scrolled {
    height: var(--header-h-scrolled);
  }

  .careers {
    background-image:
      linear-gradient(rgba(20, 20, 18, 0.78), rgba(20, 20, 18, 0.78)),
      url("../images/gallery/05-demolition-5.jpg");
  }

  .hero {
    padding-block: calc(var(--header-h) + 24px) 56px;
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .hero .eyebrow {
    letter-spacing: 0.12em;
    font-size: 0.7rem;
  }

  .hero-lead {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .scroll-cue {
    display: none;
  }

  .approach-overlay {
    position: relative;
    left: auto;
    bottom: auto;
    width: 46%;
    margin: -48px 0 0 auto;
  }

  .split-media {
    padding-bottom: 0;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: 32px 26px;
  }

  .service-num {
    margin-bottom: 1.25rem;
  }

  .gallery-arrow {
    width: 44px;
    height: 44px;
  }

  .gallery-controls {
    gap: 10px;
  }

  .gallery-counter {
    min-width: 70px;
    font-size: 0.85rem;
  }

  .gallery-slide {
    width: 84vw;
    height: min(105vw, 520px);
  }

  .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .cert-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .cert-tile {
    min-height: 84px;
    padding: 18px;
    font-size: 0.92rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-card {
    padding: 28px 22px;
  }

  .field {
    margin-bottom: 18px;
  }

  .pull-quote {
    padding: 48px 26px;
  }

  .pull-quote::before,
  .pull-quote-body::before {
    font-size: 5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-bottom {
    margin-top: 48px;
  }

  .lightbox {
    padding: 64px 12px 96px;
  }

  .lightbox-stage {
    align-items: flex-start;
  }

  .lightbox-figure {
    margin-top: 12px;
  }

  .lightbox-img {
    max-width: 92vw;
    max-height: 66vh;
  }

  .lightbox-nav {
    top: auto;
    bottom: 22px;
    transform: none;
    width: 48px;
    height: 48px;
  }

  .lightbox-prev {
    left: 16px;
  }

  .lightbox-next {
    right: 16px;
  }

  .lightbox-close {
    top: 14px;
    right: 14px;
  }
}

/* ---------- Map ---------- */
.map-embed {
  margin-top: 28px;
  max-width: 460px;
}

.map-frame {
  height: 200px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--charcoal);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-link {
  display: inline-block;
  margin-top: 12px;
  font: 600 0.78rem/1.2 var(--font-heading);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-text);
}
