/* Anything Plumbing LLC — hybrid 90s theme.
   Modern, readable, fast page wearing 90s chrome. Rules: 15-90s-theme-rules.md
   No webfonts, no framework, no JS required. Pixel art is scaled with CSS. */

:root {
  --paper: #f4f1e7;
  --paper-2: #e9e4d6;
  --ink: #16181d;
  --ink-soft: #3c4048;
  --blue-d: #12386b;
  --teal: #1f7d5f;
  --teal-hover: #155f47;
  --rust: #b8360d;
  --yellow: #f2b705;
  --bevel: inset -3px -3px 0 rgba(0, 0, 0, .28), inset 3px 3px 0 #fff;
  --bevel-in: inset 3px 3px 0 rgba(0, 0, 0, .28), inset -3px -3px 0 #fff;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, "Courier New", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bar: 55px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  /* faint 90s tiled paper texture, pure CSS, no image request */
  background-image: repeating-linear-gradient(45deg, rgba(22, 24, 29, .035) 0 2px, transparent 2px 6px);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  /* +3px = the call bar's top border; the bar is --bar plus that border */
  padding-bottom: calc(var(--bar) + 3px + env(safe-area-inset-bottom));
}

img { max-width: 100%; height: auto; }
img.pixel { image-rendering: crisp-edges; image-rendering: pixelated; }
.px-2 { width: 8rem; } .px-3 { width: 12rem; } .px-4 { width: 16rem; }

a { color: var(--blue-d); text-underline-offset: 3px; }
a:hover { color: var(--rust); }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: 10px 14px; z-index: 20;
}
.skip:focus { left: 8px; top: 8px; }

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1rem; }
.measure { max-width: 68ch; }

/* ---------- masthead + toolbar ---------- */
.masthead {
  border-bottom: 3px solid var(--ink);
  background: var(--paper-2);
  background-image: repeating-linear-gradient(135deg, rgba(22, 24, 29, .05) 0 2px, transparent 2px 7px);
}
.masthead .wrap {
  display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center;
  justify-content: space-between; padding-top: 1rem; padding-bottom: 1rem;
}
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand .name { font-family: var(--mono); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; }
.brand .sub { display: block; font-family: var(--sans); font-size: .8rem; font-weight: 400; color: var(--ink-soft); letter-spacing: .02em; }

nav.top { display: flex; flex-wrap: wrap; gap: .4rem; }
nav.top a {
  font-family: var(--mono); font-size: .9rem; text-decoration: none; color: var(--ink);
  border: 2px solid var(--ink); background: var(--paper); box-shadow: var(--bevel);
  padding: .4rem .65rem; min-height: 44px; display: inline-flex; align-items: center;
}
nav.top a:hover, nav.top a[aria-current="page"] { background: var(--yellow); }
nav.top a:active { box-shadow: var(--bevel-in); }

/* ---------- ticker ---------- */
.ticker {
  border-bottom: 3px solid var(--ink); background: var(--ink); color: #fff;
  height: 34px; overflow: hidden; display: flex; align-items: center;
}
.ticker .track {
  display: inline-flex; white-space: nowrap; font-family: var(--mono); font-size: .9rem;
  animation: slide 28s linear infinite; will-change: transform;
}
/* gap:0 plus padding-right keeps the -50% loop point exact */
.ticker .track span { display: inline-flex; align-items: center; gap: .5rem; padding-right: 3rem; }
.ticker:focus-within .track { animation-play-state: paused; }
/* hover only where a real pointer exists: a tap can leave :hover stuck on a touch screen */
@media (hover: hover) { .ticker:hover .track { animation-play-state: paused; } }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  /* stay one clipped line at every width: wrapping + height:auto made a 106-157 px box on an
     iPad in Reduce Motion. The base rule's 34px height and overflow:hidden do the clipping. */
  .ticker .track { animation: none; transform: none; }
}

/* ---------- panels, buttons ---------- */
.panel {
  border: 2px solid var(--ink); background: #fff; box-shadow: var(--bevel);
  padding: 1.1rem 1.25rem; margin: 1.25rem 0;
}
.panel h2 { margin-top: 0; }
.panel.tint { background: var(--paper-2); }
.panel.accent { border-left: 10px solid var(--rust); }

.btn {
  display: inline-block; font-family: var(--mono); font-weight: 700; text-decoration: none;
  color: var(--ink); background: var(--yellow); border: 2px solid var(--ink);
  box-shadow: var(--bevel); padding: .7rem 1.1rem; margin: .25rem .35rem .25rem 0;
}
.btn:hover { background: #ffd23f; color: var(--ink); }
.btn:active { box-shadow: var(--bevel-in); }
.btn.call { background: var(--teal); color: #fff; }
.btn.call:hover { background: var(--teal-hover); color: #fff; }
.btn.ghost { background: var(--paper); }

.divider {
  height: 10px; margin: 2rem 0 1.5rem;
  background-image: repeating-linear-gradient(45deg, var(--ink) 0 2px, transparent 2px 5px);
  opacity: .5;
}

/* ---------- layout ---------- */
.grid { display: grid; gap: 1rem; margin: 1.25rem 0; }
@media (min-width: 40rem) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.hero { display: grid; gap: 1.25rem; align-items: center; padding: 1.5rem 0 .5rem; }
@media (min-width: 46rem) { .hero { grid-template-columns: 1.4fr 1fr; } }

h1, h2, h3 { font-family: var(--mono); line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); margin: .2rem 0 .6rem; }
h2 { font-size: 1.35rem; margin: 1.75rem 0 .5rem; }
h3 { font-size: 1.1rem; margin: 1.25rem 0 .35rem; }
p { margin: .65rem 0; }
ul, ol { padding-left: 1.3rem; }
li { margin: .3rem 0; }
.eyebrow {
  font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--rust); margin: 0;
}
.lead { font-size: 1.15rem; }
.small { font-size: .9rem; color: var(--ink-soft); }
table { border-collapse: collapse; width: 100%; margin: 1rem 0; background: #fff; }
th, td { border: 2px solid var(--ink); padding: .5rem .6rem; text-align: left; }
th { background: var(--paper-2); font-family: var(--mono); font-size: .9rem; }

/* ---------- sticky call bar (the 90s toolbar that earns its keep) ---------- */
.callbar {
  position: fixed; inset: auto 0 0 0; z-index: 15;
  border-top: 3px solid var(--ink); background: var(--ink); color: #fff;
}
.callbar .wrap { display: flex; gap: .75rem; align-items: center; justify-content: space-between; height: var(--bar); }
.callbar .hours { font-family: var(--mono); font-size: .8rem; color: #e9e4d6; }
.callbar a {
  font-family: var(--mono); font-weight: 700; text-decoration: none; color: #fff;
  background: var(--teal); border: 2px solid #fff; box-shadow: var(--bevel); padding: .45rem .8rem;
}
.callbar a:hover { background: var(--teal-hover); }

/* ---------- footer ---------- */
footer.site {
  margin-top: 2.5rem; border-top: 3px solid var(--ink); background: var(--paper-2);
  padding: 1.5rem 0 2rem; font-size: .92rem;
}
footer.site .cols { display: grid; gap: 1.25rem; }
@media (min-width: 46rem) { footer.site .cols { grid-template-columns: repeat(3, 1fr); } }
footer.site address { font-style: normal; }
/* Footer links are a link list, not prose, so WCAG 2.2 target size (2.5.8) applies: 24x24 CSS px.
   Measured at 320 px they were 20 px tall. Inline-block + padding grows the hit box and the line
   box with it. Links inside a sentence are exempt from 2.5.8 and are left alone. */
footer.site a { display: inline-block; padding: .25rem 0; }

/* ---------- layout helpers: the only two the site needs ---------- */
.tight { margin: .2rem 0; }
.flush-b { margin-bottom: 0; }
@media print { .callbar, .ticker { display: none; } body { padding-bottom: 0; } }

/* ---------- small screens: one site, it just reflows (no separate mobile build) ---------- */
body { overflow-wrap: break-word; }

.btn { min-height: 44px; }

.callbar { padding-bottom: env(safe-area-inset-bottom); }
@media (max-width: 44rem) {
  /* keep real table semantics; scroll a wrapper instead of restyling the cells */
  .table-scroll { margin: 1rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-scroll table { min-width: 30rem; margin: 0; }
  th, td { white-space: normal; }
  .wrap { padding: 0 .85rem; }
  .hero { padding-top: 1rem; }
  .panel { padding: .9rem 1rem; }
  .ticker { height: 30px; }
  .ticker .track { font-size: .82rem; gap: 2rem; }
  h2 { font-size: 1.22rem; }
}

/* phones held in the hand: shorter hours label */
@media (max-width: 44rem) {
  .callbar .hours { font-size: .72rem; }
}

/* narrow phones: tables stay tables and swipe sideways inside .table-scroll.
   Restyling tr/td to display:block here used to strip table semantics in Safari/VoiceOver. */
@media (max-width: 30rem) {
  .table-scroll table { min-width: 26rem; }
  th, td { padding: .45rem .5rem; }
}

/* 360 px: the bar can wrap to two lines under text zoom, so the reserve covers two.
   Measured at 320 px: the bar is 60/108 px at 100/125% font scaling and clears the reserve; past
   about 150% it grows beyond the fixed reserve (128 px at 150%, 217 px at 200%). Fixing that needs
   JS or a taller reserve; noted, not solved. */
@media (max-width: 30rem) {
  body { padding-bottom: calc(var(--bar) * 2 + 3px + env(safe-area-inset-bottom)); }
  .callbar .wrap { height: auto; min-height: var(--bar); padding: .4rem 0; gap: .5rem; flex-wrap: wrap; }
  .callbar .hours { font-size: .74rem; }
  .callbar .where { display: none; }
  .callbar a { font-size: .92rem; padding: .5rem .7rem; }
}
