/* ============================================================
   PREMIUM LAYER — photographic redesign (loads after components.css)
   Patterns drawn from top roofing sites: full-bleed photo hero,
   on-fold lead form, trust micro-row, cert wall, duotone media
   bands, angled dividers, labeled gallery, owner quote.
   ============================================================ */

/* ---------- PHOTOGRAPHIC HERO ---------- */
.hero-photo {
  position: relative; color: var(--color-paper);
  min-height: clamp(540px, 78vh, 760px);
  display: flex; align-items: center; overflow: hidden;
  background: var(--color-navy-deep);
}
.hero-photo::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--hero-img, url("/assets/photos/hero-home.jpg")) center 35% / cover no-repeat;
  transform: scale(1.02);
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(102deg, rgba(13,13,13,0.92) 0%, rgba(13,13,13,0.74) 32%, rgba(13,13,13,0.28) 62%, rgba(13,13,13,0.04) 100%),
    linear-gradient(0deg, rgba(13,13,13,0.6) 0%, rgba(13,13,13,0) 34%);
}
.hero-photo > .container { position: relative; z-index: 2; width: 100%; padding-top: var(--s-7); padding-bottom: var(--s-7); }
.hero-photo-grid { display: grid; grid-template-columns: 1.12fr 0.88fr; gap: var(--s-7); align-items: center; }
.hero-copy .eyebrow { color: var(--color-amber-soft); }
.hero-kw { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
  font-size: var(--fs-sm); color: rgba(255,255,255,0.85); margin: 0 0 var(--s-4); }
.hero-head {
  font-family: var(--font-display); font-weight: 700; color: var(--color-paper);
  font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 1.02; letter-spacing: 0.005em;
  margin: 0 0 var(--s-5); text-wrap: balance;
}
.hero-head .accent { color: var(--color-amber); }
.hero-photo .hero-sub { font-size: var(--fs-md); color: rgba(255,255,255,0.9); max-width: 52ch; margin-bottom: var(--s-5); }
.hero-photo .hero-ctas { margin-bottom: var(--s-5); }
.hero-badges { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: center; }
.hero-badge2 { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); color: rgba(255,255,255,0.92); font-weight: 500; }
.hero-badge2 svg { width: 18px; height: 18px; color: var(--color-amber); flex-shrink: 0; }
.hero-badge2 .stars { color: var(--color-rust); letter-spacing: 1px; }

/* form card sitting on the fold */
.hero-form-card { background: var(--color-paper); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  border-top: 5px solid var(--color-rust); overflow: hidden; }
.hero-form-card .lead-form { box-shadow: none; border-top: none; border-radius: 0; padding: var(--s-5) var(--s-6); }
.hero-form-card .lead-form h2 { font-size: var(--fs-lg); }
.hero-form-card .lead-form p.small { margin-bottom: var(--s-4); }
.hero-form-card .field { margin-bottom: var(--s-3); }
.hero-form-card .field input, .hero-form-card .field textarea { padding: var(--s-2) var(--s-4); }
.hero-form-card .field textarea { min-height: 64px; }
.hero-form-card .privacy-note { margin-top: var(--s-2); }

@media (max-width: 960px) {
  .hero-photo { min-height: 0; }
  .hero-photo-grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .hero-photo::after { background:
    linear-gradient(180deg, rgba(13,13,13,0.78) 0%, rgba(13,13,13,0.86) 100%); }
}

/* ---------- TRUST BAR refinements (existing .trust-bar) ---------- */
.trust-bar { border-top: 3px solid var(--color-rust); }

/* ---------- FIX: headings on dark photo bands must be light ----------
   base.css forces h2/h3 to navy; on the dark .bridge-section photo that is
   invisible. Force light here (premium.css loads last so it wins). */
.bridge-section h2, .bridge-section h3, .bridge-section h4 { color: var(--color-paper); }
.bridge-section .lead, .bridge-section > .container > .reveal > p { color: rgba(255,255,255,0.9); }
.bridge-section .eyebrow { color: var(--color-amber-soft); }

/* ---------- CERT / PARTNER WALL ---------- */
.cert-wall { background: var(--color-paper); border-bottom: 1px solid var(--color-line); padding: var(--s-7) 0; }
.cert-wall .lbl { text-align: center; font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 0.18em; font-size: var(--fs-xs); color: var(--color-muted); margin-bottom: var(--s-5);
  display: flex; align-items: center; justify-content: center; gap: var(--s-4); }
.cert-wall .lbl::before, .cert-wall .lbl::after { content: ""; height: 1px; width: clamp(20px, 8vw, 90px); background: var(--color-line); }
.cert-row { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-5); justify-content: center; align-items: center; }
.cert-badge { display: inline-flex; align-items: center; gap: var(--s-3); min-height: 58px;
  padding: 0.5rem 1.15rem; border: 1.5px solid var(--color-line); border-radius: 12px;
  background: var(--color-paper); color: var(--color-muted); filter: grayscale(1); opacity: 0.78;
  transition: all var(--dur-fast) var(--ease-out); }
.cert-badge svg { width: 30px; height: 30px; flex-shrink: 0; color: var(--color-navy-soft); }
.cert-name { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
  font-size: 1.02rem; line-height: 1; color: var(--color-navy); }
.cert-badge:hover { opacity: 1; filter: none; border-color: var(--color-rust); box-shadow: var(--shadow-sm); }
.cert-badge:hover svg { color: var(--color-rust); }

/* ---------- BEFORE / AFTER SLIDER ---------- */
.ba-grid { display: grid; grid-template-columns: 1fr; gap: var(--s-5); max-width: 900px; margin: var(--s-6) auto 0; }
@media (max-width: 760px) { .ba-grid { grid-template-columns: 1fr !important; } }
.ba-slider { position: relative; margin: 0; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md); aspect-ratio: 4/3; user-select: none; touch-action: pan-y; }
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ba-before { clip-path: inset(0 50% 0 0); will-change: clip-path; }
.ba-tag { position: absolute; bottom: var(--s-3); z-index: 3; font-family: var(--font-display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; color: var(--color-paper);
  background: rgba(13,13,13,0.78); padding: 4px 10px; border-radius: var(--radius-pill); }
.ba-tag-before { left: var(--s-3); } .ba-tag-after { right: var(--s-3); }
.ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: var(--color-paper);
  transform: translateX(-50%); z-index: 4; pointer-events: none; box-shadow: 0 0 0 1px rgba(13,13,13,0.25); }
.ba-grip { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 42px; height: 42px;
  border-radius: 50%; background: var(--color-rust); border: 3px solid var(--color-paper); box-shadow: var(--shadow-md);
  display: grid; place-items: center; }
.ba-grip::before { content: "\2194"; color: var(--color-paper); font-size: 20px; font-weight: 700; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 5; }
.ba-range:focus-visible + .ba-cap, .ba-range:focus-visible ~ .ba-handle .ba-grip { outline: 3px solid var(--color-amber); }
.ba-cap { position: absolute; top: var(--s-3); left: 50%; transform: translateX(-50%); z-index: 3;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.72rem;
  color: var(--color-paper); background: rgba(24,24,24,0.85); padding: 4px 12px; border-radius: var(--radius-pill); white-space: nowrap; }
.ba-hint { text-align: center; color: var(--color-muted); font-size: var(--fs-sm); margin-top: var(--s-4); }

/* ---------- STORM ALERT BANNER ---------- */
.storm-banner { background: var(--color-rust); color: var(--color-ink); font-size: var(--fs-sm); }
.storm-banner[hidden] { display: none; }
.storm-banner .container { display: flex; align-items: center; justify-content: center; gap: var(--s-4); flex-wrap: wrap;
  padding: 9px var(--s-5); position: relative; }
.storm-banner strong { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; }
.storm-banner a.sb-cta { color: var(--color-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.storm-banner a.sb-cta:hover { color: var(--color-navy-deep); text-decoration: none; }
.storm-banner .sb-close { position: absolute; right: var(--s-4); top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--color-ink); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 0 6px; opacity: 0.7; }
.storm-banner .sb-close:hover { opacity: 1; }
@media (max-width: 600px) { .storm-banner .sb-close { display: none; } }

/* ---------- DESKTOP FLOATING CTA ---------- */
.fab-cta { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: none;
  align-items: center; gap: var(--s-2); padding: var(--s-4) var(--s-5);
  background: var(--color-rust); color: var(--color-ink); border-radius: var(--radius-pill);
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  box-shadow: var(--shadow-lg); transform: translateY(120%); transition: transform var(--dur-base) var(--ease-out), background var(--dur-fast); }
.fab-cta svg { width: 20px; height: 20px; }
.fab-cta.is-shown { transform: translateY(0); }
.fab-cta:hover { background: var(--color-rust-deep); color: var(--color-ink); }
@media (min-width: 901px) { .fab-cta { display: inline-flex; } }

/* ---------- BLOG ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }
.post-card { display: flex; flex-direction: column; background: var(--color-paper); border: 1px solid var(--color-line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-card .pc-media { aspect-ratio: 16/10; overflow: hidden; }
.post-card .pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.post-card:hover .pc-media img { transform: scale(1.05); }
.post-card .pc-body { padding: var(--s-5); display: flex; flex-direction: column; flex: 1; }
.post-card .pc-meta { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.72rem; color: var(--color-ink); margin-bottom: var(--s-2); }
.post-card h3 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.post-card p { font-size: var(--fs-sm); color: var(--color-muted); flex: 1; }
.post-card .more { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; font-size: 0.85rem;
  letter-spacing: 0.06em; color: var(--color-ink); margin-top: var(--s-3); }
.article-hero { position: relative; }
.article-body { max-width: 720px; margin: 0 auto; }
.article-body h2 { margin-top: var(--s-7); }
.article-body h3 { margin-top: var(--s-5); }
.article-meta { color: var(--color-muted); font-size: var(--fs-sm); margin-bottom: var(--s-5);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- linked town cards ---------- */
a.town-card { display: block; color: inherit; text-decoration: none; }
a.town-card .town-more { display: inline-block; margin-top: var(--s-3); font-family: var(--font-display);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; color: var(--color-ink); }
a.town-card:hover .town-more { color: var(--color-navy-soft); }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: var(--s-10) 0; }
.notfound .code { font-family: var(--font-display); font-weight: 700; font-size: clamp(4rem, 14vw, 8rem);
  line-height: 1; color: var(--color-ink); letter-spacing: 0.02em; }

/* ---------- ANGLED DIVIDER ---------- */
.angle-top { clip-path: polygon(0 34px, 100% 0, 100% 100%, 0 100%); margin-top: -34px; position: relative; z-index: 3; }

/* ---------- DUOTONE / MEDIA BAND ---------- */
.media-band { position: relative; color: var(--color-paper); padding: var(--s-10) 0; overflow: hidden; background: var(--color-navy); }
.media-band::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--band-img, url("/assets/photos/crew-roof.jpg")) center / cover no-repeat; opacity: 0.5; }
.media-band::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(13,13,13,0.55) 0%, rgba(13,13,13,0.9) 100%); }
.media-band > .container { position: relative; z-index: 2; }
.media-band h2 { color: var(--color-paper); }
.media-band .eyebrow { color: var(--color-amber-soft); }
.media-band .lead { color: rgba(255,255,255,0.9); }

/* ---------- INNER-PAGE HERO -> real photo ---------- */
.hero-inner { padding: var(--s-9) 0 var(--s-8); }
.hero-inner::before { background: var(--inner-hero, url("/assets/photos/inner-hero.jpg")) center / cover no-repeat !important; opacity: 1 !important; z-index: 0; }
.hero-inner::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(102deg, rgba(13,13,13,0.92) 0%, rgba(13,13,13,0.78) 45%, rgba(13,13,13,0.55) 100%); }
.hero-inner > .container { position: relative; z-index: 2; }

/* ---------- SERVICE CARD photo polish ---------- */
.svc-card { overflow: hidden; }
.svc-card .svc-card-media { overflow: hidden; aspect-ratio: 16/10; }
.svc-card .svc-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); aspect-ratio: auto; }
.svc-card:hover .svc-card-media img { transform: scale(1.06); }

/* ---------- PROJECT GALLERY ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin-top: var(--s-6); }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item { position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4/3; box-shadow: var(--shadow-sm); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--s-5) var(--s-4) var(--s-3);
  background: linear-gradient(180deg, rgba(13,13,13,0) 0%, rgba(13,13,13,0.92) 100%); color: var(--color-paper);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; }
.gallery-item figcaption span { display: block; color: var(--color-amber-soft); font-size: 0.72rem; letter-spacing: 0.1em; margin-bottom: 2px; }

/* ---------- OWNER QUOTE ---------- */
.owner-quote { display: grid; grid-template-columns: 0.78fr 1.22fr; gap: var(--s-7); align-items: center; }
.owner-quote .photo { border-radius: var(--radius-lg); aspect-ratio: 4/5; object-fit: cover; box-shadow: var(--shadow-lg); }
.owner-quote blockquote { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.25; color: var(--color-navy); margin: 0 0 var(--s-5); position: relative; }
.owner-quote blockquote::before { content: "\201C"; color: var(--color-rust); font-size: 3rem; line-height: 0; vertical-align: -0.35em; margin-right: 0.1em; }
.owner-quote .sig strong { display: block; font-family: var(--font-display); font-size: var(--fs-lg); color: var(--color-navy); }
.owner-quote .sig span { color: var(--color-muted); font-size: var(--fs-sm); }
@media (max-width: 800px) { .owner-quote { grid-template-columns: 1fr; } .owner-quote .photo { max-width: 320px; } }

/* ---------- bigger section headings for editorial weight ---------- */
section > .container > h2 { letter-spacing: 0.01em; }
.eyebrow { font-size: var(--fs-xs); }

/* ---------- FIX: process grid handles any step count (no orphan) ----------
   The home claim preview has 5 steps; a fixed 4-col grid orphaned the 5th.
   auto-fit balances 4 or 5 steps cleanly across breakpoints. */
.process { grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); }
@media (max-width: 640px) { .process { grid-template-columns: 1fr; } }

/* ---------- a11y: larger mobile tap targets for text links ---------- */
@media (max-width: 900px) {
  .footer-links a { display: inline-block; padding: 4px 0; }
  .svc-card a.more { padding: 6px 0; }
}

/* ---------- CTA + FOOTER form one dark zone that rises into the light
   section above via a neighborhood rooftop skyline (Owl-style divider).
   The graphic reads clearly because it sits against a LIGHT background. */
.cta-banner { background: var(--color-navy-deep); position: relative; overflow: visible; }
.cta-roofline { position: absolute; left: 0; right: 0; bottom: 100%; height: 76px; pointer-events: none;
  background: url("/assets/graphics/rooftops.svg") repeat-x left bottom; background-size: auto 100%; }

/* ---------- FOOTER (premium rebuild) ---------- */
.footer { overflow: visible; padding-top: var(--s-9); position: relative; }
/* neighborhood rooftop skyline graphic rising into the section above (Owl-style divider) */
.footer-roofline { position: absolute; left: 0; right: 0; bottom: 100%; height: 80px; pointer-events: none;
  background: url("/assets/graphics/rooftops.svg") repeat-x left bottom; background-size: auto 100%; }
/* faint rooftop watermark for depth behind the footer content */
.footer::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("/assets/graphics/rooftops-solid.svg") repeat-x left bottom; background-size: auto 46%; opacity: 0.05; }
.footer > .container { position: relative; z-index: 1; }

.footer-top { display: grid; grid-template-columns: minmax(300px, 1.2fr) 1.8fr; gap: var(--s-8); margin-bottom: var(--s-7); }
.footer .brand { font-size: 1.6rem; }
.footer-tag { color: rgba(255,255,255,0.72); font-size: var(--fs-sm); max-width: 42ch; margin: var(--s-2) 0 var(--s-5); }

.footer-contact { background: rgba(255,255,255,0.04); border: 1px solid var(--color-navy-line);
  border-radius: var(--radius-md); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.fc-row { display: flex; align-items: flex-start; gap: var(--s-3); color: rgba(255,255,255,0.82); font-size: var(--fs-sm); line-height: 1.4; }
.fc-row svg { width: 19px; height: 19px; color: var(--color-amber); flex-shrink: 0; margin-top: 1px; }
a.fc-row { transition: color var(--dur-fast) var(--ease-out); }
a.fc-row:hover { color: var(--color-paper); }
a.fc-row:hover svg { color: var(--color-rust); }

.footer .social { margin-top: var(--s-5); gap: var(--s-3); }
.footer .social a { width: 40px; height: 40px; }

.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.footer-links h4 { color: var(--color-amber-soft); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.9rem; margin-bottom: var(--s-4); }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 0 0 var(--s-3); }
.footer-links a { color: rgba(255,255,255,0.78); font-size: var(--fs-sm); }
.footer-links a:hover { color: var(--color-amber-soft); padding-left: 3px; transition: padding var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }

.footer-bottom { border-top: 1px solid var(--color-navy-line); }

@media (max-width: 820px) {
  .footer-top { grid-template-columns: 1fr; gap: var(--s-6); }
  .footer-links { grid-template-columns: repeat(2, 1fr); gap: var(--s-5); }
}
@media (max-width: 460px) { .footer-links { grid-template-columns: 1fr; } }

/* ---------- MOTION ----------
   Deliberately NOT using opacity:0 scroll-reveal: a prior build proved that
   pattern can leave content stuck-hidden in some render contexts. Content is
   always visible; we add only entrance animations that DO NOT use forwards/both
   fill, so if the animation engine never advances, elements rest at opacity 1.
   .reveal stays as a hook (visible by default via components.css) for a future
   progressive enhancement. */
@keyframes rw-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.hero-copy { animation: rw-rise 0.7s var(--ease-out); }
.hero-form-card { animation: rw-rise 0.7s var(--ease-out) 0.1s backwards; }
@media (prefers-reduced-motion: reduce) { .hero-copy, .hero-form-card { animation: none; } }
