/* ============================================================
   Miguel & Sons Plumbing Services
   Composition: risograph two-color misregister · variable-width
   breathing type · marquee ticker · full-bleed image gallery ·
   layered gradient depth · no signature mechanic (restraint).
   ============================================================ */

:root {
  --bg: #f7f5ea;
  --paper: #fffdf4;
  --ink-a: #ff48b0;   /* fluorescent pink */
  --ink-b: #1f3fff;   /* royal blue */
  --ink: #14131c;
  --muted: #55536a;
  --rule: rgba(20, 19, 28, 0.16);
  --shadow: 0 1px 0 rgba(20, 19, 28, 0.08);

  --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;
}

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

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

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.55vw + 0.9rem, 1.1rem);
  line-height: 1.62;
  font-variation-settings: "wdth" 100;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 55% at 8% -5%, rgba(255, 72, 176, 0.30) 0, transparent 62%),
    radial-gradient(ellipse 65% 60% at 100% 12%, rgba(31, 63, 255, 0.22) 0, transparent 58%),
    radial-gradient(ellipse 80% 50% at 50% 108%, rgba(255, 72, 176, 0.16) 0, transparent 60%);
  background-attachment: fixed;
}

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

a { color: var(--ink-b); }
a:hover { color: var(--ink-a); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 50;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- typography ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2.4rem, 7.5vw, 5.4rem);
  font-variation-settings: "wdth" 88;
}

h2 {
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  font-variation-settings: "wdth" 92;
}

h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.2;
  margin-bottom: 0.5em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* breathing width axis — the site's pulse */
@keyframes breathe {
  0%, 100% { font-variation-settings: "wdth" 78; }
  50%      { font-variation-settings: "wdth" 118; }
}

.breathe {
  animation: breathe 7s ease-in-out infinite;
  will-change: font-variation-settings;
}

/* ---------- ticker band ---------- */

.ticker {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  border-bottom: 3px solid var(--ink-a);
}

.ticker__track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  padding: 0.55rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: scroll 38s linear infinite;
}

.ticker__track .dot { color: var(--ink-a); }

@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* ---------- masthead ---------- */

.masthead {
  padding: clamp(1.4rem, 3vw, 2.4rem) var(--pad) clamp(0.8rem, 2vw, 1.4rem);
}

.masthead__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.mark {
  margin: 0;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  position: relative;
  display: inline-block;
}

/* misregister: a pink ghost of the wordmark, offset a hair */
.mark::before {
  content: "Miguel & Sons";
  position: absolute;
  inset: 0;
  color: var(--ink-a);
  transform: translate(-3px, 2px);
  z-index: -1;
  opacity: 0.85;
}

.mark .amp { color: var(--ink-b); }

.mark__sub {
  margin: 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.callbtn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.7rem 1.15rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink-b);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink-a);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.callbtn:hover,
.callbtn:focus-visible {
  color: var(--paper);
  background: var(--ink-a);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink-b);
}

.callbtn__label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
}

.callbtn__num {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) var(--pad) clamp(2rem, 5vw, 4rem);
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
  align-items: end;
}

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr 0.95fr; }
}

.hero__type h1 { margin-bottom: 0.5em; }

.hero__lede {
  font-size: clamp(1.05rem, 1.1vw + 0.85rem, 1.28rem);
  max-width: 34ch;
  color: #2a2838;
}

.hero__meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 0.9rem;
  margin-top: 1.6rem;
}

.hero__fig {
  margin: 0;
  position: relative;
}

.hero__fig img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink-a);
}

/* ---------- bands ---------- */

.band {
  padding: clamp(2.6rem, 6vw, 5rem) var(--pad);
}

.band--a { border-top: 2px solid var(--ink); }
.band--b { border-top: 2px solid var(--ink); }

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

.band__inner--split {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3.5rem);
}

@media (min-width: 900px) {
  .band__inner--split { grid-template-columns: 1.4fr 1fr; }
}

.band__lede {
  max-width: 62ch;
  color: #2a2838;
  font-size: 1.05rem;
}

/* ---------- services ---------- */

.services {
  max-width: var(--maxw);
  margin: clamp(1.8rem, 4vw, 3rem) auto 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

@media (min-width: 720px) {
  .services { grid-template-columns: 1fr 1fr; column-gap: clamp(1.5rem, 4vw, 3.5rem); }
}

.svc {
  padding: 1.5rem 0 1.6rem;
  border-bottom: 1px solid var(--rule);
}

.svc__num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--ink-a);
  margin: 0 0 0.5rem;
}

.svc h3 { letter-spacing: -0.015em; }

.svc p {
  color: #35334a;
  font-size: 0.98rem;
  margin: 0;
}

/* ---------- full-bleed images ---------- */

.bleed {
  margin: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.bleed img {
  width: 100%;
  height: clamp(220px, 42vw, 560px);
  object-fit: cover;
}

/* ---------- gallery ---------- */

.gallery {
  max-width: var(--maxw);
  margin: clamp(1.8rem, 4vw, 3rem) auto 0;
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
}

@media (min-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; }
}

.gallery__item { margin: 0; }

.gallery__item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 2px solid var(--ink);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery__item:nth-child(odd) img { box-shadow: 8px 8px 0 var(--ink-b); }
.gallery__item:nth-child(even) img { box-shadow: 8px 8px 0 var(--ink-a); }

.gallery__item img:hover {
  transform: translate(-2px, -2px);
  box-shadow: 12px 12px 0 var(--ink);
}

.gallery__item figcaption {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #35334a;
  max-width: 46ch;
}

.gallery__item figcaption strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-b);
  margin-bottom: 0.35rem;
}

/* ---------- facts ---------- */

.facts {
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 1.4rem 1.5rem;
  box-shadow: 8px 8px 0 var(--ink-a);
  align-self: start;
}

.facts h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.facts dl { margin: 0; }

.facts dt {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-b);
  margin-top: 0.9rem;
}

.facts dt:first-child { margin-top: 0; }

.facts dd {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
}

/* ---------- quotes ---------- */

.quotes {
  max-width: var(--maxw);
  margin: clamp(1.8rem, 4vw, 3rem) auto 0;
  display: grid;
  gap: clamp(1.2rem, 3vw, 2rem);
}

@media (min-width: 760px) {
  .quotes { grid-template-columns: 1fr 1fr; }
}

.quotes blockquote {
  margin: 0;
  padding: 1.4rem 1.5rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink-b);
}

.quotes blockquote:nth-child(even) { box-shadow: 6px 6px 0 var(--ink-a); }

.quotes p {
  font-size: 1rem;
  color: #2a2838;
  margin-bottom: 0.9rem;
}

.quotes cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- contact ---------- */

.contact {
  max-width: var(--maxw);
  margin: clamp(1.8rem, 4vw, 3rem) auto 0;
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.4rem);
}

@media (min-width: 860px) {
  .contact { grid-template-columns: 1.1fr 1fr 1fr; }
}

.contact__block {
  border-top: 3px solid var(--ink);
  padding-top: 1.1rem;
}

.contact__block--phone { border-top-color: var(--ink-a); }

.contact__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

.contact__phone {
  display: inline-block;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 4px solid var(--ink-a);
  padding-bottom: 0.1rem;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.contact__phone:hover,
.contact__phone:focus-visible {
  color: var(--ink-b);
  border-bottom-color: var(--ink-b);
}

.contact__note {
  margin-top: 0.9rem;
  font-size: 0.92rem;
  color: #35334a;
}

address {
  font-style: normal;
  font-size: 1rem;
  line-height: 1.6;
}

.hours {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.hours th,
.hours td {
  text-align: left;
  padding: 0.32rem 0;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
}

.hours th { color: var(--muted); }
.hours td { text-align: right; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; }

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

.footer {
  border-top: 3px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: clamp(2rem, 5vw, 3.4rem) var(--pad) 4.5rem;
}

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

.footer__mark {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.footer__mark .amp { color: var(--ink-a); }

.footer__line {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem;
}

.footer__line a { color: var(--ink-a); text-decoration: none; }
.footer__line a:hover { text-decoration: underline; }

.footer__fine {
  font-size: 0.8rem;
  color: rgba(255, 253, 244, 0.62);
  max-width: 60ch;
  margin: 0 0 1.6rem;
}

.claim-banner {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 0.5rem 0.8rem;
  color: rgba(255, 253, 244, 0.82);
  background: rgba(255, 253, 244, 0.09);
  border: 1px solid rgba(255, 253, 244, 0.22);
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.claim-banner:hover,
.claim-banner:focus-visible {
  color: var(--ink);
  background: var(--ink-a);
  border-color: var(--ink-a);
}

/* kwaku attribution — required on free tier */
.attribution {
  position: fixed;
  bottom: 0.5rem;
  right: 0.75rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  opacity: 0.55;
  z-index: 20;
}

.attribution a {
  color: var(--ink);
  text-decoration: none;
  background: rgba(247, 245, 234, 0.9);
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--rule);
}

.attribution a:hover { color: var(--ink-b); }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .breathe {
    animation: none;
    font-variation-settings: "wdth" 92;
  }

  .ticker__track {
    animation: none;
    transform: none;
    flex-wrap: wrap;
    width: auto;
    white-space: normal;
    justify-content: center;
    gap: 1rem;
  }

  .ticker__track span:nth-child(n + 11) { display: none; }

  .callbtn,
  .gallery__item img,
  .contact__phone,
  .claim-banner {
    transition: none;
  }

  .callbtn:hover,
  .gallery__item img:hover {
    transform: none;
  }
}

/* ---------- dark mode ---------- */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12111a;
    --paper: #1c1b26;
    --ink: #f4f1e6;
    --muted: #a9a6bd;
    --rule: rgba(244, 241, 230, 0.18);
  }

  body {
    color: var(--ink);
    background-color: var(--bg);
    background-image:
      radial-gradient(ellipse 70% 55% at 8% -5%, rgba(255, 72, 176, 0.24) 0, transparent 62%),
      radial-gradient(ellipse 65% 60% at 100% 12%, rgba(31, 63, 255, 0.30) 0, transparent 58%),
      radial-gradient(ellipse 80% 50% at 50% 108%, rgba(255, 72, 176, 0.14) 0, transparent 60%);
  }

  .hero__lede,
  .band__lede,
  .svc p,
  .gallery__item figcaption,
  .quotes p,
  .contact__note { color: #d9d6e6; }

  .ticker { background: #05050a; border-bottom-color: var(--ink-a); }

  .mark::before { opacity: 0.9; }

  .callbtn {
    color: #0b0b12;
    background: var(--ink-a);
    border-color: var(--ink);
    box-shadow: 4px 4px 0 var(--ink-b);
  }

  .callbtn:hover,
  .callbtn:focus-visible {
    color: #0b0b12;
    background: #ff7ac4;
    box-shadow: 6px 6px 0 var(--ink-b);
  }

  .hero__fig img { box-shadow: 10px 10px 0 var(--ink-b); }

  .facts { box-shadow: 8px 8px 0 var(--ink-b); }

  .quotes blockquote:nth-child(even) { box-shadow: 6px 6px 0 var(--ink-a); }

  .footer { background: #05050a; }

  .attribution a {
    color: var(--ink);
    background: rgba(18, 17, 26, 0.9);
  }

  .attribution a:hover { color: var(--ink-a); }
}
