/* ──────────────────────────────────────────────────────────────────────────
   aaero-base.css - Shared site styles
   Loaded once by the browser, cached across all 26 pages.
   Contains: skip-link, focus indicators, FAQ accordion, nearby-cities bridge
   links, industry-standards section, MBA footer link, local-callout boxes,
   and the cookie consent banner.
   ────────────────────────────────────────────────────────────────────────── */

/* ── Skip navigation (WCAG 2.4.1) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  z-index: 9999;
  background: #C9302C;
  color: #fff !important;
  padding: 12px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.1s;
  white-space: nowrap;
}
.skip-link:focus { top: 8px; outline: 3px solid #fff; outline-offset: 2px; }

/* ── Blue CTA button — nav "Free Estimate" across all pages ── */
.btn-blue {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 22px;
  background: linear-gradient(135deg, #1a56db 0%, #1446b8 100%);
  color: #fff; font-weight: 700; font-size: 14px;
  border-radius: 8px; border: none;
  text-decoration: none; cursor: pointer;
  transition: all .25s;
}
.btn-blue:hover {
  background: linear-gradient(135deg, #1446b8 0%, #0f3a9e 100%);
  box-shadow: 0 6px 24px rgba(26,86,219,.45);
  transform: translateY(-1px);
  color: #fff; text-decoration: none;
}
@keyframes pulse-blue {
  0%,100% { box-shadow: 0 4px 16px rgba(26,86,219,.30), 0 0 0 0 rgba(26,86,219,.35); }
  50%      { box-shadow: 0 4px 16px rgba(26,86,219,.30), 0 0 0 10px rgba(26,86,219,0); }
}
.btn-blue.btn-pulse { animation: pulse-blue 2.2s infinite; }

/* ── Focus indicators (WCAG 2.4.7) ── */
.hamburger:focus-visible { outline: 3px solid #C9302C; outline-offset: 2px; }
.btn:focus-visible { outline: 3px solid #C9302C; outline-offset: 3px; }
a:focus-visible { outline: 2px solid #C9302C; outline-offset: 2px; border-radius: 2px; }
button:focus-visible { outline: 3px solid #C9302C; outline-offset: 2px; }

/* ── FAQ accordion (matches JSON-LD content) ── */
.faq-section { padding: 80px 0; background: #fff; border-top: 1px solid #ebebeb; }
.faq-section .faq-hdr { text-align: center; margin-bottom: 8px; }
.faq-section .faq-hdr .label { color: var(--red); display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 12px; -webkit-text-fill-color: var(--red); background: none; }
.faq-section .faq-hdr h2 { font-family: var(--serif); font-size: clamp(28px, 4vw, 42px); font-weight: 600; text-transform: uppercase; color: var(--black); letter-spacing: .5px; line-height: 1.15; }
.faq-accordion { max-width: 820px; margin: 48px auto 0; padding: 0 24px; }
.faq-item { background: none; border: none; border-bottom: 1px solid #e2e2e2; border-radius: 0; margin-bottom: 0; overflow: hidden; }
.faq-item:first-child { border-top: 1px solid #e2e2e2; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--black); line-height: 1.35; letter-spacing: .3px; cursor: pointer; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: rgba(201,48,44,.08); color: var(--red); font-size: 22px; font-weight: 300; display: inline-flex; align-items: center; justify-content: center; line-height: 1; transition: background .2s ease, color .2s ease, transform .2s ease; position: static; transform: none; }
.faq-item[open] summary::after { content: "+"; background: var(--red); color: #fff; transform: rotate(45deg); }
.faq-item summary:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; border-radius: 4px; }
.faq-item .faq-a { padding: 0 64px 26px 0; font-size: 16px; color: var(--gray-700); line-height: 1.78; }
.faq-item .faq-a strong { color: var(--black); }
@media(max-width:768px){ .faq-item summary { font-size: 17px; } .faq-item .faq-a { padding-right: 10px; } }

/* ── Nearby service areas (bridge links) ── */
.nearby-cities { padding: 50px 0; background: #fff; border-top: 1px solid #ebebeb; }
.nearby-cities .nb-hdr { text-align: center; margin-bottom: 28px; }
.nearby-cities h2 { font-family: var(--serif); font-size: 26px; font-weight: 600; text-transform: uppercase; color: var(--black); margin-bottom: 8px; }
.nearby-cities p { color: var(--gray-700); font-size: 14px; }
.nearby-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; max-width: 900px; margin: 0 auto; }
.nearby-card { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px 16px; background: #fafafa; border: 1px solid #ebebeb; border-radius: 8px; font-weight: 600; color: var(--black); transition: all .2s; text-align: center; }
.nearby-card:hover { background: var(--red); color: #fff; border-color: var(--red); transform: translateY(-2px); }
.nearby-card i { color: var(--red); transition: color .2s; }
.nearby-card:hover i { color: #fff; }

/* ── Industry standards / outbound authority links ── */
.standards-section { padding: 50px 0; background: #fafafa; border-top: 1px solid #ebebeb; }
.standards-inner { max-width: 900px; margin: 0 auto; }
.standards-section h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; text-transform: uppercase; color: var(--black); margin-bottom: 8px; text-align: center; }
.standards-section .std-intro { text-align: center; color: var(--gray-700); font-size: 14px; margin-bottom: 26px; max-width: 680px; margin-left: auto; margin-right: auto; }
.standards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.std-link { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; background: #fff; border: 1px solid #ebebeb; border-radius: 8px; transition: all .2s; }
.std-link:hover { border-color: var(--red); transform: translateY(-2px); }
.std-link i { color: var(--red); font-size: 18px; margin-top: 2px; flex-shrink: 0; }
.std-link-text { display: flex; flex-direction: column; gap: 2px; }
.std-link-name { font-weight: 700; font-size: 14px; color: var(--black); }
.std-link-desc { font-size: 12px; color: var(--gray-500); line-height: 1.4; }

/* ── Marin Builders Association footer link ── */
.ft-mba-link { display: inline-block; margin-top: 12px; font-size: 12px; color: rgba(255,255,255,.65); text-decoration: underline; text-underline-offset: 2px; transition: color .2s; }
.ft-mba-link:hover { color: var(--gold, #EED705); }

/* ── Local insights callout (city-specific E-E-A-T) ── */
.local-callout { display: flex; gap: 18px; align-items: flex-start; padding: 22px 24px; margin: 26px 0 30px; background: linear-gradient(135deg, #fdf4f4 0%, #fff 100%); border-left: 4px solid var(--red); border-radius: var(--r); }
.local-callout-icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.local-callout-body h3 { font-family: var(--serif); font-size: 17px; font-weight: 700; color: var(--black); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.local-callout-body p { font-size: 14.5px; color: var(--gray-700); line-height: 1.65; margin: 0; }
.local-callout-body strong { color: var(--black); }
@media(max-width: 600px){ .local-callout { flex-direction: column; gap: 12px; padding: 18px 20px; } }

/* ── Form validation (form-validate.js) ─────────────────────── */
.field-error {
  display: block;
  color: #8b1f1b; /* darkened for 5.4:1 contrast ratio on white (was #c0392b = ~4.2:1) */
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
  min-height: 0;
}
.field-error:empty { display: none; }

.fc-invalid,
.fc-invalid:focus {
  border-color: #8b1f1b !important;
  background-color: #fff8f8 !important;
  box-shadow: 0 0 0 2px rgba(139,31,27,.18) !important;
}

/* ── Placeholder contrast (WCAG 1.4.3 AA — 4.5:1 minimum) ── */
input::placeholder,
textarea::placeholder,
select::placeholder {
  color: #737373; /* #737373 on white = 4.56:1 — just passes AA */
  opacity: 1;
}

/* ── Accessible dropdown keyboard support (WCAG 2.1.1) ── */
.nav-item:focus-within .nav-drop { opacity: 1; pointer-events: auto; transform: none; visibility: visible; }
.nav-item:focus-within .caret { transform: rotate(180deg); }

.btn-loading {
  opacity: 0.75;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
  animation: aaero-spin .7s linear infinite;
}

@keyframes aaero-spin { to { transform: rotate(360deg); } }

/* ── Reduced motion (WCAG 2.3.3) ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Authorized Dealer Brand Badge Row ── */
.brands-section { padding: 48px 0; background: #fff; border-bottom: 1px solid #ebebeb; text-align: center; }
.brands-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px 40px;
}
.brand-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  background: #f8f9fa;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  min-width: 120px;
}
.brand-badge:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}
.brand-badge img {
  max-width: 120px;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(20%);
  opacity: 0.85;
  transition: opacity 0.2s, filter 0.2s;
}
.brand-badge:hover img { opacity: 1; filter: grayscale(0%); }
@media (max-width: 600px) {
  .brands-grid { gap: 16px 24px; }
  .brand-badge { min-width: 90px; padding: 10px 14px; }
  .brand-badge img { max-width: 90px; }
}

/* -- Sticky sub-nav (scroll-activated secondary nav bar) ------------------- */
.subnav { position: fixed; top: 0; left: 0; right: 0; z-index: 950; background: rgba(255,255,255,.98); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid #ebebeb; box-shadow: 0 2px 16px rgba(0,0,0,.08); display: flex; align-items: center; height: 68px; transform: translateY(-100%); opacity: 0; transition: transform 0.32s ease, opacity 0.32s ease; pointer-events: none; }
.subnav.visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.subnav-inner { max-width: var(--max); margin: 0 auto; padding: 0 24px; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.subnav-logo img { height: 48px; width: auto; display: block; }
.subnav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.subnav-list a { display: block; padding: 7px 14px; border-radius: 100px; font-size: 13px; font-weight: 600; color: var(--gray-700); white-space: nowrap; transition: background var(--ease), color var(--ease); }
.subnav-list a:hover { background: var(--gray-100); color: var(--black); }
.subnav-phone { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 18px; background: var(--red); color: var(--white); font-weight: 700; font-size: 14px; border-radius: 6px; white-space: nowrap; transition: background var(--ease); flex-shrink: 0; }
.subnav-phone:hover { background: var(--red-dark); }
@media(max-width:600px){ .subnav { height:60px; } .subnav-list { display:none; } .subnav-logo img { height:40px; } }

/* ── Cookie Consent Banner ── */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: #111;
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,.75);
  box-shadow: 0 -4px 24px rgba(0,0,0,.35);
}
#cookie-banner p { margin: 0; flex: 1 1 260px; line-height: 1.5; }
#cookie-banner p a { color: #fff; text-decoration: underline; opacity: .8; }
#cookie-banner p a:hover { opacity: 1; }
.cookie-btns { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-btn-accept { padding: 8px 20px; background: #C9302C; color: #fff; border: none; border-radius: 6px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; transition: opacity .2s; }
.cookie-btn-accept:hover { opacity: .85; }
.cookie-btn-reject { padding: 8px 16px; background: transparent; color: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.25); border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit; transition: border-color .2s, color .2s; }
.cookie-btn-reject:hover { border-color: rgba(255,255,255,.6); color: #fff; }
.cookie-btn-manage { padding: 8px 16px; background: transparent; color: rgba(255,255,255,.35); border: none; border-radius: 6px; font-size: 12px; font-weight: 400; cursor: pointer; font-family: inherit; transition: color .2s; text-decoration: underline; }
.cookie-btn-manage:hover { color: rgba(255,255,255,.7); }
@media(max-width: 768px) { #cookie-banner { padding-bottom: 78px; } }

/* ── Mobile menu CTA button — override the generic .mob-menu a color rule ── */
a.mob-cta { color: #fff !important; border-bottom: none !important; }
a.mob-cta:hover { color: #fff !important; opacity: .88; }

/* ── Footer mascot slide-in ── */
.ft-mascot-wrap {
  position: absolute;
  right: -8px;
  bottom: 0;
  width: 220px;
  transform: translateX(115%);
  transition: transform 0.85s cubic-bezier(0.34, 1.45, 0.64, 1);
  pointer-events: none;
  z-index: 5;
  user-select: none;
}
.ft-mascot-wrap.ft-mascot-visible {
  transform: translateX(0);
}
.ft-mascot-wrap img { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { .ft-mascot-wrap { width: 160px; right: -4px; } }
@media (max-width: 600px) { .ft-mascot-wrap { width: 120px; right: -2px; } }
