/* ============================================================
   FONTS — self-hosted
   ============================================================ */
@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("/assets/fonts/open-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans";
  src: url("/assets/fonts/open-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   CUSTOM PROPERTIES — from Project Variables
   ============================================================ */
:root {
  --color-primary: #212d45;
  --color-secondary: #4b4f58;
  --color-accent: #ffc03d;
  --color-accent-dark: #f8b526;
  --color-bg-light: #f5f5f5;
  --color-bg-alt: #f2f5f7;
  --color-white: #ffffff;
  --font-heading: "Montserrat", sans-serif;
  --font-body: "Open Sans", sans-serif;
  --container-max: 1240px;
  --container-pad: clamp(1rem, 5vw, 2rem);
  --header-height: 4.5rem;
}

/* ============================================================
   RESET
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--color-secondary);
  background-color: var(--color-white);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul[role="list"] {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.3;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

main {
  flex: 1;
}

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  background-color: var(--color-accent);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: var(--color-accent-dark);
  transform: translateY(-2px);
}

.section-intro {
  max-width: 52rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: var(--color-primary);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-white);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.site-logo span {
  color: var(--color-accent);
}

/* Nav — mobile: hidden until .nav-open */
.nav-list {
  display: none;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background-color: var(--color-primary);
  border-bottom: 2px solid var(--color-accent);
  padding: 1rem var(--container-pad);
}

.site-header.nav-open .nav-list {
  display: flex;
}

.nav-link {
  display: block;
  padding: 0.625rem 0;
  font-size: 1rem;
  color: var(--color-white);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-link[aria-current="page"] {
  color: var(--color-accent);
  font-weight: 700;
}

/* Nav — tablet and up: horizontal inline, centered */
@media (min-width: 768px) {
  .header-inner {
    justify-content: center;
  }

  .nav-list {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    position: static;
    border: none;
    padding: 0;
    background: transparent;
  }

  .nav-link {
    padding: 0;
  }
}

/* Hamburger toggle button */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  padding: 0.25rem;
  flex-shrink: 0;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-white);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

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

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

/* ============================================================
   HERO (homepage)
   ============================================================ */
.hero {
  background-image: linear-gradient(rgba(33, 45, 69, 0.85), rgba(33, 45, 69, 0.85)),
    url("/assets/images/tranquil-backyard-with-wooden-deck-and-shed.webp");
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  padding-block: clamp(3rem, 8vw, 6rem);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  color: var(--color-white);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  margin-bottom: 1.75rem;
  max-width: 36rem;
}

/* ============================================================
   FEATURE BANNER (below hero)
   ============================================================ */
.hero-features-banner {
  background-color: var(--color-primary);
  border-top: 3px solid var(--color-accent);
  color: var(--color-white);
  padding-block: 2rem;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.hero-features img {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .hero-features {
    flex-direction: row;
    gap: 2.5rem;
  }

  .hero-features li {
    flex: 1;
  }
}

/* ============================================================
   PAGE BANNER (inner pages)
   ============================================================ */
.page-banner {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding-block: clamp(3rem, 7vw, 5rem);
  text-align: center;
}

.page-banner h1 {
  color: var(--color-white);
  font-size: clamp(2.25rem, 6vw, 4rem);
  margin-bottom: 1rem;
}

.page-banner p {
  max-width: 52rem;
  margin-inline: auto;
}

.page-banner .btn {
  margin-top: 1.75rem;
}

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.home-services,
.home-projects,
.testimonials,
.home-team,
.services-list,
.about-content,
.gallery-section,
.policy-content,
.contact-page {
  padding-block: clamp(3rem, 7vw, 5rem);
}

.home-services h2,
.home-projects h2,
.testimonials h2,
.home-team h2 {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1.5rem;
}

/* ============================================================
   HOME — SERVICES
   ============================================================ */
.home-services {
  background-color: var(--color-bg-light);
}

.home-services-grid {
  display: grid;
  gap: 1.5rem;
}

.service-card {
  background-color: var(--color-white);
  box-shadow: 0 2px 12px rgba(33, 45, 69, 0.08);
  overflow: hidden;
}

.service-card img {
  width: 100%;
  object-fit: cover;
}

.service-card h2,
.service-card h3 {
  font-size: 1.35rem;
  padding: 1.25rem 1.25rem 0.5rem;
  text-align: center;
}

.service-card p {
  padding: 0 1.25rem 1.5rem;
  text-align: center;
}

.home-services-grid .service-card h3 {
  padding-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .home-services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   HOME — ABOUT / MISSION
   ============================================================ */
.home-about {
  background-image: linear-gradient(rgba(33, 45, 69, 0.9), rgba(33, 45, 69, 0.9)),
    url("/assets/images/construction-site-discussion-with-safety-helmets.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--color-white);
  padding-block: clamp(3rem, 7vw, 5rem);
}

.home-about h2 {
  color: var(--color-white);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1.25rem;
}

.home-about-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.home-about-content .btn {
  margin-top: 1.5rem;
}

@media (min-width: 1024px) {
  .home-about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
  margin-block: 3rem;
}

.counter-number {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--color-accent);
  line-height: 1.1;
}

.counter-label {
  font-size: 1rem;
  margin-top: 0.375rem;
}

.home-mission {
  text-align: center;
  max-width: 56rem;
  margin-inline: auto;
}

/* ============================================================
   HOME — PROJECTS
   ============================================================ */
.projects-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.projects-grid img {
  width: 100%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Horizontally scrollable strip of past project photos */
.projects-carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.75rem;
}

.projects-carousel img {
  width: min(70vw, 17rem);
  flex-shrink: 0;
  scroll-snap-align: start;
  object-fit: cover;
}

.projects-carousel:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ============================================================
   HOME — TESTIMONIALS
   ============================================================ */
.testimonials {
  background-color: var(--color-bg-alt);
}

.testimonials-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.testimonial {
  background-color: var(--color-white);
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(33, 45, 69, 0.08);
  border-top: 4px solid var(--color-accent);
}

.testimonial footer {
  margin-top: 1.25rem;
}

.testimonial cite {
  font-style: normal;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--color-primary);
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   HOME — TEAM
   ============================================================ */
.team-grid {
  display: grid;
  gap: 1.5rem;
}

.team-grid img {
  width: 100%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   SERVICES PAGE
   ============================================================ */
.services-list {
  background-color: var(--color-bg-light);
}

.services-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Offset anchor targets below the sticky header */
.services-grid .service-card {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-content h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin-block: 2rem 0.875rem;
}

.about-content h2:first-child {
  margin-top: 0;
}

.about-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.about-grid .about-text h2:first-child {
  margin-top: 0;
}

.about-image img {
  margin-inline: auto;
  box-shadow: 0 2px 16px rgba(33, 45, 69, 0.15);
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: 1.4fr 1fr;
  }

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

  .about-grid-reverse .about-text {
    order: 2;
  }

  .about-grid-reverse .about-image {
    order: 1;
  }
}

.values-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ============================================================
   GALLERY PAGE
   ============================================================ */
.gallery-grid {
  display: grid;
  gap: 1.5rem;
}

.gallery-grid img {
  width: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.gallery-grid a:hover img {
  transform: scale(1.02);
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   PRIVACY POLICY PAGE
   ============================================================ */
.policy-content {
  max-width: 52rem;
  margin-inline: auto;
}

.policy-content h2 {
  font-size: 1.5rem;
  margin-block: 2rem 0.75rem;
}

.policy-content ul {
  padding-left: 1.25rem;
  margin-block: 0.75rem;
}

.policy-content p + p {
  margin-top: 0.75rem;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-page-grid {
  display: grid;
  gap: 3rem;
}

.contact-info h2,
.contact-form-wrap h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin-bottom: 1.25rem;
}

.contact-info h3 {
  font-size: 1.05rem;
  margin-block: 1.25rem 0.25rem;
}

.contact-info a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.contact-social {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.contact-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.contact-social a:hover {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

@media (min-width: 1024px) {
  .contact-page-grid {
    grid-template-columns: 1fr 1.4fr;
  }
}

/* ============================================================
   CONTACT FORM (all pages)
   ============================================================ */
.contact-section {
  background-image: url("/assets/images/light-background-with-stripes.webp");
  background-size: cover;
  background-position: center;
  background-color: var(--color-bg-light);
  padding-block: clamp(3rem, 7vw, 5rem);
  scroll-margin-top: var(--header-height);
}

.contact-section h2 {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
}

.contact-form {
  max-width: 44rem;
  margin-inline: auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font: inherit;
  color: var(--color-secondary);
  background-color: var(--color-white);
  border: 1px solid #cfd4dc;
  border-radius: 2px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 0;
  border-color: var(--color-accent);
}

.contact-form .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-status {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.form-status.success {
  color: #22c55e;
}

.form-status.error {
  color: #ef4444;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding-top: 3rem;
}

.footer-inner {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-heading {
  color: var(--color-white);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.footer-col p {
  margin-bottom: 0.5rem;
}

.footer-col a:hover {
  color: var(--color-accent);
}

.footer-services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem 1.5rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.footer-social a:hover {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1.2fr 1fr;
  }
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-block: 1.25rem;
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
}

.footer-copy {
  font-size: 0.875rem;
  opacity: 0.8;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-nav a {
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-nav a:hover {
  color: var(--color-accent);
}

@media (min-width: 768px) {
  .footer-bottom-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ============================================================
   LIGHTBOX (homepage projects + gallery page)
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background-color: rgba(33, 45, 69, 0.94);
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

/* Stop the page behind the lightbox from scrolling */
body.lightbox-open {
  overflow: hidden;
}

/* Zoom cursor on images that open the lightbox */
.gallery-grid img,
.projects-grid img,
.projects-carousel img {
  cursor: zoom-in;
}

/* ============================================================
   FOCUS STYLES — do not remove
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}
