/* Pipe Connection Plumbing — preview site stylesheet
   Idea: the work-order ticket clipped to a plumber's copper work.
   Palette: deep shop-green ground, warm ticket paper, copper, paint-red, ink.
   Type: Fraunces (display) + Manrope (UI/body). Self-hosted, see fonts/. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-italic-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #0d221e;
  --night-2: #14342e;
  --paper: #fbf6ee;
  --copper: #e8a66d;
  --copper-deep: #b4531c;
  --copper-dark: #8c3d12;
  --red: #d34b2e;
  --red-dark: #b53a22;
  --ink: #1b2422;
  --ink-soft: #4a5551;
  --rule: rgba(13, 34, 30, 0.14);
  --rule-strong: rgba(13, 34, 30, 0.28);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-ui: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step-0: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.65rem, 1.45rem + 1vw, 2.25rem);
  --step-3: clamp(2.25rem, 1.85rem + 2vw, 3.5rem);
  --step-4: clamp(2.9rem, 2.1rem + 3.4vw, 5.25rem);

  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1.25rem;
  --space-4: 2rem;
  --space-5: 3.25rem;
  --space-6: 5rem;

  --wrap: 70rem;
  --tap: 44px;
  --radius: 4px;
  --focus: 3px solid var(--red);
  --focus-dark: 3px solid var(--copper);
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-2);
  text-wrap: balance;
}

p {
  margin: 0 0 var(--space-2);
  max-width: 62ch;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

address {
  font-style: normal;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.accent {
  color: var(--copper);
  font-style: italic;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  max-width: 44ch;
}

.small {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -4rem;
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  background: var(--paper);
  color: var(--night);
  font-weight: 700;
  border: 2px solid var(--night);
  border-radius: var(--radius);
  transition: top 0.15s ease-out;
}

.skip-link:focus {
  top: var(--space-2);
}

:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

.band--night :focus-visible,
.site-footer :focus-visible {
  outline: var(--focus-dark);
}

.site-header {
  background: var(--night);
  border-bottom: 1px solid rgba(232, 166, 109, 0.22);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--paper);
  min-height: var(--tap);
}

.brand__mark {
  flex: none;
  color: var(--copper);
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.brand__name em {
  font-style: italic;
  color: var(--copper);
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 0.95rem;
  color: var(--paper);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: border-color 0.15s ease-out, background-color 0.15s ease-out;
}

.site-nav a:hover {
  border-color: rgba(232, 166, 109, 0.55);
  background: rgba(232, 166, 109, 0.12);
}

.site-nav a[aria-current="page"] {
  background: rgba(232, 166, 109, 0.18);
  border-color: rgba(232, 166, 109, 0.7);
}

/* ---- bands: the page is built from full-bleed colour bands ---- */

.band {
  position: relative;
  padding: var(--space-5) var(--space-3);
}

.band__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  position: relative;
}

.band--night {
  background: var(--night);
  color: var(--paper);
}

.band--night .lede,
.band--night .small {
  color: rgba(251, 246, 238, 0.82);
}

.band--paper {
  background: var(--paper);
  color: var(--ink);
  /* ruled work-order ground */
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 3.15rem,
    var(--rule) 3.15rem calc(3.15rem + 1px)
  );
}

.band--copper {
  background: var(--copper-deep);
  color: var(--paper);
}

.band--copper .lede,
.band--copper .small {
  color: rgba(251, 246, 238, 0.9);
}

/* ---- seams: a torn/ruled edge between bands ---- */

.seam {
  height: 10px;
  background:
    repeating-linear-gradient(90deg, var(--copper) 0 14px, var(--copper-dark) 14px 28px);
  border-top: 2px solid var(--night);
  border-bottom: 2px solid var(--night);
}

.seam--copper {
  background:
    repeating-linear-gradient(90deg, var(--night) 0 14px, var(--night-2) 14px 28px);
}

/* ---- ticket chips: the stamped marks on a work ticket ---- */

.ticket-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-3);
}

.pin {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 32px;
  padding: 0.25rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1.5px solid var(--copper);
  border-radius: 999px;
  color: var(--copper);
  background: rgba(232, 166, 109, 0.1);
}

.pin__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(211, 75, 46, 0.35);
}

.ticket-mark {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--copper-dark);
  margin: 0 0 0.35rem;
}

.band--night .ticket-mark {
  color: var(--copper);
}

.band--copper .ticket-mark {
  color: var(--paper);
  opacity: 0.85;
}

/* ---- call button: the loudest object on every screen ---- */

.call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.75rem 1.5rem;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 2px solid var(--red-dark);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 0 var(--red-dark);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background-color 0.15s ease-out;
}

.call-btn:hover {
  background: var(--red-dark);
}

.call-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 0 var(--red-dark);
}

.call-btn--wide {
  width: 100%;
  max-width: 26rem;
}

.call-btn__icon {
  flex: none;
  color: var(--paper);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* ---- hero: the name plate over a drawn pipe run ---- */

.hero__grid {
  display: grid;
  gap: var(--space-4);
}

.hero h1 {
  font-size: var(--step-4);
  max-width: 16ch;
}

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

.pipe-run {
  display: block;
  width: 100%;
  height: auto;
  max-width: 560px;
}

.pressure-line {
  stroke-dasharray: 12 16;
  animation: pressure 2.4s linear infinite;
}

@keyframes pressure {
  to {
    stroke-dashoffset: -28;
  }
}

.tag-swing {
  transform-origin: 466px 84px;
  animation: swing 3.6s ease-in-out infinite alternate;
}

@keyframes swing {
  from {
    transform: rotate(-2.2deg);
  }
  to {
    transform: rotate(2.2deg);
  }
}

/* ---- numbered ticket list ---- */

.section-intro {
  margin-bottom: var(--space-4);
  max-width: 40rem;
}

.section-intro h2 {
  font-size: var(--step-2);
}

.ticket-list {
  display: grid;
  gap: var(--space-3);
  counter-reset: ticket;
}

.ticket-list li {
  counter-increment: ticket;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-3);
  background: var(--paper);
  border: 1.5px solid var(--rule-strong);
  border-left: 6px solid var(--copper-deep);
  border-radius: var(--radius);
}

.ticket-list li::before {
  content: counter(ticket, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 700;
  line-height: 1;
  color: var(--copper-deep);
}

.ticket-list h3 {
  font-size: var(--step-1);
  margin: 0 0 0.25rem;
}

/* ---- address ticket ---- */

.address-ticket {
  display: grid;
  gap: var(--space-4);
}

.address-lines {
  display: grid;
  gap: 0.15rem;
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.35;
  margin-bottom: var(--space-3);
}

.address-lines .city {
  color: var(--copper);
  font-style: italic;
}

.band--copper .address-lines .city {
  color: var(--paper);
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: var(--tap);
  padding: 0.45rem 1.15rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--night);
  background: var(--paper);
  border: 2px solid var(--night);
  border-radius: var(--radius);
  transition: transform 0.12s ease-out, background-color 0.15s ease-out;
}

.map-link:hover {
  background: var(--copper);
}

.map-link:active {
  transform: translateY(2px);
}

.address-art {
  margin: 0;
}

.address-art svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 360px;
  border: 2px solid rgba(251, 246, 238, 0.35);
  border-radius: var(--radius);
  background: var(--night-2);
}

/* ---- phone band: the number as the picture ---- */

.phone-band {
  text-align: center;
}

.phone-band .band__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.phone-band__number {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 1.5rem + 3vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.phone-band .call-btn {
  margin-top: var(--space-2);
}

/* ---- contact page: two slips side by side ---- */

.reach-grid {
  display: grid;
  gap: var(--space-4);
}

.phone-slip {
  padding: var(--space-3);
  background: var(--paper);
  border: 1.5px solid var(--rule-strong);
  border-top: 6px solid var(--red);
  border-radius: var(--radius);
}

.phone-slip h2,
.reach-grid h2 {
  font-size: var(--step-2);
}

.phone-slip .phone-band__number {
  text-align: left;
  font-size: var(--step-2);
  margin-bottom: var(--space-1);
}

.phone-slip a {
  color: var(--copper-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.phone-slip a:hover {
  color: var(--red);
}

.contact-hero h1 {
  font-size: var(--step-3);
  max-width: 18ch;
}

/* ---- footer: the quiet stamp at the bottom ---- */

.site-footer {
  background: var(--night);
  color: var(--paper);
  padding: var(--space-4) var(--space-3) var(--space-3);
  border-top: 6px solid var(--copper-deep);
}

.site-footer__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  gap: var(--space-3);
  justify-items: start;
}

.site-footer__seal {
  color: var(--copper);
}

.site-footer__phone {
  font-family: var(--font-display);
  font-size: var(--step-1);
  margin: 0 0 0.25rem;
  font-variant-numeric: tabular-nums;
}

.site-footer__phone a {
  color: var(--copper);
  text-decoration: none;
}

.site-footer__phone a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.site-footer .small {
  color: rgba(251, 246, 238, 0.75);
}

.site-footer__nav ul {
  display: flex;
  gap: var(--space-1);
}

.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 0.75rem;
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
}

.site-footer__nav a:hover,
.site-footer__nav a[aria-current="page"] {
  border-bottom-color: var(--copper);
}

.preview-note {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  width: 100%;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(251, 246, 238, 0.85);
  background: rgba(211, 75, 46, 0.18);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---- responsive ---- */

@media (min-width: 40rem) {
  .ticket-list {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
  }

  .ticket-list li {
    grid-template-columns: 1fr;
    min-height: 100%;
  }
}

@media (min-width: 52rem) {
  .band {
    padding: var(--space-6) var(--space-4);
  }

  .band__inner--split,
  .hero__grid {
    grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
    align-items: center;
    display: grid;
  }

  .reach-grid {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: start;
    gap: var(--space-5);
  }

  .address-ticket {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: var(--space-5);
  }

  .address-art {
    justify-self: end;
    width: 100%;
  }

  .site-footer__inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-4);
    padding-bottom: var(--space-3);
  }

  .preview-note {
    grid-column: 1 / -1;
  }
}

@media (min-width: 72rem) {
  .hero h1 {
    font-size: var(--step-4);
  }
}
