/* Walling Contracting Ltd — base styles
   Palette drawn from the fleet: charcoal/black livery, paddock green, warm dusk light. */

:root {
  --dark: #171b16;
  --dark-2: #23291f;
  --green: #4a7c3a;
  --green-dark: #33562a;
  --cream: #f6f5ef;
  --white: #ffffff;
  --muted: #5b645c;
  --border: #e3e2d9;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(15, 20, 12, 0.15);
  --max-width: 1180px;
  --font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--dark);
  color: var(--white);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 1000;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

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

.wrap {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  color: var(--white);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.brand-name em {
  font-style: normal;
  font-weight: 400;
  color: #cfd6c9;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: var(--white);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.nav-toggle-bars {
  top: 21px;
}

.nav-toggle-bars::before {
  top: -7px;
}

.nav-toggle-bars::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-7px) rotate(-45deg);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  text-decoration: none;
  color: #e8ebe4;
  font-weight: 500;
  font-size: 0.95rem;
}

.primary-nav a:hover {
  color: var(--white);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}

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

.btn-small {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  background: var(--green);
  color: var(--white);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 65%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 8, 0.55) 0%,
    rgba(10, 14, 8, 0.35) 35%,
    rgba(10, 14, 8, 0.85) 100%
  );
}

.hero-content {
  position: relative;
  padding-block: 4rem 4.5rem;
  max-width: 760px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green);
  margin: 0 0 0.75rem;
}

.hero .eyebrow {
  color: #b9d9a8;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 1.1rem;
}

.hero-lede {
  font-size: 1.1rem;
  color: #e9ede4;
  margin: 0 0 2rem;
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Sections ---------- */

.section {
  padding-block: 5rem;
}

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

.section h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  margin: 0 0 1rem;
}

.section-lede {
  color: var(--muted);
  max-width: 62ch;
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* ---------- Services ---------- */

.service-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.service-card--wide {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}

.service-card--wide p {
  color: #cfd6c9;
}

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(74, 124, 58, 0.12);
  color: var(--green);
  margin-bottom: 1rem;
}

.service-card--wide .service-icon {
  background: rgba(255, 255, 255, 0.12);
  color: #b9d9a8;
}

.service-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-copy p {
  color: var(--dark-2);
}

.about-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- Gallery ---------- */

.gallery-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--dark);
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.06);
}

/* ---------- Video ---------- */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.video-item {
  margin: 0;
}

.video-player {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  background: var(--dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.video-item figcaption {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Contact ---------- */

.section-contact {
  background: var(--dark);
  color: var(--white);
}

.section-contact .eyebrow {
  color: #b9d9a8;
}

.section-contact .section-lede {
  color: #cfd6c9;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-social h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.social-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  transition: background-color 0.15s ease;
}

.social-list a:hover {
  background: rgba(255, 255, 255, 0.18);
}

.social-list svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--dark-2);
  color: #cfd6c9;
  padding-block: 1.5rem;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.footer-inner p {
  margin: 0;
}

.footer-credit {
  color: #8b9385;
}

/* ---------- 404 page ---------- */

.not-found {
  text-align: center;
  padding-block: 6rem;
}

.centered {
  margin-inline: auto;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 6, 0.9);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 1100px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-dialog img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: var(--white);
  margin-top: 0.9rem;
  font-size: 0.95rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
  left: -1rem;
}

.lightbox-next {
  right: -1rem;
}

@media (max-width: 720px) {
  .lightbox-prev {
    left: 0.25rem;
  }
  .lightbox-next {
    right: 0.25rem;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-media {
    order: -1;
  }
}

@media (max-width: 700px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .primary-nav {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--dark);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.2s ease;
  }

  .primary-nav.is-open {
    transform: translateX(0);
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .primary-nav ul li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .primary-nav ul a {
    display: block;
    padding: 1rem 0.25rem;
    font-size: 1.05rem;
  }

  .primary-nav .btn-small {
    text-align: center;
  }

  .hero {
    min-height: 100vh;
    align-items: center;
  }

  .section {
    padding-block: 3.5rem;
  }
}
