/* ================================================================
   SQUAREWOODS — styles.css
   Architectural · Quiet · Editorial
   Green #214d3a  |  Cream #f3ecdf  |  Paper #fbf9f4  |  Gold #b29a6b
   Playfair Display (headings) + DM Sans (UI + body)
   ================================================================ */

/* ---- Tokens -------------------------------------------------- */
:root {
  --green:   #214d3a;
  --green2:  #173b2d;
  --cream:   #f3ecdf;
  --paper:   #fbf9f4;
  --ink:     #242622;
  --muted:   #6b6e67;
  --line:    #d9d2c4;
  --gold:    #b29a6b;
  --white:   #ffffff;
  --error:   #c0392b;
  --success: #2a6049;

  /* Spacing scale */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 48px;
  --s6: 64px;
  --s7: 96px;
  --s8: 128px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur-base: 280ms;
  --dur-slow: 480ms;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a  { color: inherit; text-decoration: none; }
p  { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
img { display: block; max-width: 100%; height: auto; }

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

/* ---- Typography ---------------------------------------------- */
h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  margin: 0;
}

h1 {
  font-size: clamp(2.8rem, 6.5vw, 5.5rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.25;
  font-weight: 600;
}

/*
 * em inside headings = signature green accent on light backgrounds.
 * Dark sections override this with a warm gold tone.
 */
em { font-style: normal; color: var(--green); }

/* ---- Layout -------------------------------------------------- */
.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.section         { padding: var(--s7) 0; }
.section.cream   { background: var(--cream); }
.section.dark    { background: var(--green); color: var(--white); }
.section.dark em { color: #e8d4a8; }

/* ================================================================
   SCROLL-REVEAL
   Elements with .reveal are invisible until .visible is added
   by JS IntersectionObserver.
   All transitions are gated on prefers-reduced-motion.
   ================================================================ */
.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity  var(--dur-slow) var(--ease-out),
      transform var(--dur-slow) var(--ease-out);
  }

  .reveal.visible {
    opacity: 1;
    transform: none;
  }

  /* Staggered children: each direct child delays by 80ms */
  .reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition:
      opacity  var(--dur-slow) var(--ease-out),
      transform var(--dur-slow) var(--ease-out);
  }

  .reveal-stagger.visible > *:nth-child(1) { transition-delay: 0ms;   opacity: 1; transform: none; }
  .reveal-stagger.visible > *:nth-child(2) { transition-delay: 80ms;  opacity: 1; transform: none; }
  .reveal-stagger.visible > *:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: none; }
  .reveal-stagger.visible > *:nth-child(4) { transition-delay: 240ms; opacity: 1; transform: none; }
  .reveal-stagger.visible > *:nth-child(5) { transition-delay: 320ms; opacity: 1; transform: none; }
  .reveal-stagger.visible > *:nth-child(6) { transition-delay: 400ms; opacity: 1; transform: none; }
  .reveal-stagger.visible > *:nth-child(7) { transition-delay: 480ms; opacity: 1; transform: none; }
  .reveal-stagger.visible > *:nth-child(8) { transition-delay: 560ms; opacity: 1; transform: none; }
}

/* ================================================================
   HEADER + NAVIGATION
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 249, 244, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(36, 38, 34, 0.08);
}

.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: var(--s3);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand > span:last-child > span { font-weight: 400; }

/* Text fallback mark — used only when SVG logo is unavailable */
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--green);
  color: var(--white);
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 0;
  flex-shrink: 0;
}

/* SVG logo preferred */
.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  gap: var(--s3);
  margin-inline-start: auto;
  font-size: 13px;
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}

.nav-links a {
  color: var(--ink);
  transition: color var(--dur-fast);
  padding: 4px 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 100%;
  height: 1px;
  background: var(--green);
  transition: right var(--dur-base) var(--ease-out);
}

.nav-links a:hover { color: var(--green); }
.nav-links a:hover::after { right: 0; }

/* Nav CTA strip */
.nav-actions {
  display: flex;
  gap: var(--s1);
  align-items: center;
  flex-shrink: 0;
}

.whatsapp-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  transition: opacity var(--dur-fast);
}

.whatsapp-link:hover { opacity: 0.75; }

/* ---- Hamburger button ---------------------------------------- */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  width: 40px;
  height: 40px;
}

.menu-btn__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  .menu-btn__bar {
    transition:
      transform  var(--dur-base) var(--ease-out),
      opacity    var(--dur-fast),
      background var(--dur-fast);
  }

  /* X state when aria-expanded="true" */
  .menu-btn[aria-expanded="true"] .menu-btn__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-btn[aria-expanded="true"] .menu-btn__bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

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

/* ---- Mobile slide-down nav ----------------------------------- */
.nav-mobile {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 76px;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  z-index: 99;
  padding: var(--s2) 0;
}

.nav-mobile.open { display: flex; }

@media (prefers-reduced-motion: no-preference) {
  .nav-mobile {
    opacity: 0;
    transform: translateY(-8px);
    transition:
      opacity   var(--dur-base) var(--ease-out),
      transform var(--dur-base) var(--ease-out);
  }

  .nav-mobile.open {
    opacity: 1;
    transform: none;
    display: flex;
  }
}

.nav-mobile a {
  display: block;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur-fast), color var(--dur-fast);
}

.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { background: var(--cream); color: var(--green); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 13px 22px;
  border: 1px solid transparent;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background  var(--dur-fast),
    color       var(--dur-fast),
    border-color var(--dur-fast),
    box-shadow   var(--dur-fast);
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

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

.btn-green:hover {
  background: var(--green2);
  box-shadow: 0 4px 16px rgba(33, 77, 58, 0.25);
}

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

.btn-outline:hover {
  background: var(--green);
  color: var(--white);
}

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

.btn-white:hover {
  background: var(--cream);
}

/* ================================================================
   HERO
   Full-width section with video background and 2-column inner layout.
   Left column:  copy (tagline, headline, lead text).
   Right column: .hero__form-panel (white card with 3-step lead form).

   Background layer priority:
     1. <video class="hero__video"> — plays when motion allowed
     2. <img class="hero__poster"> — static fallback (prefers-reduced-motion
        or video not supported); also shown as poster frame
     3. <picture class="hero__picture"> — used when hero_video is UNASSIGNED
        and Cell 10 falls back to a static image hero.
   ================================================================ */
.hero {
  position: relative;
  min-height: min(92vh, 840px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}

/* ---- Video background ---------------------------------------- */
.hero__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Poster image — shown as CSS background during video load,
   or as a full replacement when prefers-reduced-motion is set. */
.hero__poster {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: none; /* JS sets display:block if video can't autoplay */
}

/* prefers-reduced-motion: hide video, show poster instead */
@media (prefers-reduced-motion: reduce) {
  .hero__video  { display: none !important; }
  .hero__poster { display: block !important; }
}

/* ---- Static image fallback (no video assigned) -------------- */
/*
 * When hero_video is UNASSIGNED in Cell 06 / Cell 07,
 * Cell 10 will generate a <picture> element instead.
 * This block ensures it fills the hero identically.
 */
.hero__picture {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ---- Overlay — left-heavy gradient for copy legibility ------- */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    105deg,
    rgba(18, 36, 27, 0.90) 0%,
    rgba(18, 36, 27, 0.65) 48%,
    rgba(18, 36, 27, 0.30) 100%
  );
}

/* ---- Inner 2-column grid ------------------------------------- */
/*
 * .hero__inner sits inside .container (already horizontally constrained).
 * Left column:  flexible — copy, tagline, headline.
 * Right column: fixed 420px — form panel card.
 * At ≤900px: stacks to single column, form drops below copy.
 */
.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--s6);
  align-items: center;
  padding: 108px 0 80px;
  width: 100%;
}

/* ---- Copy column (left) -------------------------------------- */
.hero__copy {
  /* flex column so trust line stays at bottom */
  display: flex;
  flex-direction: column;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(230, 223, 209, 0.9);
  margin-bottom: var(--s3);
}

/* Status dot — signals the business is active */
.hero__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7ec89e;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__dot {
    animation: dot-pulse 2.4s ease-in-out infinite;
  }

  @keyframes dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.55; transform: scale(1.35); }
  }
}

.hero h1 em { color: #e8d8b8; }

.hero__lead {
  max-width: 560px;
  font-size: 18px;
  color: rgba(240, 238, 233, 0.88);
  margin: var(--s2) 0 var(--s4);
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__trust {
  margin-top: var(--s3);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(240, 238, 233, 0.50);
}

.hero__trust b {
  margin: 0 7px;
  opacity: 0.5;
}

/* ---- Form panel (right column) ------------------------------ */
/*
 * Semi-opaque white card that contrasts against the dark video overlay.
 * Hosts the .lead-form 3-step capture flow.
 */
.hero__form-panel {
  background: rgba(251, 249, 244, 0.97);
  color: var(--ink);
  padding: var(--s4) var(--s4) var(--s3);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  /* Prevent the form card from being taller than the viewport */
  max-height: calc(92vh - 120px);
  overflow-y: auto;
  /* Smooth scroll inside if form is tall on mobile */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.hero__form-panel h3 {
  font-size: 18px;
  margin: 0 0 var(--s1);
  color: var(--ink);
  letter-spacing: -0.01em;
}

.hero__form-panel > p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 var(--s3);
}

/* ================================================================
   LEAD FORM — 3-STEP ESTIMATE CAPTURE
   Used in .hero__form-panel (homepage hero) and optionally
   on budget-calculator.html.

   Step 1: Name · Phone · Location · Budget range
   Step 2: Property type · Rooms · Size · Quality tier
   Step 3: Estimate reveal + WhatsApp CTA

   The JS state machine:
     - Validates each step before advancing
     - Hides .lf-panel[hidden], shows active panel
     - On Step 3: reveals .lf-estimate and .lf-wa-btn

   See Cell 09 for the JavaScript implementation.
   ================================================================ */

/* ---- Step progress indicator --------------------------------- */
.lf-progress {
  display: flex;
  align-items: center;
  margin-bottom: var(--s4);
  /* [QA FIX] This is an <ol>, and there is no global list reset in this
     stylesheet (only .nav-links and one other list reset it locally).
     The browser's native "1." "2." "3." markers were therefore painting
     underneath the step circles — visible as stray numerals beside each
     dot in a rendered screenshot. .lf-done span{display:none} hid the
     span but not the marker. Reset the list itself. */
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}

.lf-progress__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition:
    border-color var(--dur-base),
    background   var(--dur-base),
    color        var(--dur-base);
}

/* Active step dot */
.lf-progress__dot[aria-current="step"] {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

/* Completed step dot */
.lf-progress__dot.lf-done {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
  /* Checkmark via content — simpler than SVG injection */
}

.lf-progress__dot.lf-done::after {
  content: "✓";
  font-size: 13px;
  font-weight: 700;
}

.lf-progress__dot.lf-done span { display: none; } /* hide number when done */

/* Connecting line between dots */
.lf-progress__line {
  flex: 1;
  height: 1px;
  background: var(--line);
  margin: 0 6px;
  transition: background var(--dur-base);
}

.lf-progress__line.lf-done {
  background: var(--green);
}

/* ---- Step panels --------------------------------------------- */
/*
 * All panels are in the DOM at once.
 * JS toggles [hidden] to show/hide.
 * No display:none in CSS — [hidden] is the canonical hide.
 */
.lf-panel {
  /* No special layout here — just a grouping wrapper */
}

/* ---- Form fields --------------------------------------------- */
.lf-field {
  margin-bottom: 14px;
}

.lf-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 5px;
}

.lf-field input,
.lf-field select {
  display: block;
  width: 100%;
  padding: 11px 13px;
  /* [QA FIX] Measured at 40px tall on a 390x844 viewport. 44px is the iOS
     minimum touch target and 16px is the font size below which mobile
     Safari zooms the viewport on focus — which on this 2-column hero
     reflows the whole form. Both raised. Verified at 390px and 1440px. */
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: border-color var(--dur-fast);
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0; /* iOS rounds corners by default — override */
}

.lf-field select {
  padding-right: 36px;
  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 1l5 5 5-5' stroke='%23214d3a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

.lf-field input:focus,
.lf-field select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(33, 77, 58, 0.08);
}

/* ---- Validation error state ---------------------------------- */
.lf-field--error input,
.lf-field--error select {
  border-color: var(--error);
}

.lf-field--error input:focus,
.lf-field--error select:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.10);
}

.lf-error-msg {
  display: none;
  font-size: 11px;
  color: var(--error);
  margin-top: 4px;
  line-height: 1.4;
}

.lf-field--error .lf-error-msg { display: block; }

/* ---- Two-column field row ------------------------------------ */
/*
 * Use for side-by-side pairs: e.g. Size + Quality on Step 2.
 * Each child is a .lf-field.
 */
.lf-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---- Navigation buttons ------------------------------------- */
.lf-nav {
  display: flex;
  gap: 10px;
  margin-top: var(--s3);
}

/* Back button — ghost style */
.lf-nav-back {
  min-height: 48px;   /* [QA FIX] touch target — see .lf-nav-next */
  padding: 11px 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    border-color var(--dur-fast),
    color        var(--dur-fast);
  flex-shrink: 0;
}

.lf-nav-back:hover {
  border-color: var(--green);
  color: var(--green);
}

/* Next button — full green */
.lf-nav-next {
  flex: 1;
  padding: 12px 18px;
  /* [QA FIX] Measured at 39px tall on a 390x844 viewport — below the 44px
     iOS / 48px Material minimum for a primary touch target, and this is
     the single most important button on the page (it advances the lead
     form). min-height guarantees a comfortable tap area without changing
     desktop appearance. */
  min-height: 48px;
  border: 0;
  background: var(--green);
  color: var(--white);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--dur-fast), box-shadow var(--dur-fast);
}

.lf-nav-next:hover {
  background: var(--green2);
  box-shadow: 0 4px 14px rgba(33, 77, 58, 0.25);
}

/* ---- Estimate reveal panel ---------------------------------- */
/*
 * Hidden until Step 3 validation passes.
 * JS removes [hidden] and the animation fires via prefers-reduced-motion gate.
 * Left-bordered with gold to signal "result" visually.
 */
.lf-estimate {
  background: var(--cream);
  padding: var(--s3) var(--s3) var(--s2);
  margin-bottom: var(--s3);
  border-left: 3px solid var(--gold);
}

.lf-estimate[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .lf-estimate:not([hidden]) {
    animation: lf-estimate-in var(--dur-slow) var(--ease-out) both;
  }

  @keyframes lf-estimate-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
}

.lf-estimate__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

.lf-estimate__range {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 26px;
  color: var(--green);
  line-height: 1.1;
  margin-bottom: 6px;
}

.lf-estimate__disclaimer {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ---- WhatsApp handoff button -------------------------------- */
/*
 * Shown only on Step 3, below the estimate panel.
 * Carries all collected data + estimate in the wa.me URL (see Cell 09).
 */
.lf-wa-btn {
  min-height: 48px;   /* [QA FIX] touch target — see .lf-nav-next */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px var(--s3);
  background: #25d366;
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 0;
  cursor: pointer;
  transition:
    background  var(--dur-fast),
    box-shadow  var(--dur-fast);
  text-decoration: none; /* in case rendered as <a> */
  -webkit-font-smoothing: antialiased;
}

.lf-wa-btn:hover {
  background: #1fb558;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.30);
}

.lf-wa-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--white);
  flex-shrink: 0;
}

/* ---- Restart link (after WhatsApp CTA) ---------------------- */
.lf-restart {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: var(--s2);
  cursor: pointer;
  transition: color var(--dur-fast);
}

.lf-restart:hover { color: var(--green); }

/* ================================================================
   INTRO
   ================================================================ */
.intro-section { padding: 72px 0; }

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  align-items: start;
}

.intro-grid p {
  font-size: 17px;
  color: var(--muted);
}

/* ================================================================
   SHARED SECTION HEAD
   ================================================================ */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  align-items: start;
  margin-bottom: var(--s5);
}

.section-head p {
  font-size: 17px;
  color: var(--muted);
  max-width: 480px;
}

.section-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s2);
}

.dark .section-label { color: rgba(178, 154, 107, 0.8); }

.text-link {
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--dur-fast);
}

.text-link:hover { gap: 8px; }

/* ================================================================
   SERVICES GRID
   ================================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.service-card {
  background: var(--paper);
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: background var(--dur-base);
}

/* Bottom-border accent appears on hover */
.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 100%;
  height: 2px;
  background: var(--green);
  transition: right var(--dur-slow) var(--ease-out);
}

.service-card:hover { background: var(--cream); }
.service-card:hover::after { right: 0; }

/* Icon container */
.service-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: auto;
  color: var(--gold);
}

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

.service-num {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: var(--s5);
}

.service-card h3 {
  font-size: 20px;
  margin: 0 0 var(--s1);
}

.service-card p {
  font-size: 14px;
  color: var(--muted);
  flex-grow: 1;
  margin-bottom: var(--s2);
}

.service-card .text-link { font-size: 12px; }

/* ================================================================
   FEATURE SECTIONS (Kitchen / Furniture / Bedroom)
   ================================================================ */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  align-items: center;
}

.feature.flip > *:first-child { order: 2; }
.feature.flip > *:last-child  { order: 1; }

/* Pill / tag lists */
.pill-list,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: var(--s3) 0;
}

.pill-list span,
.tag-list span {
  padding: 7px 13px;
  border: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.02em;
  background: var(--paper);
  transition: border-color var(--dur-fast), color var(--dur-fast);
}

.pill-list span:hover,
.tag-list span:hover {
  border-color: var(--green);
  color: var(--green);
}

/* ---- Feature image container --------------------------------- */
.feature-image-wrap {
  position: relative;
  overflow: hidden;
}

.feature-image-wrap picture,
.feature-image-wrap img {
  width: 100%;
  display: block;
}

.feature-image-wrap img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

@media (prefers-reduced-motion: no-preference) {
  .feature-image-wrap:hover img {
    transform: scale(1.03);
  }
}

.feature-placeholder {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #ddd2c0, #a99479);
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 11px;
  letter-spacing: 0.16em;
}

/* ================================================================
   PROJECTS GRID
   ================================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s3);
  margin-top: var(--s5);
}

.project-card { position: relative; }

.project-card__img-wrap {
  position: relative;
  overflow: hidden;
}

.project-card__img-wrap picture,
.project-card__img-wrap img {
  width: 100%;
  display: block;
}

.project-card__img-wrap img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

@media (prefers-reduced-motion: no-preference) {
  .project-card:hover .project-card__img-wrap img {
    transform: scale(1.05);
  }
}

/* Category badge */
.project-card__badge {
  position: absolute;
  top: var(--s2);
  left: var(--s2);
  padding: 4px 10px;
  background: rgba(33, 77, 58, 0.88);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-card h3 {
  font-size: 17px;
  margin: var(--s2) 0 4px;
}

.project-card p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ================================================================
   INTERIOR STYLES GRID
   ================================================================ */
.styles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  margin-top: var(--s4);
}

.styles-grid span {
  background: var(--paper);
  padding: 32px 28px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  display: block;
  cursor: default;
  transition: background var(--dur-base), color var(--dur-fast);
}

.styles-grid span:hover {
  background: var(--green);
  color: var(--white);
}

/* ================================================================
   CRAFTSMANSHIP GRID (replaces testimonials)
   4 columns: DESIGN / MATERIAL / FUNCTION / PROCESS
   ================================================================ */
.craft-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: var(--s5);
}

.craft-card {
  background: var(--paper);
  padding: var(--s4) var(--s4) var(--s5);
  position: relative;
  overflow: hidden;
}

.craft-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-out);
}

.craft-card:hover::before { transform: scaleX(1); }

.craft-icon {
  width: 36px;
  height: 36px;
  margin-bottom: var(--s3);
  color: var(--gold);
}

.craft-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.craft-card h3 {
  font-size: 18px;
  margin-bottom: var(--s1);
}

.craft-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

/* ================================================================
   CTA BANNER
   ================================================================ */
.cta-banner {
  padding: var(--s6) var(--s6);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s4);
  align-items: center;
  margin: var(--s7) 0;
}

.cta-banner p {
  margin: var(--s1) 0 0;
  font-size: 16px;
  color: var(--muted);
  max-width: 560px;
}

.cta-banner__actions {
  display: flex;
  gap: var(--s2);
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ================================================================
   BUDGET CALCULATOR
   (Used on budget-calculator.html, which has its own gated form flow)
   ================================================================ */
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  align-items: start;
}

.calculator-intro p {
  color: rgba(219, 227, 221, 0.9);
  font-size: 17px;
  margin: var(--s2) 0 0;
}

.calc-disclaimer {
  margin-top: var(--s4);
  padding: var(--s2) var(--s3);
  border-left: 2px solid var(--gold);
  color: rgba(219, 227, 221, 0.75);
  font-size: 13px;
  line-height: 1.65;
}

.calculator-panel {
  background: var(--white);
  color: var(--ink);
  padding: var(--s4);
}

/* Calculator form fields */
.calc-field {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: var(--s3);
}

.calc-field select {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 12px 36px 12px 13px;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  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 1l5 5 5-5' stroke='%23214d3a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  transition: border-color var(--dur-fast);
}

.calc-field select:focus { border-color: var(--green); }

.calc-legend {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 var(--s3);
}

.checks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}

.check-label input[type="checkbox"] {
  accent-color: var(--green);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.calc-note {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
  line-height: 1.5;
}

/* Calculator result */
.calc-result {
  margin-top: var(--s3);
  padding: var(--s3);
  background: var(--cream);
}

.calc-result[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .calc-result:not([hidden]) {
    animation: result-reveal 0.4s var(--ease-out);
  }

  @keyframes result-reveal {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
  }
}

.calc-result__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 6px;
}

.calc-result__range {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  color: var(--green);
  margin-bottom: 4px;
  line-height: 1.1;
}

.calc-result__note {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: var(--s2);
}

/* ================================================================
   PROCESS STEPS
   ================================================================ */
.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  margin-top: var(--s5);
  position: relative;
}

.process-step {
  background: var(--paper);
  padding: var(--s4) var(--s3);
  min-height: 160px;
}

.process-step__num {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: var(--s3);
}

.process-step h3 { font-size: 17px; }

/* ================================================================
   FAQ
   ================================================================ */
.faq-list {
  max-width: 820px;
  margin: var(--s5) auto 0;
}

.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  padding: var(--s3) 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s2);
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
  color: var(--green);
  flex-shrink: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .faq-item summary::after {
    transition: transform var(--dur-base) var(--ease-out);
  }
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  color: var(--muted);
  padding-bottom: var(--s3);
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
}

/* ================================================================
   ABOUT / WHY SQUAREWOODS
   ================================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  align-items: start;
}

.about-copy p { font-size: 17px; color: var(--muted); }

.muted-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: var(--s3);
}

/* ================================================================
   CONTACT
   ================================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
}

.contact-grid > div { padding-top: var(--s2); }

.dark .contact-grid p {
  color: rgba(219, 227, 221, 0.85);
  font-size: 17px;
}

.contact-actions {
  display: flex;
  gap: var(--s2);
  margin-top: var(--s4);
  flex-wrap: wrap;
}

/* Contact form */
.contact-form {
  background: var(--white);
  padding: var(--s4);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-form label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
  color: var(--ink);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  display: block;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: border-color var(--dur-fast);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green);
}

/* Error state */
.contact-form input.field-error,
.contact-form select.field-error,
.contact-form textarea.field-error {
  border-color: var(--error);
}

/* Success state — applied to whole form */
.contact-form.form-success input,
.contact-form.form-success select,
.contact-form.form-success textarea {
  border-color: var(--line);
  color: var(--muted);
}

.contact-form textarea { resize: vertical; min-height: 100px; }

.form-span-2 { grid-column: 1 / -1; }

/* ================================================================
   FOOTER
   ================================================================ */
footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s5);
  padding: var(--s7) 0 var(--s5);
}

.footer-grid h4 {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 var(--s2);
}

.footer-grid a,
.footer-grid address {
  display: block;
  margin: 7px 0;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  transition: color var(--dur-fast);
}

.footer-grid a:hover { color: var(--green); }
.footer-grid p { color: var(--muted); font-size: 14px; margin: 6px 0 0; }

.footer-legal {
  border-top: 1px solid var(--line);
  padding: var(--s2) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  gap: var(--s2);
  flex-wrap: wrap;
}

/* ================================================================
   FLOATING WHATSAPP BUTTON
   ================================================================ */
.floating-wa {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(33, 77, 58, 0.35);
  z-index: 50;
  transition: background var(--dur-fast), transform var(--dur-base);
}

.floating-wa:hover {
  background: var(--green2);
  transform: scale(1.08);
}

.floating-wa svg {
  width: 24px;
  height: 24px;
  fill: var(--white);
}

/* Pulse ring */
.floating-wa__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--green);
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .floating-wa__pulse {
    animation: wa-pulse 2.5s ease-out infinite;
  }

  @keyframes wa-pulse {
    0%   { transform: scale(1);   opacity: 0.6; }
    100% { transform: scale(1.7); opacity: 0; }
  }
}

/* ================================================================
   BACK TO TOP
   ================================================================ */
.back-top {
  position: fixed;
  right: 24px;
  bottom: 92px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: opacity var(--dur-base), background var(--dur-fast);
}

.back-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-top:hover { background: var(--cream); }

.back-top svg {
  width: 16px;
  height: 16px;
  stroke: var(--green);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ================================================================
   TOAST NOTIFICATION
   ================================================================ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: var(--white);
  padding: 13px 22px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  border-left: 3px solid var(--green);
  transition:
    opacity   var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}

.toast--error  { border-left-color: var(--error); }
.toast--success{ border-left-color: var(--success); }

.toast.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ================================================================
   RESPONSIVE — 1050px (tablet)
   ================================================================ */
@media (max-width: 1050px) {
  .nav-links   { display: none; }
  /* [QA FIX — CRITICAL] The .nav-actions "Free Consultation" button is
     161px wide. Left visible below 1050px it consumed the nav row and
     pushed .menu-btn to x=421 on a 390px viewport — entirely off-screen,
     making the mobile menu impossible to open. Verified in headless
     Chromium at 390x844 before and after this fix.
     The same CTA already exists inside .nav-mobile, so hiding it from
     the top bar loses no functionality. */
  .nav-actions { display: none; }
  /* [QA FIX] menu-btn now carries the auto margin that .nav-actions used
     to hold, so the hamburger is pinned to the right edge and stays
     inside the viewport. */
  .menu-btn    { display: flex; margin-inline-start: auto; }
  .whatsapp-link { display: none; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .styles-grid   { grid-template-columns: repeat(4, 1fr); }
  .process-steps { grid-template-columns: repeat(3, 1fr); }
  .craft-grid    { grid-template-columns: repeat(2, 1fr); }
  .footer-grid   { grid-template-columns: 1fr 1fr; gap: var(--s4); }
  .cta-banner    { grid-template-columns: 1fr; }
  .cta-banner__actions { justify-content: flex-start; }
}

/* ================================================================
   RESPONSIVE — 900px
   Hero switches to single column: form drops below copy.
   ================================================================ */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    padding: 88px 0 56px;
    gap: var(--s4);
  }

  /* Form panel: full width, constrained height */
  .hero__form-panel {
    max-height: none;
    max-width: 520px;
  }

  /* On mobile the copy doesn't need a max-width constraint */
  .hero__copy { max-width: none; }
}

/* ================================================================
   RESPONSIVE — 720px (mobile)
   ================================================================ */
@media (max-width: 720px) {
  .container { width: min(100% - 28px, 1180px); }
  .section   { padding: 64px 0; }

  h1 { font-size: 2.8rem; }
  h2 { font-size: 2rem; }

  .hero          { min-height: auto; }
  .hero__inner   { padding: 72px 0 48px; gap: var(--s3); }

  /* Full-width form panel on phone */
  .hero__form-panel { max-width: none; }

  /* Hero copy actions stack to column */
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }

  .intro-grid,
  .section-head,
  .feature,
  .about-grid,
  .contact-grid,
  .calculator-grid { grid-template-columns: 1fr; gap: var(--s4); }

  .feature.flip > *:first-child,
  .feature.flip > *:last-child { order: initial; }

  .services-grid   { grid-template-columns: 1fr; }
  .projects-grid   { grid-template-columns: 1fr; }
  .styles-grid     { grid-template-columns: 1fr 1fr; }
  .craft-grid      { grid-template-columns: 1fr 1fr; }
  .process-steps   { grid-template-columns: 1fr; }
  .checks-grid     { grid-template-columns: 1fr; }

  /* Lead form: 2-col rows collapse to 1 col */
  .lf-row-2 { grid-template-columns: 1fr; }

  /* [QA FIX] iOS Safari auto-zooms the viewport when a focused input has a
     font-size below 16px, which reflows the hero form mid-typing. 14px ->
     16px on small screens prevents that. Desktop keeps 14px. */
  .lf-field input,
  .lf-field select { font-size: 16px; }

  .contact-form {
    grid-template-columns: 1fr;
  }
  .form-span-2 { grid-column: auto; }

  .contact-actions { flex-direction: column; }
  .contact-actions .btn { width: 100%; text-align: center; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    padding: var(--s5) 0 var(--s4);
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .cta-banner {
    padding: var(--s4);
    margin: var(--s5) 0;
  }

  .floating-wa { right: 16px; bottom: 16px; width: 50px; height: 50px; }
  .back-top    { right: 16px; bottom: 80px; }

  .toast { white-space: normal; max-width: calc(100% - 32px); }
}

/* ================================================================
   RESPONSIVE — 420px (small mobile)
   ================================================================ */
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
  .styles-grid { grid-template-columns: 1fr; }
  .craft-grid  { grid-template-columns: 1fr; }
}

/* =============================================================
   CELL 12 PATCH — Hero video mobile suppression & reduced motion
   ============================================================= */

/* On mobile the <video> has no <source> elements at parse time
   (the inline gate script adds them only for ≥900 px viewports).
   This hides the empty element so no black box appears before
   the script runs. */
@media (max-width: 899px) {
  .hero__video { display: none; }
}

/* Belt-and-suspenders: also suppress via CSS for prefers-reduced-motion.
   The gate script already skips adding sources in this case. */
@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }
}


/* >>> cell14:video-gate BEGIN <<< */
@media (max-width:899px){.hero__video{display:none;}}
@media (prefers-reduced-motion:reduce){.hero__video{display:none;}}
/* >>> cell14:video-gate END <<< */

/* >>> cell14:card-count BEGIN <<< */
/* all 4 project cards shown — nothing hidden */
/* >>> cell14:card-count END <<< */
