/* ==========================================================================
   styles.css — layout & visual design
   --------------------------------------------------------------------------
   You should NOT need to edit this file to re-skin the site.
   Brand colors live in config.js (SITE.theme) and are injected as the
   CSS custom properties below at page load. The values here are only
   fallbacks so the page never renders unstyled.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Overridden from config.js — edit colors THERE, not here */
  --accent:       #2F5D3A;
  --accent-dark:  #1E3F28;
  --accent-soft:  #E8EFE6;
  --ink:          #23281F;
  --paper:        #FFFFFF;
  --paper-alt:    #F5F2EB;

  /* Non-brand tokens (safe to leave alone) */
  --ink-soft:     #5A6157;
  --line:         #E2DFD6;
  --radius:       12px;
  --shadow:       0 2px 10px rgba(30, 40, 30, 0.08);
  --shadow-lift:  0 14px 34px rgba(30, 40, 30, 0.16);
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                  Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bricolage Grotesque", "Arial Black", Impact, sans-serif;
  --header-h:     72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h3 { font-size: 1.25rem; }

/* ---------- Scroll reveal (classes applied by main.js) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

p { margin: 0 0 1em; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

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

.container {
  width: min(1140px, 100% - 2.5rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px; left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent-dark);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(47, 93, 58, 0.25);
}
.btn--primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(30, 63, 40, 0.32);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}
.btn--ghost:hover {
  background: #fff;
  color: var(--accent-dark);
  border-color: #fff;
}

.btn--lg { padding: 1rem 1.9rem; font-size: 1.0625rem; }

.btn[disabled] { opacity: 0.6; cursor: wait; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(30, 40, 30, 0.1); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand svg { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px; height: 46px;
  padding: 11px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  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); }

.site-nav {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
  padding: 1rem 1.25rem 1.5rem;
}
.site-nav.is-open { display: block; }

.site-nav ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.site-nav li + li { border-top: 1px solid var(--line); }
.site-nav ul a {
  display: block;
  padding: 0.75rem 0.25rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.site-nav ul a:hover { color: var(--accent); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    position: static;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }
  .site-nav ul {
    display: flex;
    gap: 1.5rem;
    margin: 0;
  }
  .site-nav li + li { border: 0; }
  .site-nav ul a { padding: 0.25rem 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(88vh, 760px);
  padding: 5rem 0;
  color: #fff;
  background: var(--accent-dark);
  overflow: hidden;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  animation: hero-zoom 18s ease-out forwards;
}

@keyframes hero-zoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(12, 24, 15, 0.55) 0%, transparent 40%),
    linear-gradient(
      to right,
      rgba(12, 24, 15, 0.82) 0%,
      rgba(12, 24, 15, 0.52) 55%,
      rgba(12, 24, 15, 0.18) 100%
    );
}

.hero__content {
  position: relative;
  max-width: 640px;
  margin-left: calc((100% - min(1140px, 100% - 2.5rem)) / 2);
}

.hero__eyebrow {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #D7E4D2;
}

.hero__headline {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  color: #fff;
  margin-bottom: 0.4em;
  text-wrap: balance;
}

.hero__subhead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 34em;
  color: #E9EFE6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.25rem;
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.hero__stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}

.hero__stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #C9D8C4;
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section--alt { background: var(--paper-alt); }

.section__head {
  max-width: 640px;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.section__head--center { margin-inline: auto; text-align: center; }

.section__eyebrow {
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.section__lede { color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- Services ---------- */
.grid--services {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .grid--services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--services { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.service-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-5px); }

.service-card__img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  transition: transform 0.45s ease;
}
.service-card:hover .service-card__img { transform: scale(1.05); }
/* Clip the zooming image to the card's rounded top corners */
.service-card { isolation: isolate; }

.service-card__body { padding: 1.25rem 1.4rem 1.5rem; }
.service-card__body h3 { color: var(--accent-dark); }
.service-card__body p { margin: 0; color: var(--ink-soft); }

/* ---------- Gallery (featured projects / before-after) ---------- */
.grid--gallery {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .grid--gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--gallery { grid-template-columns: repeat(3, 1fr); } }

.project {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.project:hover { box-shadow: var(--shadow-lift); transform: translateY(-5px); }

.project__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--line);
}

.project__shot { position: relative; overflow: hidden; }
.project__shot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.project:hover .project__shot img { transform: scale(1.05); }

/* Single-photo projects get a taller, more editorial crop */
.project > .project__shot img { aspect-ratio: 1 / 1; }
/* Before/after pairs keep the side-by-side 4:3 crop */
.project__pair .project__shot img { aspect-ratio: 4 / 3; }

.project__tag {
  position: absolute;
  top: 10px; left: 10px;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(35, 40, 31, 0.85);
}
.project__tag--after { background: var(--accent); }

.project__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 1rem 1.25rem;
}
.project__caption strong { font-size: 1.05rem; }
.project__caption span { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Why choose us ---------- */
.why {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .why { grid-template-columns: 5fr 7fr; }
}

.why__img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.why__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.why__items {
  display: grid;
  gap: 1.75rem;
}
@media (min-width: 560px) { .why__items { grid-template-columns: 1fr 1fr; } }

.why-item { display: flex; gap: 1rem; }
.why-item__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.why-item__icon svg { width: 26px; height: 26px; }
.why-item h3 { margin-bottom: 0.25em; font-size: 1.1rem; }
.why-item p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- Testimonials ---------- */
.grid--testimonials {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) { .grid--testimonials { grid-template-columns: repeat(3, 1fr); } }

.testimonial {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 1.75rem 1.6rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.testimonial:hover { box-shadow: var(--shadow-lift); transform: translateY(-4px); }

.testimonial__stars {
  color: #C8922A;
  font-size: 1.05rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.testimonial blockquote {
  margin: 0 0 1.25rem;
  font-style: italic;
  color: var(--ink);
}

.testimonial figcaption {
  margin-top: auto;
  font-weight: 700;
  color: var(--accent-dark);
}
.testimonial figcaption span {
  font-weight: 400;
  color: var(--ink-soft);
}

/* ---------- Service area ---------- */
.towns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}
.towns li {
  padding: 0.45rem 1rem;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.95rem;
}
.service-area__cta { text-align: center; }

/* ---------- Contact ---------- */
.contact {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 900px) {
  .contact { grid-template-columns: 5fr 7fr; align-items: start; }
}

.contact-info {
  background: var(--accent-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
}
.contact-info h3 { color: #fff; }
.contact-info a { color: #fff; font-weight: 700; }
.contact-info a:hover { color: var(--accent-soft); }

.contact-info__row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1.1rem;
}
.contact-info__row svg {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 3px;
  color: var(--accent-soft);
}
.contact-info__row p { margin: 0; }
.contact-info__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #B9CDB4;
}

.hours-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.97rem;
}

/* ---------- Form ---------- */
.quote-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
}

.form-row { display: grid; gap: 0 1.25rem; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }

.field { margin-bottom: 1.2rem; }

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 8px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

/* Honeypot — hidden from humans, visible to dumb bots. Do not remove. */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.turnstile-slot { margin-bottom: 1.2rem; min-height: 65px; }

.form-status {
  margin: 1rem 0 0;
  font-weight: 600;
  min-height: 1.5em;
}
.form-status.is-error   { color: #A23B2E; }
.form-status.is-success { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--accent-dark);
  color: #D9E2D5;
  padding: 3.5rem 0 0;
  font-size: 0.97rem;
}

.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--accent-soft); }

.site-footer .brand { color: #fff; }
.site-footer .brand svg { color: #A9C4A2; }

.footer-grid {
  display: grid;
  gap: 2.25rem;
  padding-bottom: 2.5rem;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }

.footer-grid h3 {
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-grid p { margin-bottom: 0.5em; }

.footer-grid .hours-list li { border-color: rgba(255, 255, 255, 0.12); }

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.footer-social a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
}
.footer-social a:hover { background: rgba(255, 255, 255, 0.1); }
.footer-social svg { width: 20px; height: 20px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.88rem;
  color: #AEBFA8;
}
.footer-bottom p { margin: 0; }
