/* ==========================================================================
   CGS ROOFING MASTER TEMPLATE — DESIGN SYSTEM
   ========================================================================== */

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

/* ---------- BRAND COLORS (edit here to re-skin for a new client) ---------- */
:root{
  --color-primary:        #1F3A34;   /* deep marsh green */
  --color-primary-light:  #2C4E45;
  --color-secondary:      #2C4A5E;   /* weathered slate blue */
  --color-accent:         #A9744F;   /* copper / patina metal accent */
  --color-accent-light:   #C79269;

  --color-bg:             #FBF9F4;   /* oyster white */
  --color-bg-alt:         #F1EAD9;   /* warm sand */
  --color-bg-dark:        #16261F;

  --color-text:           #1A2420;
  --color-text-muted:     #57635C;
  --color-text-inverse:   #FBF9F4;

  --color-border:         #DCD4C0;
  --color-border-dark:    rgba(251,249,244,0.18);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --radius-sm: 3px;
  --radius-md: 6px;
  --max-width: 1200px;

  --header-height: 76px;
}

/* ---------- RESET ---------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; scroll-padding-top: calc(var(--header-height) + 16px); }
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--color-text);
  background:var(--color-bg);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul, ol{ margin:0; padding:0; list-style:none; }
button{ font-family:inherit; cursor:pointer; }
h1,h2,h3,h4{ font-family:var(--font-display); margin:0; line-height:1.15; font-weight:600; color:var(--color-primary); }
p{ margin:0; }
:focus-visible{ outline: 3px solid var(--color-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important; scroll-behavior:auto !important; }
}

.container{ max-width:var(--max-width); margin:0 auto; padding:0 var(--space-3); }
.section{ padding: var(--space-6) 0; }
.section--tight{ padding: var(--space-5) 0; }
.section--alt{ background:var(--color-bg-alt); }
.section--dark{ background:var(--color-bg-dark); color:var(--color-text-inverse); }
.section--dark h2, .section--dark h3{ color:var(--color-text-inverse); }
.section--primary{ background:var(--color-primary); color:var(--color-text-inverse); }
.section--primary h2, .section--primary h3{ color:var(--color-text-inverse); }

.eyebrow{
  font-size:0.8125rem; letter-spacing:0.02em; color:var(--color-accent);
  font-weight:600; margin-bottom:var(--space-1); display:block;
}
.section-head{ max-width:640px; margin-bottom:var(--space-4); }
.section-head p{ color:var(--color-text-muted); margin-top:var(--space-2); font-size:1.05rem; }
h2{ font-size:clamp(1.75rem, 3vw, 2.5rem); }
h3{ font-size:1.25rem; }
.hr{ border:none; border-top:1px solid var(--color-border); margin:0; }

/* ---------- BUTTONS ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:0.5rem;
  padding:0.9rem 1.6rem; font-weight:600; font-size:0.95rem;
  border-radius:var(--radius-sm); border:1.5px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space:nowrap;
}
.btn--primary{ background:var(--color-accent); color:#FFF; }
.btn--primary:hover{ background:var(--color-accent-light); }
.btn--outline{ border-color: currentColor; background:transparent; }
.btn--outline:hover{ background: rgba(0,0,0,0.05); }
.section--primary .btn--outline, .section--dark .btn--outline{ border-color: var(--color-text-inverse); }
.section--primary .btn--outline:hover, .section--dark .btn--outline:hover{ background: rgba(255,255,255,0.1); }
.btn--block{ width:100%; }
.btn--sm{ padding:0.6rem 1.1rem; font-size:0.875rem; }

/* ---------- HEADER ---------- */
.site-header{
  position:sticky; top:0; z-index:100; background:var(--color-bg);
  border-bottom:1px solid var(--color-border);
  height:var(--header-height);
}
.header-inner{
  height:100%;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:var(--space-2);
}
.logo{
  font-family:var(--font-display); font-weight:600; font-size:1.15rem; color:var(--color-primary);
  flex-shrink:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  max-width:320px;
}
@media (max-width:480px){
  .logo{ font-size:0.8rem; }
}
@media (max-width:340px){
  .logo{ font-size:0.7rem; }
}
.logo span{ color:var(--color-accent); }
.main-nav{ justify-self:center; min-width:0; }
.main-nav ul{ display:flex; gap:1.15rem; white-space:nowrap; }
.main-nav a{ font-weight:500; font-size:0.88rem; padding:0.4rem 0; border-bottom:2px solid transparent; white-space:nowrap; }
.main-nav a:hover, .main-nav a[aria-current="page"]{ border-bottom-color:var(--color-accent); }
.header-actions{ justify-self:end; display:flex; align-items:center; gap:0.85rem; flex-shrink:0; }
.lang-toggle{
  display:flex; align-items:center; border:1.5px solid var(--color-border); border-radius:20px; overflow:hidden;
  flex-shrink:0;
}
.lang-toggle button{
  background:none; border:none; padding:0.35rem 0.6rem; font-weight:700; font-size:0.72rem;
  letter-spacing:0.02em; color:var(--color-text-muted); line-height:1;
}
.lang-toggle button:first-child{ border-right:1.5px solid var(--color-border); }
.lang-toggle button.active{ background:var(--color-primary); color:#fff; }
.header-phone{
  font-weight:700; font-size:0.88rem; display:flex; align-items:center; gap:0.35rem;
  white-space:nowrap; flex-shrink:0; color:var(--color-primary);
}
.header-phone svg{ flex-shrink:0; color:var(--color-accent); }
.header-cta{ flex-shrink:0; white-space:nowrap; padding:0.55rem 1rem; font-size:0.84rem; }
.hamburger{ display:none; background:none; border:none; padding:0.4rem; flex-shrink:0; }
.hamburger svg{ width:24px; height:24px; }

.mobile-nav{
  display:none; position:fixed; inset:var(--header-height) 0 0 0; background:var(--color-bg); z-index:99;
  overflow-y:auto; padding:var(--space-4) var(--space-3);
}
.mobile-nav.open{ display:block; }
.mobile-nav ul{ display:flex; flex-direction:column; gap:1.25rem; font-size:1.15rem; font-weight:500; }
.mobile-nav .lang-toggle{ margin-top:var(--space-3); }
.mobile-nav .mobile-phone{
  display:flex; align-items:center; gap:0.5rem; margin-top:var(--space-3);
  font-weight:700; font-size:1.05rem; color:var(--color-primary);
}
.mobile-nav .mobile-phone svg{ color:var(--color-accent); flex-shrink:0; }

.sticky-mobile-bar{
  display:none; position:fixed; bottom:0; left:0; right:0; z-index:98;
  background:var(--color-primary); padding:0.6rem var(--space-2);
  box-shadow:0 -2px 10px rgba(0,0,0,0.15);
}
.sticky-mobile-bar .row{ display:flex; gap:0.6rem; }
.sticky-mobile-bar a{ flex:1; text-align:center; white-space:nowrap; padding-left:0.6rem; padding-right:0.6rem; }

/* Collapse to the hamburger menu comfortably BEFORE the nav/phone/CTA run
   out of room and wrap — 1180px gives every element (logo, 6 nav links,
   EN|ES, phone, CTA) enough breathing room on real laptop widths. */
@media (max-width: 1180px){
  .main-nav{ display:none; }
  .header-phone{ display:none; }
  .hamburger{ display:block; }
  .sticky-mobile-bar{ display:block; }
  body{ padding-bottom:64px; }
  .header-actions{ gap:0.75rem; }
  /* The 3-column auto/1fr/auto grid leaves an empty middle track (nav is
     gone) that still claims two gaps worth of space either side of it —
     space that would otherwise go to the logo. Two explicit columns with
     space-between removes that phantom track entirely. */
  .header-inner{ grid-template-columns:auto auto; justify-content:space-between; }
  /* With the nav gone, the header row is just logo + EN|ES + CTA +
     hamburger — on narrow phones that's still too much next to a long
     company name and squeezes the logo down to a sliver (it can render
     as "[RO…"). The sticky bottom bar already repeats this same estimate
     CTA (it also uses the .header-cta class, so this selector is scoped
     to .header-actions only), so drop the header's copy here and
     prioritize logo + language toggle + hamburger, which always leaves
     the logo enough room. */
  .header-actions .header-cta{ display:none; }
}
.header-cta .btn-label-short{ display:none; }
@media (max-width: 480px){
  .header-cta .btn-label-full{ display:none; }
  .header-cta .btn-label-short{ display:inline; }
}

/* ---------- HERO ---------- */
.hero{
  display:grid; grid-template-columns:1.05fr 0.95fr; align-items:stretch; min-height:640px;
}
.hero-copy{ display:flex; flex-direction:column; justify-content:center; padding:var(--space-5) var(--space-4); }
.hero-copy h1{ font-size:clamp(2.25rem, 4.2vw, 3.5rem); margin:0.5rem 0 var(--space-2); }
.hero-copy p{ font-size:1.15rem; color:var(--color-text-muted); max-width:520px; margin-bottom:var(--space-3); }
.hero-ctas{ display:flex; gap:1rem; flex-wrap:wrap; }
.hero-image{ position:relative; overflow:hidden; min-height:340px; }
.hero-image img{ width:100%; height:100%; object-fit:cover; }
.hero-image .badge{
  position:absolute; left:var(--space-3); bottom:var(--space-3); background:rgba(27,42,36,0.85);
  color:#fff; padding:0.6rem 1rem; border-radius:var(--radius-sm); font-size:0.85rem; font-weight:600;
  backdrop-filter: blur(2px);
}
@media (max-width:900px){
  .hero{ grid-template-columns:1fr; min-height:auto; }
  .hero-copy{ padding:var(--space-4) var(--space-3); order:2; }
  .hero-image{ order:1; min-height:280px; }
}

/* ---------- TRUST STRIP ---------- */
.trust-strip{ background:var(--color-bg-alt); border-top:1px solid var(--color-border); border-bottom:1px solid var(--color-border); }
.trust-strip .container{ display:flex; flex-wrap:wrap; gap:var(--space-4) var(--space-5); justify-content:center; align-items:center; padding:var(--space-3) var(--space-3); }
.trust-item{ display:flex; align-items:center; gap:0.5rem; font-weight:600; font-size:0.95rem; color:var(--color-primary); white-space:nowrap; }
.trust-item .stat-num{ font-family:var(--font-display); font-size:1.4rem; color:var(--color-accent); }
[data-flag="hidden"]{ display:none !important; }

/* ---------- LOWCOUNTRY / 3-POINT ---------- */
.point-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:var(--space-4); margin-top:var(--space-4); }
.point-card{ border-left:3px solid var(--color-accent); padding-left:var(--space-2); }
.point-card h3{ margin-bottom:0.4rem; font-size:1.05rem; }
.point-card p{ color:var(--color-text-muted); font-size:0.95rem; }
@media (max-width:800px){ .point-grid{ grid-template-columns:1fr; gap:var(--space-3); } }

/* ---------- MATERIALS ---------- */
.materials-grid{ display:grid; grid-template-columns:1fr 1fr; gap:var(--space-4); margin-top:var(--space-4); }
.material-card{ background:var(--color-bg); border:1px solid var(--color-border); border-radius:var(--radius-md); overflow:hidden; }
.material-card img{ height:220px; width:100%; object-fit:cover; }
.material-card .body{ padding:var(--space-3); }
.material-card h3{ margin-bottom:0.5rem; }
.material-card .desc{ color:var(--color-text-muted); margin-bottom:var(--space-2); }
.material-card .cols{ display:grid; grid-template-columns:1fr 1fr; gap:var(--space-2); margin-bottom:var(--space-2); }
.material-card h4{ font-family:var(--font-body); font-size:0.8rem; text-transform:uppercase; letter-spacing:0.04em; color:var(--color-primary); margin-bottom:0.5rem; font-weight:700; }
.material-card ul li{ font-size:0.9rem; color:var(--color-text-muted); padding-left:1rem; position:relative; margin-bottom:0.35rem; }
.material-card ul li::before{ content:"–"; position:absolute; left:0; color:var(--color-accent); }
.material-card .takeaway{ font-weight:600; font-style:italic; color:var(--color-primary); border-top:1px solid var(--color-border); padding-top:var(--space-2); font-family:var(--font-display); font-size:1.05rem; }
@media (max-width:900px){ .materials-grid{ grid-template-columns:1fr; } }

.compare-table-wrap{ overflow-x:auto; margin-top:var(--space-5); }
.compare-table{ width:100%; border-collapse:collapse; min-width:640px; }
.compare-table caption{ text-align:left; font-family:var(--font-display); font-size:1.3rem; margin-bottom:var(--space-2); color:var(--color-primary); }
.compare-table th, .compare-table td{ text-align:left; padding:0.9rem 1rem; border-bottom:1px solid var(--color-border); font-size:0.92rem; }
.compare-table thead th{ color:var(--color-primary); font-size:0.78rem; text-transform:uppercase; letter-spacing:0.03em; border-bottom:2px solid var(--color-primary); }
.compare-table tbody td:first-child{ font-weight:600; color:var(--color-primary); }
.table-disclaimer{ margin-top:var(--space-2); font-size:0.85rem; color:var(--color-text-muted); }

/* ---------- SERVICES GRID ---------- */
.services-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:0; margin-top:var(--space-4); border-top:1px solid var(--color-border); border-left:1px solid var(--color-border); }
.service-card{ padding:var(--space-3); border-right:1px solid var(--color-border); border-bottom:1px solid var(--color-border); transition:background-color 0.15s ease; }
.service-card:hover{ background:var(--color-bg-alt); }
.service-card h3{ margin-bottom:0.5rem; font-size:1.1rem; }
.service-card p{ color:var(--color-text-muted); font-size:0.92rem; margin-bottom:var(--space-2); }
.service-card a{ font-weight:600; font-size:0.88rem; color:var(--color-accent); }
@media (max-width:900px){ .services-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:600px){ .services-grid{ grid-template-columns:1fr; } }

/* ---------- PROCESS ---------- */
.process-list{ counter-reset:step; display:grid; grid-template-columns:repeat(7,1fr); gap:var(--space-2); margin-top:var(--space-4); }
.process-step{ counter-increment:step; text-align:left; padding-top:var(--space-2); border-top:2px solid var(--color-accent); }
.process-step::before{ content: counter(step, decimal-leading-zero); font-family:var(--font-display); font-size:1.6rem; color:var(--color-accent); display:block; margin-bottom:0.4rem; }
.process-step h3{ font-size:0.95rem; margin-bottom:0.3rem; }
.process-step p{ font-size:0.85rem; color:var(--color-text-muted); }
@media (max-width:1000px){ .process-list{ grid-template-columns:repeat(3,1fr); } }
@media (max-width:600px){ .process-list{ grid-template-columns:1fr 1fr; } }

/* ---------- GALLERY ---------- */
.gallery-filters{ display:flex; gap:0.6rem; flex-wrap:wrap; margin:var(--space-3) 0 var(--space-4); }
.gallery-filters button{
  background:none; border:1.5px solid var(--color-border); padding:0.5rem 1rem; border-radius:20px;
  font-size:0.85rem; font-weight:600; color:var(--color-text-muted);
}
.gallery-filters button.active{ background:var(--color-primary); border-color:var(--color-primary); color:#fff; }
.gallery-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:var(--space-3); }
.gallery-item{ position:relative; border-radius:var(--radius-md); overflow:hidden; aspect-ratio:4/3; }
.gallery-item img{ width:100%; height:100%; object-fit:cover; transition:transform 0.3s ease; }
.gallery-item:hover img{ transform:scale(1.04); }
.gallery-item .tag{ position:absolute; top:0.75rem; left:0.75rem; background:rgba(27,42,36,0.85); color:#fff; font-size:0.72rem; font-weight:700; padding:0.3rem 0.6rem; border-radius:3px; text-transform:uppercase; letter-spacing:0.02em; }
@media (max-width:900px){ .gallery-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .gallery-grid{ grid-template-columns:1fr; } }

/* Tasteful "add a real photo" gallery slot — used for project categories
   (storm damage, repairs) that don't have real photography yet. The SVG
   itself carries the label/icon, so it just needs a dashed frame to read
   as an intentional, replaceable slot rather than a broken image. */
.gallery-item--placeholder{ border:1.5px dashed var(--color-border); }
.ba-wrap:empty{ display:none; }

/* ---------- BEFORE / AFTER ---------- */
/* Small, unobtrusive caption — used sparingly, never a loud dashed "demo"
   warning box. Sample-project disclosure lives primarily in code
   comments / README so the live template still reads as finished. */
.demo-notice{
  color:var(--color-text-muted); font-size:0.85rem; margin-bottom:var(--space-4); font-style:italic;
}

.ba-featured{
  display:grid; grid-template-columns:1.3fr 1fr; gap:0; border:1px solid var(--color-border);
  border-radius:var(--radius-md); overflow:hidden; background:var(--color-bg);
  box-shadow:0 18px 40px -24px rgba(22,38,31,0.35);
}
.ba-slider{
  position:relative; aspect-ratio:6/5; overflow:hidden; cursor:ew-resize; user-select:none;
  background:var(--color-bg-dark);
}
.ba-slider-img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.ba-slider-before-wrap{ position:absolute; inset:0; height:100%; overflow:hidden; width:50%; }
.ba-slider-before-wrap img{ position:absolute; top:0; left:0; height:100%; max-width:none; object-fit:cover; }
.ba-slider-line{
  position:absolute; top:0; bottom:0; left:50%; width:0; transform:translateX(-50%);
  border-left:2px solid rgba(255,255,255,0.9); pointer-events:none;
}
.ba-slider-handle{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:44px; height:44px;
  border-radius:50%; background:#fff; display:flex; align-items:center; justify-content:center;
  box-shadow:0 4px 14px rgba(0,0,0,0.3); pointer-events:none; color:var(--color-primary);
}
.ba-slider .ba-tag{
  position:absolute; top:1rem; z-index:2; background:rgba(22,38,31,0.82); color:#fff;
  font-size:0.72rem; font-weight:700; text-transform:uppercase; letter-spacing:0.04em;
  padding:0.35rem 0.75rem; border-radius:20px;
}
.ba-slider .ba-tag--before{ left:1rem; }
.ba-slider .ba-tag--after{ right:1rem; }
.ba-slider-hint{
  position:absolute; bottom:1rem; left:50%; transform:translateX(-50%); z-index:2;
  background:rgba(22,38,31,0.75); color:#fff; font-size:0.72rem; font-weight:600;
  padding:0.35rem 0.8rem; border-radius:20px; pointer-events:none; white-space:nowrap;
}
.ba-featured-body{ padding:var(--space-4); display:flex; flex-direction:column; justify-content:center; }
.ba-featured-body h3{ font-size:1.5rem; margin-bottom:var(--space-2); }
.ba-meta-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:var(--space-2); margin-bottom:var(--space-3); padding-bottom:var(--space-3); border-bottom:1px solid var(--color-border); }
.ba-meta-grid .meta-label{ display:block; font-size:0.72rem; text-transform:uppercase; letter-spacing:0.04em; color:var(--color-accent); font-weight:700; margin-bottom:0.25rem; }
.ba-meta-grid .meta-value{ font-weight:600; color:var(--color-primary); font-size:0.95rem; }
.ba-featured-body p{ color:var(--color-text-muted); }

.ba-secondary-grid{ display:grid; grid-template-columns:1fr 1fr; gap:var(--space-3); margin-top:var(--space-3); }
.ba-card-lg{ border:1px solid var(--color-border); border-radius:var(--radius-md); overflow:hidden; background:var(--color-bg); }
.ba-card-lg .ba-images{ display:grid; grid-template-columns:1fr 1fr; }
.ba-card-lg .ba-images figure{ margin:0; position:relative; aspect-ratio:1/1; overflow:hidden; }
.ba-card-lg .ba-images img{ width:100%; height:100%; object-fit:cover; display:block; }
.ba-card-lg .ba-images figcaption{
  position:absolute; bottom:0.6rem; left:0.6rem; background:rgba(22,38,31,0.82); color:#fff;
  font-size:0.7rem; padding:0.25rem 0.6rem; border-radius:20px; font-weight:700; text-transform:uppercase; letter-spacing:0.03em;
}
.ba-card-lg .ba-body{ padding:var(--space-3); }
.ba-card-lg .ba-body h3{ font-size:1.1rem; margin-bottom:0.3rem; }
.ba-card-lg .ba-meta-row{ display:flex; flex-wrap:wrap; gap:0.4rem 1rem; font-size:0.82rem; color:var(--color-text-muted); margin-bottom:0.5rem; }
.ba-card-lg .ba-meta-row strong{ color:var(--color-primary); }

@media (max-width:900px){
  .ba-featured{ grid-template-columns:1fr; }
  .ba-secondary-grid{ grid-template-columns:1fr; }
}

/* ---------- REVIEWS ---------- */
.reviews-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:var(--space-3); margin-top:var(--space-4); }
.review-card{ position:relative; background:var(--color-bg); border:1px solid var(--color-border); border-radius:var(--radius-md); padding:var(--space-3); }
.review-card .sample-tag{
  position:absolute; top:var(--space-3); right:var(--space-3); font-size:0.65rem; font-weight:700;
  text-transform:uppercase; letter-spacing:0.04em; color:var(--color-text-muted); opacity:0.7;
}
.stars{ color:var(--color-accent); font-size:1rem; margin-bottom:0.6rem; letter-spacing:0.1em; }
.review-card p.quote{ font-style:italic; color:var(--color-text); margin-bottom:var(--space-2); padding-right:3.5rem; }
.review-card .reviewer{ font-weight:600; font-size:0.88rem; color:var(--color-text-muted); }
@media (max-width:900px){ .reviews-grid{ grid-template-columns:1fr; } }

.review-cta{ display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); flex-wrap:wrap; margin-top:var(--space-5); padding:var(--space-4); background:var(--color-bg-alt); border-radius:var(--radius-md); }
.review-cta h3{ margin-bottom:0.3rem; }
.review-cta p{ color:var(--color-text-muted); }

/* ---------- ABOUT ---------- */
.about-grid{ display:grid; grid-template-columns:1fr 1fr; gap:var(--space-5); align-items:center; }
.about-grid img{ border-radius:var(--radius-md); }
.values-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:var(--space-3); margin-top:var(--space-4); }
.value-card{ padding:var(--space-3); border:1px solid var(--color-border); border-radius:var(--radius-md); }
@media (max-width:900px){ .about-grid, .values-grid{ grid-template-columns:1fr; } }

/* ---------- SERVICE AREAS ---------- */
.areas-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:var(--space-2); margin-top:var(--space-4); }
.area-chip{ background:var(--color-bg); border:1px solid var(--color-border); border-radius:var(--radius-sm); padding:0.9rem 1rem; font-weight:600; color:var(--color-primary); text-align:center; }
.map-embed{ margin-top:var(--space-4); border-radius:var(--radius-md); overflow:hidden; border:1px solid var(--color-border); aspect-ratio:16/7; background:var(--color-bg-alt); display:flex; align-items:center; justify-content:center; color:var(--color-text-muted); font-size:0.9rem; }
@media (max-width:900px){ .areas-grid{ grid-template-columns:repeat(2,1fr); } }

/* ---------- ESTIMATE / CONTACT FORM ---------- */
.estimate-section{ background:var(--color-primary); color:var(--color-text-inverse); }
.estimate-grid{ display:grid; grid-template-columns:1fr 1fr; gap:var(--space-5); align-items:start; }
.estimate-copy h2{ color:#fff; margin-bottom:var(--space-2); }
.estimate-copy p{ color:rgba(251,249,244,0.8); margin-bottom:var(--space-3); }
.schedule-box{ margin-top:var(--space-4); padding-top:var(--space-4); border-top:1px solid var(--color-border-dark); }
.schedule-box h3{ color:#fff; margin-bottom:0.5rem; }
.form-card{ background:var(--color-bg); border-radius:var(--radius-md); padding:var(--space-4); color:var(--color-text); }
/* GoHighLevel inline form embed wrapper — fills the card width on every
   breakpoint. min-height avoids a collapsed/clipped iframe before GHL's
   form_embed.js script resizes it to the form's actual (device-dependent)
   content height; it does not fight that resize, only floors it. */
.ghl-form-embed{ width:100%; min-height:500px; }
.ghl-form-embed iframe{ display:block; width:100%; min-height:500px; }
.form-row{ display:grid; grid-template-columns:1fr 1fr; gap:var(--space-2); margin-bottom:var(--space-2); }
.form-field{ display:flex; flex-direction:column; gap:0.35rem; margin-bottom:var(--space-2); }
.form-field label{ font-size:0.85rem; font-weight:600; color:var(--color-primary); }
.form-field input, .form-field select, .form-field textarea{
  padding:0.7rem 0.85rem; border:1.5px solid var(--color-border); border-radius:var(--radius-sm); font-family:inherit; font-size:0.95rem; background:#fff;
}
.upload-field{ border:2px dashed var(--color-border); border-radius:var(--radius-md); padding:var(--space-3); text-align:center; }
.upload-field p{ font-size:0.85rem; color:var(--color-text-muted); margin-top:0.4rem; }
.form-consent{ font-size:0.78rem; color:var(--color-text-muted); margin-top:var(--space-2); }
.form-demo-note{
  margin-top:var(--space-2); padding:0.75rem 1rem; border-radius:var(--radius-sm);
  background:var(--color-bg-alt); border:1px solid var(--color-border);
  font-size:0.85rem; color:var(--color-primary); font-weight:600;
}
.ghl-placeholder{ border:1.5px dashed var(--color-border); border-radius:var(--radius-sm); padding:1rem; text-align:center; font-size:0.82rem; color:var(--color-text-muted); background:var(--color-bg-alt); }
@media (max-width:900px){ .estimate-grid{ grid-template-columns:1fr; } .form-row{ grid-template-columns:1fr; } }

/* ---------- FAQ ---------- */
.faq-list{ max-width:760px; margin-top:var(--space-4); }
.faq-item{ border-bottom:1px solid var(--color-border); }
.faq-item summary{ cursor:pointer; padding:1.1rem 0; font-weight:600; font-size:1.02rem; display:flex; justify-content:space-between; align-items:center; list-style:none; color:var(--color-primary); }
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary::after{ content:"+"; font-size:1.4rem; color:var(--color-accent); font-weight:400; }
.faq-item[open] summary::after{ content:"–"; }
.faq-item p{ padding-bottom:1.1rem; color:var(--color-text-muted); max-width:640px; }

/* ---------- FOOTER ---------- */
.site-footer{ background:var(--color-bg-dark); color:var(--color-text-inverse); padding:var(--space-5) 0 var(--space-3); }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:var(--space-4); padding-bottom:var(--space-4); border-bottom:1px solid var(--color-border-dark); }
.footer-grid h4{ font-family:var(--font-body); font-size:0.85rem; text-transform:uppercase; letter-spacing:0.04em; color:var(--color-accent-light); margin-bottom:var(--space-2); font-weight:700; }
.footer-grid ul li{ margin-bottom:0.6rem; font-size:0.92rem; color:rgba(251,249,244,0.8); }
.footer-logo{ font-family:var(--font-display); font-size:1.4rem; margin-bottom:var(--space-2); color:#fff; }
.footer-grid p{ color:rgba(251,249,244,0.7); font-size:0.92rem; }
.footer-bottom{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:1rem; padding-top:var(--space-3); font-size:0.8rem; color:rgba(251,249,244,0.55); }
.footer-bottom a{ color:rgba(251,249,244,0.8); }
.social-row{ display:flex; gap:0.75rem; margin-top:var(--space-2); }
.social-row a{ width:34px; height:34px; border:1px solid var(--color-border-dark); border-radius:50%; display:flex; align-items:center; justify-content:center; }
@media (max-width:900px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .footer-grid{ grid-template-columns:1fr; } }

/* ---------- PAGE HEADER (interior pages) ---------- */
.page-hero{ background:var(--color-bg-alt); padding:var(--space-5) 0 var(--space-4); border-bottom:1px solid var(--color-border); }
.page-hero .eyebrow{ margin-bottom:0.5rem; }
.page-hero p{ color:var(--color-text-muted); max-width:640px; margin-top:var(--space-2); font-size:1.05rem; }
.breadcrumb{ font-size:0.85rem; color:var(--color-text-muted); margin-bottom:var(--space-2); }
.breadcrumb a{ color:var(--color-accent); font-weight:600; }

/* ---------- CREDENTIAL BADGES ---------- */
.credential-row{ display:flex; flex-wrap:wrap; gap:0.6rem; margin-top:var(--space-2); }
.credential-badge{ border:1px solid var(--color-border); border-radius:20px; padding:0.4rem 0.9rem; font-size:0.8rem; font-weight:600; color:var(--color-primary); }
/* On dark/primary-colored backgrounds the badge text must flip to a light
   color — otherwise it renders as dark-green text on a dark-green
   background: an invisible label inside a visible pill outline. */
.section--primary .credential-badge, .section--dark .credential-badge, .estimate-section .credential-badge{
  color:var(--color-text-inverse); border-color:var(--color-border-dark); background:rgba(255,255,255,0.08);
}

/* ---------- GENERIC CONTENT (legal pages) ---------- */
.legal-content{ max-width:760px; }
.legal-content h2{ margin-top:var(--space-4); margin-bottom:var(--space-2); font-size:1.4rem; }
.legal-content h2:first-child{ margin-top:0; }
.legal-content p, .legal-content li{ color:var(--color-text-muted); margin-bottom:var(--space-2); }
.legal-content ul{ padding-left:1.2rem; list-style:disc; }
.legal-content .updated{ color:var(--color-text-muted); font-size:0.85rem; margin-bottom:var(--space-4); }

/* ---------- SIGNS / LIST CARDS (replacement & repair pages) ---------- */
.check-list li{ padding-left:1.6rem; position:relative; margin-bottom:0.6rem; color:var(--color-text-muted); }
.check-list li::before{ content:"✓"; position:absolute; left:0; color:var(--color-accent); font-weight:700; }

.two-col{ display:grid; grid-template-columns:1fr 1fr; gap:var(--space-5); align-items:start; }
@media (max-width:900px){ .two-col{ grid-template-columns:1fr; } }

.callout{ background:var(--color-bg-alt); border-left:3px solid var(--color-accent); padding:var(--space-3); border-radius:0 var(--radius-sm) var(--radius-sm) 0; }
.callout h3{ margin-bottom:0.5rem; font-size:1.05rem; }
.callout p{ color:var(--color-text-muted); font-size:0.92rem; }


/* ==========================================================================
   PHONE LAYOUT (600px and below)
   Goal: a homeowner on an iPhone can book in one tap without scrolling
   through the whole site. Desktop/laptop layout is untouched - every rule
   that changes layout lives inside the media query below.
   - Hero: shorter photo, no paragraph, "Book My Free Inspection" first.
   - Sticky bottom bar books straight into the GHL calendar (header.html).
   - Long educational sections collapse behind a "See Details" button.
   - Estimate section: short heading, then the form immediately, then the
     "Prefer to choose a time?" booking box.
   ========================================================================== */
.hero-cta-phone, .hero-alt-phone, .m-collapse-toggle{ display:none; }
/* html already reserves header + 16px (scroll-padding-top); cancel the 16px
   here so the form section lands flush under the sticky header. */
#estimate-form{ scroll-margin-top:-16px; }

@media (max-width:600px){
  .section{ padding:var(--space-5) 0; }
  .section-head{ margin-bottom:var(--space-3); }

  /* Hero */
  .hero-image{ height:210px; min-height:0; }
  .hero-copy{ padding:var(--space-3) var(--space-2) var(--space-4); }
  .hero-copy h1{ font-size:2rem; margin:0.35rem 0 var(--space-3); }
  .hero-copy > p{ display:none; }
  .hero-ctas{ flex-direction:column; gap:0.75rem; }
  .hero-cta-desktop{ display:none; }
  .hero-cta-phone{ display:flex; width:100%; }
  .hero-alt-phone{
    display:flex; justify-content:center; gap:0.6rem; margin:0.25rem 0 0;
    font-size:0.95rem; font-weight:600; color:var(--color-text-muted);
  }
  .hero-alt-phone a{ color:var(--color-primary); text-decoration:underline; text-underline-offset:3px; }
  /* Bottom bar waits until the hero's Book button has scrolled away (main.js) */
  .sticky-mobile-bar{ transition:transform 0.2s ease; }
  body.hero-cta-visible .sticky-mobile-bar{ transform:translateY(110%); }

  /* Trust strip: tight badge rows instead of big gaps */
  .trust-strip .container{ gap:0.6rem 1.5rem; padding:var(--space-2); }
  .trust-item{ font-size:0.88rem; }

  /* "See Details" collapsibles */
  .m-collapse{ display:none; }
  .m-collapse.is-open{ display:block; margin-top:var(--space-3); }
  .m-collapse-toggle{
    display:inline-flex; align-items:center; margin-top:var(--space-2);
    background:none; border:1.5px solid var(--color-border); border-radius:999px;
    padding:0.5rem 1.1rem; font-weight:600; font-size:0.9rem; color:var(--color-primary);
  }
  .m-collapse-toggle::after{ content:"+"; margin-left:0.5rem; color:var(--color-accent); font-size:1.15rem; line-height:1; }
  .m-collapse-toggle[aria-expanded="true"]::after{ content:"\2013"; }
  .m-collapse-toggle .m-hide{ display:none; }
  .m-collapse-toggle[aria-expanded="true"] .m-show{ display:none; }
  .m-collapse-toggle[aria-expanded="true"] .m-hide{ display:inline; }

  /* Services: compact 2-column tiles, titles + "Learn More" only */
  .services-grid{ grid-template-columns:1fr 1fr; }
  .service-card{ padding:var(--space-2); }
  .service-card h3{ font-size:1rem; }
  .service-card p{ display:none; }

  /* Reviews: the "leave us a review" ask is for past customers, not new visitors */
  .review-cta{ display:none; }

  /* Estimate section: heading -> form -> booking box */
  .estimate-section{ padding:var(--space-3) 0 var(--space-4); }
  .estimate-grid{ gap:var(--space-2); }
  .estimate-copy{ display:contents; }
  .estimate-copy h2{ order:0; font-size:1.5rem; margin:0; }
  .estimate-copy > p, .estimate-copy .credential-row{ display:none; }
  .form-card{ order:1; padding:var(--space-2); }
  .schedule-box{ order:2; margin-top:0; padding-top:var(--space-3); }
  .schedule-box .btn{ display:flex; width:100%; }
}
