/* Caston Roofing — standalone additions */

/* lightbox for project photos */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  cursor: zoom-out;
}
#lightbox[hidden] { display: none; }
#lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
#lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 40px;
  line-height: 1;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
}

/* mobile menu overlay container */
#mobile-menu { position: relative; z-index: 90; }
#mobile-menu[hidden] { display: none; }

/* safety: anything framer-motion left invisible renders visible */
[data-framer-appear-id] { opacity: 1 !important; transform: none !important; }

/* ---------- sticky mobile call bar ---------- */
.cr-callbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 80;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(5, 5, 5, 0.96);
  border-top: 1px solid rgba(255, 196, 0, 0.35);
}
.cr-callbar a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.cr-callbar-call { background: var(--brand-yellow, #ffc400); color: #050505; }
.cr-callbar-est { border: 2px solid var(--brand-yellow, #ffc400); color: var(--brand-yellow, #ffc400); }
@media (max-width: 1023px) {
  .cr-callbar { display: grid; }
  body { padding-bottom: 76px; }
}

/* ---------- hero trust chips ---------- */
.cr-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.cr-trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
}
.cr-star { color: var(--brand-yellow, #ffc400); }

/* ---------- FAQ ---------- */
.cr-faq-list { max-width: 860px; }
.cr-faq {
  border: 1px solid rgba(5, 5, 5, 0.12);
  border-radius: 10px;
  background: #fff;
  margin-bottom: 10px;
}
.cr-faq summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 800;
  font-size: 16px;
  list-style: none;
  position: relative;
  padding-right: 44px;
}
.cr-faq summary::-webkit-details-marker { display: none; }
.cr-faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-yellow, #ffc400);
}
.cr-faq[open] summary::after { content: "\2212"; }
.cr-faq p { padding: 0 18px 16px; margin: 0; line-height: 1.6; color: #44403c; }

/* ---------- service & city page components ---------- */
.cr-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}
@media (min-width: 768px) { .cr-list { grid-template-columns: 1fr 1fr; } }
.cr-list li {
  position: relative;
  padding: 12px 16px 12px 40px;
  background: #fff;
  border: 1px solid rgba(5, 5, 5, 0.1);
  border-radius: 8px;
  font-weight: 600;
  line-height: 1.45;
}
.cr-list li::before {
  content: "\2713";
  position: absolute;
  left: 14px;
  top: 11px;
  font-weight: 900;
  color: var(--brand-yellow, #ffc400);
  background: #050505;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: grid;
  place-items: center;
}
.cr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 2px solid #050505;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #050505;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.cr-chip:hover { background: #050505; color: var(--brand-yellow, #ffc400); }
.cr-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.cr-city-link { color: inherit; text-decoration: none; }
.cr-city-link:hover { color: var(--brand-yellow, #ffc400); }

/* ---------- header nav: dropdowns (desktop) ---------- */
.cr-nav-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
}
.cr-dd-trigger:hover { color: #ca8a04; }
.cr-caret {
  width: 7px; height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.18s;
}
.cr-dd { position: relative; display: inline-flex; }
.cr-dd-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 60;
  display: none;
  background: #fff;
  border: 1px solid rgba(5, 5, 5, 0.1);
  border-top: 3px solid var(--brand-yellow, #ffc400);
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(16, 17, 19, 0.22);
  padding: 14px;
}
/* invisible bridge so the pointer can cross the gap without closing */
.cr-dd-panel::before {
  content: "";
  position: absolute;
  top: -14px; left: 0; right: 0; height: 14px;
}
.cr-dd-panel--right { left: auto; right: 0; }
.cr-dd-panel--services { display: none; grid-template-columns: repeat(3, minmax(170px, 1fr)); gap: 4px 10px; }
.cr-dd-panel a, .cr-dd-all {
  display: block;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #101113;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.14s, color 0.14s;
}
.cr-dd-panel a:hover, .cr-dd-panel a:focus-visible { background: #f7f7f4; color: #ca8a04; }
.cr-dd-all {
  border-bottom: 1px solid rgba(5, 5, 5, 0.1);
  border-radius: 7px 7px 0 0;
  margin-bottom: 6px;
  color: #ca8a04;
}
.cr-dd-cities { display: grid; grid-template-columns: repeat(2, minmax(140px, 1fr)); gap: 2px 8px; }
/* open states: touch/click (.open), keyboard (:focus-within), pointer hover */
.cr-dd.open > .cr-dd-panel,
.cr-dd:focus-within > .cr-dd-panel { display: block; }
.cr-dd.open > .cr-dd-panel--services,
.cr-dd:focus-within > .cr-dd-panel--services { display: grid; }
.cr-dd.open > .cr-dd-trigger .cr-caret,
.cr-dd:focus-within > .cr-dd-trigger .cr-caret { transform: rotate(-135deg) translateY(2px); }
@media (hover: hover) and (pointer: fine) {
  .cr-dd:hover > .cr-dd-panel { display: block; }
  .cr-dd:hover > .cr-dd-panel--services { display: grid; }
  .cr-dd:hover > .cr-dd-trigger .cr-caret { transform: rotate(-135deg) translateY(2px); }
}

/* ---------- header nav: accordions (mobile drawer) ---------- */
.cr-m-dd { margin: 0; }
.cr-m-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cr-m-summary::-webkit-details-marker { display: none; }
.cr-m-dd[open] .cr-m-summary { border-color: rgba(253, 224, 71, 0.6); color: #fde047; }
.cr-m-dd[open] .cr-m-summary .cr-caret { transform: rotate(-135deg) translateY(2px); }
.cr-m-sub {
  display: grid;
  gap: 1px;
  margin: 6px 0 2px;
  padding-left: 8px;
  border-left: 2px solid rgba(255, 255, 255, 0.14);
}
.cr-m-sub a {
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  border-radius: 6px;
}
.cr-m-sub a:hover { color: #fde047; }
.cr-m-all { color: #fde047 !important; border-bottom: 1px solid rgba(255,255,255,0.12); border-radius: 0 !important; margin-bottom: 3px; }

/* ---------- accessibility widget internals ---------- */
/* lift the launcher above the mobile call bar and over other fixed UI */
.accessibility-widget { z-index: 84; }
@media (max-width: 1023px) { .accessibility-widget { bottom: 88px; right: 14px; } }
.accessibility-panel { display: grid; gap: 10px; }
.cr-a11y-head { display: flex; align-items: center; justify-content: space-between; }
.cr-a11y-title { font-size: 1.05rem; font-weight: 900; color: var(--brand-black, #050505); margin: 0; }
.cr-a11y-label { font-weight: 800; color: var(--brand-black, #050505); }
.cr-a11y-size { display: inline-flex; align-items: center; gap: 8px; }
.cr-a11y-size-val { min-width: 54px; text-align: center; font-weight: 800; font-size: 13px; }
.accessibility-icon-button { cursor: pointer; font-weight: 900; font-size: 14px; line-height: 1; }
.accessibility-toggle { cursor: pointer; }
.cr-a11y-reset {
  margin-top: 2px; padding: 10px 12px; border: 1px solid rgba(5,5,5,0.16); border-radius: 8px;
  background: #fff; font-weight: 800; color: var(--brand-black, #050505); cursor: pointer;
}
.cr-a11y-reset:hover { background: #f7f7f4; }
.accessibility-launcher { cursor: pointer; }

/* ---------- consent banner ---------- */
.cr-consent {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 95;
  width: min(100vw - 32px, 440px);
  background: #101113;
  color: #f5f5f4;
  border: 1px solid rgba(255, 196, 0, 0.4);
  border-radius: 14px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
  padding: 20px;
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cr-consent.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cr-consent-title { margin: 0 0 6px; font-size: 1.1rem; font-weight: 900; color: #fff; }
.cr-consent-text { margin: 0; font-size: 13.5px; line-height: 1.6; color: #d6d3d1; }
.cr-consent-text a { color: var(--brand-yellow, #ffc400); text-decoration: underline; text-underline-offset: 2px; }
.cr-consent-prefs { margin-top: 14px; display: grid; gap: 10px; }
.cr-consent-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px; background: rgba(255, 255, 255, 0.05); border-radius: 10px;
}
.cr-consent-cat { display: block; font-weight: 800; font-size: 14px; color: #fff; }
.cr-consent-note { display: block; font-size: 12px; color: #a8a29e; margin-top: 2px; line-height: 1.4; }
.cr-consent-always { font-size: 12px; font-weight: 800; color: var(--brand-yellow, #ffc400); white-space: nowrap; }
.cr-consent-switch {
  flex: none; width: 46px; height: 26px; border-radius: 999px; border: none;
  background: #44403c; position: relative; cursor: pointer; transition: background 0.18s;
}
.cr-consent-switch.on { background: var(--brand-yellow, #ffc400); }
.cr-consent-knob {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform 0.18s;
}
.cr-consent-switch.on .cr-consent-knob { transform: translateX(20px); }
.cr-consent-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
.cr-consent-actions .btn { font-size: 13px; padding: 10px 16px; }
.cr-consent-reject { border-color: rgba(255,255,255,0.4); color: #f5f5f4; }
.cr-consent-link {
  background: none; border: none; color: #d6d3d1; font-weight: 800; font-size: 13px;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; margin-left: auto;
}
.cr-consent-link:hover { color: #fff; }
@media (max-width: 1023px) {
  .cr-consent { left: 12px; right: 12px; width: auto; bottom: 84px; }
  /* on mobile the launcher would overlap the banner — resolve consent first */
  body.cr-consent-visible .accessibility-widget { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cr-consent { transition: none; }
}
html[data-a11y-motion] .cr-consent { transition: none; }

/* footer cookie-preferences trigger matches the footer link style */
.footer-consent-link {
  background: none; border: none; padding: 0; font: inherit; color: inherit;
  cursor: pointer; text-align: left;
}
.footer-consent-link:hover { color: #fff; }

/* ---------- engagement pass: inline images, mid CTA, two-up grids ---------- */
/* .btn-outline is not in the compiled stylesheet — define it for our CTAs */
.btn-outline {
  border: 2px solid #050505;
  color: #050505;
  background: transparent;
}
.btn-outline:hover { background: #050505; color: var(--brand-yellow, #ffc400); }

.cr-inline-img { margin: 28px 0 0; }
.cr-inline-img img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(36, 31, 26, 0.16);
}
.cr-midcta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #101113;
  border: 1px solid rgba(255, 196, 0, 0.35);
  border-radius: 14px;
  padding: 24px 28px;
}
.cr-midcta-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-yellow, #ffc400);
}
.cr-midcta-line { margin: 6px 0 0; font-size: 1.15rem; font-weight: 800; color: #fff; }
.cr-midcta-alt { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.cr-two-up { max-width: 760px; }

/* ---------- form fallback + review links ---------- */
.cr-form-alt { margin-top: 12px; font-size: 14px; text-align: center; }
.cr-form-alt a { font-weight: 800; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.cr-greviews { margin-top: 28px; }

