/* ============================================================
   Plumbing N Things — Philadelphia
   Composition: black + white + one color per section,
   stacked headline, fade+rise on scroll, broken bento,
   drag-to-scroll band, patterned SVG background.
   ============================================================ */

:root {
  --ink: #0a0a0a;
  --red: #e10600;
  --blue: #003c8a;
  --acid: #f4ff33;

  --paper: #f2f0eb;
  --paper-2: #e6e3dc;
  --line: rgba(10, 10, 10, 0.14);
  --line-inv: rgba(255, 255, 255, 0.22);

  --fg: #0a0a0a;
  --bg: var(--paper);

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --pad: clamp(1.15rem, 4vw, 3.5rem);
  --maxw: 1180px;

  --dot: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><circle cx='2' cy='2' r='1.1' fill='%230a0a0a' fill-opacity='0.16'/></svg>");
  --dot-inv: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><circle cx='2' cy='2' r='1.1' fill='%23ffffff' fill-opacity='0.20'/></svg>");
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--dot);
  background-size: 22px 22px;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.62;
  font-variation-settings: "opsz" 20;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.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 {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--ink); color: #fff; padding: 0.7rem 1rem; font-weight: 700;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}
.sec--red :focus-visible,
.sec--blue :focus-visible { outline-color: #fff; }
.sec--acid :focus-visible { outline-color: var(--ink); }

/* ---------------- top bar ---------------- */

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.6rem var(--pad);
  background: rgba(242, 240, 235, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.mark { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.mark-drop {
  width: 14px; height: 20px; flex: none;
  background: var(--red);
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  transform: rotate(45deg);
}
.mark-text {
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.05;
  font-size: 0.98rem; display: flex; flex-direction: column;
}
.mark-text em {
  font-family: var(--font-mono); font-style: normal; font-weight: 400;
  font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase;
  opacity: 0.6; margin-top: 0.15rem;
}

.topnav { display: none; gap: 1.35rem; margin-left: auto; }
.topnav a {
  text-decoration: none; font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.01em; padding: 0.5rem 0; border-bottom: 2px solid transparent;
}
.topnav a:hover { border-bottom-color: var(--red); }

.callbtn {
  margin-left: auto; text-decoration: none;
  background: var(--ink); color: #fff;
  padding: 0.5rem 0.85rem; min-height: 44px;
  display: flex; flex-direction: column; justify-content: center;
  border-radius: 3px; line-height: 1.1;
}
.topnav + .callbtn { margin-left: 0; }
.callbtn-label {
  font-family: var(--font-mono); font-size: 0.58rem;
  text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.7;
}
.callbtn-num { font-weight: 800; font-size: 0.95rem; letter-spacing: -0.01em; }
.callbtn:hover { background: var(--red); }

@media (min-width: 860px) {
  .topnav { display: flex; }
}

/* ---------------- section shell ---------------- */

.sec {
  position: relative;
  padding: clamp(3rem, 8vw, 6.5rem) var(--pad);
  background-image: var(--dot);
  background-size: 22px 22px;
}

.sec--ink  { background-color: var(--ink);  color: #f4f2ee; background-image: var(--dot-inv); }
.sec--red  { background-color: var(--red);  color: #fff;    background-image: var(--dot-inv); }
.sec--blue { background-color: var(--blue); color: #fff;    background-image: var(--dot-inv); }
.sec--acid { background-color: var(--acid); color: var(--ink); }

.wrap { max-width: var(--maxw); margin: 0 auto; }

.kicker {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  margin: 0 0 1.1rem; opacity: 0.75;
}

.h2 {
  font-size: clamp(1.9rem, 1.1rem + 3.4vw, 3.4rem);
  line-height: 0.98; letter-spacing: -0.035em; font-weight: 800;
  margin: 0 0 1.1rem; text-wrap: balance;
}

.section-lede {
  max-width: 46ch; margin: 0 0 2.6rem;
  font-size: 1.05rem; opacity: 0.9;
}

/* ---------------- hero ---------------- */

.hero { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }

.stack {
  font-size: clamp(2.5rem, 1rem + 9vw, 7rem);
  line-height: 0.9; letter-spacing: -0.045em; font-weight: 800;
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  text-wrap: nowrap;
}
.stack span { display: block; }
.stack span:nth-child(2) { margin-left: 0.9em; color: var(--acid); }
.stack span:nth-child(3) { margin-left: -0.06em; }

.hero-grid {
  display: grid; gap: clamp(1.6rem, 4vw, 3rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 820px) {
  .hero-grid { grid-template-columns: 1.35fr 1fr; }
}

.lede { margin: 0; font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.18rem); max-width: 52ch; opacity: 0.92; }

.hero-card {
  border: 1px solid var(--line-inv);
  border-left: 4px solid var(--acid);
  padding: 1.4rem 1.5rem;
  background: rgba(255, 255, 255, 0.04);
}
.hero-card-line { margin: 0 0 0.7rem; font-size: 0.92rem; opacity: 0.8; }
.bigphone {
  display: inline-block; text-decoration: none;
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.3rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.1;
  border-bottom: 3px solid var(--acid);
  padding-bottom: 0.1rem;
}
.bigphone:hover { color: var(--acid); }
.hero-card-sub {
  margin: 0.9rem 0 0; font-family: var(--font-mono);
  font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7;
}

.hero-rule {
  max-width: var(--maxw); margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  height: 1px; background: var(--line-inv);
}

/* ---------------- broken bento ---------------- */

.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
@media (min-width: 760px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .card { grid-column: span 3; }
  .card--wide { grid-column: 1 / 4; }
  .card--wide + .card { grid-column: 4 / 7; }
  .card--tall { grid-column: 2 / 6; }
  .card--blank { grid-column: 6 / 7; }
}

.card {
  background: var(--red);
  padding: clamp(1.3rem, 2.6vw, 2rem);
  display: flex; flex-direction: column;
}
.card h3 {
  margin: 0 0 0.6rem; font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.15;
}
.card p { margin: 0 0 0.85rem; font-size: 0.96rem; opacity: 0.95; }
.card-meta {
  margin-top: auto !important; padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  font-family: var(--font-mono); font-size: 0.66rem !important;
  letter-spacing: 0.05em; text-transform: uppercase; opacity: 0.85 !important;
}
.card--blank { background: transparent; min-height: 60px; }

/* ---------------- drag band ---------------- */

.bandsec { padding-left: 0; padding-right: 0; }
.bandsec .wrap { padding-left: var(--pad); padding-right: var(--pad); }

.band {
  position: relative;
  overflow: hidden;
  cursor: grab;
  margin-top: 0.5rem;
  padding: 0.4rem 0 1.2rem;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.band.is-dragging { cursor: grabbing; }

.band-track {
  display: flex; gap: 1.1rem;
  padding: 0 var(--pad);
  will-change: transform;
}

.job {
  flex: 0 0 auto;
  width: min(78vw, 400px);
  margin: 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line-inv);
}
.job img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  pointer-events: none;
}
.job figcaption {
  padding: 1rem 1.1rem 1.2rem;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.job-tag {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--acid);
}
.job strong { font-size: 1.06rem; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; }
.job figcaption span:last-child { font-size: 0.9rem; opacity: 0.88; line-height: 1.5; }

.band-hint {
  margin: 0; padding: 0 var(--pad);
  font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.6;
}

/* ---------------- about ---------------- */

.about-grid {
  display: grid; gap: clamp(1.8rem, 4vw, 3.2rem);
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .about-grid { grid-template-columns: 1.5fr 1fr; }
}

.about-copy p { margin: 0 0 1.1rem; max-width: 60ch; }
.about-copy p:first-child::first-letter {
  float: left; font-size: 3.4rem; line-height: 0.82;
  font-weight: 800; padding: 0.1rem 0.5rem 0 0;
}

.about-side { display: grid; gap: 1px; background: rgba(10, 10, 10, 0.2); border: 1px solid rgba(10, 10, 10, 0.2); }
.stat {
  background: var(--acid); padding: 1.1rem 1.2rem;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.stat-num { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.stat-label { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.75; }
.stat--blank { background: transparent; min-height: 46px; }

.promise {
  margin-top: clamp(2.4rem, 5vw, 3.6rem);
  border-top: 3px solid var(--ink);
  padding-top: 1.6rem;
}
.promise h3 { margin: 0 0 1.1rem; font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.7rem); font-weight: 800; letter-spacing: -0.025em; }
.promise-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: rgba(10,10,10,0.18); border: 1px solid rgba(10,10,10,0.18); }
@media (min-width: 760px) { .promise-list { grid-template-columns: 1fr 1fr; } }
.promise-list li {
  background: var(--acid); padding: 1rem 1.15rem;
  font-size: 0.95rem; line-height: 1.5;
}
.promise-list strong { display: block; font-weight: 800; letter-spacing: -0.01em; }

/* ---------------- visit ---------------- */

.visit-grid {
  display: grid; gap: clamp(1.6rem, 4vw, 2.6rem);
  grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .visit-grid { grid-template-columns: 1fr 1fr 1.05fr; }
}

.visit-block h3 {
  margin: 0 0 1rem; font-size: 0.72rem; font-family: var(--font-mono);
  font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--acid); opacity: 0.95;
}
.visit-block--call { border-left: 1px solid var(--line-inv); padding-left: clamp(1rem, 3vw, 2rem); }
@media (max-width: 819px) { .visit-block--call { border-left: 0; padding-left: 0; } }

.hours { border-collapse: collapse; width: 100%; max-width: 22rem; }
.hours th, .hours td { text-align: left; padding: 0.42rem 0; font-weight: 400; font-size: 0.95rem; }
.hours th { font-weight: 600; }
.hours td { font-family: var(--font-mono); font-size: 0.82rem; text-align: right; opacity: 0.9; }
.hours tr + tr th, .hours tr + tr td { border-top: 1px solid var(--line-inv); }
.hours-weekend th, .hours-weekend td { color: var(--acid); }

.addr { font-style: normal; font-size: 1.15rem; font-weight: 600; line-height: 1.45; letter-spacing: -0.01em; }

.note { font-size: 0.92rem; opacity: 0.82; margin: 1rem 0 0; max-width: 42ch; }
.note--tight { margin-top: 0.6rem; }

.maplink { text-decoration: none; border-bottom: 2px solid var(--acid); font-weight: 600; }
.maplink:hover { color: var(--acid); }

.bigphone--light { border-bottom-color: var(--acid); }

.service-area {
  margin-top: clamp(2.4rem, 5vw, 3.6rem);
  border-top: 1px solid var(--line-inv);
  padding-top: 1.6rem;
}
.service-area h3 {
  margin: 0 0 0.7rem; font-size: 0.72rem; font-family: var(--font-mono);
  font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--acid);
}
.service-area p { margin: 0; max-width: 72ch; font-size: 0.98rem; opacity: 0.9; }

/* ---------------- footer ---------------- */

.foot {
  background: var(--ink); color: #f4f2ee;
  background-image: var(--dot-inv); background-size: 22px 22px;
  padding: clamp(2rem, 5vw, 3rem) var(--pad) clamp(3.5rem, 6vw, 4.5rem);
  border-top: 4px solid var(--red);
}
.foot-inner { display: flex; flex-direction: column; gap: 1.1rem; }
.foot-name { margin: 0; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.foot-line { margin: 0.25rem 0 0; font-size: 0.92rem; opacity: 0.85; }
.foot-line a { text-decoration: none; border-bottom: 1px solid var(--line-inv); }
.foot-line a:hover { color: var(--acid); border-bottom-color: var(--acid); }
.foot-line--small { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; opacity: 0.6; }

.claim-banner {
  align-self: flex-start;
  font-size: 0.78rem; text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-inv);
  padding: 0.5rem 0.8rem; border-radius: 3px;
  color: #f4f2ee; opacity: 0.85;
}
.claim-banner:hover { background: rgba(255, 255, 255, 0.16); opacity: 1; }

.attribution {
  position: static;
  margin: 0; font-size: 0.7rem; opacity: 0.5;
  font-family: var(--font-mono);
}
.attribution a { color: inherit; }

/* ---------------- motion ---------------- */

@keyframes fadeRise {
  from { opacity: 0; translate: 0 12px; }
  to   { opacity: 1; translate: 0 0; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sec > .wrap,
    .sec > .band {
      animation: fadeRise 420ms cubic-bezier(.2, .7, .1, 1) both;
      animation-timeline: view();
      animation-range: entry 0% cover 25%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
