/* ============================================================
   Rexburg Plumbing and Heating — main stylesheet (v1.0)
   Mobile-first, no frameworks. Placeholder brand for a
   pay-per-call / referral lead-gen site (Rexburg, ID).
   ============================================================ */

/* ---------- Reset & tokens ---------- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root{
  --navy:#0a2540;
  --navy-2:#10355c;
  --navy-dark:#06182e;
  --amber:#f59e0b;
  --amber-dark:#d97706;
  --amber-soft:#fef3c7;
  --white:#ffffff;
  --bg:#f4f7fa;
  --text:#1e2a38;
  --muted:#55677c;
  --border:#dbe3ec;
  --success:#15803d;
  --radius:10px;
  --maxw:1140px;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --shadow:0 2px 10px rgba(6,24,46,.08);
}

html{scroll-behavior:smooth}
body{
  font-family:var(--font);
  color:var(--text);
  line-height:1.65;
  background:var(--white);
  -webkit-text-size-adjust:100%;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--navy-2)}
p{margin-bottom:1rem}

.container{width:min(100% - 2.5rem,var(--maxw));margin-inline:auto}

/* Screen-reader only */
.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}

/* Skip link */
.skip-link{position:absolute;left:1rem;top:-4rem;background:var(--amber);color:var(--navy);font-weight:700;padding:.6rem 1rem;border-radius:0 0 8px 8px;z-index:200;text-decoration:none;transition:top .2s}
.skip-link:focus{top:0}

/* Focus states */
:focus-visible{outline:3px solid var(--amber);outline-offset:2px;border-radius:4px}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.55rem;
  font-weight:700;font-size:1.05rem;line-height:1.2;text-decoration:none;
  padding:.95rem 1.7rem;border-radius:9px;border:2px solid transparent;cursor:pointer;
  transition:background .15s ease,transform .1s ease;
}
.btn:active{transform:scale(.98)}
.btn svg{width:1.25em;height:1.25em;flex:none}
.btn-call{background:var(--amber);color:var(--navy)}
.btn-call:hover{background:#fbbf24}
.btn-navy{background:var(--navy);color:var(--white)}
.btn-navy:hover{background:var(--navy-2)}
.btn-outline{border-color:var(--white);color:var(--white);background:transparent}
.btn-outline:hover{background:rgba(255,255,255,.12)}
.btn-outline-navy{border-color:var(--navy);color:var(--navy);background:transparent}
.btn-outline-navy:hover{background:var(--navy);color:var(--white)}
.btn-lg{font-size:1.2rem;padding:1.1rem 2rem}

/* ---------- Header ---------- */
.site-header{background:var(--navy);color:var(--white);position:sticky;top:0;z-index:100;box-shadow:0 2px 8px rgba(0,0,0,.25)}
.header-inner{display:flex;align-items:center;gap:1rem;padding:.7rem 0}
.brand{display:flex;align-items:center;gap:.65rem;text-decoration:none;color:var(--white);margin-right:auto}
.brand img{width:44px;height:44px;flex:none}
.brand-text{font-size:1.02rem;line-height:1.25;font-weight:400}
.brand-strong{display:block;font-weight:800;letter-spacing:.01em}

.nav-toggle{display:inline-flex;flex-direction:column;gap:5px;background:none;border:2px solid rgba(255,255,255,.35);border-radius:8px;padding:.6rem .65rem;cursor:pointer}
.nav-toggle-bar{display:block;width:22px;height:2px;background:var(--white);border-radius:2px}
.nav-toggle[aria-expanded="true"]{border-color:var(--amber)}

.primary-nav{display:none}
.primary-nav.open{display:block;position:absolute;top:100%;left:0;right:0;background:var(--navy-dark);border-top:1px solid rgba(255,255,255,.12);box-shadow:0 12px 24px rgba(0,0,0,.35)}
.primary-nav ul{list-style:none}
.primary-nav a{display:block;color:var(--white);text-decoration:none;padding:.85rem 1.25rem;font-weight:600}
.primary-nav a:hover{background:rgba(255,255,255,.08);color:var(--amber)}
.nav-group-label{display:block;color:var(--amber);font-size:.8rem;text-transform:uppercase;letter-spacing:.08em;font-weight:800;padding:.9rem 1.25rem .3rem}
.nav-group ul a{padding-left:2rem;font-weight:500}

.header-call{display:none}

/* ---------- Hero ---------- */
.hero{background:linear-gradient(135deg,var(--navy-dark) 0%,var(--navy) 60%,var(--navy-2) 100%);color:var(--white);padding:3.2rem 0 3.6rem}
.hero-badge{display:inline-block;background:var(--amber);color:var(--navy);font-weight:800;font-size:.82rem;letter-spacing:.06em;text-transform:uppercase;padding:.4rem .9rem;border-radius:999px;margin-bottom:1.1rem}
.hero h1{font-size:2rem;line-height:1.2;margin-bottom:1rem;letter-spacing:-.01em}
.hero-sub{font-size:1.12rem;color:#d7e3f0;max-width:42rem;margin-bottom:1.6rem}
.hero-ctas{display:flex;flex-wrap:wrap;gap:.9rem;margin-bottom:1.8rem}
.trust-row{list-style:none;display:flex;flex-wrap:wrap;gap:.6rem 1.4rem;padding:0}
.trust-row li{display:flex;align-items:center;gap:.5rem;font-weight:600;font-size:.98rem;color:#eaf1f8}
.trust-row svg{width:1.2em;height:1.2em;color:var(--amber);flex:none}

/* ---------- Sections ---------- */
.section{padding:3.2rem 0}
.section-alt{background:var(--bg)}
.section-title{font-size:1.65rem;line-height:1.3;color:var(--navy);margin-bottom:.7rem;letter-spacing:-.01em}
.section-sub{color:var(--muted);max-width:46rem;margin-bottom:2rem;font-size:1.06rem}
.center{text-align:center}
.center .section-sub{margin-inline:auto}

/* Breadcrumbs */
.breadcrumbs{font-size:.88rem;color:var(--muted);padding:1.1rem 0 0}
.breadcrumbs ol{list-style:none;display:flex;flex-wrap:wrap;gap:.4rem}
.breadcrumbs li+li::before{content:"/";margin-right:.4rem;color:#9fb0c2}
.breadcrumbs a{color:var(--navy-2);text-decoration:none}
.breadcrumbs a:hover{text-decoration:underline}

/* Page hero (interior pages) */
.page-hero{background:linear-gradient(135deg,var(--navy-dark),var(--navy-2));color:var(--white);padding:2.6rem 0 2.8rem}
.page-hero h1{font-size:1.9rem;line-height:1.25;margin-bottom:.8rem}
.page-hero .lead{color:#d7e3f0;font-size:1.1rem;max-width:44rem;margin-bottom:1.4rem}
.page-hero .hero-ctas{margin-bottom:0}

/* ---------- Cards & grids ---------- */
.grid{display:grid;gap:1.4rem;grid-template-columns:1fr}
.card{background:var(--white);border:1px solid var(--border);border-radius:var(--radius);padding:1.6rem;box-shadow:var(--shadow);display:flex;flex-direction:column}
.card h3{font-size:1.18rem;color:var(--navy);margin-bottom:.5rem}
.card h3 a{color:var(--navy);text-decoration:none}
.card h3 a:hover{color:var(--amber-dark);text-decoration:underline}
.card p{color:var(--muted);font-size:.99rem;flex:1}
.card-link{font-weight:700;color:var(--amber-dark);text-decoration:none;margin-top:.6rem;display:inline-block}
.card-link:hover{text-decoration:underline}
.service-icon{width:52px;height:52px;border-radius:12px;background:var(--navy);color:var(--amber);display:flex;align-items:center;justify-content:center;margin-bottom:1rem}
.service-icon svg{width:26px;height:26px}

/* Problems list */
.problems{list-style:none;display:grid;gap:1rem;grid-template-columns:1fr}
.problems li{background:var(--white);border:1px solid var(--border);border-left:5px solid var(--amber);border-radius:8px;padding:1.1rem 1.25rem;box-shadow:var(--shadow)}
.problems strong{color:var(--navy)}
.problems a{font-weight:700;color:var(--amber-dark)}

/* Steps (how it works) */
.steps{list-style:none;display:grid;gap:1.4rem;grid-template-columns:1fr;counter-reset:step}
.steps li{background:var(--white);border:1px solid var(--border);border-radius:var(--radius);padding:1.6rem;position:relative;box-shadow:var(--shadow)}
.steps li::before{counter-increment:step;content:counter(step);display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;background:var(--amber);color:var(--navy);font-weight:800;font-size:1.3rem;margin-bottom:.9rem}
.steps h3{color:var(--navy);margin-bottom:.4rem;font-size:1.15rem}
.steps p{color:var(--muted);margin-bottom:0}
.notice{background:var(--amber-soft);border:1px solid #fcd34d;border-radius:var(--radius);padding:1.1rem 1.3rem;margin-top:1.6rem;font-size:.99rem}
.notice strong{color:var(--navy)}

/* Area strip */
.area-list{list-style:none;display:flex;flex-wrap:wrap;gap:.7rem;padding:0}
.area-list a{display:inline-block;background:var(--white);border:1.5px solid var(--border);color:var(--navy);font-weight:700;text-decoration:none;padding:.6rem 1.15rem;border-radius:999px}
.area-list a:hover{border-color:var(--amber);background:var(--amber-soft)}

/* ---------- FAQ ---------- */
.faq{max-width:48rem}
.faq-item{border:1px solid var(--border);border-radius:var(--radius);margin-bottom:.8rem;background:var(--white);overflow:hidden}
.faq-q{width:100%;text-align:left;background:none;border:0;padding:1.05rem 1.25rem;font-size:1.03rem;font-weight:700;color:var(--navy);display:flex;justify-content:space-between;align-items:center;gap:1rem;cursor:pointer;font-family:inherit}
.faq-q::after{content:"+";font-size:1.5rem;line-height:1;color:var(--amber-dark);flex:none;font-weight:400}
.faq-q[aria-expanded="true"]::after{content:"\2212"}
.faq-a{padding:0 1.25rem 1.2rem;color:var(--muted)}
.faq-a p:last-child{margin-bottom:0}

/* ---------- CTA band ---------- */
.cta-band{background:var(--navy-dark);color:var(--white);text-align:center;padding:3.4rem 0}
.cta-band h2{font-size:1.7rem;margin-bottom:.7rem}
.cta-band p{color:#c9d8e8;max-width:38rem;margin:0 auto 1.6rem}
.cta-band .btn-call{font-size:1.25rem}

/* ---------- Content pages ---------- */
.page-content{max-width:48rem}
.page-content h2{font-size:1.5rem;color:var(--navy);margin:2.2rem 0 .7rem;line-height:1.35}
.page-content h3{font-size:1.2rem;color:var(--navy);margin:1.6rem 0 .5rem}
.page-content ul,.page-content ol{margin:0 0 1.2rem 1.4rem}
.page-content li{margin-bottom:.45rem}
.page-content li::marker{color:var(--amber-dark)}
.inline-cta{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:1.4rem;margin:2rem 0;text-align:center}
.inline-cta p{margin-bottom:1rem;font-weight:600;color:var(--navy)}

/* ---------- Forms ---------- */
.lead-form{max-width:34rem;background:var(--white);border:1px solid var(--border);border-radius:var(--radius);padding:1.8rem;box-shadow:var(--shadow)}
.form-group{margin-bottom:1.1rem}
.form-group label{display:block;font-weight:700;color:var(--navy);margin-bottom:.35rem;font-size:.98rem}
.form-group input,.form-group select,.form-group textarea{width:100%;font:inherit;padding:.75rem .9rem;border:1.5px solid var(--border);border-radius:8px;background:#fff;color:var(--text)}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{border-color:var(--amber);outline:3px solid rgba(245,158,11,.25)}
.form-note{font-size:.9rem;color:var(--muted);margin-top:.9rem}
.form-success{background:#ecfdf5;border:1.5px solid #6ee7b7;color:#065f46;border-radius:var(--radius);padding:1.4rem;font-weight:600}

/* ---------- Footer ---------- */
.site-footer{background:var(--navy-dark);color:#c9d8e8;margin-top:0}
.footer-grid{display:grid;gap:2rem;grid-template-columns:1fr;padding:3rem 0 2rem}
.site-footer h2{font-size:1rem;text-transform:uppercase;letter-spacing:.07em;color:var(--amber);margin-bottom:.9rem}
.site-footer ul{list-style:none}
.site-footer li{margin-bottom:.5rem}
.site-footer a{color:#dbe6f2;text-decoration:none}
.site-footer a:hover{color:var(--amber);text-decoration:underline}
.footer-brand p{font-size:.95rem}
.footer-brand .btn{margin-top:1rem}
.footer-bottom{border-top:1px solid rgba(255,255,255,.14);padding:1.4rem 0 7.5rem;font-size:.88rem;color:#9fb0c2}
.footer-bottom p{margin-bottom:.4rem}
.footer-note{font-style:italic}

/* ---------- Sticky mobile call bar ---------- */
.sticky-call{
  position:fixed;left:1rem;right:1rem;bottom:1rem;z-index:90;
  display:flex;align-items:center;justify-content:center;gap:.8rem;
  background:var(--amber);color:var(--navy);text-decoration:none;font-weight:800;
  border-radius:14px;padding:.85rem 1.1rem;box-shadow:0 6px 24px rgba(0,0,0,.35);
  transform:translateY(140%);transition:transform .3s ease;
}
.sticky-call.visible{transform:none}
.sticky-call svg{width:1.7em;height:1.7em;flex:none}
.sticky-call span{line-height:1.25;text-align:left}
.sticky-call strong{display:block;font-size:1.12rem}
.sticky-call small{font-weight:600;font-size:.82rem}
body{padding-bottom:0}
@media (max-width:899px){body{padding-bottom:5.6rem}}

/* ---------- 404 ---------- */
.error-page{text-align:center;padding:4rem 0}
.error-page h1{font-size:3rem;color:var(--navy);margin-bottom:.6rem}
.error-page p{color:var(--muted);max-width:34rem;margin:0 auto 1.6rem}

/* ---------- Responsive ---------- */
@media (min-width:720px){
  .grid-2{grid-template-columns:repeat(2,1fr)}
  .grid-3{grid-template-columns:repeat(2,1fr)}
  .problems{grid-template-columns:repeat(2,1fr)}
  .hero h1{font-size:2.5rem}
  .page-hero h1{font-size:2.3rem}
  .footer-grid{grid-template-columns:repeat(2,1fr)}
}
@media (min-width:900px){
  .nav-toggle{display:none}
  .primary-nav{display:block;position:static}
  .primary-nav>ul{display:flex;align-items:center;gap:.2rem}
  .primary-nav a{padding:.6rem .7rem;font-size:.95rem;white-space:nowrap}
  .nav-group{position:relative}
  .nav-group-label{padding:.6rem .7rem;font-size:.95rem;text-transform:none;letter-spacing:0;color:var(--white);font-weight:600;cursor:default}
  .nav-group>ul{display:none;position:absolute;top:100%;left:0;background:var(--navy-dark);border:1px solid rgba(255,255,255,.14);border-radius:0 0 10px 10px;min-width:15rem;box-shadow:0 14px 28px rgba(0,0,0,.35);padding:.4rem 0}
  .nav-group:hover>ul,.nav-group:focus-within>ul{display:block}
  .nav-group ul a{padding:.6rem 1.1rem}
  .nav-group ul a:hover{background:rgba(255,255,255,.08)}
  .header-call{display:inline-flex;font-size:.95rem;padding:.65rem 1.1rem}
  .sticky-call{display:none}
  body{padding-bottom:0}
  .footer-bottom{padding-bottom:1.4rem}
}
@media (min-width:1000px){
  .grid-3{grid-template-columns:repeat(3,1fr)}
  .steps{grid-template-columns:repeat(3,1fr)}
  .footer-grid{grid-template-columns:1.4fr 1fr 1fr 1fr}
  .section{padding:4.2rem 0}
}

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