/* ============================================================================
   BC HOME SERVICE — v18 "APEX" design layer
   Additive on top of v17 NOVA. Loaded AFTER v17.css on every public page.

   Scope rules (non-negotiable):
   - The homepage hero (#home) and #service-areas React sections are NEVER
     restyled at rest. Hover-only micro-interactions are additionally fenced
     with :not(#home .btn) / :not(#service-areas .btn) selectors.
   - Every animation is transform / opacity / filter only.
   - prefers-reduced-motion disables all v18 motion.
   - No indigo/blue-purple palette: brand = deep navy + cyan + warm orange.
   ============================================================================ */

.v18, .v18 * { box-sizing: border-box; }

:root {
  --v18-navy: #0a1628;
  --v18-navy-2: #10233d;
  --v18-cyan: #48cae4;
  --v18-cyan-deep: #0096c7;
  --v18-orange: #ff6b35;
  --v18-amber: #ffb703;
  --v18-ink: #16233a;
  --v18-ink-soft: #4a5a72;
  --v18-paper: #f6f9fc;
  --v18-line: rgba(10, 22, 40, 0.09);
  --v18-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --v18-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --v18-dur: 0.55s;
}

/* =============================================================
   1. THE MINIMAL FLOATING ACTION PILL  (mobile, replaces the
   v16 full-width bar with a compact centered glass dock)
   ============================================================= */
@media (max-width: 768px) {
  .v16-action-bar {
    left: 50%;
    right: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: auto;
    height: 52px;
    border-radius: 26px;
    padding: 0 4px;
    gap: 0;
    -webkit-transform: translate(-50%, var(--v18-ab-y, 90px)) scale(0.9);
    transform: translate(-50%, var(--v18-ab-y, 90px)) scale(0.9);
    -webkit-transition: -webkit-transform 0.45s var(--v18-ease), box-shadow 0.3s ease;
    transition: transform 0.45s var(--v18-ease), box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.16);
    -webkit-box-shadow: 0 14px 38px rgba(2, 10, 24, 0.5), 0 3px 10px rgba(2, 10, 24, 0.4);
    box-shadow: 0 14px 38px rgba(2, 10, 24, 0.5), 0 3px 10px rgba(2, 10, 24, 0.4);
  }
  .v16-action-bar.v18-ab-in {
    --v18-ab-y: 0px;
    -webkit-transform: translate(-50%, 0) scale(1);
    transform: translate(-50%, 0) scale(1);
  }
  .v16-action-bar.v18-ab-hidden {
    --v18-ab-y: calc(100% + 26px);
    -webkit-transform: translate(-50%, calc(100% + 26px)) scale(0.92);
    transform: translate(-50%, calc(100% + 26px)) scale(0.92);
  }
  /* gradient hairline across the pill's top edge */
  .v16-action-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg,
      rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.02) 42%, transparent 60%);
    pointer-events: none;
  }
  .v16-ab-btn {
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    position: relative;
    min-height: 52px;
    padding: 5px 15px 3px;
    gap: 2px;
    font-size: 0.575rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    border-radius: 22px;
    border-left: 0 !important;
  }
  .v16-ab-btn + .v16-ab-btn::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    height: 24px;
    width: 1px;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    pointer-events: none;
  }
  .v16-ab-btn svg { width: 18px; height: 18px; }
  .v16-ab-btn:active {
    -webkit-transform: scale(0.92);
    transform: scale(0.92);
    background: rgba(72, 202, 228, 0.14);
    border-radius: 22px;
  }
  /* book = the accent action: warm gradient text */
  .v16-ab-btn[href*="/book/"], .v16-ab-btn[href*="book-online"] {
    color: #ffd9a8;
  }
  .v16-ab-btn[href*="/book/"] svg, .v16-ab-btn[href*="book-online"] svg {
    color: var(--v18-amber, #ffb703);
  }
  /* body clearance: pill floats, needs less dead space */
  body { padding-bottom: 74px !important; }
}

/* =============================================================
   2. MOBILE DRAWER DOCK — compact pill row (was 3 big boxes)
   ============================================================= */
@media (max-width: 768px) {
  .v16-dock-row {
    gap: 6px;
    max-width: 320px;
    margin: 0 auto;
  }
  .v16-dock-btn {
    -webkit-flex: 0 1 auto;
    flex: 0 1 auto;
    -webkit-flex-direction: row;
    flex-direction: row;
    gap: 7px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 19px;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.055);
  }
  .v16-dock-btn svg { width: 15px; height: 15px; }
  .v16-dock-btn:active {
    -webkit-transform: scale(0.94);
    transform: scale(0.94);
  }
  .v16-dock-hours { margin-top: 8px; font-size: 0.62rem; }
}

/* =============================================================
   3. BRAND LOGO — the new stacked BC ONE lockup needs more
   height than the old wide wordmark to stay legible.
   ============================================================= */
.brand-logo-img {
  height: clamp(46px, 5.6vw, 58px) !important;
}
.nav.scrolled .brand-logo-img {
  height: clamp(40px, 4.7vw, 50px) !important;
}
@media (max-width: 640px) {
  .brand-logo-img { height: 44px !important; }
  .nav.scrolled .brand-logo-img { height: 38px !important; }
}

/* =============================================================
   4. BUTTON SYSTEM APEX — shine sweep, press depth, ring focus.
   Hero (#home) + #service-areas React buttons excluded at rest
   AND on hover: their original treatment is untouched.
   ============================================================= */
.btn:not(#home .btn):not(#service-areas .btn):not(.bc-hero .btn):not(.v16-ab-btn):not(.v16-dock-btn) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  -webkit-transition:
    -webkit-transform 0.18s var(--v18-ease),
    box-shadow 0.28s ease,
    background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  transition:
    transform 0.18s var(--v18-ease),
    box-shadow 0.28s ease,
    background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn:not(#home .btn):not(#service-areas .btn):not(.bc-hero .btn)::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 100%);
  -webkit-transform: translateX(-160%) skewX(-18deg) translateZ(0);
  transform: translateX(-160%) skewX(-18deg) translateZ(0);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}
.btn:not(#home .btn):not(#service-areas .btn):not(.bc-hero .btn):hover::after {
  -webkit-animation: v18Shine 0.85s var(--v18-ease) forwards;
  animation: v18Shine 0.85s var(--v18-ease) forwards;
}
@-webkit-keyframes v18Shine {
  0%   { opacity: 0; -webkit-transform: translateX(-160%) skewX(-18deg); }
  12%  { opacity: 1; }
  100% { opacity: 0; -webkit-transform: translateX(240%) skewX(-18deg); }
}
@keyframes v18Shine {
  0%   { opacity: 0; -webkit-transform: translateX(-160%) skewX(-18deg); transform: translateX(-160%) skewX(-18deg); }
  12%  { opacity: 1; }
  100% { opacity: 0; -webkit-transform: translateX(240%) skewX(-18deg); transform: translateX(240%) skewX(-18deg); }
}
.btn:not(#home .btn):not(#service-areas .btn):not(.bc-hero .btn):hover {
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
}
.btn:not(#home .btn):not(#service-areas .btn):not(.bc-hero .btn):active {
  -webkit-transform: translateY(0) scale(0.975);
  transform: translateY(0) scale(0.975);
}

/* primary buttons gain a soft brand glow on hover */
.btn-primary:not(#home .btn-primary):not(#service-areas .btn-primary):hover,
.btn-blue:not(#home .btn-blue):not(#service-areas .btn-blue):hover {
  -webkit-box-shadow: 0 10px 26px -8px rgba(0, 150, 199, 0.55);
  box-shadow: 0 10px 26px -8px rgba(0, 150, 199, 0.55);
}
.btn-secondary:not(#home .btn-secondary):hover,
.btn-orange:not(#home .btn-orange):hover,
.btn-warm:not(#home .btn-warm):hover {
  -webkit-box-shadow: 0 10px 26px -8px rgba(255, 107, 53, 0.5);
  box-shadow: 0 10px 26px -8px rgba(255, 107, 53, 0.5);
}

/* sitewide keyboard ring (never affects resting visuals) */
a:not(.v16-ab-btn):focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--v18-cyan-deep, #0096c7);
  outline-offset: 2px;
  border-radius: 6px;
}

/* =============================================================
   5. IMAGE TREATMENTS — radius, depth, hover zoom (content imgs)
   ============================================================= */
.article-body img:not(.no-v18),
.blog-content img:not(.no-v18),
.card img:not(.no-v18),
figure img:not(.no-v18) {
  border-radius: 14px;
  -webkit-box-shadow: 0 10px 30px -14px rgba(10, 22, 40, 0.25);
  box-shadow: 0 10px 30px -14px rgba(10, 22, 40, 0.25);
}
.ba-img img, .gallery-item img, .g-item img {
  -webkit-transition: -webkit-transform 0.6s var(--v18-ease);
  transition: transform 0.6s var(--v18-ease);
  will-change: auto;
}
.ba-img:hover img, .gallery-item:hover img, .g-item:hover img {
  -webkit-transform: scale(1.055);
  transform: scale(1.055);
}
.ba-img, .gallery-item, .g-item {
  overflow: hidden;
  border-radius: 14px;
}

/* =============================================================
   6. FORMS — floating focus glow + refined chips
   ============================================================= */
.qf-input, .qf-input-group input, .qf-input-group select, .qf-input-group textarea,
input[type="text"]:not(.v18-keep), input[type="tel"], input[type="email"],
select:not(.v18-keep), textarea:not(.v18-keep) {
  -webkit-transition: border-color 0.2s ease, box-shadow 0.25s ease, background-color 0.2s ease;
  transition: border-color 0.2s ease, box-shadow 0.25s ease, background-color 0.2s ease;
}
.qf-input:focus, .qf-input-group input:focus, .qf-input-group select:focus,
.qf-input-group textarea:focus,
input[type="text"]:focus, input[type="tel"]:focus, input[type="email"]:focus,
select:focus, textarea:focus {
  outline: none;
  border-color: var(--v18-cyan-deep, #0096c7) !important;
  -webkit-box-shadow: 0 0 0 4px rgba(0, 150, 199, 0.13), 0 2px 10px -4px rgba(0, 150, 199, 0.25);
  box-shadow: 0 0 0 4px rgba(0, 150, 199, 0.13), 0 2px 10px -4px rgba(0, 150, 199, 0.25);
}
.city-chip, .qf-chip {
  -webkit-transition: -webkit-transform 0.2s var(--v18-ease), border-color 0.2s ease,
    background-color 0.2s ease, box-shadow 0.25s ease, color 0.2s ease;
  transition: transform 0.2s var(--v18-ease), border-color 0.2s ease,
    background-color 0.2s ease, box-shadow 0.25s ease, color 0.2s ease;
}
.city-chip:hover, .qf-chip:hover {
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
  border-color: rgba(0, 150, 199, 0.45) !important;
  -webkit-box-shadow: 0 6px 16px -8px rgba(0, 150, 199, 0.4);
  box-shadow: 0 6px 16px -8px rgba(0, 150, 199, 0.4);
}

/* =============================================================
   7. FAQ ACCORDIONS — accent rail + smooth height
   ============================================================= */
.faq-item {
  -webkit-transition: border-color 0.25s ease, box-shadow 0.3s ease;
  transition: border-color 0.25s ease, box-shadow 0.3s ease;
  position: relative;
}
.faq-item:hover {
  border-color: rgba(0, 150, 199, 0.38);
}
.faq-item.open, .faq-item.active {
  -webkit-box-shadow: 0 10px 30px -16px rgba(0, 150, 199, 0.35);
  box-shadow: 0 10px 30px -16px rgba(0, 150, 199, 0.35);
}
.faq-item.open::before, .faq-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--v18-cyan, #48cae4), var(--v18-orange, #ff6b35));
}

/* =============================================================
   8. TABLE POLISH — sticky head, zebra hover, tabular numbers
   ============================================================= */
.table-wrap, .compare-table-wrap { overflow-x: auto; }
table.comparison, .pricing-table, .cost-table { border-collapse: separate; border-spacing: 0; }
table.comparison th, .pricing-table th, .cost-table th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 2;
  font-variant-numeric: tabular-nums;
}
table.comparison tbody tr, .pricing-table tbody tr, .cost-table tbody tr {
  -webkit-transition: background-color 0.18s ease;
  transition: background-color 0.18s ease;
}
table.comparison tbody tr:hover, .pricing-table tbody tr:hover, .cost-table tbody tr:hover {
  background-color: rgba(0, 150, 199, 0.055);
}
.stat-num, .cost, .value { font-variant-numeric: tabular-nums; }

/* =============================================================
   9. CUSTOM SCROLLBAR + SELECTION (desktop only)
   ============================================================= */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #b9c8d8, #93a8bd);
  border-radius: 8px;
  border: 3px solid rgba(255, 255, 255, 0.85);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: #7d94ab; }
::selection {
  background: rgba(0, 150, 199, 0.22);
  color: inherit;
}
* { scrollbar-width: thin; scrollbar-color: #a9bbcd transparent; }

/* long list panels (admin + site) */
.max-h-96, [class*="overflow-y-auto"] {
  scrollbar-width: thin;
  scrollbar-color: rgba(10, 22, 40, 0.25) transparent;
}

/* =============================================================
   10. FOOTER APEX (internal pages) — hairlines, link arrows
   ============================================================= */
.footer-grid a, footer .footer-links a {
  -webkit-transition: color 0.2s ease, -webkit-transform 0.2s var(--v18-ease);
  transition: color 0.2s ease, transform 0.2s var(--v18-ease);
}
footer a:hover { color: #fff; }
.footer-social a, .footer-social svg {
  -webkit-transition: -webkit-transform 0.25s var(--v18-ease), background-color 0.25s ease;
  transition: transform 0.25s var(--v18-ease), background-color 0.25s ease;
}
.footer-social a:hover {
  -webkit-transform: translateY(-3px);
  transform: translateY(-3px);
}
.logo-mark {
  -webkit-box-shadow: 0 6px 18px -8px rgba(2, 10, 24, 0.55);
  box-shadow: 0 6px 18px -8px rgba(2, 10, 24, 0.55);
}

/* =============================================================
   11. CARD PRESS DEPTH (non-hero cards only; v17 already lifts)
   ============================================================= */
.card:not(#home .card):not(#service-areas .card):active {
  -webkit-transform: translateY(-1px) scale(0.992);
  transform: translateY(-1px) scale(0.992);
}

/* =============================================================
   12. REDUCED MOTION — kill every v18 animation
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .v16-action-bar {
    -webkit-transition: none;
    transition: none;
    -webkit-transform: translate(-50%, 0);
    transform: translate(-50%, 0);
  }
  .btn::after { display: none; }
  .btn, .city-chip, .qf-chip, .ba-img img, .gallery-item img, .g-item img,
  .footer-social a, .card {
    -webkit-transition: none !important;
    transition: none !important;
  }
}

/* =============================================================
   13. PRINT — clean output for quotes/estimates
   ============================================================= */
@media print {
  .v16-action-bar, .chat-float, .ai-chat-float, .nav, .mobile-nav,
  .v15-seasonal, footer .footer-social, .scroll-top { display: none !important; }
  body { padding-bottom: 0 !important; }
}
