/* =========================================================
   J.C. Electrical Services — Global Stylesheet
   One stylesheet to keep formatting consistent site-wide
   ========================================================= */

/* ---------- Design Tokens ---------- */
/* ---------- Theme Tokens ---------- */
:root{
  /* shared */
  --brand: #6d28d9;
  --brand-2: #a78bfa;
  --accent: #22c55e;

  --shadow: 0 10px 30px rgba(0,0,0,.18);
  --radius: 18px;
  --radius-sm: 12px;

  --max: 1100px;
  --pad: 20px;

  --h1: clamp(34px, 4.6vw, 52px);
  --h2: clamp(24px, 3.2vw, 34px);
  --h3: 20px;
  --p: 16px;

  --line: 1.6;
  --speed: 160ms;

  /* dark defaults */
  --bg: #0b0f14;
  --surface: #101826;
  --surface-2: #0f1722;
  --text: #e8eef7;
  --muted: #b8c4d8;
  --border: rgba(255,255,255,.10);
  --headerBg: rgba(11,15,20,.65);
}

/* Light theme overrides */
:root[data-theme="light"]{
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #f1f5fb;
  --text: #0b1220;
  --muted: #3b475b;
  --border: rgba(15, 23, 42, .12);
  --headerBg: rgba(246,248,252,.75);
  --shadow: 0 10px 30px rgba(2,6,23,.10);
}


/* ---------- Base Reset ---------- */
*{ box-sizing: border-box; }
html,body{ height: 100%}
html{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);
  line-height: var(--line);
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
p{ margin: 0 0 14px; font-size: var(--p); color: var(--muted); }
h1,h2,h3{ margin: 0 0 12px; line-height: 1.15; color: var(--text); }
h1{ font-size: var(--h1); letter-spacing: -.02em; }
h2{ font-size: var(--h2); letter-spacing: -.01em; }
h3{ font-size: var(--h3); }

/* ---------- Layout Helpers ---------- */
.container{
  width: min(var(--max), 100% - 2*var(--pad));
  margin-inline: auto;
}
.section{ padding: 70px 0; }
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
:root[data-theme="light"] .card{
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(241,245,251,1));
}
.card-pad{ padding: 22px; }

/* ---------- Grid Helpers ---------- */
.grid{
  display: grid;
  gap: 18px;
}
.grid-2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Grid helper: span full width */
.span-2{
  grid-column: 1 / -1;
}
/* ---------- Header / Nav ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: transparent;         /* important */
  backdrop-filter: none;           /* important */
  -webkit-backdrop-filter: none;   /* important */
  isolation: isolate;              /* keeps layers stable */
  background-color: #3C1048;
}

.site-header{
  padding-top: env(safe-area-inset-top);
}

/* Disable header overlay layer (we're using a solid brand header) */
.site-header::before{
  content: none !important;
}

.navbar{
  display: flex;
  align-items: center;
  justify-content: flex-start; /* NOT space-between */
  gap: 18px;
  padding: 10px 0;
}



.brand{
  display: flex;
  align-items: center;
  gap: 1px;
  min-width: 220px;
  flex: 0 0 auto;
}
/* Brand logo sizing */
.brand img{
  height: 150px;          /* was likely ~40–44px */
  width: auto;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}

.brand .title{
  min-width: none;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand .title strong{ font-size: 24px; }
.brand .title span{ font-size: 12px; color: var(--muted); white-space: nowrap; }

.nav-links{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-links a{
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  transition: background var(--speed), color var(--speed), transform var(--speed);
}
.nav-links a:hover{
  background: rgba(255,255,255,.06);
  color: var(--text);
}
.nav-links a.active{
  background: rgba(109,40,217,.18);
  color: var(--text);
  border: 1px solid rgba(167,139,250,.25);
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--speed), background var(--speed), border-color var(--speed), opacity var(--speed);
  font-weight: 650;
  letter-spacing: .01em;
  user-select: none;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: linear-gradient(180deg, rgba(109,40,217,.95), rgba(109,40,217,.65));
  border-color: rgba(167,139,250,.35);
  color: white;
}
.btn-primary:hover{ opacity: .95; }
.btn-ghost{
  background: rgba(255,255,255,.04);
  color: var(--text);
}
.btn-ghost:hover{ background: rgba(255,255,255,.07); }
.btn-accent{
  background: linear-gradient(180deg, rgba(34,197,94,.95), rgba(34,197,94,.55));
  border-color: rgba(34,197,94,.35);
  color: #06210f;
}

/* ---------------------------------
   Trust Strip (below header, site-wide)
---------------------------------- */
.trust-strip-wrap{
  background: transparent;
}

.trust-strip{
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 14px;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-left: 4px solid #3C1048;

  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;

  font-size: 13.5px;
  line-height: 1.35;
}

.trust-strip strong{
  font-weight: 750;
  color: #ffffff;
}

.trust-strip span{
  color: rgba(255,255,255,0.88);
}

/* Light mode */
:root[data-theme="light"] .trust-strip{
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(15,23,42,0.12);
  border-left: 4px solid #3C1048;
}

:root[data-theme="light"] .trust-strip strong{
  color: #0b1220;
}

:root[data-theme="light"] .trust-strip span{
  color: rgba(15,23,42,0.75);
}

/* ---------- Hero ---------- */
.hero{
  padding: 72px 0 46px;
}
.hero-inner{
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 18px;
  align-items: center;
}
.hero .lead{
  font-size: 18px;
  color: var(--muted);
  max-width: 60ch;
}
.hero-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.hero-badges{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.badge{
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.hero-side{
  padding: 18px;
}
.kpi{
  display: grid;
  gap: 10px;
}
.kpi .row{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.18);
  border: 1px solid var(--border);
}
.kpi .row strong{ color: var(--text); }
.kpi .row span{ color: var(--muted); font-size: 14px; }

/* ----------Signature --------*/
.signature{
  margin-top: 14px;
  margin-bottom: 2px;
  font-family: "Ms Madi", cursive;
  font-size: 26px;          /* slightly larger looks more natural */
  color: var(--text);
  letter-spacing: 0.02em;
}

.signature + .small{
  margin-top: 0;
  opacity: 0.85;
}

/* ---------- Forms ---------- */
.form{
  display: grid;
  gap: 12px;
}
.label{
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.input, .textarea, .select{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.22);
  color: var(--text);
  outline: none;
}
.textarea{ min-height: 120px; resize: vertical; }
.help{
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.form-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ---------- Footer ---------- */
.site-footer{
  border-top: 1px solid var(--border);
  background: rgba(109,40,217,.10);
  padding: 34px 0;
}
.footer-grid{
  display: grid;
  gap: 14px;
  grid-template-columns: 1.25fr .75fr;
  align-items: start;
}
.footer-grid a{ color: var(--muted); }
.footer-grid a:hover{ color: var(--text); }
.small{ font-size: 12px; color: var(--muted); }

/* ---------- Utility ---------- */
.hr{ height: 1px; background: var(--border); margin: 16px 0; }
.note{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(167,139,250,.25);
  background: rgba(109,40,217,.10);
  color: var(--muted);
}
.success{
  border-color: rgba(34,197,94,.30);
  background: rgba(34,197,94,.10);
}
.warn{
  border-color: rgba(245,158,11,.30);
  background: rgba(245,158,11,.10);
}
.error{
  border-color: rgba(239,68,68,.30);
  background: rgba(239,68,68,.10);
}

/* ---------------------------------
   Theme transition (smooth)
---------------------------------- */
/* Theme transition only when user toggles */
html.theme-animate,
html.theme-animate body,
html.theme-animate .site-header,
html.theme-animate .card,
html.theme-animate .nav-links a,
html.theme-animate .badge,
html.theme-animate .input,
html.theme-animate .textarea,
html.theme-animate .select,
html.theme-animate .note,
html.theme-animate .btn {
  transition:
    background-color 220ms ease,
    color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    filter 220ms ease,
    fill 220ms ease;
}


/* ---------------------------------
   Bulb toggle styling
---------------------------------- */
:root{
  --bulbColor: #facc15; /* yellow for dark theme */
  --bulbGlow: drop-shadow(0 0 10px rgba(250, 204, 21, .25));
}

:root[data-theme="light"]{
  --bulbColor: #94a3b8; /* gray for light theme */
  --bulbGlow: none;
}

#themeToggle{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 650;
}

#themeToggle .bulb{
  width: 18px;
  height: 18px;
  display: inline-block;
  filter: var(--bulbGlow);
}

#themeToggle .bulb path{
  fill: var(--bulbColor);
  transition: fill 220ms ease, filter 220ms ease;
}
html { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root:not([data-theme="light"]) { color-scheme: dark; }

/* -----------------------------------------------------------------------
Services card formatting
/* ----------------------------------------------------------------------- */
/* Two-column services list inside a card */
.services-two-col{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin-top: 12px;
}

.services-two-col ul{
  margin: 0;
  padding-left: 18px;
}

.services-two-col li{
  margin: 6px 0;
  color: var(--muted);
  font-size: var(--p);
}

/* -------------- Card with image padding ----------- */
/* Full-card circuit background with left-side fade (text stays readable) */
.card.services-bg-full{
  position: relative;
  overflow: hidden;
}

/* Background art layer */
.card.services-bg-full::after{
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/circuit-traces-angled.svg");
  background-repeat: no-repeat;
  background-position: 80% center;
  background-size: 45%, auto;
  opacity: 0.10;                 /* base strength (we control visibility with mask below) */
  pointer-events: none;
  z-index: 0;
}

/* Fade mask: stronger cover on LEFT, less cover toward MIDDLE/RIGHT */
.card.services-bg-full::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;

  /* This overlay hides the background more on the left,
     then gradually reveals it toward the middle/right. */
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.65) 0%,
    rgba(255,255,255,0.12) 24%,
    rgba(255,255,255,0.38) 46%,
    rgba(255,255,255,0.65) 72%,
    rgba(255,255,255,0.9) 100%
  );
}

/* Keep card content above the layers */
.card.services-bg-full > *{
  position: relative;
  z-index: 2;
}

/* DARK mode: use a dark veil so traces stay subtle behind light text */
:root:not([data-theme="light"]) .card.services-bg-full::before{
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.40) 22%,
    rgba(0,0,0,0.18) 45%,
    rgba(0,0,0,0.05) 70%,
    rgba(0,0,0,0.00) 100%
  );
}

/* NOTE: SVG background renders black by default — filter used for dark mode */
:root:not([data-theme="light"]) .card.services-bg-full::after{
  filter: invert(1) brightness(1.1) contrast(0.95);
  color: rgba(255,255,255,0.9);
  opacity: 0.10;
}

/* LIGHT mode: use a light veil so traces don’t muddy the background */
:root[data-theme="light"] .card.services-bg-full::before{
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.85) 0%,
    rgba(255,255,255,0.65) 24%,
    rgba(255,255,255,0.38) 46%,
    rgba(255,255,255,0.12) 54%,
    rgba(0, 0, 0, 0) 70%
  );
}

/* Remove the filter for light mode (SVG shows correctly on light bg) */
:root[data-theme="light"] .card.services-bg-full::after{
  filter: none;
  color: rgba(0,0,0,0.9);
  opacity: 0.08;
}

/* -----------------------------------------------------------------------
    Fixes for Bugs
/* -----------------------------------------------------------------------
/* ---------------------------------
   Header text stability
   Prevent text re-rasterization flash
---------------------------------- */  
/* Prevent brief text flash during theme switch (header brand text) */
.brand .title,
.brand .title strong,
.brand .title span{
  transition: none !important;          /* don’t animate these */
  -webkit-font-smoothing: antialiased;  /* stabilize */
  text-rendering: geometricPrecision;   /* stabilize */
}

/* Reduce flicker from GPU composition in sticky + blur headers */
.site-header,
.brand{
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.brand, .brand .title{
  position: relative;
  z-index: 1;
  transform: translateZ(0);
  will-change: transform;
}
.brand .title strong, .brand .title span{
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}
/* ---------------------------------
   Header text stability (Edge fix)
   Prevent text re-rasterization flash
---------------------------------- */
.site-header *{
  transition-property: background-color, border-color, box-shadow, filter, fill;
}
.first-line{
  text-indent: 2em;
  font-size: smaller;
}
.clean-list{ margin: 12px 0 0; padding-left: 18px; }
.clean-list li{ margin: 8px 0; color: var(--muted); }
/* ---------------------------------
   Theme toggle label fix
   Prevent flicker when toggling themes
---------------------------------- */
/* Theme toggle label: no JS flicker */
#themeToggle .toggleText { display: inline-flex; }
#themeToggle .label-dark,
#themeToggle .label-light { display: none; }

/* If current theme is DARK, show "Light Mode" */
html:not([data-theme="light"]) #themeToggle .label-dark { display: inline; }

/* If current theme is LIGHT, show "Dark Mode" */
html[data-theme="light"] #themeToggle .label-light { display: inline; }
.site-header{
  background-color: #3C1048 !important;
}

/* =========================================
   Light mode: make header readable on purple
   ========================================= */
html[data-theme="light"] .site-header,
html[data-theme="light"] .site-header a,
html[data-theme="light"] .site-header .brand,
html[data-theme="light"] .site-header .title{
  color: #fff !important;
}

/* Nav links need a visible “hit box” in light mode */
html[data-theme="light"] .site-header .nav-links a{
  color: #fff !important;
  opacity: 0.95;
}

html[data-theme="light"] .site-header .nav-links a:hover{
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* If you use aria-current for active page, make it pop */
html[data-theme="light"] .site-header .nav-links a[aria-current="page"]{
  opacity: 1;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Buttons inside the header (including the theme toggle) */
html[data-theme="light"] .site-header .btn{
  color: #fff !important;
  border-color: rgba(255,255,255,0.55) !important;
  background: rgba(255,255,255,0.12) !important;
}

html[data-theme="light"] .site-header .btn:hover{
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(255,255,255,0.70) !important;
}

/* Header tagline contrast fix */
.site-header .tagline{
  display: block;
  margin-top: 2px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.85);
}

/* Keep it readable in light mode on purple header */
html[data-theme="light"] .site-header .tagline{
  color: rgba(255,255,255,0.85) !important;
}

/* Header should span full width (don’t constrain to --max) */
.site-header .container{
  width: 100%;
  max-width: none;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
/* Align nav with body content while header stays full-width */
.site-header .nav-wrap{
  max-width: var(--max);
  width: 100%;
  display: grid;
  justify-content: flex-end;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 24px;
/* Right side of header: nav on top, theme button below */
  max-width: var(--max);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;     /* pushes everything to the far right */
  gap: 8px;                  /* space between links and button */
  row-gap: 16px;
}

/* Keep links right-aligned */
.site-header .nav-links{
  grid-column: 1;
  grid-row: 1;
  justify-content: flex-start;
}
/* Nav links sit closer to logo */

/* Ensure the toggle sits at the far right under the links */
.site-header #themeToggle{
  align-self: flex-end;
/* Theme toggle pinned far right, below links */
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
}

/* ===== Header nav positioning override ===== */
/* nav links move LEFT toward logo, theme toggle stays RIGHT below */

.site-header .nav-wrap{
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;   /* do NOT right-align the whole block */
  width: auto !important;            /* prevent full-width “right block” behavior */
}

/* Links row sits left (closer to logo) */
.site-header .nav-links{
  justify-content: flex-start !important;
  align-self: flex-start !important;
}

/* Theme toggle sits below and far right */
.site-header #themeToggle{
  align-self: flex-end !important;
  margin-top: 8px;
}

/* Quick Info Border */
.quick-info{
  border-left: 4px solid #3C1048;
}

/* Optional: subtle accent for About page trust cards */
.card h2 + p{
  margin-bottom: 16px;
}

/* Prevent nested grid columns from collapsing too narrow */ 
.card .grid > * { 
  min-width: 0; 
}

  /* Deals page: prevent note boxes from becoming too narrow */
  .card .grid.grid-2 > .note {
    min-width: 0;
  }

  .note ul,
  .note li {
    overflow-wrap: break-word;
    word-break: normal;
  }

  .card .grid.grid-2 > .note { 
    min-width: 0; 
  }


  /* Request a quote page modal */
  .modal-overlay{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.55);
  z-index:9999;
}

.modal-overlay.is-open{
  display:flex;
}

.modal{
  background:#fff;
  width:min(560px,95vw);
  border-radius:16px;
  padding:22px;
  position:relative;
  box-shadow:0 12px 40px rgba(0,0,0,.25);
}

.modal-close{
  position:absolute;
  top:10px;
  right:14px;
  font-size:28px;
  background:none;
  border:none;
  cursor:pointer;
}



/* =========================================================
   Mobile Header / Nav (site-wide)
   Updated: unified + optimized for max-width: 768px
   ========================================================= */
@media (max-width: 768px){

  /* --- GRID OVERFLOW FIX (prevents card text from spilling) --- */
  .grid > * {
    min-width: 0;
  }

  /* Add spacing between stacked contact cards */
  .grid-2 > .card { 
    margin-bottom: 12px; 
  }

  /* Add spacing for the loose <p> inside the grid */ 
  .grid-2 > p.small { 
    margin-top: 12px; 
  }

  /* --- CARD OVERFLOW FIX --- */
  .card {
    min-width: 0;
  }

  /* --- TEXT WRAPPING FIX --- */
  p, li {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Navbar wraps cleanly */
  .navbar{
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 0;
    align-items: flex-start;
  }

  /* Brand row = full width */
  .brand{
    flex: 1 1 100%;
    min-width: 0;
    gap: 10px;
  }

  /* Logo shrinks for mobile */
  .brand img{
    height: 56px;
  }

  /* Title can wrap naturally */
  .brand .title{
    min-width: 0;
  }

  .brand .title strong{
    font-size: 18px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .brand .title span{
    white-space: normal;
  }

  /* Nav-wrap becomes vertical */
  .site-header .nav-wrap{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  /* Nav links wrap (no horizontal scroll) */
  .site-header .nav-links{
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
    justify-content: flex-start;
    gap: 8px 10px;
    row-gap: 12px;
  }

  .site-header .nav-links a{
    padding: 8px 10px;
    font-size: 14px;
    white-space: nowrap;
  }

  /* Theme toggle sits below nav, right aligned */
  .site-header #themeToggle{
    align-self: flex-end;
    padding: 9px 10px;
    margin-top: 8px;
  }

  /* Prevent theme toggle from stretching full width on mobile */
  #themeToggle {
    width: auto !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-self: flex-end !important;
    padding: 6px 10px; /* smaller, less attention-grabbing */
    margin-top: 4px; /* Improve spacing around theme toggle */
  }


  #themeToggle .bulb { 
    width: 16px; 
    height: 16px; 
  }

  #themeToggle .toggleText { 
    display: none; 
  }

  /* Trust strip tightening */
  .trust-strip{
    font-size: 13px;
    padding: 9px 10px;
  }

  /* Hero adjustments */
  .hero{
    padding: 44px 0 28px;
  }
  .hero .lead{
    font-size: 16px;
  }

  /* Collapse hero grid */
  .hero-inner{
    grid-template-columns: 1fr;
  }

    /* Spacing between hero text and quick-info */
  .hero-side { 
    margin-top: 20px; 
  }

  /* Footer collapses to one column */
  .footer-grid{
    grid-template-columns: 1fr;
  }

  .footer-grid > div { 
    margin-bottom: 20px; 
  }

  /* Services list collapses to one column */
  .services-two-col{
    grid-template-columns: 1fr;
  }

  /* --- EXTRA SAFETY: collapse grid-3 on mobile --- */
  .grid-3 {
    grid-template-columns: 1fr;
  }

  /* Add spacing between nested note blocks inside deal cards */ 
  .card .note { 
    margin-top: 10px; 
  }

  /* Add spacing between the nested grid-2 (Residential/Commercial) sections */ 
  .card .grid.grid-2 > .note { 
    margin-bottom: 12px; 
  }

  /* Add spacing before the Deal Disclaimers card */ 
  .card + .card { 
    margin-top: 16px; 
  }

  /* Add spacing before note blocks inside FAQ cards */ 
  .card .note { 
    margin-top: 10px; 
  }

  .card .grid.grid-2 { 
    grid-template-columns: 1fr !important;
    gap: 12px; 
  }

  /* Deals page: stack deal cards vertically on mobile */
  .grid.grid-2 { 
    grid-template-columns: 1fr !important; 
  }

  .grid.grid-2 > .card { 
    margin-bottom: 16px; 
  }

  /* Stack the two main quote cards vertically */
  .grid.grid-2 {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Stack the Phone/Email fields inside the form */
  form .grid.grid-2 {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  /* Add spacing between stacked cards */
  .grid.grid-2 > .card {
    margin-bottom: 12px;
  }

  /* Stack the two main service-area cards vertically */
.grid.grid-2 {
  grid-template-columns: 1fr !important;
  gap: 16px;
}

/* Add spacing between stacked cards */
.grid.grid-2 > .card {
  margin-bottom: 12px;
}

/* Collapse the grid-3 list of regions */
.grid.grid-3 {
  grid-template-columns: 1fr !important;
  gap: 10px;
}

/* Ensure note boxes inside the grid-3 don't collapse too narrow */
.grid.grid-3 .note {
  min-width: 0;
}
}

/* =========================================================
   Small Phones (max-width: 480px)
   ========================================================= */
@media (max-width: 480px){

  /* Header / Branding */
  .brand img { height: 44px; }
  .brand .title strong { font-size: 16px; }
  .site-header .nav-links a {
    padding: 7px 9px;
    font-size: 13px;
  }

  /* Global Elements */
  .note { padding: 10px 12px; }
  .note,
  .note.warn {
    font-size: 13px;
    line-height: 1.5;
  }
  .badge { padding: 6px 10px; }
  .small { font-size: 11px; }
  .help {
    font-size: 13px;
    line-height: 1.45;
  }

  /* Buttons & Actions */
  .btn {
    width: 100%;
    padding: 11px 14px;
  }
  .hero-actions { gap: 10px; }
  .hero-actions a,
  .form-actions .btn {
    flex: 1 1 100%;
  }

  /* Cards */
  .card-pad,
  .card .card-pad,
  .card.span-2 .card-pad,
  .card.services-bg-full .card-pad {
    padding: 16px;
  }

  /* Typography */
  h1 { font-size: 30px; }
  main.section h1,
  main .container > h1 {
    font-size: 28px;
  }
  main.section > .container > p,
  main .container > p {
    font-size: 15px;
    line-height: 1.55;
  }
  .hero .lead {
    font-size: 15px;
    line-height: 1.5;
  }

  /* Trust Strip */
  .trust-strip {
    font-size: 12.5px;
    padding: 8px 10px;
  }

  /* Lists */
  .clean-list li,
  .services-two-col li {
    margin: 6px 0;
    font-size: 15px;
    overflow-wrap: break-word;
    word-break: normal;
  }

  /* Signature block */
  .signature {
    font-size: 22px;
    margin-top: 10px;
  }
  .signature + .small { margin-top: 2px; }

  /* Grid adjustments */
  .grid-2 > p.small {
    font-size: 13px;
    line-height: 1.5;
    margin-top: 10px;
  }

  /* Nested grids collapse cleanly */
  .card .grid.grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Region notes (Service Areas) */
  .grid.grid-3 .note {
    font-size: 14px;
    padding: 10px 12px;
  }

  /* Final service-area paragraph */
  body > p.small {
    padding: 0 16px;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
  }

  /* Form spacing */
  .form > div {
    margin-bottom: 6px;
  }
}


