/* ==========================================================================
   Module 03 — Homepage Hero (Design System v2 / Concept C — "Modern Local Pro")
   Scoped entirely under .qh so it cannot affect any other section of this
   page (which still uses the legacy --bc-* component library) or any other
   page on the site. Tokens below are transcribed from the Module 02 Design
   System lock (deep teal + burnt amber) — do not edit values here without
   updating the Design System doc first.
   ========================================================================== */

.qh{
  --qh-primary: #0F5C56;
  --qh-primary-dark: #0A413C;
  --qh-primary-tint: #E4EFED;
  --qh-accent: #C2480E;
  --qh-accent-dark: #9A3A0B;
  --qh-accent-tint: #FBEAE0;
  --qh-paper: #F7F8F7;
  --qh-surface: #FFFFFF;
  --qh-ink: #16221F;
  --qh-ink-soft: #4B5754;
  --qh-line: #DCE2E0;
  --qh-focus: #C2480E;

  --qh-font-heading: 'Manrope', 'Segoe UI', sans-serif;
  --qh-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --qh-space-1: 8px;
  --qh-space-2: 16px;
  --qh-space-3: 24px;
  --qh-space-4: 32px;
  --qh-space-5: 48px;

  --qh-radius-btn: 8px;
  --qh-radius-card: 12px;
  --qh-radius-panel: 16px;

  --qh-shadow-sm: 0 1px 3px rgba(22,34,31,.08);
  --qh-shadow-md: 0 6px 16px rgba(22,34,31,.12);
  --qh-shadow-lg: 0 16px 40px rgba(22,34,31,.16);

  display: block;
  background: var(--qh-paper);
  padding-block: var(--qh-space-4) var(--qh-space-4);
}

/* Anchor-scroll behaviour (Module 03: CSS-first, no JS). Applies sitewide
   to the implicit <html> element, which is an interaction behaviour, not a
   visual style, so it does not violate the "no new styles" design lock. */
html{ scroll-behavior: smooth; }

.qh *{ box-sizing: border-box; }

.qh__container{
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: var(--qh-space-2);
  display: grid;
  gap: var(--qh-space-4);
}

/* ---- Left column: content ---- */
.qh__content{ display: flex; flex-direction: column; gap: var(--qh-space-2); }

.qh__eyebrow{
  font-family: var(--qh-font-body);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--qh-primary);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0;
}

.qh__title{
  font-family: var(--qh-font-heading);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--qh-ink);
  margin: 0;
}

.qh__lede{
  font-family: var(--qh-font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--qh-ink-soft);
  margin: 0;
  max-width: 46ch;
}

.qh__chips{ display: flex; flex-wrap: wrap; gap: var(--qh-space-1); margin-top: 4px; }

.qh__chip{
  display: inline-flex;
  align-items: center;
  font-family: var(--qh-font-body);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--qh-primary-dark);
  background: var(--qh-primary-tint);
  border-radius: 999px;
  padding: 6px 12px;
  line-height: 1;
}

.qh__actions{
  display: flex;
  flex-wrap: wrap;
  gap: var(--qh-space-2);
  margin-top: var(--qh-space-1);
}

.qh__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--qh-font-heading);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--qh-radius-btn);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
}

.qh__btn--accent{
  background: var(--qh-accent);
  color: #fff;
}
.qh__btn--accent:hover{ background: var(--qh-accent-dark); }

.qh__btn--outline{
  background: transparent;
  color: var(--qh-primary);
  border-color: var(--qh-primary);
}
.qh__btn--outline:hover{ background: var(--qh-primary); color: #fff; }

.qh__btn:focus-visible{
  outline: 2px solid var(--qh-focus);
  outline-offset: 2px;
}

/* ---- Right column: form card ---- */
.qh__form-card{
  background: var(--qh-surface);
  border-radius: var(--qh-radius-panel);
  box-shadow: var(--qh-shadow-lg);
  padding-block: var(--qh-space-3);
  padding-inline: var(--qh-space-2);
  display: flex;
  flex-direction: column;
  gap: var(--qh-space-2);
  /* Reserves the space a real embed will occupy so dropping it in later
     causes no layout shift (CLS), per Module 03 form rules. */
  min-height: 480px;
}

/* Scroll-anchor targets (the form card itself, or a repurposed existing
   form section on About/Contact) must clear the sticky site header, which
   measures ~109px tall on mobile and ~79px on tablet/desktop — otherwise
   the smooth-scroll lands the target partially hidden underneath it. */
#quote-form{ scroll-margin-top: 128px; }
@media (min-width: 768px){
  #quote-form{ scroll-margin-top: 96px; }
}

.qh__form-title{
  font-family: var(--qh-font-heading);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.2;
  color: var(--qh-ink);
  margin: 0;
}

.qh__form-sub{
  font-family: var(--qh-font-body);
  font-size: 0.9375rem;
  color: var(--qh-ink-soft);
  margin: 0;
}

.qh__placeholder-note{
  font-family: var(--qh-font-body);
  font-size: 0.8125rem;
  color: var(--qh-ink-soft);
  background: var(--qh-accent-tint);
  border: 1px dashed var(--qh-accent);
  border-radius: var(--qh-radius-card);
  padding: var(--qh-space-2);
  line-height: 1.5;
}
.qh__placeholder-note strong{ color: var(--qh-accent-dark); }
.qh__placeholder-note code{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75em;
  background: rgba(0,0,0,.06);
  padding: 1px 5px;
  border-radius: 4px;
}

.qh__placeholder-fields{ display: flex; flex-direction: column; gap: var(--qh-space-2); flex: 1; }

.qh__field{ display: flex; flex-direction: column; gap: 4px; }

.qh__field label{
  font-family: var(--qh-font-body);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--qh-ink);
}

.qh__field input{
  font-family: var(--qh-font-body);
  font-size: 1rem; /* never below 16px, prevents iOS auto-zoom */
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--qh-line);
  border-radius: var(--qh-radius-btn);
  background: #fff;
  color: var(--qh-ink);
}
.qh__field input:disabled{
  background: #F2F3F2;
  color: var(--qh-ink-soft);
  cursor: not-allowed;
}

.qh__submit{
  margin-top: auto;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--qh-line);
  border-radius: var(--qh-radius-btn);
  background: #F2F3F2;
  color: var(--qh-ink-soft);
  font-family: var(--qh-font-heading);
  font-weight: 700;
  font-size: 1rem;
  cursor: not-allowed;
}

/* ==========================================================================
   Breakpoints — mobile-first. Tablet/desktop switch to the two-column
   layout required so the form is fully visible above the fold at
   768x1024 (tablet) and 1440x1080 (desktop), per Module 03 QA spec.
   ========================================================================== */
@media (min-width: 768px){
  .qh{ padding-block: var(--qh-space-5); }
  .qh__container{
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: var(--qh-space-5);
  }
  .qh__title{ font-size: 2.25rem; }
  .qh__lede{ font-size: 1.0625rem; }
  .qh__form-card{ min-height: 460px; padding: var(--qh-space-3); }
}

@media (min-width: 1200px){
  .qh__title{ font-size: 2.5rem; }
  .qh__container{ gap: var(--qh-space-5); }
}

/* ==========================================================================
   Homepage hero photo background (operator-approved addition — modifies the
   previously photo-less Concept C hero for the HOMEPAGE only via the
   .qh--photo modifier class; every other page's .qh hero is unaffected).
   Overlay colours are the existing --qh-primary / --qh-primary-dark tokens
   with alpha applied — no new hues introduced.
   ========================================================================== */
.qh--photo{
  position: relative;
  overflow: hidden;
  background: var(--qh-primary);
}
.qh--photo::before{
  content: "";
  position: absolute; inset: 0;
  background-image: var(--qh-photo-url);
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.qh--photo::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,92,86,.82), rgba(10,65,60,.90));
  z-index: 0;
}
.qh--photo .qh__container{ position: relative; z-index: 1; }
.qh--photo .qh__eyebrow{ color: #BFE3DE; }
.qh--photo .qh__title{ color: #fff; }
.qh--photo .qh__lede{ color: #E4EFED; }
.qh--photo .qh__chip{ background: rgba(255,255,255,.16); color: #fff; }
.qh--photo .qh__btn--outline{ border-color: #fff; color: #fff; }
.qh--photo .qh__btn--outline:hover{ background: #fff; color: var(--qh-primary-dark); }

/* ==========================================================================
   Homepage project gallery (operator-approved addition). Uses only real,
   recovered project photography — see hero-gallery New-Copy/Image Manifest
   note in the accompanying report. Reuses existing tokens only.
   ========================================================================== */
.qh-gallery{ background: var(--qh-paper); padding-block: var(--qh-space-5); }
.qh-gallery__container{ max-width: 1140px; margin-inline: auto; padding-inline: var(--qh-space-2); }
.qh-gallery__head{ margin-bottom: var(--qh-space-3); }
.qh-gallery__eyebrow{
  font-family: var(--qh-font-body);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--qh-primary);
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.qh-gallery__title{
  font-family: var(--qh-font-heading);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--qh-ink);
  margin: 0;
}
.qh-gallery__grid{ display: grid; grid-template-columns: 1fr; gap: var(--qh-space-2); }
@media (min-width: 600px){ .qh-gallery__grid{ grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px){ .qh-gallery__grid{ grid-template-columns: repeat(3, 1fr); } }
.qh-gallery__item{
  border-radius: var(--qh-radius-card);
  overflow: hidden;
  box-shadow: var(--qh-shadow-sm);
  aspect-ratio: 4 / 3;
}
.qh-gallery__item img{ width: 100%; height: 100%; object-fit: cover; display: block; }

/* ==========================================================================
   Hero pattern rollout additions (service/location/contact/about pages).
   Reuse existing tokens only — no new colours, radius, shadow or spacing
   values are introduced below.
   ========================================================================== */

/* CTA-only variant (About, Contact): single column, no form-card, content
   column carries a "Get a Free Quote" button that scrolls to that page's
   own existing form section further down the page. */
.qh__container--cta-only{
  grid-template-columns: 1fr;
  max-width: 760px;
}

/* Decorative service photo — shown only where a genuinely relevant photo
   was recovered (see hero rollout plan). Hidden on mobile to keep the
   above-the-fold quote button and phone CTA compact, per Module 03 rules;
   reappears on tablet/desktop where there is fold headroom for it. */
.qh__image{
  display: none;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--qh-radius-card);
  box-shadow: var(--qh-shadow-sm);
  margin-top: 4px;
}
@media (min-width: 768px){
  .qh__image{ display: block; }
}
