@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=IBM+Plex+Sans:wght@400;700&display=swap');

/* ============================================================================
   Upland CA Plumbing Experts
   Adapted from the supplied D24 design reference. Visual identity preserved:
   all 8 tokens, the three font pairing and their element assignments, the 56/32px
   H1, line-height 1.7, the 860px and 767px breakpoints and the red focus ring.
   Additions are marked ADDED and exist because a standing rule requires them.
   ============================================================================ */

:root{
  --bg:#F2EEE5;
  --red:#CC0000;
  --ink:#1A1A1A;
  --rule:#C8C0B0;
  --hl:#FFF4A0;          /* was declared and unused in the reference, now live */
  --text:#1A1A1A;
  --muted:#6B6460;
  --maxw:1120px;
  --prose:900px;         /* ADDED: readable centred column for body copy */
  --paper:#fff;          /* ADDED: replaces hardcoded #fff repeats */
  --slot-a:#EDE8DC;      /* ADDED: slot gradient, on palette, replaces #f3f4f6 */
  --slot-b:#DED8C8;
  --brand-accent:#E8B04B;/* ADDED: replaces the off palette inline #fbbf77 */
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:'Libre Baskerville',serif;color:var(--text);background:var(--bg);line-height:1.7}
img{max-width:100%;height:auto;display:block}
a{color:var(--red)}
:focus-visible{outline:3px solid var(--red);outline-offset:2px}

.skip-link{position:absolute;left:-999px;top:0;z-index:200;background:var(--red);color:#fff;padding:.6rem 1rem;font-weight:700;text-decoration:none}
.skip-link:focus{left:0}

/* ---------------------------------------------------------------- masthead */
.masthead{background:var(--ink);color:#fff;border-bottom:3px solid var(--red)}
.masthead-in{max-width:var(--maxw);margin:0 auto;display:flex;flex-direction:column;align-items:center;padding:1rem 1.25rem}
.brand{font-family:'Playfair Display',serif;font-weight:700;font-size:1.8rem;color:#fff;text-decoration:none;text-align:center;display:inline-flex;align-items:center;gap:.6rem}
.brand span{color:var(--red)}
.brand-text{display:inline-block}
.brand-logo{width:38px;height:38px;flex:0 0 auto}
.masthead-tag{font-size:.78rem;color:#ccc;font-family:'IBM Plex Sans',sans-serif;margin-top:.2rem}

/* ---------------------------------------------------------------- nav */
/* position and z-index are load bearing: the mobile scrim is fixed at z-index 50,
   so the nav bar has to sit above it or every drawer link becomes unclickable.
   Caught by the Playwright interaction test, which clicks rather than measures. */
.nav{background:var(--paper);border-bottom:1px solid var(--rule);position:relative;z-index:60}
.nav-in{max-width:var(--maxw);margin:0 auto;display:flex;padding:0 1.25rem}
.nav-toggle{display:none}
.nav-list{list-style:none;margin:0;padding:0;display:flex;flex:1}
.nav-item{position:relative;display:flex}
.nav-link{padding:.7rem .85rem;color:var(--ink);text-decoration:none;font-size:.8rem;font-weight:700;font-family:'IBM Plex Sans',sans-serif;text-transform:uppercase;border:0;background:none;cursor:pointer;display:inline-flex;align-items:center;gap:.3rem}
.nav-link:hover{color:var(--red)}
.nav-caret{font-size:.7em;line-height:1}                      /* ADDED: was classed, never styled */
.has-dropdown>.nav-link[aria-expanded="true"]{color:var(--red)} /* ADDED */
.dropdown{position:absolute;top:100%;left:0;z-index:60;min-width:286px;background:var(--paper);border:1px solid var(--rule);padding:.3rem;display:none;list-style:none;margin:0;box-shadow:0 10px 24px rgba(26,26,26,.12)}
.nav-item:hover>.dropdown,.nav-item:focus-within>.dropdown{display:block}
.dropdown a{display:block;padding:.5rem .6rem;color:var(--ink);text-decoration:none;font-size:.85rem;font-family:'IBM Plex Sans',sans-serif}
.dropdown a:hover{background:var(--bg)}
.dropdown .dd-head{display:block;padding:.5rem .6rem .2rem;font-family:'IBM Plex Sans',sans-serif;font-size:.68rem;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.dropdown .view-all{border-top:1px solid var(--rule);margin-top:.25rem;font-weight:700;color:var(--red)}  /* ADDED */
.nav-phone{margin-left:auto;display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:var(--red);color:#fff;text-decoration:none;font-weight:700;font-family:'IBM Plex Sans',sans-serif}
.nav-phone-icon{font-size:1em;line-height:1}                  /* ADDED */
.nav-phone-label{white-space:nowrap}                            /* ADDED */
.nav-overlay{display:none}                                      /* ADDED: mobile scrim */

/* ---------------------------------------------------------------- layout */
.container{max-width:var(--maxw);margin:0 auto;padding:0 1.25rem}
.section{padding:3rem 0}
.band{background:var(--paper);border-top:1px solid var(--rule);border-bottom:1px solid var(--rule)}
.prose{max-width:var(--prose);margin-left:auto;margin-right:auto}  /* ADDED: centred boxed body copy, Section 4B */
.prose a[href^="mailto:"]{overflow-wrap:anywhere;word-break:break-word}  /* long email addresses must wrap at 320px */
.lede{font-size:1.05rem;color:#333;max-width:62ch}                 /* ADDED */
.ruled{border-bottom:2px solid var(--ink);padding-bottom:.35rem}   /* ADDED */

.ticker{overflow:hidden;background:var(--red);padding:.5rem 0}
.ticker-track{display:inline-flex;gap:2.5rem;white-space:nowrap;color:#fff;font-family:'IBM Plex Sans',sans-serif;font-size:.85rem;text-transform:uppercase;letter-spacing:.05em}
@media (prefers-reduced-motion: no-preference){
  .ticker-track{animation:tick 25s linear infinite}
}
@keyframes tick{from{transform:translateX(0)}to{transform:translateX(-50%)}}

/* ---------------------------------------------------------------- hero */
.hero{background:var(--bg);padding:2.5rem 0}
.hero .container{display:grid;grid-template-columns:2fr 1fr;gap:2rem;align-items:start}
.hero-copy{min-width:0}
.hero-copy .image-slot{margin-left:0}
.hero .eyebrow{font-size:.76rem;letter-spacing:.1em;text-transform:uppercase;color:var(--red);font-weight:700;font-family:'IBM Plex Sans',sans-serif;margin:0}
h1{font-family:'Playfair Display',serif;font-weight:900;font-size:56px;line-height:1.08;margin:.4rem 0 .9rem;color:var(--ink)}
.hero p{max-width:56ch;font-size:1.05rem;color:#333;margin:0 0 1.2rem}
.hero-actions{display:flex;flex-wrap:wrap;gap:.8rem}
.sidebar-brief{border:2px solid var(--ink);padding:1rem;background:var(--paper)}
.sidebar-brief .tag{display:inline-block;background:var(--red);color:#fff;font-size:.7rem;padding:.15rem .5rem;font-family:'IBM Plex Sans',sans-serif;text-transform:uppercase;margin-bottom:.5rem}
.sidebar-brief ul{list-style:none;margin:.6rem 0 0;padding:0;font-size:.9rem}
.sidebar-brief li{padding:.3rem 0;border-top:1px solid var(--rule)}
.sidebar-brief li:first-child{border-top:0}

/* ---------------------------------------------------------------- type */
h2{font-family:'Playfair Display',serif;font-weight:900;font-size:2rem;color:var(--ink);margin:0 0 .7rem}
h3{font-family:'Libre Baskerville',serif;font-weight:700;font-size:1.05rem;margin:0 0 .4rem;color:var(--ink)}
h4{font-family:'IBM Plex Sans',sans-serif;font-weight:700;font-size:.92rem;margin:0 0 .4rem;color:var(--ink);text-transform:uppercase;letter-spacing:.04em}
p{margin:0 0 1.2rem}
.dateline{font-family:'Playfair Display',serif;font-variant:small-caps;font-size:.8rem;color:var(--muted);margin:0 0 .3rem;letter-spacing:.05em}

/* ---------------------------------------------------------------- buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.8rem 1.5rem;text-decoration:none;font-weight:700;min-height:48px;border:2px solid var(--ink);font-family:'Libre Baskerville',serif}
.btn-accent{background:var(--ink);color:#fff}
.btn-ghost{background:transparent;color:var(--ink)}
.btn-accent:hover{background:var(--red);border-color:var(--red)}
.btn-ghost:hover{background:var(--ink);color:#fff}

/* ---------------------------------------------------------------- grids + cards */
.grid{display:grid;gap:1.6rem}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.card{padding:0}
.card h3 a{color:var(--ink);text-decoration:none}
.card p{font-size:.94rem}
.card .card-link{margin-top:.6rem;font-weight:700;font-size:.86rem;color:var(--red);text-decoration:underline;display:inline-block}
@media (prefers-reduced-motion: no-preference){
  /* the reference faded these in from opacity 0 set inline by JS, which hid the
     cards entirely when JS failed. Same effect, CSS only, visible at rest. */
  .grid-3>*{animation:colbuild .4s ease both}
  .grid-3>*:nth-child(2){animation-delay:.12s}
  .grid-3>*:nth-child(3){animation-delay:.24s}
  .grid-3>*:nth-child(4){animation-delay:.36s}
  .grid-3>*:nth-child(5){animation-delay:.48s}
  .grid-3>*:nth-child(6){animation-delay:.6s}
}
@keyframes colbuild{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}

.feature{margin:0 0 1.5rem}

/* ADDED: card variants, so long body copy and checklists are not bare text on paper */
.panel{background:var(--paper);border:1px solid var(--rule);padding:1.4rem 1.5rem;margin:0 0 1.5rem}
.panel>:last-child{margin-bottom:0}
.checklist{background:var(--paper);border-left:4px solid var(--red);padding:1.2rem 1.4rem;margin:0 0 1.5rem}
.checklist ul{list-style:none;margin:0;padding:0}
.checklist li{position:relative;padding:.35rem 0 .35rem 1.6rem;font-size:.96rem}
.checklist li::before{content:"\2713";position:absolute;left:0;top:.35rem;color:var(--red);font-weight:700}
.callout{background:var(--hl);border:1px solid var(--rule);padding:1.1rem 1.3rem;margin:0 0 1.5rem;font-size:.97rem}
.callout>:last-child{margin-bottom:0}
.callout h4{margin-bottom:.3rem}
.steps{counter-reset:step;list-style:none;margin:0 0 1.5rem;padding:0}
.steps li{counter-increment:step;position:relative;padding:.55rem 0 .55rem 2.6rem;border-top:1px solid var(--rule);font-size:.96rem}
.steps li:first-child{border-top:0}
.steps li::before{content:counter(step);position:absolute;left:0;top:.5rem;width:1.8rem;height:1.8rem;border:2px solid var(--ink);border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:'IBM Plex Sans',sans-serif;font-size:.8rem;font-weight:700}
.plainlist{list-style:none;margin:0;padding:0}
.plainlist li{padding:.35rem 0;border-top:1px solid var(--rule);font-size:.96rem}
.plainlist li:first-child{border-top:0}
.linkout{list-style:none;margin:0 0 1.5rem;padding:0}
.linkout li{padding:.6rem 0;border-top:1px solid var(--rule);display:flex;flex-wrap:wrap;gap:.2rem 1rem;align-items:baseline;justify-content:space-between}
.linkout li:first-child{border-top:0}
.linkout a{font-weight:700;text-decoration:underline}
.lo-note{color:var(--muted);font-size:.9rem;font-style:italic;flex:1 1 16rem;text-align:right}
.srclink{font-size:.84rem;color:var(--muted);font-family:'IBM Plex Sans',sans-serif;margin:-.6rem 0 1.4rem}
.srclink a{color:var(--red)}

/* ADDED: tables, wrapped so a narrow viewport scrolls the table and not the page */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 0 1.5rem;border:1px solid var(--rule);background:var(--paper)}
table{border-collapse:collapse;width:100%;font-size:.94rem}
caption{text-align:left;font-family:'IBM Plex Sans',sans-serif;font-size:.8rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);padding:.7rem .9rem}
th,td{text-align:left;padding:.62rem .9rem;border-top:1px solid var(--rule);vertical-align:top}
th{font-family:'IBM Plex Sans',sans-serif;font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;background:var(--bg)}
td.num{white-space:nowrap}

/* ---------------------------------------------------------------- image slots */
.image-slot{margin:1.5rem auto;background:linear-gradient(135deg,var(--slot-a),var(--slot-b));border:1px solid var(--rule);display:flex;align-items:center;justify-content:center;color:var(--muted);font-family:'IBM Plex Sans',sans-serif;font-size:.84rem;overflow:hidden;text-align:center}
.image-slot span{padding:1rem}

/* ---------------------------------------------------------------- faq */
.faq details{border-bottom:1px solid var(--rule);padding:.2rem 0;margin:0}
.faq summary{cursor:pointer;padding:.85rem 0;font-weight:700;list-style:none;display:flex;justify-content:space-between;gap:1rem;font-family:'Playfair Display',serif}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";color:var(--red);font-family:'IBM Plex Sans',sans-serif}
.faq details[open] summary::after{content:"-"}
.faq .faq-body{padding:0 0 .9rem}
.faq .faq-body>:last-child{margin-bottom:0}

/* ---------------------------------------------------------------- areas */
.area-cols{columns:2;column-gap:2rem;column-rule:1px solid var(--rule)}
.area-cols ul{list-style:none;margin:0;padding:0}
.area-cols li{break-inside:avoid;padding:.18rem 0}
.area-cols a{color:var(--red);text-decoration:none;font-weight:700;font-size:.92rem}
.area-cols a:hover{text-decoration:underline}
.zipcard{background:var(--paper);border:2px solid var(--ink);padding:1.2rem 1.4rem;margin:1.5rem 0}
.zipcard h3{margin-bottom:.3rem}
.zipcard .zips{font-family:'IBM Plex Sans',sans-serif;font-weight:700;letter-spacing:.04em}

/* ADDED: map embed, no API key format */
.map-wrap{position:relative;padding-bottom:56.25%;height:0;margin:0 0 1.5rem;border:1px solid var(--rule);background:var(--paper)}
.map-wrap iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

/* ---------------------------------------------------------------- cta band */
.cta-band{background:var(--ink);color:#fff}
.cta-band h2{color:#fff}
.cta-band p{color:#ddd}
.cta-band .btn-ghost{color:#fff;border-color:#fff}
.cta-band .btn-ghost:hover{background:#fff;color:var(--ink)}
.cta-mid{background:var(--paper);border-top:2px solid var(--ink);border-bottom:2px solid var(--ink);padding:1.3rem 1.5rem;margin:2rem auto;max-width:var(--prose);display:flex;flex-wrap:wrap;align-items:center;gap:1rem;justify-content:space-between}
.cta-mid p{margin:0;font-size:1rem;max-width:46ch}

/* ---------------------------------------------------------------- crumbs */
.crumbs{font-size:.85rem;padding:.9rem 0 0;font-family:'IBM Plex Sans',sans-serif;color:var(--muted)}
.crumbs ol{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.4rem}
.crumbs li::after{content:"/";margin-left:.4rem;color:var(--rule)}
.crumbs li:last-child::after{content:""}
.crumbs a{color:var(--red);text-decoration:none}

/* ---------------------------------------------------------------- footer */
.site-footer{background:var(--ink);color:#ccc}
.site-footer .container{padding-top:2.4rem;padding-bottom:1.4rem}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:1.6rem}
.footer-brand .brand{color:#fff;font-size:1.2rem}
.footer-brand .brand span{color:var(--brand-accent)}
.footer-brand p{font-size:.9rem}
.site-footer h3{color:var(--red);font-size:.85rem;text-transform:uppercase;font-family:'IBM Plex Sans',sans-serif;letter-spacing:.05em}
.site-footer ul{list-style:none;margin:0;padding:0}
.site-footer li{padding:.16rem 0}
.site-footer a{color:#ccc;text-decoration:none;font-size:.88rem;font-family:'IBM Plex Sans',sans-serif}
.site-footer a:hover{color:#fff;text-decoration:underline}
.footer-phone{display:inline-block;color:#fff;font-weight:700;font-size:1.05rem;text-decoration:none;margin:.3rem 0}  /* ADDED */
.footer-nap{font-size:.86rem;font-family:'IBM Plex Sans',sans-serif;color:#bbb;margin:.3rem 0 0}
.footer-legal{border-top:1px solid #333;margin-top:1.4rem;padding-top:1rem;font-size:.78rem;color:#9a9a9a;font-family:'IBM Plex Sans',sans-serif;line-height:1.6}
.footer-legal p{margin:0 0 .5rem}
.footer-legal p:last-child{margin-bottom:0}

/* ---------------------------------------------------------------- sticky cta */
.sticky-cta{display:none;position:fixed;left:0;right:0;bottom:0;z-index:90;background:var(--red)}
.sticky-cta a{display:flex;align-items:center;justify-content:center;gap:.5rem;padding:.85rem;color:#fff;text-decoration:none;font-weight:700;min-height:48px}

/* ---------------------------------------------------------------- responsive */
@media (max-width:860px){
  .hero .container{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr 1fr}
  h1{font-size:42px}
}
@media (max-width:767px){
  h1{font-size:32px}
  h2{font-size:1.6rem}
  .nav-in{flex-wrap:wrap;align-items:center}
  .nav-toggle{display:inline-flex;align-items:center;gap:.5rem;background:none;border:0;color:var(--ink);font-family:'IBM Plex Sans',sans-serif;font-weight:700;padding:.75rem 0;cursor:pointer;min-height:48px}
  .nav-list{display:none;flex-direction:column;width:100%;flex-basis:100%;border-top:1px solid var(--rule)}
  .nav-list.open{display:flex}
  .nav-item{display:block}
  .nav-link{width:100%;justify-content:space-between;padding:.85rem .2rem;min-height:48px}
  .dropdown{position:static;display:none;border:0;border-left:3px solid var(--rule);margin:0 0 .4rem .4rem;min-width:0;box-shadow:none}
  .nav-item.open>.dropdown{display:block}
  .nav-item:hover>.dropdown{display:none}
  .nav-item.open:hover>.dropdown{display:block}
  .nav-phone{margin-left:auto}
  .nav-overlay.show{display:block;position:fixed;inset:0;background:rgba(26,26,26,.45);z-index:50}
  .grid-2,.grid-3{grid-template-columns:1fr}
  .area-cols{columns:1;column-rule:0}
  .footer-grid{grid-template-columns:1fr}
  .cta-mid{flex-direction:column;align-items:flex-start}
  .linkout li{flex-direction:column}
  .lo-note{text-align:left;flex:1 1 auto}
  .sticky-cta{display:block}
  body{padding-bottom:54px}
  body.nav-open{overflow:hidden}
}
@media print{
  .nav,.sticky-cta,.ticker,.skip-link{display:none}
}

/* ------------------------------------------------- hub coverage map (rules section 12) */
.covermap{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:2rem;align-items:start;margin-top:1.2rem}
.covermap-list{min-width:0}
.covermap-list h3{margin-top:1.6rem}
.covermap-fig{margin:0}
.covermap-fig figcaption{font-size:.85rem;color:var(--muted,#555);margin:.5rem 0}
.chips{list-style:none;margin:.4rem 0 .8rem;padding:0;display:flex;flex-wrap:wrap;gap:.5rem}
.chip{border:1px solid var(--ink);padding:.3rem .8rem;font-weight:700;letter-spacing:.03em;background:var(--paper)}
.cmap{display:block;width:100%;height:auto;border:1px solid var(--rule)}
.cmap-bg{fill:var(--paper)}
.cmap-zone{fill:rgba(204,0,0,.12);stroke:rgba(204,0,0,.55);stroke-width:1.2}
.cmap-road{fill:none;stroke:#9a9a9a;stroke-width:1.6;stroke-linejoin:round}
.cmap-roadlabel{font:600 11px system-ui,sans-serif;fill:#6b6b6b}
.cmap-lead{stroke:#555;stroke-width:1}
.cmap-dot{fill:var(--ink);stroke:#fff;stroke-width:1.5}
.cmap-dot-city{fill:var(--red)}
.cmap-chip{fill:#fff;stroke:var(--ink);stroke-width:1}
.cmap-chip-city{stroke:var(--red);stroke-width:1.6}
.cmap-label{font:600 13px system-ui,sans-serif;fill:var(--ink)}
.cmap-hit,.cmap-dothit{fill:transparent}
.cmap-dothit{display:none}
.cmap-pin:focus{outline:none}
.cmap-pin:focus-visible .cmap-chip,.cmap-pin:hover .cmap-chip{stroke:var(--red);stroke-width:2.5}
@media (max-width:760px){.covermap{grid-template-columns:minmax(0,1fr)}.cmap-label,.cmap-chip{display:none}.cmap-hit{display:none}.cmap-dothit{display:inline}.cmap-dot{r:9px}.cmap-pin:focus-visible .cmap-dot{stroke:var(--red);stroke-width:3}}

/* ---------------------------------------------------------------- stage 2 figures (real images) */
.fig{margin:1.9rem auto;max-width:880px}
.fig img{display:block;width:100%;height:auto;border:1px solid var(--rule);background:var(--slot-a)}
.fig figcaption{font-family:'IBM Plex Sans',sans-serif;font-size:.88rem;line-height:1.5;color:var(--muted);margin:.65rem 0 0;padding-left:.85rem;border-left:3px solid var(--red)}
.fig--wide{max-width:880px}
.fig--inset{max-width:680px}
.fig--hero img{aspect-ratio:16/9;object-fit:cover;object-position:var(--fig-pos,50% 50%)}
@media (min-width:900px){
  .fig--side{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:1.4rem;align-items:end;max-width:980px}
  .fig--side figcaption{margin:0 0 .3rem}
}

/* Stage 2 logo: artwork sits untouched on a white plate */
.brand--logo{display:inline-flex;align-items:center;line-height:0}
.logo-plate{display:inline-block;background:#fff;padding:6px 10px;border-radius:6px;line-height:0}
.brand--logo .brand-logo{display:block;width:auto;height:58px;max-width:100%;object-fit:contain}
.footer-brand .logo-plate{padding:8px 12px}
.footer-brand .brand--logo .brand-logo{height:60px}
@media (max-width:600px){.brand--logo .brand-logo{height:42px}.logo-plate{padding:5px 8px}}
.cta-band .fig figcaption{color:#d6d6d6;border-left-color:var(--red)}
.cta-band .fig img{border-color:#444}
