/* casselberryhvac.com — "Workshop Estimating Desk"
   Iron, brass, paper. Restyled from the Stitch "Atelier & Spec" design
   import (design-import/atelier_spec/DESIGN.md) — colors, type scale,
   spacing and component shapes only; no copy, facts or numbers were carried
   out of that mockup. This file is the single source of the visual layer;
   build.py only ever emits the class names below.

   Rules of this system, so later edits do not soften it:
   - Absolute squareness. Zero border-radius anywhere, no exceptions.
   - Zero shadows, zero gradients, zero blur. Depth comes from a bounded
     rectangle and a rule weight, never from elevation.
   - Two rule weights only: a 1px hairline (--line-2, iron-rule) for
     ordinary dividers, and a 2px heavy rule (--line, tempered iron) for
     master boundaries — header, footer, section spines, framed panels.
     A 1px brass rule (--brass) marks an active, focused or trade-verified
     boundary. Nothing else.
   - Domine (structural slab serif) carries every heading and every large
     numeric readout. IBM Plex Sans carries body copy and every label —
     labels get their "technical" character from uppercase + letterspacing,
     not from a monospace face; DESIGN.md never specifies one.
   - Numbers are tabular everywhere. The site is an argument made of
     figures, sourced under every one of them.
*/

@import url('https://fonts.googleapis.com/css2?family=Domine:wght@400;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  /* ---- Atelier & Spec palette (design-import/atelier_spec/DESIGN.md) --- */
  --ink:     #1C1C18;   /* on-surface: body copy, high-emphasis text */
  --iron:    #33383B;   /* primary / primary-container: fills, heavy rules, headings */
  --iron-2:  #44474A;   /* on-surface-variant: secondary text, muted labels */
  --iron-3:  #74777A;   /* outline: hairline icons, placeholders */
  --iron-black: #1F2224;/* hover/active fill for primary elements */
  --brass:   #B08A3E;   /* brass-accent: the one accent color */
  --brass-d: #79590F;   /* darker brass: stronger accent text, active state */
  --paper:   #EFEBE4;   /* paper-base: page background, the tactile substrate */
  --panel:   #F7F5F0;   /* paper-surface: raised cells, cards, inputs */
  --panel-2: #E6E2DB;   /* surface-variant: zebra rows, strip headers */
  --line:    #33383B;   /* heavy master rule — 2px, header/footer/frames */
  --line-2:  #D4CEBF;   /* iron-rule — 1px hairline, ordinary dividers */
  --warn-bg: #F4EEDF;   /* brass-wash — callouts, active chips */
  --error:   #BA1A1A;   /* error/critical — used sparingly, emergency states */

  --slab: 'Domine', Georgia, 'Times New Roman', serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;
  /* Labels use the same face as body copy — DESIGN.md's label-sm/md/lg
     scale is IBM Plex Sans throughout. The "technical spec" read comes
     from uppercase + letterspacing, applied per rule below. */
  --mono: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto,
          Arial, sans-serif;

  --wrap: 1080px;
  --m-desktop: 32px;  /* margin-desktop */
  --m-mobile: 16px;   /* margin-mobile */
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--iron); text-decoration-color: var(--brass); text-underline-offset: 3px; }
a:hover { color: var(--brass-d); }

h1, h2, h3, h4 {
  font-family: var(--slab);
  font-weight: 700;
  margin: 0 0 .55em;
  color: var(--ink);
}
/* display / display-mobile: 48px:56 / 34px:40, -0.02em..-0.01em, 700 */
h1 { font-size: clamp(2.125rem, 1.55rem + 2.6vw, 3rem); line-height: 1.16; letter-spacing: -0.02em; }
/* headline-lg / headline-lg-mobile: 32px:40 / 26px:32, -0.01em..0, 700 */
h2 { font-size: clamp(1.625rem, 1.35rem + 1.2vw, 2rem); line-height: 1.24; letter-spacing: -0.01em; }
/* headline-md: 22px:28, 600, no letterspacing */
h3 { font-size: 1.375rem; line-height: 1.27; font-weight: 600; letter-spacing: 0; }
/* headline-sm: 18px:24, 600 */
h4 { font-size: 1.125rem; line-height: 1.33; font-weight: 600; letter-spacing: 0; }

p { margin: 0 0 1.05em; }
strong { font-weight: 700; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--m-mobile); }
.narrow { max-width: 760px; }
@media (min-width: 641px) { .wrap { padding: 0 var(--m-desktop); } }

/* ---- micro-label: brass, uppercase, letterspaced, with a leading rule ---- */
.lab {
  font-family: var(--mono);
  font-size: .625rem;         /* label-sm: 10px */
  line-height: 1;
  letter-spacing: .12em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--brass-d);
  display: block;
  margin: 0 0 .75rem;
}
.lab::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--brass);
  vertical-align: .25em;
  margin-right: 9px;
}

/* ---------------- header ---------------- */
.topbar {
  background: var(--panel);
  color: var(--iron-2);
  font-family: var(--mono);
  font-size: .8125rem;        /* label-lg: 13px */
  font-weight: 600;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--line-2);
  padding: 7px 0;
}
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; justify-content: space-between; }
.topbar a { color: var(--iron-2); text-decoration-color: var(--brass); }
.topbar strong { color: var(--brass-d); }

header.site { border-bottom: 2px solid var(--line); background: var(--paper); }
.head-in { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; margin-right: auto; }
.brand-logo { flex: 0 0 auto; height: 40px; width: auto; display: block; }
.brand b {
  font-family: var(--slab);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.05;
  display: block;
  color: var(--ink);
}
.brand span {
  font-family: var(--mono);
  font-size: .6875rem;        /* label-md: 11px */
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--iron-2);
  display: block;
}

nav.main ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 20px; margin: 0; padding: 0; }
nav.main a {
  font-family: var(--mono);
  font-size: .6875rem;        /* label-md: 11px */
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  display: inline-block;
  color: var(--iron-2);
}
nav.main a:hover { border-bottom-color: var(--brass); color: var(--ink); }
nav.main a[aria-current="page"] { border-bottom-color: var(--iron); color: var(--ink); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: .6875rem;        /* label-md: 11px */
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 22px;
  border: 1px solid var(--iron);
  background: var(--iron);
  color: var(--paper);
  border-radius: 0;
}
.btn:hover { background: var(--iron-black); border-color: var(--brass); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--iron); border: 1px solid var(--iron); }
.btn--ghost:hover { background: var(--warn-bg); color: var(--iron); border-color: var(--iron); }
.btn--pending {
  background: repeating-linear-gradient(135deg, var(--warn-bg), var(--warn-bg) 7px, var(--panel-2) 7px, var(--panel-2) 14px);
  color: var(--iron);
  border: 1px dashed var(--brass-d);
  cursor: default;
}
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4rem 0 0; }

/* ---------------- hero ---------------- */
.hero { border-bottom: 2px solid var(--line); padding: 44px 0; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 40px; align-items: start; }
.hero p.lede { font-size: 1.0625rem; line-height: 1.55; max-width: 58ch; color: var(--iron-2); } /* body-lg: 16px, set relative to base */

/* stat plate — the numbers, boxed and sourced */
.plate { border: 2px solid var(--line); background: var(--panel); }
.plate h3 {
  margin: 0;
  padding: 11px 16px;
  background: var(--iron);
  color: var(--paper);
  font-family: var(--mono);
  font-size: .6875rem;        /* label-md */
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.plate dl { margin: 0; }
.plate .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-2);
}
.plate .row:last-of-type { border-bottom: 0; }
.plate dt { font-size: .875rem; color: var(--iron-2); }
.plate dd { margin: 0; font-family: var(--slab); font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.plate .src {
  padding: 10px 16px;
  border-top: 2px solid var(--line);
  font-family: var(--mono);
  font-size: .6875rem;
  line-height: 1.5;
  color: var(--iron-2);
}

/* ---------------- sections ---------------- */
section { padding: 48px 0; border-bottom: 1px solid var(--line-2); }
section.rule-heavy { border-bottom: 2px solid var(--line); }
section:last-of-type { border-bottom: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ---------------- boxes ---------------- */
.box {
  border: 1px solid var(--line-2);
  background: var(--panel);
  padding: 20px 24px;
}
.box > :last-child { margin-bottom: 0; }
.box h3 { margin-top: 0; }

.box--note {
  border: 1px solid var(--brass);
  background: var(--warn-bg);
}
.box--flat { background: transparent; border-color: var(--line-2); }

.card {
  border: 1px solid var(--line-2);
  background: var(--panel);
  padding: 0;
  display: flex;
  flex-direction: column;
}
.card .cn {
  font-family: var(--mono);
  font-size: .6875rem;        /* label-md */
  font-weight: 600;
  letter-spacing: .12em;
  padding: 7px 16px;
  border-bottom: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--brass-d);
}
.card .cb { padding: 18px; }
.card .cb > :last-child { margin-bottom: 0; }
.card h3 { margin-bottom: .4em; }

/* ---------------- tables ---------------- */
.tblwrap { overflow-x: auto; border: 2px solid var(--line); background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; min-width: 560px; }
caption {
  caption-side: top;
  text-align: left;
  font-family: var(--mono);
  font-size: .6875rem;        /* label-md */
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 9px 14px;
  background: var(--iron);
  color: var(--paper);
}
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
thead th {
  border-bottom: 2px solid var(--line);
  font-family: var(--mono);
  font-size: .6875rem;        /* label-md */
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--iron-2);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:nth-child(even) { background: var(--panel-2); }
.tblwrap + .src, .chartbox + .src, figure .src { margin-top: 8px; }

.src {
  font-family: var(--mono);
  font-size: .6875rem;
  line-height: 1.6;
  color: var(--iron-2);
  margin: 8px 0 0;
}
.src a { color: var(--iron-2); }

/* ---------------- the age bands (signature) ---------------- */
.chartbox { border: 2px solid var(--line); background: var(--panel); padding: 18px 20px 12px; }
.bandrow { display: grid; grid-template-columns: 128px 1fr 62px; gap: 12px; align-items: center; padding: 8px 0; }
.bandrow + .bandrow { border-top: 1px solid var(--line-2); }
.bandrow .bl { font-family: var(--mono); font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--iron-2); }
.bandrow .bv { font-family: var(--slab); font-weight: 700; font-size: 1.02rem; text-align: right; color: var(--ink); }
.bar { height: 20px; background: var(--panel-2); border: 1px solid var(--line-2); position: relative; }
.bar i { display: block; height: 100%; background: var(--iron); }
.bar i.hi { background: var(--brass); }

/* ---------------- checklist / plain lists ---------------- */
ul.plain, ol.plain { padding-left: 1.15em; margin: 0 0 1.05em; }
ul.plain li, ol.plain li { margin-bottom: .5em; }

ul.ticks { list-style: none; padding: 0; margin: 0 0 1.05em; }
ul.ticks li { padding-left: 26px; position: relative; margin-bottom: .55em; }
ul.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .5em;
  width: 12px; height: 12px;
  border: 2px solid var(--brass-d);
}

dl.spec { margin: 0; }
dl.spec dt {
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--iron-2);
  margin-top: 14px;
}
dl.spec dt:first-child { margin-top: 0; }
dl.spec dd { margin: 2px 0 0; }

/* ---------------- FAQ ---------------- */
.faq { border-top: 2px solid var(--line); }
.faq .q { border-bottom: 1px solid var(--line-2); padding: 18px 0; }
.faq .q:last-child { border-bottom: 2px solid var(--line); }
.faq h3 { margin-bottom: .45em; font-size: 1.1rem; }
.faq p:last-child { margin-bottom: 0; }

/* ---------------- pending / handover marker ---------------- */
.need {
  font-family: var(--mono);
  font-size: .84em;
  font-weight: 600;
  border: 1px dashed var(--brass-d);
  background: var(--warn-bg);
  padding: 1px 6px;
  color: var(--brass-d);
  white-space: nowrap;
}

/* ---------------- form: the estimating-desk intake ---------------- */
form.enq { border: 2px solid var(--line); background: var(--panel); padding: 22px 24px; }
form.enq label {
  display: block;
  font-family: var(--mono);
  font-size: .625rem;         /* label-sm: 10px */
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--iron-2);
  margin: 0 0 5px;
}
form.enq .f { margin-bottom: 16px; }
form.enq .hint {
  display: block;
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--brass-d);
  margin: 5px 0 0;
}
form.enq input,
form.enq select,
form.enq textarea {
  width: 100%;
  font: inherit;
  font-family: var(--body);
  font-size: .9375rem;
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--ink);
  border-radius: 0;
  appearance: none;
}
form.enq select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2333383B'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
form.enq textarea { resize: vertical; }
form.enq input:focus,
form.enq select:focus,
form.enq textarea:focus {
  outline: none;
  border-color: var(--iron);
  border-bottom: 3px solid var(--brass);
  padding-bottom: 8px;
}
form.enq button { font: inherit; cursor: pointer; }

/* symptoms / multi-select checklist grid */
.chk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  padding: 12px;
}
form.enq label.chk {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--body);
  font-size: .9rem;
  color: var(--ink);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  cursor: pointer;
  padding: 3px 0;
  margin: 0;
}
.chk input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--iron);
  border: 1px solid var(--iron);
  border-radius: 0;
}

/* data-plate photo triage note */
.platehint {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--warn-bg);
  border: 1px solid var(--brass);
}
.platehint .lab { margin-bottom: .35rem; }
.platehint p { font-size: .875rem; color: var(--iron-2); }

/* ---------------- footer ---------------- */
footer.site { background: var(--iron); color: var(--paper); padding: 42px 0 26px; border-top: 2px solid var(--line); }
.footer-logo {
  height: 36px; width: auto; background: #fff; padding: 6px 12px;
  border-radius: 8px; margin-bottom: 12px; display: block;
}
footer.site a { color: var(--paper); }
footer.site h4 {
  font-family: var(--mono);
  font-size: .6875rem;        /* label-md */
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: .85em;
}
.fgrid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 34px; }
.fgrid ul { list-style: none; margin: 0; padding: 0; }
.fgrid li { margin-bottom: .45em; font-size: .9375rem; }
.fbot {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid #565C60;
  font-family: var(--mono);
  font-size: .6875rem;
  line-height: 1.7;
  color: #BDB6AA;
}
.fbot .need { background: #454B4E; border-color: var(--brass); color: #E4C88A; }

/* ---------------- breadcrumb ---------------- */
.crumb {
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--iron-2);
  padding: 14px 0 0;
}
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

/* ---------------- page head block ---------------- */
.phead { padding: 34px 0 38px; border-bottom: 2px solid var(--line); }
.phead p.lede { font-size: 1.0625rem; line-height: 1.55; max-width: 62ch; margin-bottom: 0; color: var(--iron-2); }

.skip {
  position: absolute; left: -9999px;
  background: var(--iron); color: var(--paper); padding: 10px 16px;
  font-family: var(--mono); font-size: .8rem;
}
.skip:focus { left: 8px; top: 8px; z-index: 20; }

hr.rule { border: 0; border-top: 2px solid var(--line); margin: 34px 0; }

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .fgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .grid-2, .grid-3, .fgrid { grid-template-columns: 1fr; }
  .chk-grid { grid-template-columns: 1fr; }
  section { padding: 36px 0; }
  .head-in { padding: 13px 0; }
  nav.main ul { gap: 2px 14px; }
  .bandrow { grid-template-columns: 96px 1fr 54px; gap: 9px; }
  .bandrow .bl { font-size: .625rem; }
}

@media print {
  .topbar, nav.main, .btns, footer.site .fgrid { display: none; }
  body { background: #fff; font-size: 11pt; }
  .box, .tblwrap, .plate, .chartbox { break-inside: avoid; }
}
