/* =========================================================================
   Spectrum Plumbing — Design System
   Vault-grounded: color carries meaning, typography signals E-E-A-T,
   motion restrained to content pages, mobile-first, WCAG 2.2 AA.
   ========================================================================= */

/* ----- Design tokens ----- */
:root {
  /* Surfaces */
  --bg-primary: #0a0e1a;
  --bg-secondary: #0f1524;
  --bg-card: #131929;
  --bg-elevated: #1a2133;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #cbd5e0;
  --text-muted: #a0aec0;
  --text-on-accent: #001018;

  /* Accent — teal family, used for primary action */
  --accent: #00b4d8;
  --accent-hover: #0096b7;
  --accent-deep: #0077a8;
  --accent-soft: rgba(0, 180, 216, 0.12);

  /* Interaction feedback — lime accent for hover states (ties to original brand) */
  --lime: #c6f73a;
  --lime-hover: #b0e022;
  --lime-soft: rgba(198, 247, 58, 0.14);
  --lime-text: #001b00;

  /* Semantic (color carries meaning, per Rule 19) */
  --emergency: #ef4444;
  --emergency-hover: #dc2626;
  --success: #10b981;
  --warning: #f59e0b;

  /* Borders */
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(0, 180, 216, 0.3);

  /* Spectrum gradient (brand signature — teal pair) */
  --spectrum: linear-gradient(90deg, #00b4d8 0%, #0077a8 100%);

  /* Rainbow — matches logo colors. Used for interaction states.
     Many color stops + soft easing between them for smooth blending.
     Ends with a return to the starting blue so background-position scrolling
     loops seamlessly (no visible seam where the gradient wraps). */
  --rainbow: linear-gradient(90deg,
    #4d7cff   0%,
    #6b6bff   7%,
    #8e5bff  14%,
    #c458e0  21%,
    #ff5bc7  28%,
    #ff5683  35%,
    #ff4d5e  42%,
    #ff6a45  49%,
    #ff8a3d  56%,
    #ffb63d  63%,
    #ffd93d  68%,
    #c5df45  74%,
    #8ed94d  79%,
    #6dd694  84%,
    #4ecddc  90%,
    #4d9ce8  95%,
    #4d7cff 100%);

  --rainbow-conic: conic-gradient(from 0deg at 50% 50%,
    #4d7cff,
    #8e5bff 12.5%,
    #ff5bc7 25%,
    #ff4d5e 37.5%,
    #ff8a3d 50%,
    #ffd93d 62.5%,
    #8ed94d 75%,
    #4ecddc 87.5%,
    #4d7cff 100%);

  /* Fonts */
  --font-body: 'Lato', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ui: 'Raleway', system-ui, sans-serif;
  --font-display: 'Fraunces', 'Raleway', Georgia, serif;

  /* Fluid type — refined scale with bigger jumps for clearer hierarchy */
  --text-xs:     clamp(0.75rem,   0.72rem + 0.15vw, 0.8125rem);    /* 12–13 */
  --text-sm:     clamp(0.875rem,  0.82rem + 0.25vw, 0.9375rem);    /* 14–15 */
  --text-base:   clamp(1rem,      0.95rem + 0.25vw, 1.125rem);     /* 16–18 body */
  --text-lg:     clamp(1.125rem,  1.05rem + 0.35vw, 1.25rem);      /* 18–20 lead */
  --text-xl:     clamp(1.375rem,  1.25rem + 0.6vw,  1.625rem);     /* 22–26 H4 */
  --text-2xl:    clamp(1.75rem,   1.5rem + 1.1vw,   2.25rem);      /* 28–36 H3 */
  --text-3xl:    clamp(2.25rem,   1.85rem + 1.8vw,  3rem);         /* 36–48 H2 / sub H1 */
  --text-4xl:    clamp(2.75rem,   2.1rem + 2.8vw,   4rem);         /* 44–64 sub H1 */
  --text-display:clamp(3rem,      2rem + 4.5vw,     6rem);         /* 48–96 home H1 */

  /* Measure (line-length) — optimal readability per CMS writing guide */
  --measure: 68ch;
  --measure-narrow: 54ch;
  --measure-head: 22ch;

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.5rem; --space-6: 2rem;
  --space-8: 3rem; --space-10: 4rem; --space-12: 6rem; --space-16: 8rem;

  /* Layout */
  --container: 1200px;
  --container-narrow: 760px;
  --container-wide: 1400px;

  /* Shape */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 150ms;
  --duration: 250ms;
  --duration-slow: 500ms;

  /* Z */
  --z-nav: 100;
  --z-dropdown: 110;
  --z-mobile-menu: 120;
  --z-call-bar: 90;
}

@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;
  }
}

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  font-feature-settings: "kern", "liga", "clig";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }

/* Headings — display-serif for H1/H2 (editorial voice), geometric sans for H3/H4 (utility) */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4);
  color: var(--text-primary);
  text-wrap: balance;
  font-feature-settings: "kern", "liga", "ss01";
}

h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-4xl);
  line-height: 1.04;
  letter-spacing: -0.028em;
  max-width: var(--measure-head);
}

h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-3xl);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 30ch;
}

h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-2xl);
  line-height: 1.2;
  letter-spacing: -0.012em;
}

h4 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-xl);
  line-height: 1.25;
  letter-spacing: -0.008em;
}

h5 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.3;
}

h6 {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: var(--text-xs);
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Em in display headings — brand accent italic for emphasis moments */
h1 em, h2 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

/* In the hero, em = the brand "spectrum" moment — animated rainbow fill */
.hero h1 em, .hero h2 em {
  font-style: italic;
  font-weight: 500;
  background-image: var(--rainbow);
  background-size: 200% auto;
  background-position: 0% 50%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: rainbow-flow 22s linear infinite;
  padding: 0 0.03em;
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 em, .hero h2 em { animation: none; }
}

p { margin: 0 0 var(--space-4); color: var(--text-primary); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

/* Lead paragraph — the first paragraph that introduces a page */
.lead {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: var(--measure-narrow);
  font-weight: 400;
}

a { color: var(--accent); text-decoration: none; transition: color var(--duration-fast) var(--ease); }
a:hover, a:focus-visible { color: var(--accent-hover); }

ul, ol { padding-left: var(--space-5); margin: 0 0 var(--space-4); }
li { margin-bottom: var(--space-2); }

strong { font-weight: 700; }
code { font-family: ui-monospace, monospace; font-size: 0.9em; background: var(--bg-card); padding: 2px 6px; border-radius: var(--radius-sm); }

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.skip-link {
  position: absolute; top: -100px; left: 8px; z-index: 999;
  background: var(--accent); color: var(--text-on-accent);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius);
  font-weight: 700; transition: top var(--duration) var(--ease);
}
.skip-link:focus { top: 8px; color: var(--text-on-accent); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ----- Utilities ----- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-5); }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--space-5); }
.muted { color: var(--text-muted); }

.btn-primary, .btn-outline, .btn-emergency {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-ui); font-weight: 700; font-size: var(--text-base);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform var(--duration-fast) var(--ease),
              box-shadow var(--duration-fast) var(--ease),
              color var(--duration-fast) var(--ease);
  border: 2px solid transparent;
  cursor: pointer;
  min-height: 48px; /* touch target */
  line-height: 1;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Rainbow rotating conic layer — shared by all button variants.
   The ::before is drawn MUCH larger than the button so only a small arc of the
   conic is visible at any time. A blur softens the wedge boundaries so colors
   wash smoothly across the full button surface. */
.btn-primary::before,
.btn-outline::before,
.btn-emergency::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 500%; aspect-ratio: 1;
  z-index: -1;
  background: var(--rainbow-conic);
  transform: translate(-50%, -50%) rotate(0deg);
  filter: blur(18px);
  opacity: 0;
  animation: rainbow-spin 28s linear infinite;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.btn-primary:hover::before,
.btn-primary:focus-visible::before,
.btn-outline:hover::before,
.btn-outline:focus-visible::before,
.btn-emergency:hover::before,
.btn-emergency:focus-visible::before {
  opacity: 0.95;
}

.btn-primary {
  background: var(--accent); color: #000814;
  box-shadow: 0 4px 12px rgba(0, 180, 216, 0.25);
  font-weight: 800;
}
.btn-primary:hover, .btn-primary:focus-visible {
  color: #000814;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(142, 91, 255, 0.35);
}

.btn-outline {
  background: transparent; color: var(--accent); border-color: var(--accent);
}
.btn-outline:hover, .btn-outline:focus-visible {
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(142, 91, 255, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-emergency {
  background: var(--emergency); color: white;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}
.btn-emergency:hover, .btn-emergency:focus-visible {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(142, 91, 255, 0.4);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-primary svg, .btn-outline svg, .btn-emergency svg { flex-shrink: 0; position: relative; z-index: 1; }

/* Reduced motion — freeze the rainbow rotation, keep the color shift */
@media (prefers-reduced-motion: reduce) {
  .btn-primary::before,
  .btn-outline::before,
  .btn-emergency::before {
    animation: none;
  }
  .nav-links > a:hover::after,
  .nav-links > a[aria-current]::after,
  .nav-links .has-dropdown > a:hover::after,
  .nav-links .has-dropdown > a[aria-current]::after {
    animation: none;
  }
}

/* ----- Nav ----- */
.site-nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transform: translateY(0);
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    padding var(--duration) var(--ease),
    background var(--duration) var(--ease);
  will-change: transform;
}
.site-nav.scrolled { padding: var(--space-1) 0; background: rgba(10, 14, 26, 0.98); }
.site-nav.hidden { transform: translateY(-102%); box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .site-nav { transition: background var(--duration) var(--ease), padding var(--duration) var(--ease); }
}
.nav-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-5);
}
.nav-logo img { display: block; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: var(--space-2); width: 44px; height: 44px;
  flex-direction: column; justify-content: space-around;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: all var(--duration) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links {
  display: flex; align-items: center; gap: var(--space-5);
  list-style: none; margin: 0; padding: 0;
}
/* Seamless loop math:
   - background-size is 200% (image is 2× container)
   - The gradient ends with the same color it starts with (closed loop)
   - Animating position by 200% scrolls through exactly one full image width,
     so the ending frame is pixel-identical to the starting frame.
   - Linear timing = constant velocity = no "stop, restart" beat. */
@keyframes rainbow-flow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes rainbow-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.nav-links > a, .nav-links .has-dropdown > a {
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: var(--space-2) 0;
  position: relative;
  transition: color var(--duration-fast) var(--ease);
  background-size: 200% 100%;
  background-position: 0% 50%;
}
.nav-links > a::after, .nav-links .has-dropdown > a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--rainbow);
  background-size: 200% 100%;
  background-position: 0% 50%;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--duration) var(--ease);
  border-radius: 2px;
}
.nav-links > a:hover::after,
.nav-links > a[aria-current]::after,
.nav-links .has-dropdown > a:hover::after,
.nav-links .has-dropdown > a[aria-current]::after {
  transform: scaleX(1);
  animation: rainbow-flow 20s linear infinite;
}
.nav-links > a:hover,
.nav-links > a[aria-current],
.nav-links .has-dropdown > a:hover,
.nav-links .has-dropdown > a[aria-current] {
  color: var(--text-primary);
}

/* Dropdown items — solid lime hover instead of rainbow text */
.dropdown a {
  transition: color var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease);
}
.dropdown a:hover, .dropdown a:focus-visible {
  background: var(--lime-soft);
  color: var(--lime);
}
.nav-cta { padding: var(--space-2) var(--space-4) !important; min-height: 40px; }
.nav-cta::after { display: none !important; }
.chev { font-size: 0.7em; margin-left: 4px; }

.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-2);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--duration) var(--ease);
  z-index: var(--z-dropdown);
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a {
  display: block; padding: var(--space-3) var(--space-4);
  color: var(--text-primary); font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  min-height: 44px; line-height: 1.5;
  display: flex; align-items: center;
}
.dropdown a:hover, .dropdown a:focus-visible {
  background: var(--accent-soft); color: var(--accent);
}

/* Mobile nav */
@media (max-width: 1023px) {
  .nav-toggle { display: flex; }
  .nav-links {
    /* Fixed-position drawer sized to the viewport.
       We use explicit height (not top/bottom) because .site-nav has a
       transform, which creates a new containing block for fixed descendants. */
    position: fixed;
    top: 0; right: 0;
    width: min(320px, 100vw);
    height: 100vh;
    height: 100dvh;
    background: var(--bg-secondary);
    flex-direction: column; align-items: flex-start;
    padding: var(--space-12) var(--space-5) calc(var(--space-6) + env(safe-area-inset-bottom));
    gap: var(--space-2);
    transform: translateX(100%);
    transition: transform var(--duration) var(--ease);
    z-index: var(--z-mobile-menu);
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    box-shadow: -24px 0 64px rgba(0, 0, 0, 0.4);
  }
  .nav-links.open { transform: translateX(0); visibility: visible; }
  .nav-links > a, .nav-links .has-dropdown { width: 100%; }
  .nav-links > a { min-height: 44px; display: flex; align-items: center; padding: var(--space-2) 0; }
  .nav-links .has-dropdown > a { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: var(--space-2) 0; }
  .dropdown {
    position: static; background: transparent; border: none; box-shadow: none;
    padding-left: var(--space-4); opacity: 1; transform: none;
    display: none;
  }
  .has-dropdown.open .dropdown { display: block; }
  .nav-cta { width: 100%; margin-top: var(--space-3); }
  /* Hide nav CTA button on mobile — sticky bottom call bar handles it */
  .nav-links .nav-cta { display: none; }
}

/* ----- Footer ----- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: var(--space-10) 0 var(--space-6);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto; padding: 0 var(--space-5);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-8);
}
.footer-col h4, .footer-col .footer-heading {
  font-size: var(--text-base); font-family: var(--font-ui); font-weight: 700;
  color: var(--accent); margin: 0 0 var(--space-3);
}
.footer-col p { color: var(--text-secondary); font-size: var(--text-sm); margin-bottom: var(--space-3); }
.footer-col a { color: var(--text-secondary); }
.footer-col a:hover { color: var(--accent); }
.footer-logo img { margin-bottom: var(--space-4); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: var(--space-2); }
.footer-links a { display: inline-block; font-size: var(--text-sm); }
.social { display: flex; gap: var(--space-3); margin-top: var(--space-4); }
.social a { display: inline-flex; padding: var(--space-2); border-radius: var(--radius-sm); }
.social a:hover { background: var(--accent-soft); }

/* ----- Mobile bottom call bar ----- */
.mobile-call-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: var(--space-3) var(--space-4);
  z-index: var(--z-call-bar);
  display: none;
}
.mobile-call-bar .btn-primary { width: 100%; }
@media (max-width: 767px) {
  .mobile-call-bar { display: block; }
  body { padding-bottom: 72px; }
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex; align-items: center;
  padding: var(--space-12) 0;
  overflow: hidden;
  background: var(--bg-primary);
}
.hero-home { min-height: 80vh; }
.hero video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  z-index: 0;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(10, 14, 26, 0.9) 0%, rgba(10, 14, 26, 0.72) 60%, rgba(10, 14, 26, 0.88) 100%);
  z-index: 1;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: var(--container); margin: 0 auto; padding: 0 var(--space-5);
  width: 100%;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0 0 var(--space-5);
  max-width: 18ch;
  text-wrap: balance;
}
.hero-subhead {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 var(--space-6);
  max-width: 52ch;
  text-wrap: pretty;
}
.hero .cta-row {
  display: flex; gap: var(--space-3); flex-wrap: wrap;
}

/* Sub-page hero (service/location/faq/about — no video) */
.hero-sub {
  min-height: auto;
  padding: var(--space-10) 0 var(--space-8);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}
.hero-sub::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,14,26,0.35) 0%, rgba(10,14,26,0.75) 100%);
  z-index: 1; pointer-events: none;
  display: block;
}
.hero-sub h1 { font-size: var(--text-3xl); }

/* Liquid hero background — SVG with goo filter */
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}
.hero-home .hero-bg { opacity: 0.35; mix-blend-mode: screen; }

@media (prefers-reduced-motion: reduce) {
  .hero-bg animate, .hero-bg animateMotion { display: none; }
  .hero-bg { opacity: 0.4; }
}

/* Disable SVG filter on small screens for perf — still shows gradients, just not merged */
@media (max-width: 640px) {
  .hero-bg g { filter: none !important; }
  .hero-bg { opacity: 0.4; }
}
.hero-eyebrow {
  font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 700;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

/* ----- TL;DR answer box (GEO-critical) ----- */
.tldr {
  background: var(--bg-card);
  border-left: 3px solid transparent;
  border-image: var(--spectrum) 1;
  border-image-slice: 0 0 0 1;
  padding: var(--space-5) var(--space-5) var(--space-5) var(--space-5);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: var(--space-6) 0;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.tldr-label {
  display: block; font-family: var(--font-ui); font-size: var(--text-xs);
  font-weight: 800; color: var(--accent); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: var(--space-2);
}
.tldr p { font-size: var(--text-lg); line-height: 1.55; margin: 0; }

/* ----- Sections ----- */
.section { padding: var(--space-10) 0; }
.section-alt { background: var(--bg-secondary); }
.section-inline { margin: var(--space-10) 0; }
.section-inline:first-child { margin-top: 0; }
.section-inline:last-child { margin-bottom: 0; }
.section-inline > h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-3xl);
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin-bottom: var(--space-5);
  padding-top: var(--space-4);
  max-width: 26ch;
}
.section-inline > h2::before {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--spectrum);
  margin-bottom: var(--space-4);
  border-radius: 2px;
}
.section-inline > h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-xl);
  line-height: 1.25;
  letter-spacing: -0.008em;
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}
.section-inline > h3 + p { margin-bottom: var(--space-5); line-height: 1.65; }
.section-inline > p { font-size: var(--text-base); line-height: 1.7; }
.section-title {
  text-align: center;
  margin: 0 auto var(--space-4);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-3xl);
  line-height: 1.1;
  letter-spacing: -0.022em;
  max-width: 28ch;
}
.section-lede {
  text-align: center;
  max-width: 58ch;
  margin: 0 auto var(--space-8);
  color: var(--text-secondary);
  font-size: var(--text-lg);
  line-height: 1.55;
  text-wrap: pretty;
}

/* ----- Cards / grids ----- */
.grid { display: grid; gap: var(--space-5); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Flex-based grid for hubs with item counts that don't divide evenly — last row centers */
.flex-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5);
}
.flex-grid > * {
  flex: 0 1 300px;
  min-width: 260px;
  max-width: 320px;
}

.service-card, .area-card, .post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration) var(--ease);
  position: relative;
}
.service-card:hover, .area-card:hover, .post-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow);
}
.card-link, .post-card-link {
  display: block; color: inherit; text-decoration: none;
  padding: var(--space-5);
  height: 100%;
}
.post-card-link { padding: 0; }
.post-card-image { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-elevated); }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration-slow) var(--ease); }
.post-card:hover .post-card-image img { transform: scale(1.03); }
.post-card-body { padding: var(--space-5); }
.post-card-body h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
  color: var(--text-primary);
}
.post-card-body p { color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.55; margin-bottom: var(--space-3); }
.post-meta { color: var(--text-muted); font-size: var(--text-xs); font-family: var(--font-ui); }
.post-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.tag {
  display: inline-block; padding: var(--space-1) var(--space-2);
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 700;
  border-radius: var(--radius-sm); text-transform: uppercase; letter-spacing: 0.04em;
}

.card-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  transition: color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.card-icon::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 600%; aspect-ratio: 1;
  z-index: -1;
  background: var(--rainbow-conic);
  transform: translate(-50%, -50%) rotate(0deg);
  filter: blur(14px);
  opacity: 0;
  animation: rainbow-spin 28s linear infinite;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}
.card-icon svg {
  width: 28px; height: 28px;
  transition: transform 0.4s var(--ease);
  transform-origin: center;
  will-change: transform;
  position: relative;
  z-index: 1;
}

/* Base hover on any card with an icon — conic rainbow fill in the icon box */
.card-link:hover .card-icon,
.card-link:focus-visible .card-icon {
  color: #001018;
  box-shadow: 0 0 28px rgba(142, 91, 255, 0.35);
}
.card-link:hover .card-icon::before,
.card-link:focus-visible .card-icon::before {
  opacity: 0.95;
}
@media (prefers-reduced-motion: reduce) {
  .card-icon::before { animation: none; }
}
.card-link:hover .card-icon svg,
.card-link:focus-visible .card-icon svg {
  transform: scale(1.15);
}

/* Per-service thematic animations on hover */
@keyframes icon-spin-grow {
  0% { transform: rotate(0deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(1.15); }
}
@keyframes icon-flicker {
  0%, 100% { transform: scale(1.15) translateY(0); filter: brightness(1); }
  20% { transform: scale(1.19) translateY(-1px); filter: brightness(1.3); }
  40% { transform: scale(1.13) translateY(1px); filter: brightness(0.95); }
  60% { transform: scale(1.18) translateY(-0.5px); filter: brightness(1.25); }
  80% { transform: scale(1.14) translateY(0.5px); filter: brightness(1.05); }
}
@keyframes icon-flash {
  0%, 100% { transform: scale(1.15); filter: brightness(1); }
  50% { transform: scale(1.25); filter: brightness(1.6) drop-shadow(0 0 10px currentColor); }
}
@keyframes icon-drop {
  0%, 100% { transform: scale(1.15) translateY(0); }
  30% { transform: scale(1.15) translateY(-2px); }
  60% { transform: scale(1.2) translateY(4px); }
  80% { transform: scale(1.15) translateY(-1px); }
}
@keyframes icon-scan {
  0%, 100% { transform: scale(1.15) rotate(0deg); }
  25% { transform: scale(1.2) rotate(-6deg); }
  75% { transform: scale(1.2) rotate(6deg); }
}
@keyframes icon-flow {
  0%, 100% { transform: scale(1.15) translateX(0); }
  50% { transform: scale(1.15) translateX(4px); }
}
@keyframes icon-tilt {
  0%, 100% { transform: scale(1.15) rotate(0deg); }
  50% { transform: scale(1.18) rotate(-4deg); }
}

.card-link:hover .card-icon[data-icon="repiping-salem"] svg {
  animation: icon-spin-grow 1.4s var(--ease) forwards;
}
.card-link:hover .card-icon[data-icon="water-heater-repair-salem"] svg {
  animation: icon-flicker 1.4s ease-in-out infinite;
}
.card-link:hover .card-icon[data-icon="tankless-water-heater-salem"] svg {
  animation: icon-flash 0.7s ease-in-out infinite;
}
.card-link:hover .card-icon[data-icon="drain-cleaning-salem"] svg {
  animation: icon-drop 1s ease-in-out infinite;
}
.card-link:hover .card-icon[data-icon="leak-detection-salem"] svg {
  animation: icon-scan 1.4s ease-in-out infinite;
}
.card-link:hover .card-icon[data-icon="sewer-line-repair-salem"] svg {
  animation: icon-flow 1.5s ease-in-out infinite;
}
.card-link:hover .card-icon[data-icon="commercial-plumbing-salem"] svg {
  animation: icon-tilt 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .card-icon svg,
  .card-link:hover .card-icon svg,
  .card-link:focus-visible .card-icon svg,
  .card-link:hover .card-icon[data-icon] svg {
    animation: none !important;
    transform: none !important;
  }
}
.card-arrow {
  color: var(--accent); font-family: var(--font-ui); font-weight: 700;
  font-size: var(--text-sm); display: inline-flex; align-items: center; gap: 6px;
  margin-top: var(--space-4);
  transition: color var(--duration-fast) var(--ease);
  background-image: var(--rainbow);
  background-size: 200% auto;
  background-position: 0% 50%;
  -webkit-background-clip: text;
          background-clip: text;
}
.card-arrow span { transition: transform var(--duration-fast) var(--ease); }
.card-link:hover .card-arrow,
.card-link:focus-visible .card-arrow {
  color: transparent;
  animation: rainbow-flow 22s linear infinite;
}
.card-link:hover .card-arrow span,
.card-link:focus-visible .card-arrow span { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) {
  .card-link:hover .card-arrow,
  .card-link:focus-visible .card-arrow { animation: none; }
}

/* ----- Value props ----- */
.value-props { padding: var(--space-10) 0; background: var(--bg-secondary); }
.value-props h2 {
  text-align: center;
  max-width: 32ch;
  margin: 0 auto var(--space-8);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-3xl);
  line-height: 1.12;
  letter-spacing: -0.022em;
}
.value-grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.value-item { text-align: left; }
.value-item img { margin-bottom: var(--space-3); }
.value-item h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.3;
  letter-spacing: -0.008em;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}
.value-item p { color: var(--text-secondary); }

/* ----- Services ticker ----- */
.ticker {
  position: relative;
  padding: var(--space-5) 0;
  background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary), var(--bg-primary));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 6%, black 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, black 6%, black 94%, transparent 100%);
}
.ticker-track {
  display: flex;
  width: max-content;
  gap: var(--space-4);
  animation: ticker-scroll 55s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track {
  animation-play-state: paused;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-base);
  text-decoration: none;
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-card);
  transition: background var(--duration) var(--ease),
              border-color var(--duration) var(--ease),
              color var(--duration) var(--ease),
              transform var(--duration-fast) var(--ease);
  white-space: nowrap;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.ticker-item::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 500%; aspect-ratio: 1;
  z-index: -1;
  background: var(--rainbow-conic);
  transform: translate(-50%, -50%) rotate(0deg);
  filter: blur(18px);
  opacity: 0;
  animation: rainbow-spin 28s linear infinite;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.ticker-item:hover, .ticker-item:focus-visible {
  border-color: transparent;
  color: #000814;
  transform: translateY(-2px);
}
.ticker-item:hover::before, .ticker-item:focus-visible::before {
  opacity: 0.95;
}
.ticker-icon {
  display: inline-flex;
  color: var(--accent);
  transition: color var(--duration) var(--ease);
}
.ticker-icon svg { width: 20px; height: 20px; }
.ticker-item:hover .ticker-icon, .ticker-item:focus-visible .ticker-icon { color: #000814; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker { -webkit-mask-image: none; mask-image: none; }
  .ticker-item::before { animation: none; }
}

@media (max-width: 640px) {
  .ticker-track { animation-duration: 35s; }
  .ticker-item { font-size: var(--text-sm); padding: var(--space-2) var(--space-4); }
}

/* ----- CTA block ----- */
.cta-block {
  position: relative;
  padding: var(--space-12) 0;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0, 180, 216, 0.14) 0%, transparent 60%),
    linear-gradient(180deg, #060912 0%, #0d1628 50%, #060912 100%);
  border-top: 1px solid var(--border-accent);
  border-bottom: 1px solid var(--border-accent);
  overflow: hidden;
  isolation: isolate;
}
.cta-block > .container { position: relative; z-index: 2; }

/* Dotted-surface canvas — liquid wave of brand-colored dots */
.cta-bg {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.cta-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 92%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 92%);
}

.cta-block h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-3xl);
  line-height: 1.08;
  letter-spacing: -0.024em;
  max-width: 22ch;
  margin: 0 auto var(--space-5);
}
.cta-block p { max-width: 60ch; margin: 0 auto var(--space-6); color: var(--text-secondary); }
.cta-row { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

/* Emergency CTA variant — red wash overlay */
.cta-emergency {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(239, 68, 68, 0.18) 0%, transparent 60%),
    linear-gradient(180deg, #180608 0%, #280a0a 50%, #180608 100%);
  border-color: rgba(239, 68, 68, 0.3);
}
.cta-emergency h2 { color: var(--text-primary); }

/* ----- Router cards (homepage three-path) ----- */
.router {
  display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  padding: var(--space-8) 0;
}
.router-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--duration) var(--ease);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.router-card:hover { transform: translateY(-3px); border-color: var(--border-accent); box-shadow: var(--shadow); }
.router-card.urgent { background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02)); border-color: rgba(239, 68, 68, 0.3); }
.router-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-2xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 20ch;
}
.router-card p { color: var(--text-secondary); margin: 0; flex: 1; font-size: var(--text-base); line-height: 1.55; }
.router-card a.btn-primary, .router-card a.btn-outline, .router-card a.btn-emergency { align-self: flex-start; margin-top: var(--space-2); }

/* ----- Breadcrumbs ----- */
.breadcrumbs ol {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  font-size: var(--text-sm); color: var(--text-muted);
}
.breadcrumbs li:not(:last-child)::after {
  content: '/'; margin-left: var(--space-2); color: var(--text-muted);
}
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs [aria-current] { color: var(--text-primary); }

/* ----- FAQ block ----- */
.faq-block {
  padding: var(--space-8) 0;
  max-width: var(--container-narrow);
  margin: 0 auto;
}
.faq-block h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-3xl);
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin-bottom: var(--space-6);
  max-width: 22ch;
}
.faq-list { display: flex; flex-direction: column; gap: var(--space-3); }
.faq-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color var(--duration) var(--ease);
}
.faq-item[open] { border-color: var(--border-accent); }
.faq-item summary {
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.3;
  letter-spacing: -0.006em;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--space-3);
  position: relative;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.5em; line-height: 1; color: var(--accent);
  font-weight: 400;
  transition: transform var(--duration) var(--ease);
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--accent); }
.faq-answer {
  padding: 0 var(--space-5) var(--space-5);
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: var(--text-base);
  max-width: 62ch;
}
.faq-answer p { max-width: 62ch; color: var(--text-secondary); }
.faq-answer > *:last-child { margin-bottom: 0; }

/* ----- Blog post article ----- */
.post-article {
  max-width: var(--container-narrow); margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-10);
  position: relative;
}
.post-header { margin-bottom: var(--space-8); }
.post-header h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-4xl);
  letter-spacing: -0.028em;
  line-height: 1.08;
  margin: var(--space-4) 0 var(--space-5);
  max-width: 24ch;
  text-wrap: balance;
}
.post-cover {
  aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius-lg); margin-bottom: var(--space-6);
  background: var(--bg-elevated);
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-header .post-meta { font-size: var(--text-sm); display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; color: var(--text-muted); }

/* Long-form reading rhythm */
.post-body {
  font-size: var(--text-lg);
  line-height: 1.72;
  color: var(--text-primary);
}
.post-body > * { max-width: 64ch; }
.post-body > h2, .post-body > h3, .post-body > h4 {
  max-width: 32ch;
}
.post-body h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-2xl);
  line-height: 1.15;
  letter-spacing: -0.018em;
  margin: var(--space-10) 0 var(--space-4);
  scroll-margin-top: 100px;
  text-wrap: balance;
}
.post-body h2::before {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--spectrum);
  margin-bottom: var(--space-4);
  border-radius: 2px;
}
.post-body h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-xl);
  line-height: 1.25;
  letter-spacing: -0.008em;
  margin: var(--space-7) 0 var(--space-3);
  color: var(--text-primary);
}
.post-body h4 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-lg);
  margin: var(--space-5) 0 var(--space-2);
  color: var(--accent);
}
.post-body p { margin: 0 0 var(--space-5); }
.post-body ul, .post-body ol { margin: 0 0 var(--space-5); padding-left: var(--space-5); }
.post-body li { margin-bottom: var(--space-2); line-height: 1.7; }
.post-body li > strong:first-child { color: var(--accent); font-weight: 700; }
.post-body a {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--border-accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--duration-fast) var(--ease);
}
.post-body a:hover { text-decoration-color: var(--accent); color: var(--accent); }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: var(--space-2) 0 var(--space-2) var(--space-5);
  margin: var(--space-6) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-xl);
  line-height: 1.4;
  color: var(--text-secondary);
}
.post-body hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: var(--space-8) auto;
  max-width: 160px;
}
.post-body table {
  width: 100%; max-width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  font-size: var(--text-base);
}
.post-body th, .post-body td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.post-body th {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--accent);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.post-body strong { color: var(--text-primary); font-weight: 700; }
.post-body em { font-style: italic; color: var(--text-secondary); }
.pullquote {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--text-primary);
  text-align: center;
  margin: var(--space-10) 0;
  padding: var(--space-6) var(--space-5);
  position: relative;
  max-width: 32ch !important;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}
.pullquote::before {
  content: '"';
  display: block;
  font-size: 5rem;
  line-height: 0.5;
  color: var(--accent);
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-weight: 700;
}
.pullquote::after {
  content: ''; display: block; margin: var(--space-4) auto 0;
  width: 48px; height: 3px; background: var(--spectrum); border-radius: 2px;
}

/* Drop cap on first paragraph */
.post-body > p:first-of-type {
  font-size: var(--text-xl);
  line-height: 1.55;
  color: var(--text-primary);
}
.post-body > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.5em;
  line-height: 0.82;
  float: left;
  margin: 0.08em 0.12em 0 0;
  color: var(--accent);
  padding: 0;
}
@media (max-width: 500px) {
  .post-body > p:first-of-type { font-size: var(--text-lg); }
  .post-body > p:first-of-type::first-letter { font-size: 1em; float: none; margin: 0; color: inherit; font-family: inherit; font-weight: 400; }
}

/* Reading progress bar */
.reading-progress {
  position: fixed; top: 0; left: 0; height: 3px;
  width: 100%;
  background: var(--spectrum);
  transform: scaleX(0); transform-origin: left;
  z-index: calc(var(--z-nav) + 1);
  pointer-events: none;
}

/* Table of contents */
.post-toc {
  position: sticky; top: calc(var(--space-10) + 3px);
  align-self: start;
  max-height: calc(100vh - var(--space-12));
  overflow-y: auto;
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-sm);
}
.post-toc h2 {
  font-family: var(--font-ui); font-size: var(--text-xs); font-weight: 800;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0 0 var(--space-3);
}
.post-toc ul { list-style: none; padding: 0; margin: 0; }
.post-toc li { margin: 0; }
.post-toc a {
  display: block; color: var(--text-secondary);
  padding: var(--space-2) 0 var(--space-2) var(--space-3);
  border-left: 2px solid var(--border);
  transition: all var(--duration-fast) var(--ease);
  text-decoration: none;
}
.post-toc a:hover, .post-toc a.active {
  color: var(--accent);
  border-left-color: var(--accent);
}

@media (min-width: 1280px) {
  .post-layout {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: var(--space-8);
    max-width: calc(var(--container-narrow) + 240px + var(--space-8));
    margin: 0 auto;
    padding: var(--space-6) var(--space-5) var(--space-10);
  }
  .post-layout .post-article { padding: 0; max-width: none; }
}
@media (max-width: 1279px) {
  .post-toc-wrapper { display: none; }
  .post-toc-mobile {
    margin: var(--space-6) 0;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius);
  }
  .post-toc-mobile summary {
    padding: var(--space-4);
    font-family: var(--font-ui); font-weight: 700;
    cursor: pointer; list-style: none;
  }
  .post-toc-mobile summary::-webkit-details-marker { display: none; }
  .post-toc-mobile[open] summary { border-bottom: 1px solid var(--border); }
  .post-toc-mobile ul { list-style: none; padding: var(--space-3) var(--space-5); margin: 0; }
  .post-toc-mobile li { margin: var(--space-2) 0; }
  .post-toc-mobile a { color: var(--text-secondary); }
}

/* Post footer */
.post-cta-inline {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-6);
  margin: var(--space-8) 0; text-align: center;
}
.post-cta-inline h3 { font-family: var(--font-display); font-weight: 500; }
.post-author {
  display: flex; gap: var(--space-4); align-items: center;
  padding: var(--space-5);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin: var(--space-8) 0;
}
.post-author h4 { margin: 0 0 var(--space-1); font-size: var(--text-base); }
.post-author p { margin: 0; font-size: var(--text-sm); color: var(--text-secondary); }

/* Related posts */
.related-posts { padding: var(--space-10) 0; background: var(--bg-secondary); border-top: 1px solid var(--border); }

/* ----- Form ----- */
.form-wrapper { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6); }

/* Jobber embed — override light-theme defaults to match dark brand */
.jobber-embed {
  min-height: 400px;
  color: var(--text-primary);
}
.jobber-embed iframe { width: 100% !important; border: 0; border-radius: var(--radius); background: transparent; }
.jobber-embed label, .jobber-embed legend { color: var(--text-primary) !important; font-family: var(--font-ui) !important; font-weight: 700 !important; font-size: var(--text-sm) !important; }
.jobber-embed input, .jobber-embed textarea, .jobber-embed select {
  background: var(--bg-primary) !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius) !important;
  font-family: var(--font-body) !important;
}
.jobber-embed input:focus, .jobber-embed textarea:focus, .jobber-embed select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-soft) !important;
  outline: none !important;
}
.jobber-embed button[type=submit], .jobber-embed .btn-primary, .jobber-embed .submit {
  background: var(--accent) !important;
  color: #000814 !important;
  border: 0 !important;
  font-family: var(--font-ui) !important;
  font-weight: 800 !important;
  border-radius: var(--radius) !important;
  padding: var(--space-3) var(--space-5) !important;
  min-height: 48px !important;
  transition: all var(--duration-fast) var(--ease) !important;
}
.jobber-embed button[type=submit]:hover, .jobber-embed .btn-primary:hover, .jobber-embed .submit:hover {
  background-image: var(--rainbow-conic) !important;
  color: #000814 !important;
  transform: translateY(-1px);
}
.contact-form { display: flex; flex-direction: column; gap: var(--space-4); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-4); }
.form-field { display: flex; flex-direction: column; gap: var(--space-2); }
.form-field label { font-family: var(--font-ui); font-weight: 700; font-size: var(--text-sm); }
.form-field input, .form-field textarea, .form-field select {
  background: var(--bg-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: var(--space-3) var(--space-4);
  font-family: inherit; font-size: var(--text-base);
  transition: border-color var(--duration-fast) var(--ease);
  width: 100%;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field .hint { color: var(--text-muted); font-size: var(--text-xs); }

/* Contact page grid */
.contact-grid {
  display: grid; gap: var(--space-8);
  grid-template-columns: 1fr;
  max-width: var(--container); margin: 0 auto; padding: var(--space-8) var(--space-5);
}
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.2fr; } }

/* Emergency page */
.emergency-hero {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, var(--bg-primary) 60%);
}
.emergency-call {
  display: block; background: var(--emergency); color: white;
  padding: var(--space-6); border-radius: var(--radius-lg);
  text-align: center; text-decoration: none;
  font-family: var(--font-ui); font-weight: 800;
  font-size: var(--text-2xl);
  box-shadow: 0 12px 32px rgba(239, 68, 68, 0.3);
  margin: var(--space-6) 0;
  transition: all var(--duration) var(--ease);
}
.emergency-call {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.emergency-call::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 500%; aspect-ratio: 1;
  z-index: -1;
  background: var(--rainbow-conic);
  transform: translate(-50%, -50%) rotate(0deg);
  filter: blur(24px);
  opacity: 0;
  animation: rainbow-spin 28s linear infinite;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.emergency-call:hover, .emergency-call:focus-visible {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(142, 91, 255, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.emergency-call:hover::before, .emergency-call:focus-visible::before { opacity: 0.95; }
@media (prefers-reduced-motion: reduce) {
  .emergency-call::before { animation: none; }
}
.emergency-call small { display: block; font-size: var(--text-sm); font-weight: 400; opacity: 0.95; margin-top: var(--space-2); }
.emergency-list { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); }

/* Entry animations (respect prefers-reduced-motion) */
.reveal {
  opacity: 0; transform: translateY(12px);
  transition: opacity var(--duration-slow) var(--ease), transform var(--duration-slow) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Pagination */
.pagination {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--space-4); padding: var(--space-8) 0;
  max-width: var(--container); margin: 0 auto;
  padding: var(--space-8) var(--space-5);
}
.pagination .spacer { flex: 1; }

/* Checklist */
.checklist { list-style: none; padding: 0; }
.checklist li {
  padding-left: var(--space-6); position: relative;
  margin-bottom: var(--space-3);
}
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 0.55em;
  width: 14px; height: 14px;
  background: var(--accent-soft);
  border: 2px solid var(--accent);
  border-radius: 3px;
}
.checklist li::after {
  content: ''; position: absolute; left: 4px; top: 0.6em;
  width: 4px; height: 8px;
  border: solid var(--accent); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Process list (numbered) */
.process { counter-reset: step; list-style: none; padding: 0; }
.process li {
  counter-increment: step;
  padding-left: var(--space-8); position: relative;
  margin-bottom: var(--space-5);
}
.process li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px;
  background: var(--spectrum); color: var(--text-on-accent);
  border-radius: 50%; font-family: var(--font-ui); font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-sm);
}

/* Proof strip */
.proof-strip {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-6); flex-wrap: wrap;
  padding: var(--space-6) 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.proof-item { display: flex; align-items: center; gap: var(--space-3); color: var(--text-secondary); font-size: var(--text-sm); }
.proof-item strong { color: var(--text-primary); font-family: var(--font-ui); }

/* Neighborhoods list */
.neighborhoods {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin: var(--space-4) 0;
}
.neighborhoods span {
  padding: var(--space-2) var(--space-4);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 999px; font-size: var(--text-sm);
}

/* About page bios */
.bio {
  display: grid; gap: var(--space-6); align-items: start;
  grid-template-columns: 1fr; margin: var(--space-8) 0;
  padding: var(--space-6); background: var(--bg-card);
  border-radius: var(--radius-lg); border: 1px solid var(--border);
}
@media (min-width: 768px) { .bio { grid-template-columns: 240px 1fr; } }
.bio img { border-radius: var(--radius); aspect-ratio: 1/1; object-fit: cover; width: 100%; }

/* Testimonial */
.testimonials-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.testimonial {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.testimonial blockquote { margin: 0; font-style: italic; }
.testimonial cite { color: var(--text-muted); font-style: normal; font-size: var(--text-sm); }
.testimonial .stars { color: var(--warning); letter-spacing: 2px; }
