/* =====================================================================
   24/7 Geyser & Plumbing Solutions — shared stylesheet
   Palette & type per research/design-language.md.
   Two roles kept separate on purpose:
     --on-brand  = text/icons sitting on the blue brand ground
                   (header, hero, footer, primary buttons) — stays near-white
                   in BOTH themes.
     --surface   = card / panel fill on the page ground — flips dark in dark.
   ===================================================================== */

/* ---- Light theme (default) ---- */
:root {
  --brand: #0B4F8A;          /* deep water blue */
  --brand-deep: #08375F;     /* night blue */
  --accent: #DE8A2E;         /* hot-water copper — lines/icons/borders only */
  --accent-text: #9A5D14;    /* deepened copper for small text on pale */
  --emergency: #D33B2C;      /* signal red — 24/7 call button ONLY */
  --emergency-hover: #b8281a;
  --teal: #127C86;           /* trust seals, sparing */

  --bg: #F3F6F8;             /* page ground */
  --surface: #FFFFFF;        /* card / panel fill */
  --surface-2: #ffffff;      /* nested panel */
  --ink: #1A2027;            /* body text */
  --muted: #586471;          /* secondary text */
  --mist: #E1E7EB;           /* quiet bands, hairlines */
  --border: #d5dde3;

  --on-brand: #F3F6F8;       /* text/icons on brand-blue ground (both themes) */
  --on-brand-muted: #c6d6e6;

  --shadow: 0 1px 3px rgba(16,42,64,.10), 0 6px 18px rgba(16,42,64,.08);
  --shadow-lg: 0 4px 12px rgba(16,42,64,.12), 0 14px 40px rgba(16,42,64,.12);
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1140px;

  --font-display: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Barlow", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Dark theme ---- */
[data-theme="dark"] {
  --bg: #062033;             /* deepest: page ground (below the brand-deep bands) */
  --surface: #123A5C;        /* lifted lighter navy — cards read as raised panels, not floating text */
  --surface-2: #16436B;
  --ink: #E6EBEF;
  --muted: #9AA7B2;
  --mist: #0A2F49;           /* quiet section band — sits between ground and surface */
  --border: #2E5E8C;         /* clearly lighter hairline so card / input edges are visible */

  --accent: #E9A24E;         /* nudged brighter for dark ground */
  --accent-text: #E9A24E;    /* copper is fine as text on dark surface */

  --shadow: 0 1px 3px rgba(0,0,0,.4), 0 10px 26px rgba(0,0,0,.5);
  --shadow-lg: 0 6px 16px rgba(0,0,0,.45), 0 20px 52px rgba(0,0,0,.55);
}

/* ===================== Base ===================== */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .5em;
}

h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1rem; }

a { color: var(--brand); }
/* Recolour only bare inline text links in dark mode. Scoping to :not([class])
   keeps this off component anchors (.btn, .call-btn, .card, .brand-lockup, nav,
   footer links) — otherwise its [data-theme] specificity beats their own colour
   rules and the 24/7 emergency button renders light-blue-on-red (unreadable). */
[data-theme="dark"] a:not([class]) { color: #7db6e8; }
[data-theme="dark"] .site-footer a { color: var(--on-brand); }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 56px 0; }

.section-label {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
  font-size: .85rem;
  color: var(--accent-text);
  margin: 0 0 .4rem;
}

.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: var(--on-brand);
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: 13px 22px; border-radius: var(--radius-sm);
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .05s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-deep); }

.btn-outline {
  background: transparent; color: var(--brand);
  border-color: var(--brand);
}
[data-theme="dark"] .btn-outline { color: #9ecbf0; border-color: #9ecbf0; }
.btn-outline:hover { background: rgba(11,79,138,.08); }

/* Emergency red — reserved for the 24/7 call button only */
.btn-emergency {
  background: var(--emergency); color: #ffffff; border-color: transparent;
}
.btn-emergency:hover { background: var(--emergency-hover); }

/* ===================== Header ===================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 2px 10px rgba(8,55,95,.25);
}
.header-inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 66px; padding: 8px 20px;
  max-width: var(--maxw); margin: 0 auto;
}

.brand-lockup { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-brand); margin-right: auto; }
.brand-mark { flex: 0 0 auto; }
.brand-mark svg { display: block; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1; letter-spacing: .01em; }
.brand-name span { display: block; font-weight: 400; font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--on-brand-muted); margin-top: 3px; }

/* Nav */
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--on-brand); text-decoration: none; font-family: var(--font-display);
  font-weight: 600; padding: 9px 12px; border-radius: 6px; font-size: .98rem;
  white-space: nowrap;   /* keep "Insurance Claims" / "Areas We Cover" on one line */
}
.main-nav a:hover { background: rgba(255,255,255,.12); }
.main-nav a[aria-current="page"] { background: rgba(255,255,255,.16); box-shadow: inset 0 -3px 0 var(--accent); }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* Emergency call button in header */
.call-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--emergency); color: #fff; text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  padding: 11px 16px; border-radius: 8px; white-space: nowrap;
  min-height: 44px; box-shadow: 0 2px 8px rgba(211,59,44,.4);
}
.call-btn:hover { background: var(--emergency-hover); }
.call-btn .call-btn-label { font-size: .62rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; opacity: .9; display: block; line-height: 1; margin-bottom: 2px; }
.call-btn .call-btn-num { line-height: 1; }

/* Theme toggle */
.theme-toggle {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  color: var(--on-brand); width: 42px; height: 42px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.theme-toggle:hover { background: rgba(255,255,255,.22); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Mobile nav toggle */
.nav-toggle {
  display: none; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  color: var(--on-brand); width: 42px; height: 42px; border-radius: 8px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 1000px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--brand-deep); padding: 8px;
    box-shadow: var(--shadow-lg);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .main-nav a { padding: 13px 14px; border-radius: 6px; }
  .site-header.nav-open .main-nav { max-height: 460px; }
  .brand-name span { display: none; }
}

/* keep the call number tappable but compact on small screens */
@media (max-width: 480px) {
  .call-btn .call-btn-num { font-size: .95rem; }
  .brand-name { font-size: .95rem; }
}

/* ===================== Hero ===================== */
.hero {
  position: relative; color: var(--on-brand);
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-deep) 100%);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .22; }
.hero-inner {
  position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto;
  padding: 66px 20px 60px;
}
.hero h1 { color: var(--on-brand); max-width: 18ch; }
.hero p { color: var(--on-brand-muted); font-size: 1.2rem; max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,.6); }
.hero .btn-outline:hover { background: rgba(255,255,255,.12); }
.hero-note { margin-top: 16px; font-size: .9rem; color: var(--on-brand-muted); }

/* ===================== Insurance band ===================== */
.insurance-band {
  background: var(--brand-deep); color: var(--on-brand);
  border-top: 4px solid var(--accent);
}
.insurance-band .container { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; padding-top: 34px; padding-bottom: 34px; }
.insurance-band h2 { color: var(--on-brand); margin: 0; flex: 1 1 340px; }
.insurance-band p { color: var(--on-brand-muted); margin: 0; flex: 1 1 300px; }
.insurance-band .btn { flex: 0 0 auto; }
.insurance-band .btn-primary { background: var(--accent); color: #241503; }
.insurance-band .btn-primary:hover { background: #c9781f; }

/* ===================== Cards / grids ===================== */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  color: var(--ink);
}
.card h3 { margin-top: 0; }
.card p { color: var(--muted); margin-bottom: 0; }

a.card { text-decoration: none; display: block; transition: transform .1s ease, box-shadow .15s ease; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
a.card .card-more { display: inline-block; margin-top: 12px; font-family: var(--font-display); font-weight: 600; color: var(--brand); }
[data-theme="dark"] a.card .card-more { color: #9ecbf0; }

.card-icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: rgba(11,79,138,.08); color: var(--brand);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
[data-theme="dark"] .card-icon { background: rgba(158,203,240,.12); color: #9ecbf0; }
.card-icon svg { width: 26px; height: 26px; }

/* ===================== Trust bar ===================== */
.trust-bar { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust-items { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.trust-item {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 16px; font-family: var(--font-display); font-weight: 600; color: var(--ink);
}
.trust-item svg { width: 18px; height: 18px; color: var(--teal); flex: 0 0 auto; }
[data-theme="dark"] .trust-item svg { color: #3fb6c1; }
.chip-needs {
  font-family: var(--font-body); font-weight: 600; font-size: .68rem;
  text-transform: uppercase; letter-spacing: .04em;
  background: rgba(222,138,46,.16); color: var(--accent-text);
  border: 1px dashed var(--accent); border-radius: 6px; padding: 2px 7px; margin-left: 2px;
}
[data-theme="dark"] .chip-needs { color: #E9A24E; background: rgba(233,162,78,.14); }

/* ===================== Section helpers ===================== */
.section-mist { background: var(--mist); }
.section-center { text-align: center; }
.section-center .lead { margin-left: auto; margin-right: auto; }

/* Area list */
.area-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; list-style: none; padding: 0; margin: 24px 0 0; }
@media (max-width: 760px) { .area-list { grid-template-columns: repeat(2, 1fr); } }
.area-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-family: var(--font-display); font-weight: 600; display: flex; align-items: center; gap: 8px;
}
.area-list li svg { width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto; }

/* Definition / process list */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 16px; }
.steps li {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 20px 20px 72px; box-shadow: var(--shadow);
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 18px; top: 18px;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand);
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
}
.steps li h3 { margin: 0 0 4px; }
.steps li p { margin: 0; color: var(--muted); }

/* Definition list of sub-services */
.service-detail { display: grid; gap: 18px; margin-top: 26px; }
.service-detail .card h3 { display: flex; align-items: center; gap: 10px; }
.service-detail .card h3 svg { width: 22px; height: 22px; color: var(--accent); flex: 0 0 auto; }

/* Media split */
.media-split { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
@media (max-width: 800px) { .media-split { grid-template-columns: 1fr; } }
.media-split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 100%; object-fit: cover; max-height: 380px; }

/* Placeholder block for missing imagery */
.img-placeholder {
  border: 2px dashed var(--border); border-radius: var(--radius);
  background: var(--mist); color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px; min-height: 220px; gap: 8px;
}
.img-placeholder svg { width: 34px; height: 34px; color: var(--accent); }
.img-placeholder .ph-tag { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .75rem; color: var(--accent-text); }
[data-theme="dark"] .img-placeholder .ph-tag { color: #E9A24E; }

/* ===================== Form ===================== */
.form-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.form-row { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-family: var(--font-display); font-weight: 600; margin-bottom: 6px; }
label .req { color: var(--emergency); }
input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--ink);
}
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: #0d2338; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,79,138,.18); }
textarea { min-height: 120px; resize: vertical; }
.form-hint { font-size: .9rem; color: var(--muted); margin-top: 14px; }
.form-hint strong { color: var(--ink); }

/* ===================== Reviews ===================== */
.rating-line { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; }
.rating-line .stars { color: var(--accent); letter-spacing: 1px; }
.quote-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 26px; }
@media (max-width: 800px) { .quote-grid { grid-template-columns: 1fr; } }
.quote {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.quote p { font-style: normal; color: var(--ink); }
.quote cite { display: block; font-style: normal; font-family: var(--font-display); font-weight: 600; color: var(--muted); margin-top: 10px; }

/* ===================== Map ===================== */
.map-embed { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-embed iframe { display: block; width: 100%; height: 360px; border: 0; }

/* ===================== NAP / contact blocks ===================== */
.nap-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
@media (max-width: 700px) { .nap-grid { grid-template-columns: 1fr; } }
.nap-item { display: flex; gap: 12px; align-items: flex-start; }
.nap-item svg { width: 22px; height: 22px; color: var(--brand); flex: 0 0 auto; margin-top: 3px; }
[data-theme="dark"] .nap-item svg { color: #9ecbf0; }
.nap-item h3 { margin: 0 0 2px; font-size: 1.05rem; }
.nap-item p { margin: 0; color: var(--muted); }
.nap-item a { font-weight: 600; }
.confirm-note { font-size: .82rem; color: var(--accent-text); font-weight: 600; }
[data-theme="dark"] .confirm-note { color: #E9A24E; }

/* ===================== CTA strip ===================== */
.cta-strip { background: var(--brand); color: var(--on-brand); text-align: center; }
.cta-strip h2 { color: var(--on-brand); }
.cta-strip p { color: var(--on-brand-muted); max-width: 52ch; margin: 0 auto 22px; }
.cta-strip .btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-strip .btn-outline { color: #fff; border-color: rgba(255,255,255,.6); }
.cta-strip .btn-outline:hover { background: rgba(255,255,255,.12); }

/* ===================== Footer ===================== */
.site-footer { background: var(--brand-deep); color: var(--on-brand); padding: 48px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.site-footer h4 { color: var(--on-brand); font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }
.site-footer p, .site-footer li { color: var(--on-brand-muted); }
.site-footer a { color: var(--on-brand); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-nap { font-size: .95rem; }
.footer-nap .confirm-note { color: #f0b86e; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15); margin-top: 30px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  font-size: .85rem; color: var(--on-brand-muted);
}
.footer-badge { display: inline-flex; align-items: center; gap: 6px; }
.footer-badge .chip-needs { color: #f0b86e; border-color: #f0b86e; background: rgba(240,184,110,.12); }

/* Utility */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
