/* Houston Pergola Pros — design system v2 (see DESIGN.md)
   Palette: Cedar Plank #7A4B2A / Pine Shadow #1E2B20 / Sand Linen #F4EEDF / Charcoal Fence #2A2620 / Bay Teal #1E6F6B */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Karla:wght@400;500;600;700&display=swap');

:root {
  --cedar: #7A4B2A;
  --pine: #1E2B20;
  --sand: #F4EEDF;
  --ink: #2A2620;
  --teal: #1E6F6B;
  --line: #E2D9C4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Karla', sans-serif;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: var(--pine);
  line-height: 1.2;
}

a { color: var(--teal); }

/* Accessibility: visible keyboard focus on every interactive element (WCAG 2.2 AA) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Slat-shadow divider — the one signature motif, used between major sections */
.slat-divider {
  height: 14px;
  background: repeating-linear-gradient(
    110deg,
    rgba(30,43,32,0.14) 0px,
    rgba(30,43,32,0.14) 6px,
    transparent 6px,
    transparent 26px
  );
}
.slat-divider.light {
  background: repeating-linear-gradient(
    110deg,
    rgba(30,111,107,0.22) 0px,
    rgba(30,111,107,0.22) 6px,
    transparent 6px,
    transparent 26px
  );
}
.slat-vert {
  width: 1px;
  align-self: stretch;
  background: repeating-linear-gradient(
    180deg,
    rgba(30,43,32,0.2) 0px,
    rgba(30,43,32,0.2) 6px,
    transparent 6px,
    transparent 18px
  );
}

/* Header */
header.site {
  background: var(--pine);
  position: sticky;
  top: 0;
  z-index: 10;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}
header.site .brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: #fff;
  text-decoration: none;
}
header.site nav { display: flex; align-items: center; flex-wrap: wrap; }
header.site nav a {
  color: #E8E2D2;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
  font-size: 0.92rem;
}
header.site nav a:hover { color: #fff; }
header.site .phone-btn {
  background: var(--teal);
  color: #fff;
  padding: 9px 16px;
  border-radius: 4px;
  font-weight: 600;
  margin-left: 20px;
  text-decoration: none;
  white-space: nowrap;
}
header.site nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* Mobile nav toggle (hamburger) — hidden on desktop */
header.site .nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px 4px;
  cursor: pointer;
  margin-left: 14px;
}
header.site .nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #E8E2D2;
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
header.site .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
header.site .nav-toggle.open span:nth-child(2) { opacity: 0; }
header.site .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero — solid, no gradient, slat-shadow corner graphic instead */
.hero {
  position: relative;
  background: var(--pine);
  color: #fff;
  padding: 72px 0 64px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 42%;
  background: repeating-linear-gradient(
    115deg,
    rgba(244,238,223,0.07) 0px,
    rgba(244,238,223,0.07) 10px,
    transparent 10px,
    transparent 46px
  );
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero h1 {
  color: #fff;
  font-size: 2.5rem;
  max-width: 680px;
}
.hero p.lead {
  font-size: 1.15rem;
  max-width: 560px;
  color: #D6D0BE;
}
.cta-row { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 4px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: #185853; }
.btn-outline { border: 1px solid #fff; color: #fff; }

/* Trust bar */
.trust-bar {
  background: var(--sand);
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.trust-bar .wrap {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.trust-item { font-weight: 600; color: var(--pine); font-size: 0.94rem; flex: 1; min-width: 200px; }

/* Sections */
section { padding: 58px 0; }
.section-head { max-width: 680px; margin-bottom: 30px; }
.section-head h2 { font-size: 1.9rem; margin-bottom: 10px; }

/* Featured + minor layout (replaces 3 identical cards) */
.feature-main {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
  margin-bottom: 36px;
}
.feature-main h3 { font-size: 1.5rem; margin: 0 0 10px; }
.feature-minor-row { display: flex; gap: 0; align-items: stretch; }
.feature-minor {
  flex: 1;
  padding: 4px 28px;
}
.feature-minor:first-child { padding-left: 0; }
.feature-minor h3 { font-size: 1.15rem; margin: 0 0 8px; }
.feature-minor p { margin: 0 0 10px; }

/* Plain list rows (replaces "why choose us" card grid) */
.feature-list { border-top: 1px solid var(--line); }
.feature-list .row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.feature-list .row h3 { margin: 0; font-size: 1.2rem; }
.feature-list .row p { margin: 0; }

/* Numbered step row (legitimate steps only, per DESIGN.md) */
.step-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.step {
  flex: 1;
  padding: 0 26px;
}
.step:first-child { padding-left: 0; }
.step .num {
  font-family: 'Fraunces', serif;
  font-size: 2.2rem;
  color: var(--teal);
  font-weight: 600;
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.step h3 { font-size: 1.05rem; margin: 0 0 6px; }
.step p { margin: 0; }

@media (max-width: 820px) {
  .feature-main { grid-template-columns: 1fr; }
  .feature-minor-row, .step-row { flex-direction: column; }
  .feature-minor, .step { padding: 0; }
  .slat-vert { display: none; }
  .hero h1 { font-size: 2rem; }
  .feature-list .row { grid-template-columns: 1fr; }

  /* Collapse the text nav into a dropdown; keep brand + call button always visible */
  header.site .wrap { justify-content: flex-start; }
  header.site .phone-btn { order: 2; margin-left: auto; padding: 8px 12px; font-size: 0.88rem; }
  header.site .nav-toggle { order: 3; display: inline-block; }
  header.site nav {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 14px;
    gap: 0;
  }
  header.site nav.open { display: flex; }
  header.site nav a {
    margin-left: 0;
    width: 100%;
    padding: 12px 4px;
    border-top: 1px solid rgba(232,226,210,0.15);
  }
  header.site nav a:first-child { border-top: 0; }
}

/* Image placeholder blocks (swap for real photos once generated) */
.img-slot {
  background: var(--sand);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8C8268;
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 240px;
  text-align: center;
  padding: 16px;
}

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-item h3 { font-size: 1.05rem; margin: 0 0 8px; color: var(--ink); font-family: 'Karla', sans-serif; font-weight: 700; }
.faq-item p { margin: 0; }

/* Final CTA band */
.cta-band {
  background: var(--cedar);
  color: #fff;
  padding: 50px 0;
  text-align: center;
}
.cta-band h2 { color: #fff; }

/* Form */
.form-wrap {
  background: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  padding: 10px;
  max-width: 640px;
  margin: 28px auto 0;
}
.form-wrap iframe { width: 100%; border: none; min-height: 560px; }

/* Footer */
footer.site {
  background: var(--pine);
  color: #C9C2AC;
  padding: 42px 0 24px;
  font-size: 0.9rem;
}
footer.site .grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
footer.site h3 { color: #fff; font-size: 1rem; font-family: 'Karla', sans-serif; }
footer.site a { color: #C9C2AC; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.8rem;
  color: #948C73;
}

/* Service area tag list (simplified from pill chips) */
.chip-list { display: flex; flex-wrap: wrap; gap: 0 22px; margin-top: 14px; }
.chip {
  color: var(--pine);
  font-weight: 600;
  font-size: 0.92rem;
  border-bottom: 2px solid var(--teal);
  padding-bottom: 2px;
}

/* generic two-col grid still used on service pages (not a 3-card pattern, so it stays) */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; align-items: center; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

/* Testimonials — asymmetric (one featured pull-quote + two minor), matching the
   feature-main/feature-minor-row pattern rather than three identical cards (see DESIGN.md) */
.testimonial-featured {
  border-left: 4px solid var(--teal);
  padding: 4px 0 4px 24px;
  margin-bottom: 28px;
}
.testimonial-featured p.quote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--pine);
  margin: 0 0 10px;
  line-height: 1.45;
}
.testimonial-minor-row { display: flex; gap: 32px; }
.testimonial-minor { flex: 1; }
.testimonial-minor p.quote {
  font-size: 1rem;
  margin: 0 0 8px;
}
.testimonial-attr {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--cedar);
}
@media (max-width: 820px) {
  .testimonial-minor-row { flex-direction: column; gap: 20px; }
}
