/* Bakersfield Quality Plumbing
   Palette and marks carried over from the existing site. */

:root {
  --ink: #0b1d24;
  --deep: #003d4d;
  --teal: #007d9f;
  --blue: #008afc;
  --blue-dark: #0069c2;
  --cream: #ffe9b3;
  --sand: #fdf6e6;
  --alert: #c8443d;
  --alert-soft: #ff9494;
  --paper: #ffffff;
  --mute: #5d6f76;
  --line: #dfe6e8;
  --line-strong: #c3d0d4;

  --display: "Archivo", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 1180px;
  --gut: clamp(1.25rem, 4vw, 3rem);
  --radius: 4px;
  --shadow: 0 1px 2px rgba(11, 29, 36, .06), 0 8px 24px rgba(11, 29, 36, .06);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }

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

.wrap { width: min(100% - var(--gut) * 2, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px;
  background: var(--deep); color: #fff;
  padding: .75rem 1.25rem; z-index: 200;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Type scale ---------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.015em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.15rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.85rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); letter-spacing: -.01em; }
h4 { font-size: 1.075rem; letter-spacing: 0; }

p { margin: 0 0 1.15rem; max-width: 68ch; }

.eyebrow {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 .9rem;
  display: block;
}
.eyebrow--onDark { color: #7fd3e8; }

/* ---------- Utility bar ---------- */

.util {
  background: var(--deep);
  color: #cfe6ee;
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .07em;
}
.util .wrap {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  align-items: center; justify-content: space-between;
  min-height: 40px; padding-block: .45rem;
}
.util strong { color: #fff; font-weight: 600; }

/* ---------- Masthead ---------- */

.masthead {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}
.masthead .wrap {
  display: flex; align-items: center; gap: 1.25rem;
  min-height: 74px; padding-block: .6rem;
}

.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: inherit; margin-right: auto; }
.brand img { width: 50px; height: 50px; object-fit: contain; flex: none; }
.brand b {
  font-family: var(--display);
  font-size: 1.11rem; font-weight: 700;
  line-height: 1.1; letter-spacing: -.01em;
  color: var(--deep);
  max-width: 18ch;
  display: block;
}

.nav { display: flex; gap: .35rem; align-items: center; }
.nav a {
  font-size: .93rem; font-weight: 500;
  color: var(--ink); text-decoration: none;
  padding: .55rem .8rem; border-radius: var(--radius);
  white-space: nowrap;
}
.nav a:hover { background: var(--sand); color: var(--deep); }
.nav a[aria-current="page"] { color: var(--teal); font-weight: 600; box-shadow: inset 0 -2px 0 var(--teal); border-radius: 0; }

.navToggle {
  display: none; background: none; border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: .5rem .7rem; cursor: pointer;
  font-family: var(--mono); font-size: .8rem; color: var(--deep);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--body); font-weight: 600; font-size: 1rem;
  padding: .85rem 1.5rem;
  border-radius: var(--radius); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--call { background: var(--blue); color: #fff; box-shadow: 0 2px 10px rgba(0, 138, 252, .3); }
.btn--call:hover { background: var(--blue-dark); }
.btn--ghost { background: transparent; color: var(--deep); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); background: var(--sand); }
.btn--onDark { background: #fff; color: var(--deep); }
.btn--onDark:hover { background: var(--cream); }
.btn--sm { padding: .6rem 1.05rem; font-size: .9rem; }

/* ---------- Hero ---------- */

.hero {
  background: var(--deep);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 5px;
  background: linear-gradient(90deg, var(--blue) 0 34%, var(--cream) 34% 67%, var(--alert-soft) 67% 100%);
}
.hero .wrap { position: relative; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero p { color: #c5dee6; font-size: 1.1rem; max-width: 56ch; }

/* The availability claim, set as the page thesis. */
.claim {
  display: flex; flex-wrap: wrap; gap: 0 2.5rem;
  margin: 1.75rem 0 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.claim div { display: flex; align-items: baseline; gap: .6rem; }
.claim b {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.75rem, 6vw, 3.9rem);
  line-height: 1; color: var(--cream);
  letter-spacing: -.03em;
}
.claim span {
  font-family: var(--mono); font-size: .78rem;
  letter-spacing: .13em; text-transform: uppercase;
  color: #9fc4d0; max-width: 8ch; line-height: 1.3;
}

.heroActions { display: flex; flex-wrap: wrap; gap: .75rem; }


/* ---------- Sections ---------- */

.sec { padding-block: clamp(3.25rem, 7vw, 5.5rem); }
.sec--sand { background: var(--sand); }
.sec--cream { background: var(--cream); }
.sec--deep { background: var(--deep); color: #fff; }
.sec--deep h2, .sec--deep h3 { color: #fff; }
.sec--deep p { color: #c5dee6; }

.secHead { margin-bottom: 2.5rem; max-width: 64ch; }
.secHead p { color: var(--mute); font-size: 1.09rem; margin-bottom: 0; margin-top: .9rem; }
.sec--deep .secHead p { color: #c5dee6; }

/* ---------- Service list ---------- */

.svcGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.svcGrid li { list-style: none; background: var(--paper); }
.svcGrid a, .svcGrid span {
  display: flex; align-items: center; gap: .9rem;
  padding: 1.15rem 1.25rem; min-height: 100%;
  text-decoration: none; color: var(--ink);
  font-weight: 500; font-size: 1rem;
  transition: background-color .15s ease;
}
.svcGrid li:hover { background: var(--sand); }
.svcGrid img { width: 46px; height: 46px; object-fit: contain; flex: none; }
.svcGrid .dot {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: var(--sand); border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: .8rem; color: var(--teal);
}

/* ---------- Symptom checker (signature) ---------- */

.checker {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--alert);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.checkerHead { padding: 1.5rem clamp(1.25rem, 3vw, 2rem) 0; }
.checkerHead p { color: var(--mute); margin-bottom: 1.35rem; }

.signs {
  list-style: none; margin: 0;
  padding: 0 clamp(1.25rem, 3vw, 2rem) 1.5rem;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: .6rem;
}
.sign { margin: 0; }
.sign label {
  display: flex; align-items: flex-start; gap: .8rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; font-size: .97rem; line-height: 1.45;
  background: var(--paper);
  transition: border-color .15s ease, background-color .15s ease;
  height: 100%;
}
.sign label:hover { border-color: var(--line-strong); background: var(--sand); }
.sign input { position: absolute; opacity: 0; width: 0; height: 0; }
.sign .box {
  width: 21px; height: 21px; flex: none; margin-top: .12rem;
  border: 2px solid var(--line-strong); border-radius: 3px;
  display: grid; place-items: center;
  transition: background-color .15s ease, border-color .15s ease;
}
.sign .box::after {
  content: ""; width: 10px; height: 6px;
  border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) scale(0); transform-origin: center;
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1);
  margin-top: -3px;
}
.sign input:checked ~ .box { background: var(--alert); border-color: var(--alert); }
.sign input:checked ~ .box::after { transform: rotate(-45deg) scale(1); }
.sign input:checked ~ .txt { color: var(--ink); font-weight: 500; }
.sign:has(input:checked) label { border-color: var(--alert); background: #fdf3f2; }
.sign input:focus-visible ~ .box { outline: 3px solid var(--blue); outline-offset: 2px; }
.sign .txt { color: #33484f; }

.tally {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem;
  padding: 1.15rem clamp(1.25rem, 3vw, 2rem);
  background: var(--sand); border-top: 1px solid var(--line);
}
.tallyText { font-size: 1rem; margin: 0; flex: 1 1 22ch; color: var(--deep); }
.tallyText b { font-family: var(--mono); font-size: 1.05rem; color: var(--alert); }
.tally .btn { margin-left: auto; }

/* ---------- Testimonials ---------- */

.quotes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem; list-style: none; padding: 0; margin: 0;
}
.quotes li {
  background: var(--paper); border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius); padding: 1.5rem;
}
.quotes blockquote { margin: 0 0 1rem; font-size: 1.06rem; line-height: 1.55; color: var(--deep); }
.quotes cite {
  font-family: var(--mono); font-style: normal;
  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mute);
}

/* ---------- Callout ---------- */

.callout {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.5rem;
  background: var(--deep); color: #fff;
  border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 2.75rem);
}
.callout p { color: #c5dee6; margin: 0; flex: 1 1 30ch; font-size: 1.09rem; }
.callout strong { color: #fff; }

/* ---------- Prose (services / membership) ---------- */

.prose h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.25rem);
  margin-top: 3.25rem; padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  max-width: 24ch;
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* Several headings on this site are full sentences carried over from the
   original copy. They get a smaller setting so they read as headings
   rather than as a wall of display type. */
.prose h2.long {
  font-size: clamp(1.35rem, 1.9vw, 1.7rem);
  letter-spacing: -.005em;
  line-height: 1.2;
  max-width: 46ch;
}
.prose h3 { margin-top: 2.25rem; margin-bottom: .8rem; color: var(--deep); }
.prose p { color: #33484f; }
/* :not(.signs) keeps the bulleted prose styling off the symptom checker,
   which lives inside .prose but is a control, not a list of statements. */
.prose ul:not(.signs) { padding-left: 0; margin: 0 0 1.5rem; list-style: none; max-width: 68ch; }
.prose ul:not(.signs) li {
  position: relative; padding-left: 1.6rem; margin-bottom: .6rem; color: #33484f;
}
.prose ul:not(.signs) li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--teal);
}
.prose figure { margin: 2rem 0; }
.prose figure img { border: 1px solid var(--line); border-radius: var(--radius); }
.prose figcaption { font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-top: .7rem; }

.layout { display: grid; grid-template-columns: 230px 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }

.toc { position: sticky; top: 92px; }
.toc h2 {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--mute); font-weight: 500;
  margin: 0 0 .9rem; padding: 0; border: 0;
}
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: .42rem 0 .42rem 1rem; margin-left: -1px;
  font-size: .9rem; color: var(--mute); text-decoration: none;
  border-left: 2px solid transparent; line-height: 1.35;
}
.toc a:hover { color: var(--teal); border-left-color: var(--line-strong); }
.toc a.on { color: var(--deep); font-weight: 600; border-left-color: var(--teal); }

/* ---------- Gallery ---------- */

.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem; list-style: none; padding: 0; margin: 0;
}
.gallery li {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); overflow: hidden;
  aspect-ratio: 4 / 3; display: grid; place-items: center; padding: 1rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gallery li:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.gallery img { max-height: 100%; object-fit: contain; }

/* ---------- Membership benefits ---------- */

.benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.25rem; list-style: none; padding: 0; margin: 0; }
.benefits li {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem;
}
.benefits h3 { margin: 0 0 .7rem; font-size: 1.22rem; color: var(--deep); }
.benefits p { margin: 0; color: #33484f; font-size: .99rem; }

.priceTag {
  display: inline-flex; align-items: baseline; gap: .5rem;
  font-family: var(--mono); background: var(--cream);
  border-radius: var(--radius); padding: .55rem 1rem;
  color: var(--deep); font-size: .92rem; letter-spacing: .04em;
}
.priceTag b { font-size: 1.4rem; letter-spacing: -.01em; }

/* ---------- Footer ---------- */

.foot { background: var(--ink); color: #9db4bc; padding-block: 3rem 2rem; font-size: .93rem; }
.foot a { color: #cfe6ee; }
.footGrid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-bottom: 2.25rem; }
.foot h3 { font-family: var(--mono); font-size: .74rem; letter-spacing: .15em; text-transform: uppercase; color: #7f979f; font-weight: 500; margin-bottom: 1rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: .5rem; }
.foot .brand b { color: #fff; }
.foot p { color: #9db4bc; }
.footPhone { font-family: var(--mono); font-size: 1.35rem; color: #fff; text-decoration: none; letter-spacing: -.01em; }
.social { display: flex; gap: .6rem; margin-top: 1rem; }
.social img { width: 30px; height: 30px; border-radius: 50%; }
.footBase {
  border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between;
  font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; color: #7f979f;
}

/* ---------- Scroll reveal ---------- */

/* Content is visible by default and only hidden once the script has
   confirmed it can reveal it again. Without this the page would render
   blank whenever the observer never fires — a direct hit on an anchor,
   a blocked script, an old browser. */
.js .rise { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .rise { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; }
  .toc { position: static; border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; }
  .toc ol { display: flex; flex-wrap: wrap; gap: .25rem .5rem; border-left: 0; }
  .toc a { padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 100px; margin-left: 0; }
  .toc a.on { border-color: var(--teal); }
}

@media (max-width: 860px) {
  .footGrid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .navToggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gut) 1rem;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: .85rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: none; }
  .masthead .wrap { position: relative; }
  .util .wrap { justify-content: center; text-align: center; }
  .claim { gap: 1.25rem 2rem; }
  .tally .btn { margin-left: 0; width: 100%; justify-content: center; }
}

@media (max-width: 560px) {
  .footGrid { grid-template-columns: 1fr; gap: 2rem; }
  .heroActions .btn { width: 100%; justify-content: center; }
  /* The tap-to-call stays in the sticky header on a phone, so the wordmark
     gives up its space rather than the button. */
  .masthead .brand b { display: none; }
  .foot .brand b { font-size: 1rem; }
}
