/* Copperline Plumbing & Drain — synthetic reference demo, KDG Lab #006.
   The clean sheet: last month's lessons designed in from birth. House
   sensibility re-derived from the brief: DM Serif Display + DM Sans, dark
   primary (ink-navy) with copper accent on paper ground, no emojis,
   text-first funnel. Budgets in BUDGETS.md are measured, not asserted. */

/* B2 — the swap must move nothing: web fonts declared swap, with fallback
   faces size-adjusted to the web fonts' own tables (fallback_metrics.py).
   #005 measured font arrival at 0.0016 shift; here it is engineered to 0. */
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Serif Display";
  src: url("/fonts/dm-serif-display-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans Fallback";
  src: local("Arial");
  size-adjust: 105.1153%;
  ascent-override: 94.3725%;
  descent-override: 29.4914%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "DM Serif Display Fallback";
  src: local("Georgia");
  size-adjust: 100.8795%;
  ascent-override: 102.6968%;
  descent-override: 33.2079%;
  line-gap-override: 0%;
}

:root {
  --paper: #f6f3ec;
  --paper-deep: #eee9dc;
  --card: #fffdf8;
  --ink: #1c2830;
  --muted: #52626b;
  --band: #101b24;          /* the dark primary: hero + footer ground */
  --band-deep: #0c141b;
  --copper: #c47a4a;        /* accent on dark grounds */
  --copper-ink: #96521f;    /* accent on paper: holds 4.5:1 */
  --line: #e0d9c7;
  --lab-bg: #14171a;
  --lab-ink: #9aa4a0;
  --lab-accent: #7fc7bc;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", "DM Sans Fallback", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
.wrap { max-width: 768px; margin: 0 auto; padding: 0 24px; }
img, svg { max-width: 100%; }

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

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

h1, h2, h3 { font-family: "DM Serif Display", "DM Serif Display Fallback", Georgia, serif; font-weight: 400; }

/* ---- the $5,000 bar ---- */
.bar {
  background: var(--band-deep);
  color: rgba(246, 243, 236, .92);
  font-size: .8rem;
  letter-spacing: .01em;
  text-align: center;
  padding: 9px 16px;
}
.bar b { color: #fff; font-weight: 700; }
.bar-mark { font-weight: 600; color: #fff; }

/* ---- hero: the dark band, the disciplined image, the scrim ----
   L3: the image is absolutely placed, so it can never size the band — the
   band is sized by its own content and the image can only ever paint, not
   push. Intrinsic width/height still declared in markup. */
.hero {
  position: relative;
  background: var(--band);
  color: var(--paper);
  padding: 58px 0 52px;
  overflow: hidden;
}
.hero-art, .hero-art img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.hero-art { z-index: 0; }
.hero-art img { object-fit: cover; object-position: 68% 42%; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(92deg, rgba(16, 27, 36, .86) 0%, rgba(16, 27, 36, .55) 52%, rgba(16, 27, 36, .18) 100%);
}
.hero-inner { position: relative; z-index: 2; }
.hero .brand {
  font-family: "DM Serif Display", "DM Serif Display Fallback", Georgia, serif;
  font-size: 1.15rem;
  color: var(--copper);
  margin-bottom: 26px;
}
.eyebrow {
  color: rgba(246, 243, 236, .72);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2.4rem, 7.4vw, 3.7rem);
  line-height: 1.05;
  margin-top: 10px;
  letter-spacing: .002em;
  color: #fff;
}
.hero-sub { color: rgba(246, 243, 236, .82); font-size: 1.06rem; max-width: 46ch; margin: 16px 0 28px; }

.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  background: var(--copper);
  color: #131313;
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  padding: 15px 26px;
  border-radius: 10px;
  transition: background-color .15s ease;
}
.btn:hover { background: #d68b59; }
.hero .quiet-call { color: rgba(246, 243, 236, .75); font-size: .95rem; text-decoration-color: rgba(246, 243, 236, .4); text-underline-offset: 3px; }
.hero .quiet-call:hover { color: #fff; }
.hero :focus-visible { outline-color: var(--copper); }

.trust { display: flex; align-items: center; gap: 10px; margin-top: 26px; color: rgba(246, 243, 236, .78); font-size: .9rem; }
.stars { fill: var(--copper); flex: none; }

/* ---- the widget slot: №005's shaper as furniture ---- */
.shaper { padding: 44px 0 10px; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 24px 24px;
  box-shadow: 0 1px 2px rgba(28, 40, 48, .05), 0 10px 30px rgba(28, 40, 48, .05);
}
.panel-eyebrow {
  color: var(--copper-ink);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.panel h2 { font-size: 1.55rem; line-height: 1.18; margin-top: 6px; }
.panel-sub { color: var(--muted); font-size: .95rem; margin-top: 8px; }

/* tap rows: present in the HTML, revealed by html.js before first paint —
   the no-JS band stays complete (headline, written text, standing button) */
.rows { display: none; }
html.js .rows { display: block; margin-top: 20px; }
.row { border: 0; margin: 0 0 16px; }
.row legend {
  color: var(--muted);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 9px;
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pill span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: .94rem;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.pill:hover span { border-color: var(--copper-ink); }
.pill input:checked + span { background: var(--band); border-color: var(--band); color: var(--paper); }
.pill input:focus-visible + span { outline: 2px solid var(--copper-ink); outline-offset: 2px; }

/* the live preview: the message taking shape. Geometry reserved for the
   longest COMPOSABLE message at each width — text changes, geometry doesn't. */
.preview {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px 14px;
  margin-top: 20px;
}
.preview-label {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.preview-msg { font-size: 1.02rem; line-height: 1.5; margin-top: 5px; min-height: 6.05em; }
@media (min-width: 600px) {
  .preview-msg { min-height: 3.05em; }
}

.btn-send { display: block; width: 100%; text-align: center; margin-top: 16px; padding: 16px 20px; text-wrap: balance; }
.btn-send.is-ready { background: #d68b59; box-shadow: 0 0 0 3px rgba(196, 122, 74, .28); }
.panel-call { text-align: center; font-size: .92rem; margin-top: 12px; }
.panel-call a { color: var(--muted); text-decoration-color: rgba(82, 98, 107, .5); text-underline-offset: 3px; }
.panel-fine { color: var(--muted); font-size: .8rem; line-height: 1.55; margin-top: 14px; }

/* ---- services / reviews / area ---- */
.services { padding: 54px 0 8px; }
.services h2, .reviews h2, .area h2 { font-size: 1.7rem; margin-bottom: 20px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 680px) { .cards { grid-template-columns: 1fr; } }
.card, .review {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 18px;
}
.card h3 { font-size: 1.18rem; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: .95rem; }

/* trust surface: undated by design (F10) — no dates, no counts, no badges */
.reviews { background: var(--paper-deep); padding: 50px 0 54px; margin-top: 46px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.review p { font-size: .98rem; }
.review footer { color: var(--muted); font-size: .84rem; margin-top: 12px; }

.area { padding: 50px 0 56px; }
.area-towns { font-family: "DM Serif Display", "DM Serif Display Fallback", Georgia, serif; font-size: 1.2rem; color: var(--ink); }
.area-note { color: var(--muted); font-size: .95rem; margin-top: 10px; }

/* ---- footer ---- */
.foot { background: var(--band); color: rgba(246, 243, 236, .88); padding: 44px 0 34px; }
.foot-brand { font-family: "DM Serif Display", "DM Serif Display Fallback", Georgia, serif; font-size: 1.3rem; color: #fff; }
.foot-line { font-size: .9rem; opacity: .82; margin-top: 6px; }
.foot-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.foot .quiet-call { color: rgba(246, 243, 236, .75); text-decoration-color: rgba(246, 243, 236, .4); text-underline-offset: 3px; }
.foot .quiet-call:hover { color: #fff; }
.foot :focus-visible { outline-color: var(--copper); }
.foot-maker { font-size: .78rem; opacity: .55; margin-top: 24px; }

/* ---- the lab strip: the plate on the frame, not part of the stage ---- */
.labstrip { background: var(--lab-bg); color: var(--lab-ink); font-size: .78rem; line-height: 1.65; padding: 18px 0 26px; }
.labstrip b { color: #d7dcd9; font-weight: 600; }
.labstrip a { color: var(--lab-accent); }
.labstrip-links { margin-top: 8px; }
.labstrip :focus-visible { outline-color: var(--lab-accent); }

/* ---- small rooms ---- */
/* below 700px the hero art leaves the background and takes its own band
   under the text: on a phone, full-bleed art and a left-set headline want
   the same pixels — so they stop sharing them. Same preloaded image, fixed
   band height (no shift), and the scrim retires. */
@media (max-width: 699px) {
  .hero { padding-bottom: 0; }
  .hero-scrim { display: none; }
  .hero-art { position: relative; inset: auto; display: block; height: 176px; margin-top: 34px; }
  .hero-art img { position: static; width: 100%; height: 176px; object-fit: cover; object-position: 50% 48%; }
  .hero-art::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, var(--band) 0%, rgba(16, 27, 36, 0) 36%);
  }
}
@media (max-width: 560px) {
  .hero { padding-top: 46px; }
  .hero .btn, .foot .btn { width: 100%; text-align: center; }
  .cta-row, .foot-cta { gap: 12px; }
  .bar { font-size: .72rem; padding: 8px 12px; }
}

/* ---- L1 + L2: motion exists ONLY as enhancement, and only when wanted ----
   The hiding rule lives inside (prefers-reduced-motion: no-preference) and
   under html.js-reveal — a class stamped by the SAME file that reveals.
   No JS: nothing was ever hidden. Reduced motion: nothing ever moves.     */
@media (prefers-reduced-motion: no-preference) {
  html.js-reveal .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .55s ease .05s, transform .55s ease .05s;
  }
  html.js-reveal .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
