/* Diaz Exteriors — Playbook brand.
   Navy #0E2738 | Copper #B47645 | Warm Ivory #F4EFE8
   Tight copy. Clear hierarchy. Mobile-first. */
:root {
  --navy: #0E2738;
  --navy-2: #1a3a52;
  --copper: #B47645;
  --copper-dark: #8f5c33;
  --ivory: #F4EFE8;
  --ivory-2: #ece5d8;
  --ink: #2a3540;
  --muted: #5f6b75;
  --line: #ddd5c4;
  --white: #fff;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.6;
}
h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif; font-weight: 400;
  color: var(--navy); line-height: 1.2; margin: 0 0 12px;
}
h1 { font-size: clamp(32px, 4.5vw, 54px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: 20px; }
p { margin: 0 0 12px; max-width: 68ch; }
a { color: var(--navy); }
.shell { width: min(1140px, calc(100% - 40px)); margin: 0 auto; }
.section { padding: 56px 0; }
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  color: var(--copper-dark); text-transform: uppercase; margin: 0 0 10px;
}
.lede { font-size: 18px; color: #3d4850; max-width: 60ch; }

/* Header */
.preview {
  background: var(--navy); color: #f5ebe1; font-size: 11px;
  letter-spacing: .08em; text-align: center; padding: 8px 12px;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--line);
  width: min(1140px, calc(100% - 40px)); margin: 0 auto; flex-wrap: wrap;
}
.logo-placeholder {
  display: inline-block; padding: 10px 20px; border: 2px dashed var(--copper);
  color: var(--copper-dark); font-size: 13px; font-weight: 700; letter-spacing: .1em;
}
.topbar nav { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; }
.topbar nav > a, .nav-dropdown > button {
  font-size: 14px; text-decoration: none; color: var(--ink);
  background: none; border: none; padding: 8px 2px; cursor: pointer; font-family: inherit;
}
.topbar nav a:hover, .nav-dropdown > button:hover { color: var(--copper-dark); }
.topbar nav a[aria-current="page"] { color: var(--copper-dark); font-weight: 700; }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; z-index: 50;
  background: var(--white); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(14,39,56,.12); min-width: 220px; padding: 8px;
}
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: 10px 12px; font-size: 14px; text-decoration: none; border-radius: 6px; }
.nav-dropdown-menu a:hover { background: var(--ivory); }
.topbar .logo-placeholder { padding: 7px 14px; font-size: 12px; }
.header-cta { display: flex; align-items: center; gap: 16px; }
.header-cta .btn-copper.header-consult {
  padding: 8px 14px; font-size: 13px; min-height: 0; line-height: 1.3;
  white-space: nowrap; border-radius: 7px;
}
.header-phone { font-weight: 700; text-decoration: none; font-size: 15px; }
.nav-toggle { display: none; }

/* Buttons */
.btn-copper, .btn-outline, .btn-navy {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 8px; font-size: 15px; font-weight: 700;
  text-decoration: none; border: 2px solid transparent; min-height: 48px; cursor: pointer;
}
/* Next pass §3: button FILLS are deep copper #975C30; #B47645 is accent only. */
.btn-copper { background: #975C30; color: #fff; border-color: #975C30; }
.btn-copper:hover { background: #7E4D26; border-color: #7E4D26; }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-2); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* Hero */
.hero {
  background: var(--navy); color: #fff; padding: 72px 0;
}
.hero h1 { color: #fff; }
.hero .lede { color: #d8cfbd; }
.hero .btn-outline { color: #fff; border-color: #fff; }
.hero .btn-outline:hover { background: #fff; color: var(--navy); }

/* Trust strip */
.trust-strip { background: var(--white); border-bottom: 1px solid var(--line); padding: 20px 0; }
.trust-strip ul {
  display: flex; justify-content: center; gap: 16px 40px; flex-wrap: wrap;
  list-style: none; margin: 0; padding: 0; text-align: center;
}
.trust-strip li { font-size: 14px; font-weight: 600; color: var(--navy); }

/* Cards */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; margin-top: 28px;
}
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--muted); }
.card img { width: 100%; height: 180px; object-fit: cover; border-radius: 8px; margin-bottom: 16px; }
.card .btn-outline { margin-top: 12px; font-size: 14px; padding: 10px 20px; min-height: 44px; }

/* Accordion */
.dx-accordion-group { margin-top: 20px; border-top: 1px solid var(--line); }
.dx-accordion { border-bottom: 1px solid var(--line); }
.dx-accordion summary {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 4px; cursor: pointer; font-weight: 600; color: var(--navy);
  font-size: 16px; list-style: none; min-height: 56px;
}
.dx-accordion summary::-webkit-details-marker { display: none; }
.dx-accordion summary span { font-size: 22px; color: var(--copper); font-weight: 400; }
.dx-accordion[open] summary span { transform: rotate(45deg); }
.dx-detail { padding: 0 4px 20px; font-size: 15px; color: var(--ink); }
.dx-detail p { margin-bottom: 10px; }

/* CTA band */
.cta-band { background: var(--navy); color: #fff; padding: 64px 0; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d8cfbd; margin: 0 auto 20px; }
.cta-band .cta-row { justify-content: center; }
.cta-band .btn-outline { color: #fff; border-color: #fff; }
.cta-band .btn-outline:hover { background: #fff; color: var(--navy); }

/* ---------- photo-rich service pages ---------- */
.hero-photo { position: relative; background-size: cover; background-position: center; color: #fff; }
.hero-photo::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(rgba(14,39,56,.78), rgba(14,39,56,.62));
}
.hero-photo .shell { position: relative; z-index: 1; }
.hero-photo .eyebrow { color: var(--copper); }
a.card-link { display: block; text-decoration: none; color: inherit; }
a.card-link:hover .card { border-color: var(--copper); box-shadow: 0 4px 18px rgba(14,39,56,.10); }
.card { transition: border-color .15s, box-shadow .15s; }
.card .photo-tag {
  display: inline-block; font-size: 11px; color: var(--muted);
  letter-spacing: .04em; margin-top: 8px; font-style: italic;
}
/* manufacturer logos on cards */
.mfr-logo {
  display: block; max-height: 40px; width: auto; max-width: 180px;
  margin: 12px 0 4px; object-fit: contain; object-position: left center;
}
.mfr-logo-row {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line);
}
.mfr-logo-row .mfr-logo { margin: 0; max-height: 34px; }
.mfr-logo-dark {
  display: inline-block; background: var(--navy); border-radius: 6px;
  padding: 6px 10px; margin: 12px 0 4px;
}
.mfr-logo-dark .mfr-logo { margin: 0; }
/* symptom photo strip */
.symptom-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-top: 20px;
}
.symptom { text-align: center; }
.symptom img {
  width: 100%; height: 130px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line);
}
.symptom span { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-top: 6px; }
.symptom .photo-tag { margin-top: 2px; }
/* photo grid for additions page cards */
.photo-card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px; margin-top: 24px;
}

/* Footer */
footer { background: var(--navy); color: #c9bfa9; padding: 56px 0 24px; margin-top: 0; }
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px; margin-bottom: 32px;
}
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 12px; font-family: inherit; font-weight: 700; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: #c9bfa9; text-decoration: none; font-size: 14px; }
.footer-grid a:hover { color: #fff; }
.footer-grid .logo-placeholder { border-color: var(--copper); color: var(--copper); margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid #2a4358; padding-top: 20px; font-size: 13px; }
.footer-bottom a { color: #c9bfa9; }

/* Utilities */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.checklist { list-style: none; padding: 0; }
.checklist li { padding: 8px 0 8px 28px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--copper-dark); font-weight: 700; }

/* Mobile */
@media (max-width: 768px) {
  .topbar nav { display: none; }
  .topbar nav.open { display: flex; flex-direction: column; width: 100%; align-items: flex-start; }
  /* Codex visual closeout: when the mobile menu opens, keep the toolbar
     (wordmark, toggle, CTA) intact in its row; expanded links drop to a
     full-width row below instead of collapsing the toolbar. */
  .topbar nav[data-nav].nav-open { display: contents; }
  .topbar nav[data-nav].nav-open ul.nav-links { flex-basis: 100%; order: 4; }
  .nav-toggle { display: flex; width: 46px; height: 46px; align-items: center; justify-content: center; background: none; border: 1px solid var(--line); border-radius: 8px; }
  .two-col { grid-template-columns: 1fr; }
  .header-cta .header-phone { display: none; }
  .section { padding: 40px 0; }
  .hero { padding: 48px 0; }
}

/* before/after feature */
.ba-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.ba-pair figure { margin: 0; }
.ba-pair img { width: 100%; height: 220px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.ba-pair figcaption { font-size: 13px; font-weight: 700; color: var(--navy); margin-top: 6px; text-align: center; }
@media (max-width: 480px) { .ba-pair { grid-template-columns: 1fr; } }

/* manufacturer logos on cards */
.mfg-logos { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.mfg-logos img { max-height: 36px; width: auto; max-width: 130px; object-fit: contain; }
.mfg-logos img.logo-dark { filter: brightness(0); }
/* text fallback for brands with no obtainable official logo file (e.g. TimberTech) */
.mfg-text-logo { font-weight: 700; color: var(--navy); font-size: 15px; line-height: 1; letter-spacing: 0.01em; display: inline-flex; align-items: center; }

/* manufacturer logos at top of partner cards */
.card img.mfr-logo { display: inline-block; width: auto; height: auto; max-height: 40px; max-width: 170px; object-fit: contain; border-radius: 0; margin: 2px 14px 14px 0; vertical-align: middle; }

/* white logos get a navy chip so they read on ivory */
.mfr-logo-chip { display: inline-block; background: #0E2738; border-radius: 8px; padding: 8px 14px; margin: 0 0 14px; vertical-align: middle; }
.mfr-logo-chip .mfr-logo { margin: 0; max-height: 26px; }
/* square medallion logos need more height to stay legible */
.mfr-logo-medallion { max-height: 54px; }

/* --- Homepage top sections: compact hero, dual cards, logo strip, tools --- */
.hero-home { padding: 56px 0 44px; }
.hero-home h1 { font-size: 34px; line-height: 1.12; margin: 0 0 10px; }
.hero-home .lede { font-size: 17px; margin: 0 0 20px; max-width: 34em; }
.hero-cta-stack { display: inline-flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.hero-cta-stack .btn-copper, .hero-cta-stack .btn-outline { width: auto; padding: 14px 30px; text-align: center; }
.hero-badges { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: nowrap; gap: 6px 10px; }
.hero-badges li { color: #fff; font-size: 11px; font-weight: 600; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.hero-badges li::before {
  content: "✓"; display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--copper); color: var(--copper);
  font-size: 9px; font-weight: 700; flex: 0 0 auto;
}
/* second badge row: trust items — 3-column grid so checkmarks align vertically */
.hero-badges.hero-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.hero-badges.hero-trust li { min-width: 0; white-space: normal; align-items: flex-start; text-wrap: balance; }
.hero-badges.hero-trust li::before { margin-top: 1px; }
.dual-cards { padding-top: 26px; }.logo-strip-section { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px clamp(16px, 6vw, 56px); overflow: hidden; }
/* Worker A — Codex round 2, item 10a: the scrolling window sits inset from the
   page edges (section padding above) and logos fade at the window edges via
   mask instead of hard-cutting mid-scroll. */
.logo-marquee { overflow: hidden; padding: 12px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
.logo-marquee-track {
  display: flex; align-items: center; gap: 44px; width: max-content;
  padding-right: 44px;
  animation: logo-scroll 32s linear infinite;
}
.logo-marquee-track img { max-height: 36px; width: auto; max-width: 120px; object-fit: contain; flex: 0 0 auto; }
.logo-marquee-track .chip { background: var(--navy); border-radius: 6px; padding: 5px 9px; flex: 0 0 auto; }
.logo-marquee-track .chip img { display: block; }
.logo-marquee:hover .logo-marquee-track { animation-play-state: paused; }
@keyframes logo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .logo-marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; padding-right: 0; }
  .logo-marquee { -webkit-mask-image: none; mask-image: none; }
}
.tools-grid .card > p:last-child { margin-bottom: 0; }
@media (max-width: 719px) {
  /* Dual audience cards: side by side, scaled up to match mockup — substantial, matched pair */
  .dual-cards .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .dual-cards .card { padding: 18px; display: flex; flex-direction: column; }
  .dual-cards .card img { height: 190px; margin-bottom: 14px; }
  .dual-cards .card h3 { font-size: 19px; font-weight: 700; line-height: 1.3; min-height: 2.6em; margin-bottom: 8px; }
  .dual-cards .card p { font-size: 14px; line-height: 1.5; }
  .dual-cards .card p:last-child { margin-top: auto; margin-bottom: 0; padding-top: 14px; }
  .dual-cards .card .btn-copper,
  .dual-cards .card .btn-outline { font-size: 13px; padding: 11px 8px; width: 100%; text-align: center; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; text-wrap: balance; }

  /* Tools grid: matched pair — equal heights, aligned baselines, bottom-pinned single-line buttons */
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
  .tools-grid .card { padding: 14px; display: flex; flex-direction: column; }
  .tools-grid .card:nth-child(3) { grid-column: 1 / -1; }
  .tools-grid .card img { height: 110px; margin-bottom: 10px; }
  .tools-grid .tool-head { font-size: 15px; line-height: 1.3; min-height: 2.6em; margin-bottom: 8px; }
  .tools-grid .card p { font-size: 13px; }
  .tools-grid .card > p:last-child { margin-top: auto; margin-bottom: 0; padding-top: 10px; }
  .tools-grid .card .btn-copper { font-size: 11.5px; padding: 10px 6px; width: 100%; text-align: center; white-space: nowrap; }

  /* Services grid: 2 columns, matched pairs — equal heights, aligned baselines, bottom-pinned logo rows */
  #services .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
  #services .card-grid > .card-link { display: flex; }
  #services .card-grid > .card-link:nth-child(5) { grid-column: 1 / -1; }
  #services .card { padding: 12px; display: flex; flex-direction: column; flex: 1; }
  #services .card img:first-child { height: 84px; margin-bottom: 8px; }
  #services .card h3 { font-size: 15.5px; line-height: 1.3; min-height: 1.3em; margin-bottom: 4px; }
  #services .card p { font-size: 13.5px; line-height: 1.45; margin-bottom: 0; }
  #services .card .photo-tag { font-size: 10.5px; margin-bottom: 4px; }
  #services .card .mfg-logos { margin-top: auto; padding-top: 6px; gap: 6px; }
  #services .card .mfg-logos img { max-height: 22px; max-width: 80px; margin-bottom: 0; }
  #services .card .mfg-text-logo { font-size: 13px; }
  /* Doors card: compact 2-row logo block — ProVia + Simpson on one tight row, Therma-Tru beneath */
  #services .card .mfg-logos.stack-2 { flex-direction: column; align-items: flex-start; gap: 5px; }
  #services .card .mfg-logos.stack-2 .logo-row { display: flex; gap: 8px; align-items: center; }

  /* Tighten pass — snug, efficient vertical rhythm, no airy gaps.
     L08 spacing tokens: ~40px between major mobile sections, 16px card gaps,
     20px gutters (in .shell) — hierarchy from block removal, not tiny type. */
  .section { padding: 40px 0; }
  .cta-band { padding: 36px 0; }
  .cta-band p { margin-bottom: 16px; }
  .cta-row { margin-top: 16px; gap: 10px; }
  footer { padding: 40px 0 20px; }
  .footer-grid { gap: 24px; margin-bottom: 24px; }
  .footer-grid li { margin-bottom: 6px; }
  .footer-grid h4 { margin-bottom: 10px; }
  .card-grid { margin-top: 20px; gap: 16px; }
}
.tool-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--navy); margin: 0 0 12px; }
.tool-head::before {
  content: "✓"; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--copper); color: var(--copper);
  font-size: 11px; font-weight: 700; flex: 0 0 auto;
}
.tools-grid .card img { margin-bottom: 12px; }

/* Worker A — Codex round 2, item 2: one-row header at 390px.
   ≤480px: compact two-line wordmark (~118px), CTA shortens to "Consultation"
   (the "Get a " span hides), 44px CTA keeps touch target; the three items fit
   one 390px row (~64px header) while flex-wrap stays on so the open menu can
   still drop to its own row. ≤360px: deliberate two-row layout — CTA takes a
   full-width second row instead of squeezing. header.topbar specificity beats
   the per-page branding pass without touching it. */
@media (max-width: 480px) {
  header.topbar .wordmark { white-space: normal; max-width: 118px; font-size: 14px; line-height: 1.15; }
  header.topbar .cta-verb { display: none; }
  header.topbar .btn-copper { min-height: 44px; padding: 10px 14px; font-size: 13px; }
}
@media (max-width: 360px) {
  header.topbar .btn-copper { flex: 1 1 100%; text-align: center; }
  /* Codex visual closeout: stack tool cards at very narrow widths so the
     "Request a Consultation" button label never clips; allow it to wrap. */
  .tools-grid { grid-template-columns: minmax(0, 1fr); }
  .tools-grid .card .btn-copper { white-space: normal; }
  /* Doors manufacturer logos: let the ProVia/Simpson row wrap instead of
     clipping the Simpson logo at 320px. */
  #services .card .mfg-logos.stack-2 .logo-row { flex-wrap: wrap; }
  #services .card .mfg-logos img { max-width: 100%; }
}
/* Accessibility: visually-hidden text (screen-reader only). Codex round 3 fix:
   index.html/roofing.html load only playbook.css, so the nav toggle's
   "Menu" label was visible and crowding the hamburger icon. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* --- Image-frame hardening (Stage 1 A, next-pass §1) — appended, scoped ---
   One aspect-ratio frame per card group: rendered height comes from the
   frame (width:100% + aspect-ratio + height:auto), never from an image's
   intrinsic dimensions, so a wrong intrinsic height can never drive CSS
   height. object-fit:cover crops inside the frame; display:block removes
   the inline baseline gap. Manufacturer logos are excluded — they keep
   their contain/max-height rules above. Ratios approximate the frames
   these groups already rendered at (card photos ~180px tall on a
   ~290-310px image width ≈ 16/10; symptom thumbs ~130px on a ~350px
   column ≈ 8/3). Earlier fixed-height rules for these groups are
   superseded by these later, equal/higher-specificity rules. */
.card img:not(.mfr-logo) { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
#services .card img:not(.mfr-logo) { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.tools-grid .card img:not(.mfr-logo) { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.symptom img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 3; object-fit: cover; }
.ba-pair img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
@media (max-width: 719px) {
  /* The #services mobile rule earlier in this file keys height off
     :first-child with ID specificity; restate the frame there so the
     height stays aspect-driven at mobile widths too. */
  #services .card img:first-child { height: auto; aspect-ratio: 16 / 10; }
}
