/* Tyler Page Plumbing: black + white stamp look, one copper accent. Mobile first. */

:root {
  --ink: #111111;
  --paper: #f4f0e6;
  --white: #ffffff;
  --accent: #b9480f;        /* copper pipe */
  --accent-dark: #8f3608;
  --muted: #55504a;
  --line: 3px;
  --radius: 10px;
  --display: "Lilita One", "Arial Black", Impact, sans-serif;
  --label: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  padding-bottom: 64px; /* room for the phone call bar */
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
section[id] { scroll-margin-top: 16px; }

.wrap { width: min(100% - 32px, 1080px); margin-inline: auto; }

/* ---------- placeholders (demo only) ---------- */
.ph {
  background: #fff3c9;
  outline: 2px dashed var(--accent);
  outline-offset: 1px;
  border-radius: 3px;
  padding: 0 4px;
  color: var(--ink);
  white-space: nowrap;
}
.section-intro .ph { white-space: normal; }
.ph-on-ink, .ph-on-accent { background: transparent; color: inherit; outline-color: currentColor; }

.demo-ribbon {
  background: var(--accent);
  color: var(--white);
  font-family: var(--label);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .03em;
  text-align: center;
  padding: 6px 12px;
  line-height: 1.7;
}

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; letter-spacing: .01em; }
h1 { font-size: clamp(2.3rem, 9vw, 4rem); }
h2 { font-size: clamp(2rem, 7vw, 3rem); }
h3 { font-size: 1.35rem; }
.eyebrow {
  font-family: var(--label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .95rem;
  color: var(--accent);
  margin-bottom: 8px;
}
.lede { font-size: 1.15rem; margin-top: 14px; max-width: 34em; }
.section-intro { margin-top: 10px; color: var(--muted); max-width: 36em; }
.small { font-size: .95rem; color: var(--muted); margin-top: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 10px 22px;
  font-family: var(--display); font-size: 1.2rem; letter-spacing: .02em;
  text-decoration: none; text-align: center;
  border: var(--line) solid var(--ink); border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-ink { background: var(--ink); color: var(--white); box-shadow: 4px 4px 0 var(--accent); }
.btn-ink:hover { box-shadow: 5px 5px 0 var(--accent); }
.btn-ink:active { box-shadow: 1px 1px 0 var(--accent); }
.btn-line { background: var(--white); color: var(--ink); }
.btn-small { min-height: 44px; padding: 6px 14px; font-size: 1rem; box-shadow: 3px 3px 0 var(--ink); }
.btn-big { width: 100%; font-size: 1.3rem; min-height: 58px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: var(--white);
  border-bottom: var(--line) solid var(--ink);
}
.wordmark { font-family: var(--display); font-size: 1.15rem; line-height: 1; text-decoration: none; text-transform: uppercase; }
.wordmark span { display: block; color: var(--accent); }
.topnav { display: none; }
.topnav a {
  font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  text-decoration: none; padding: 8px 4px;
}
.topnav a:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero { background: var(--paper); position: relative; }
.hero-grid { display: grid; gap: 20px; padding: 28px 0 44px; text-align: center; }
.hero-logo { width: min(100%, 380px); margin-inline: auto; }
.hero-logo img { width: 100%; height: auto; filter: drop-shadow(5px 5px 0 rgba(17, 17, 17, .16)); }
.hero .lede { margin-inline: auto; }
.cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.cta-row .btn-line { grid-column: 1 / -1; }
.hero-phone { margin-top: 16px; font-family: var(--label); font-weight: 600; font-size: 1.15rem; letter-spacing: .04em; }
.hero-phone a { text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* scalloped edge, echoing the feather fan in the logo */
.scallop {
  position: absolute; left: 0; right: 0; bottom: -17px; height: 18px; z-index: 1;
  background: radial-gradient(circle at 18px 0, var(--paper) 17px, transparent 18px) 0 0 / 36px 18px repeat-x;
}
.section-ink .scallop { background-image: radial-gradient(circle at 18px 0, var(--ink) 17px, transparent 18px); }

/* ---------- sections ---------- */
.section { padding: 56px 0 52px; position: relative; }
.section-ink { background: var(--ink); color: var(--white); }
.section-ink .section-intro { color: #cfc9bd; }
.section-ink .eyebrow { color: #f0a070; }
.section-paper { background: var(--paper); border-top: var(--line) solid var(--ink); }

/* ---------- gallery ---------- */
.chips { display: flex; gap: 8px; margin: 20px -16px 16px; padding: 4px 16px 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 40px; padding: 4px 14px;
  font-family: var(--label); font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink); background: var(--white);
  border: 2px solid var(--ink); border-radius: 999px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--white); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; grid-auto-flow: dense; gap: 10px; }
.tile-wide { grid-column: span 2; }
.tile-tall { grid-row: span 2; }
.tile button {
  position: relative; display: block; width: 100%; height: 100%; padding: 0;
  border: var(--line) solid var(--ink); border-radius: var(--radius); overflow: hidden;
  background: var(--paper); color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}
.tile button:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--accent); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile-ph {
  display: grid; place-items: center; width: 100%; height: 100%;
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, rgba(17, 17, 17, .07) 10px 12px),
    var(--paper);
}
.tile-ph-label {
  font-family: var(--label); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent); background: var(--white);
  border: 2px dashed var(--accent); border-radius: 4px; padding: 2px 8px;
  transform: rotate(-4deg); margin-bottom: 44px;
}
.tile-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--ink); color: var(--white);
  padding: 6px 10px 7px; line-height: 1.2;
}
.tile-tag { display: block; font-family: var(--label); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: #f0a070; }
.tile-title { display: block; font-weight: 600; font-size: .92rem; }

/* ---------- services ---------- */
.services { display: grid; gap: 12px; margin-top: 24px; }
.services li {
  border: 2px solid var(--white); border-radius: var(--radius);
  padding: 14px 16px 16px;
}
.services h3 { color: var(--white); margin-bottom: 4px; }
.services li:last-child { border-style: dashed; border-color: #f0a070; }
.services p { color: #cfc9bd; }

/* ---------- service area ---------- */
.area-grid { display: grid; gap: 28px; }
.towns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.towns li {
  font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  border: 2px solid var(--ink); border-radius: 999px; padding: 4px 14px;
}
.towns li.ph { border: 0; border-radius: 999px; }
.utah { width: min(60%, 230px); margin-inline: auto; text-align: center; }
.utah-shadow { fill: var(--accent); }
.utah-shape { fill: var(--paper); stroke: var(--ink); stroke-width: 6; stroke-linejoin: round; }
.utah-pin path { fill: var(--ink); }
.utah-pin circle { fill: var(--paper); }
.utah text { font-family: var(--display); font-size: 34px; fill: var(--ink); letter-spacing: 2px; }
.utah figcaption { margin-top: 10px; font-size: .9rem; }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 32px; }
.contact-actions { display: grid; gap: 14px; margin-top: 22px; }
.facts { margin-top: 26px; border-top: 2px solid var(--ink); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 2px solid var(--ink); }
.facts dt { font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.facts dd { text-align: right; }

.quote-form {
  display: grid; gap: 14px;
  background: var(--white);
  border: var(--line) solid var(--ink); border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 20px 18px 22px;
}
.quote-form label { display: grid; gap: 5px; font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .95rem; }
.optional { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--muted); display: inline; }
.quote-form input, .quote-form select, .quote-form textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  font: 400 1rem/1.4 var(--body); letter-spacing: 0; text-transform: none; color: var(--ink);
  background: var(--white); border: 2px solid var(--ink); border-radius: 8px;
}
.quote-form textarea { resize: vertical; }
.quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.form-status:empty { display: none; }
.form-status { padding: 10px 12px; border-radius: 8px; font-weight: 600; border: 2px dashed var(--accent); background: #fff3c9; }
.form-status[data-state="error"] { border-style: solid; background: #fde7df; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--white); padding: 36px 0 28px; }
.footer-grid { display: grid; gap: 20px; }
.footer-name { font-family: var(--display); font-size: 1.5rem; text-transform: uppercase; margin-bottom: 6px; }
.footer-links { display: grid; gap: 8px; font-family: var(--label); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.footer-links a { padding: 4px 0; }
.footer-fine { margin-top: 24px; padding-top: 16px; border-top: 1px solid #444; font-size: .85rem; color: #b8b2a6; }

/* ---------- phone call bar ---------- */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  background: var(--ink); border-top: var(--line) solid var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
}
.callbar a {
  display: grid; place-items: center; min-height: 56px;
  font-family: var(--display); font-size: 1.15rem; letter-spacing: .03em;
  color: var(--white); text-decoration: none;
  border-left: 1px solid #444;
}
.callbar a:first-child { background: var(--accent); border-left: 0; }

/* ---------- photo viewer ---------- */
.viewer {
  width: min(94vw, 900px); padding: 0; border: var(--line) solid var(--white); border-radius: var(--radius);
  background: var(--ink); color: var(--white); overflow: hidden;
}
.viewer::backdrop { background: rgba(0, 0, 0, .82); }
.viewer-stage { height: min(62vh, 560px); background: var(--paper); }
.viewer-stage img { width: 100%; height: 100%; object-fit: contain; background: var(--ink); }
.viewer-stage .tile-ph-label { font-size: 1.1rem; margin: 0; }
.viewer-bar { display: flex; align-items: center; gap: 10px; padding: 8px; }
.viewer-bar p { flex: 1; text-align: center; font-weight: 600; font-size: .95rem; line-height: 1.25; }
.viewer button {
  width: 48px; height: 48px; flex: none;
  font: 400 1.4rem/1 var(--body); color: var(--white); background: var(--accent);
  border: 2px solid var(--white); border-radius: 8px; cursor: pointer;
}
.viewer-close { position: absolute; top: 8px; right: 8px; z-index: 1; background: var(--ink) !important; }

/* ---------- tablet and up ---------- */
@media (min-width: 720px) {
  body { font-size: 18px; padding-bottom: 0; }
  .callbar { display: none; }
  .topbar { padding: 12px 24px; }
  .topnav { display: flex; gap: 22px; }
  .wordmark { font-size: 1.3rem; }

  .hero-grid { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px; padding: 64px 0 80px; text-align: left; }
  .hero-logo { order: 2; width: 100%; background: var(--white); border: var(--line) solid var(--ink); border-radius: 16px; box-shadow: 10px 10px 0 var(--ink); padding: 36px 28px; transform: rotate(2deg); }
  .hero-logo img { filter: none; }
  .hero .lede { margin-inline: 0; }
  .cta-row { display: flex; flex-wrap: wrap; }

  .section { padding: 88px 0 80px; }
  .chips { margin-inline: 0; padding-inline: 0; }
  .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 14px; }
  .tile-title { font-size: 1rem; }
  .services { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .area-grid { grid-template-columns: 1.4fr 1fr; align-items: center; }
  .utah { width: 240px; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
  .footer-grid { grid-template-columns: 1fr auto; }
  .footer-links { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .tile button { transition: none; }
}
