/*
Theme Name: 24 Hour ATL Plumbing
Description: Custom theme for 24 Hour ATL Plumbing. Version 0.1 is fully static (hard-coded menu, logo, services) so the design can be reviewed before it is made dynamic.
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: atl-plumbing
*/

/* ---------- Tokens ---------- */
:root {
  --ink: #10222b;          /* pipe steel: dark backgrounds, headings */
  --ink-deep: #0a171d;     /* top bar, footer */
  --text: #25363f;
  --muted: #55656e;
  --water: #eaf3f6;        /* pale section background */
  --line: #d5e0e5;
  --valve: #c4261d;        /* shut-off valve red: every call button */
  --valve-dark: #a31e17;
  --brass: #b8892b;        /* accents on dark */
  --brass-dark: #8a6212;   /* accents on light */
  --white: #fff;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --maxw: 72rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}
img, svg { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); line-height: 1.12; margin: 0 0 .6em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.7rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.04; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }
.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 0; background: var(--white); color: var(--ink); padding: .75rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 3.1rem; padding: .7rem 1.5rem;
  font: inherit; font-weight: 700; text-decoration: none; text-align: center;
  border: 2px solid transparent; border-radius: 8px; cursor: pointer;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-call { background: var(--valve); color: var(--white); }
.btn-call:hover { background: var(--valve-dark); }
.btn-ghost { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-light { background: var(--white); color: var(--valve-dark); }
.btn-light:hover { background: var(--water); }

/* ---------- Top bar ---------- */
.topbar { background: var(--ink-deep); color: #d6e3e8; font-size: .9rem; }
.topbar-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1.5rem; padding-block: .5rem; }
.topbar a { color: var(--white); font-weight: 700; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 2.6rem; height: 2.6rem; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-text span { font-size: .95rem; font-weight: 600; color: var(--muted); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; background: none; border: 2px solid var(--ink); border-radius: 8px; cursor: pointer;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block; width: 1.3rem; height: 2px; background: var(--ink); content: ""; position: relative;
}
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after { position: absolute; top: 6px; }

.primary-nav {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1.25rem;
  box-shadow: 0 12px 24px rgba(16,34,43,.12);
}
.primary-nav.is-open { display: block; }
.primary-nav a { display: block; padding: .7rem 0; text-decoration: none; font-weight: 600; color: var(--ink); }
.primary-nav a:hover { color: var(--valve); }
.primary-nav .sub-menu { padding-left: 1rem; border-left: 3px solid var(--line); margin-bottom: .5rem; }
.primary-nav .sub-menu a { font-weight: 500; padding: .45rem 0; color: var(--text); }
.header-call { display: none; }

@media (min-width: 62rem) {
  .nav-toggle { display: none; }
  .primary-nav { display: block; position: static; background: none; border: 0; padding: 0; box-shadow: none; margin-left: auto; }
  .primary-nav .menu { display: flex; gap: 1.6rem; align-items: center; }
  .primary-nav a { padding: .4rem 0; }
  .has-sub { position: relative; }
  .primary-nav .sub-menu {
    display: none; position: absolute; top: 100%; left: -1rem; min-width: 15rem; padding: .5rem 1rem; margin: 0;
    background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 28px rgba(16,34,43,.14);
  }
  .has-sub:hover > .sub-menu, .has-sub:focus-within > .sub-menu { display: block; }
  .has-sub::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: .6rem; }
  .header-call { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: #d6e3e8; padding-block: clamp(2.5rem, 7vw, 5rem); }
.hero-grid { display: grid; gap: 2.5rem; align-items: start; }
.hero h1 { color: var(--white); max-width: 14ch; }
.hero-lead { font-size: 1.2rem; max-width: 34rem; color: #d6e3e8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 1.4rem; }
.hero-facts { display: grid; gap: .4rem; font-size: .98rem; }
.hero-facts li::before { content: "\2713"; color: var(--brass); font-weight: 800; margin-right: .6rem; }

.first-aid { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-top: 4px solid var(--brass); border-radius: 12px; padding: 1.5rem; }
.first-aid h2 { color: var(--white); font-size: 1.45rem; margin-bottom: 1rem; }
.first-aid ol { counter-reset: step; display: grid; gap: 1rem; }
.first-aid li { counter-increment: step; position: relative; padding-left: 2.6rem; }
.first-aid li::before {
  content: counter(step); position: absolute; left: 0; top: .05rem; width: 1.9rem; height: 1.9rem;
  display: grid; place-items: center; border-radius: 50%; background: var(--brass); color: var(--ink-deep); font-weight: 800; font-size: .95rem;
}
.first-aid li strong { color: var(--white); display: block; }
.first-aid .gas-warning { margin: 1.3rem 0 0; padding: .8rem 1rem; background: rgba(196,38,29,.22); border-left: 4px solid #ff8a80; border-radius: 6px; color: var(--white); font-size: .98rem; }

@media (min-width: 62rem) {
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 4rem; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.25rem); }
.section-water { background: var(--water); }
.section-head { max-width: 40rem; margin-bottom: 2rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* Services list */
.service-list { border-bottom: 1px solid var(--line); }
.service-list li { position: relative; border-top: 1px solid var(--line); padding: 1.1rem 0; display: grid; gap: .2rem; }
.service-list h3 { margin: 0; }
.service-list h3 a { text-decoration: none; }
.service-list h3 a::after { content: ""; position: absolute; inset: 0; }
.service-list li:hover h3 a { color: var(--valve); text-decoration: underline; text-underline-offset: 4px; }
.service-list p { margin: 0; color: var(--muted); }
@media (min-width: 48rem) {
  .service-list li { grid-template-columns: 1fr 1.5fr; gap: 2rem; align-items: baseline; padding: 1.3rem 0; }
}

/* How it works */
.steps { counter-reset: step; display: grid; gap: 1.75rem; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step); display: block; font-size: 3rem; font-weight: 800; line-height: 1; color: var(--brass-dark); margin-bottom: .5rem; }
.steps h3 { margin-bottom: .3rem; }
.steps p { color: var(--muted); margin: 0; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }

/* Why us */
.why-grid { display: grid; gap: 1.75rem; }
.why-grid li { border-left: 4px solid var(--ink); padding-left: 1.1rem; }
.why-grid h3 { margin-bottom: .25rem; }
.why-grid p { margin: 0; color: var(--muted); }
@media (min-width: 48rem) { .why-grid { grid-template-columns: 1fr 1fr; gap: 2rem 3rem; } }

/* Atlanta text */
.local-grid { display: grid; gap: 1.5rem 4rem; }
.local-grid p { max-width: 36rem; }
@media (min-width: 62rem) { .local-grid { grid-template-columns: 1fr 1.2fr; } }

/* Areas */
.area-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.25rem; }
.area-links a { display: inline-block; padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; font-weight: 600; color: var(--ink); background: var(--white); }
.area-links a:hover { border-color: var(--ink); }
.area-note { color: var(--muted); max-width: 40rem; }

/* FAQ */
.faq { max-width: 48rem; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0; font-weight: 700; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .85rem; font-size: 1.6rem; font-weight: 400; line-height: 1; color: var(--valve); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 1.1rem; margin: 0; color: var(--text); max-width: 42rem; }

/* DIY band */
.diy { background: var(--ink); color: #d6e3e8; }
.diy-inner { display: grid; gap: 1.5rem; align-items: center; }
.diy h2 { color: var(--white); margin-bottom: .4em; }
.diy p { margin: 0; max-width: 34rem; }
.diy-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
@media (min-width: 62rem) { .diy-inner { grid-template-columns: 1.4fr 1fr; gap: 4rem; } .diy-actions { justify-content: flex-end; } }

/* Final CTA */
.final-cta { background: var(--valve); color: var(--white); text-align: left; }
.final-cta h2 { color: var(--white); max-width: 20ch; }
.final-cta p { max-width: 34rem; margin-bottom: 1.5rem; }
.final-cta .phone-big { display: block; font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 800; letter-spacing: -0.02em; text-decoration: none; margin-bottom: 1.25rem; font-variant-numeric: tabular-nums; }
.final-cta .phone-big:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-deep); color: #b9c9d0; padding-top: 3rem; font-size: .98rem; }
.footer-grid { display: grid; gap: 2rem; padding-bottom: 2.5rem; }
.site-footer h2,
.site-footer h3,
.footer-title { color: var(--white); font-size: 1.05rem; margin-bottom: .8rem; letter-spacing: 0; }
.site-footer ul { display: grid; gap: .35rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-phone { display: inline-block; color: var(--white); font-size: 1.5rem; font-weight: 800; margin: .4rem 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-block: 1.25rem; font-size: .88rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; } }

/* ---------- Mobile call bar ---------- */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.6rem; background: var(--valve); color: var(--white); font-weight: 800; font-size: 1.1rem; text-decoration: none;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.callbar svg { width: 1.3rem; height: 1.3rem; }
body { padding-bottom: 3.6rem; }
@media (min-width: 48rem) { .callbar { display: none; } body { padding-bottom: 0; } }

/* ---------- Basic inner pages (index.php) ---------- */
.page-content { padding-block: 3rem; max-width: 46rem; }
.page-content h1 { font-size: clamp(2rem, 4vw, 2.8rem); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }


/* ---------- Back to Top (100% Round & Radar Animation) ---------- */
.to-top {
  position: fixed;
  right: 2rem;
  bottom: 2.2rem;
  z-index: 80;
  width: 3.3rem;          
  height: 3.3rem;
  border-radius: 50%;     
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  border: 1.5px solid var(--brass);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(11,42,74,.25);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.5);
  transition: opacity .35s ease, transform .4s cubic-bezier(.175, .885, .32, 1.275), visibility .35s, background .2s, border-color .2s;
}


.to-top::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--sky);
  opacity: 0;
  pointer-events: none;
}


.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.to-top.is-visible::before {
  animation: atl-radar 1.5s cubic-bezier(.2, .8, .2, 1) 1; 
}

@keyframes atl-radar {
  0% {
    transform: scale(1);
    opacity: 0.9;
    border-color: var(--valve); 
  }
  50% {
    opacity: 0.6;
    border-color: var(--sky);
  }
  100% {
    transform: scale(2.2);  
    opacity: 0;
  }
}

.to-top:hover {
  background: var(--blue);
  border-color: var(--sky);
  box-shadow: 0 12px 28px rgba(21,101,192,.35);
}

.to-top svg {
  width: 1.3rem;
  height: 1.3rem;
  stroke: var(--sky);
  transition: transform .25s ease, stroke .2s;
}

.to-top:hover svg {
  transform: translateY(-3px);
  stroke: #fff;
}


.to-top__text {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: var(--ink-deep);
  color: #fff;
  font-size: .84rem;
  font-weight: 700;
  padding: .45rem .85rem;
  border-radius: 999px;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s cubic-bezier(.2,.8,.2,1), visibility .25s;
}


.to-top__text::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--ink-deep);
  border-right: 1px solid rgba(255,255,255,.18);
  border-top: 1px solid rgba(255,255,255,.18);
}

.to-top:hover .to-top__text {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}


@media (max-width: 61.99rem) {
  .to-top {
    display: none !important;
  }
}

/* ---------- Global Fix for SVG Icons & Sticky Footer (Fix for 404 & All Pages) ---------- */
.icon {
  width: 1.5rem !important;
  height: 1.5rem !important;
  flex: none;
  display: inline-block;
}

/* 404 page container spacing */
.error-404, .not-found {
  padding-block: 5rem;
  text-align: center;
}


.h-sticky {
  display: none !important;
}


@media (max-width: 47.99rem) {
  .h-sticky {
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    gap: .6rem;
    padding: .6rem .8rem calc(.6rem + env(safe-area-inset-bottom));
    background: rgba(7, 26, 48, .96);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .25);
  }
  .h-sticky .h-btn {
    flex: 1;
    min-height: 2.9rem;
    padding: .6rem 1rem;
  }
}