/* ABC Heating & Cooling — "Precision Instrument" layout primitive.
   Full-bleed split-screen hero + inline readout stats, not a centered
   container + card grid. Own CSS variables and class taxonomy — see
   img/SOURCES.md and README.md for the rest of the build notes. */

:root {
  --graphite: #171b20;
  --graphite-2: #1f252c;
  --steel: #3b4753;
  --steel-light: #64727f;
  --ice: #3fb6d3;
  --ice-dim: #2b8aa3;
  --ember: #e2661f;
  --ember-dim: #b84f16;
  --frost: #f5f8fa;
  --fog: #e7edf0;
  --ink: #1a1f24;
  --mute: #5b6670;

  --font-display: 'Space Grotesk', sans-serif;
  --font-text: 'Karla', sans-serif;

  --curve: 10px;
  --lift: 0 16px 36px rgba(23, 27, 32, 0.24);
  --measure: 62ch;
  --edge: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--frost);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.4em;
  color: var(--graphite);
}

p { margin: 0 0 1em; max-width: var(--measure); color: var(--mute); }

a { color: var(--ice-dim); }

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

button { font-family: inherit; cursor: pointer; }

/* ---------- Buttons ---------- */
.gauge {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: var(--curve);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gauge:hover { transform: translateY(-2px); }
.gauge--ember { background: var(--ember); color: #fff; box-shadow: 0 10px 22px rgba(226, 102, 31, 0.35); }
.gauge--ember:hover { background: var(--ember-dim); }
.gauge--ice { background: var(--ice); color: var(--graphite); }
.gauge--ice:hover { background: var(--ice-dim); color: #fff; }
.gauge--outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.gauge--outline:hover { border-color: #fff; }
.gauge--ghost { background: transparent; color: var(--graphite); border-color: var(--graphite); }
.gauge--ghost:hover { background: var(--graphite); color: #fff; }
.gauge--full { width: 100%; justify-content: center; }

/* ---------- Topbar ---------- */
.ribbon {
  background: var(--graphite);
  color: var(--fog);
  font-size: 0.82rem;
}
.ribbon-inner {
  padding: 0.5em var(--edge);
  display: flex;
  justify-content: space-between;
  gap: 1em;
  flex-wrap: wrap;
}

/* ---------- Masthead: console ---------- */
.console {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 248, 250, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(23, 27, 32, 0.08);
}
.console-row {
  padding: 0.9em var(--edge);
  display: flex;
  align-items: center;
  gap: 2em;
}
.mark {
  display: flex;
  align-items: center;
  gap: 0.6em;
  text-decoration: none;
  color: var(--graphite);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  margin-right: auto;
}
.mark svg { flex: none; color: var(--ice-dim); }
.dials {
  display: flex;
  gap: 1.6em;
}
.dials a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
}
.dials a:hover { color: var(--ice-dim); }
.ring {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: var(--ember);
  color: #fff;
  padding: 0.6em 1.2em;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}
.ring:hover { background: var(--ember-dim); }
.toggle-vent {
  background: none;
  border: none;
  padding: 0.4em;
  display: none;
}
.toggle-vent span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--graphite);
  margin: 5px 0;
}
.dials.is-open { display: flex; }

@media (max-width: 860px) {
  .dials {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--frost);
    flex-direction: column;
    padding: 1em var(--edge) 1.4em;
    border-bottom: 1px solid rgba(23, 27, 32, 0.08);
    gap: 0.9em;
  }
  .toggle-vent { display: block; }
}

/* ---------- Hero: split ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 80vh;
}
.split-photo {
  position: relative;
  overflow: hidden;
}
.split-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(23, 27, 32, 0) 60%, rgba(23, 27, 32, 0.5) 100%);
}
.split-content {
  background: var(--graphite);
  color: var(--frost);
  padding: clamp(2.4em, 6vw, 4em) var(--edge);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split-content .status-line {
  font-family: var(--font-display);
  color: var(--ice);
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  text-transform: uppercase;
  margin-bottom: 0.8em;
}
.split-content h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
}
.split-content p { color: rgba(245, 248, 250, 0.78); }
.split-actions { display: flex; gap: 0.9em; flex-wrap: wrap; margin: 1.2em 0 1.6em; }
.split-readout {
  display: flex;
  gap: 2em;
  border-top: 1px solid rgba(245, 248, 250, 0.15);
  padding-top: 1.3em;
}
.split-readout div { display: flex; flex-direction: column; }
.split-readout strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--ice);
}
.split-readout span { font-size: 0.78rem; color: rgba(245, 248, 250, 0.65); text-transform: uppercase; letter-spacing: 0.04em; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split-photo { min-height: 42vh; }
}

/* ---------- Readout band ---------- */
.readout-band {
  background: var(--graphite-2);
  color: var(--fog);
}
.readout-inner {
  padding: 1em var(--edge);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 2.4em;
  justify-content: center;
  font-size: 0.9rem;
  text-align: center;
}
.readout-inner span { white-space: nowrap; }
.readout-inner strong { color: var(--ice); font-family: var(--font-display); }

/* ---------- System Diagnostic (bespoke) ---------- */
.triage {
  padding: clamp(3em, 7vw, 5.5em) var(--edge);
  background: var(--fog);
}
.triage-frame { max-width: 980px; margin: 0 auto; }
.triage-lead {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.9em;
}
.triage-picker {
  display: flex;
  gap: 0.6em;
  flex-wrap: wrap;
  margin-bottom: 1.6em;
}
.triage-btn {
  background: #fff;
  border: 1.5px solid rgba(23, 27, 32, 0.14);
  padding: 0.75em 1.2em;
  border-radius: var(--curve);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.triage-btn .urgency-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ice);
  flex: none;
}
.triage-btn[data-urgency="high"] .urgency-dot { background: var(--ember); }
.triage-btn[aria-selected="true"] {
  border-color: var(--graphite);
  background: var(--graphite);
  color: #fff;
}
.triage-sheet {
  background: #fff;
  border-radius: var(--curve);
  padding: clamp(1.6em, 4vw, 2.6em);
  box-shadow: var(--lift);
}
.triage-sheet h3 { font-size: 1.35rem; margin-bottom: 0.3em; }
.triage-urgency {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3em 0.8em;
  border-radius: 999px;
  margin-bottom: 1em;
}
.triage-urgency[data-level="high"] { background: rgba(226, 102, 31, 0.14); color: var(--ember-dim); }
.triage-urgency[data-level="normal"] { background: rgba(63, 182, 211, 0.14); color: var(--ice-dim); }
.triage-notes { list-style: none; margin: 0 0 1.4em; padding: 0; display: grid; gap: 0.7em; }
.triage-notes li { padding-left: 1.6em; position: relative; color: var(--ink); }
.triage-notes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--ice);
}

/* ---------- Services: deck ---------- */
.deck-section {
  padding: clamp(3em, 7vw, 5.5em) 0 clamp(3em, 7vw, 5.5em) var(--edge);
}
.deck-open {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  max-width: 46ch;
  margin-bottom: 1.2em;
  padding-right: var(--edge);
}
.deck {
  display: flex;
  gap: 1.2em;
  overflow-x: auto;
  padding-bottom: 0.8em;
  padding-right: var(--edge);
  scroll-snap-type: x proximity;
}
.deck-card {
  flex: 0 0 260px;
  background: #fff;
  border: 1px solid rgba(23, 27, 32, 0.1);
  border-radius: var(--curve);
  padding: 1.6em;
  scroll-snap-align: start;
}
.deck-card .num { font-family: var(--font-display); color: var(--steel-light); font-size: 0.85rem; }
.deck-card h3 { font-size: 1.05rem; margin: 0.4em 0 0.3em; }
.deck-card .response { font-size: 0.78rem; font-weight: 700; color: var(--ember-dim); text-transform: uppercase; letter-spacing: 0.03em; display: block; margin-bottom: 0.6em; }
.deck-card p { font-size: 0.9rem; margin: 0; }

/* ---------- Maintenance plan: coverage ---------- */
.coverage-section {
  padding: clamp(3em, 7vw, 5.5em) var(--edge);
  background: var(--graphite);
  color: var(--frost);
}
.coverage-frame {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3em;
  align-items: center;
}
.coverage-frame h2 { color: #fff; }
.coverage-frame p { color: rgba(245, 248, 250, 0.75); }
.coverage-rows { border-top: 1px solid rgba(245, 248, 250, 0.15); }
.coverage-row {
  display: flex;
  justify-content: space-between;
  padding: 0.9em 0;
  border-bottom: 1px solid rgba(245, 248, 250, 0.15);
  font-size: 0.95rem;
}
.coverage-row span:first-child { color: rgba(245, 248, 250, 0.85); }
.coverage-row span:last-child { color: var(--ice); font-weight: 700; }
@media (max-width: 800px) {
  .coverage-frame { grid-template-columns: 1fr; }
}

/* ---------- Service ticket log (bespoke) ---------- */
.ticket-section {
  padding: clamp(3em, 7vw, 5.5em) var(--edge);
}
.ticket-open {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  max-width: 46ch;
  margin-bottom: 1em;
}
.ticket-filter {
  display: flex;
  gap: 0.6em;
  flex-wrap: wrap;
  margin-bottom: 1.6em;
}
.ticket-filter button {
  background: var(--frost);
  border: 1.5px solid rgba(23, 27, 32, 0.14);
  color: var(--ink);
  padding: 0.55em 1.1em;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.ticket-filter button[aria-pressed="true"] {
  background: var(--graphite);
  border-color: var(--graphite);
  color: #fff;
}
.ticket-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2em;
}
.ticket-card {
  border: 1.5px dashed rgba(23, 27, 32, 0.22);
  border-radius: var(--curve);
  overflow: hidden;
  background: #fff;
}
.ticket-card img { aspect-ratio: 4 / 3; object-fit: cover; }
.ticket-body { padding: 1em 1.2em 1.2em; }
.ticket-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--steel-light);
  margin-bottom: 0.4em;
}
.ticket-body h3 { font-size: 1rem; margin: 0; }
.ticket-card.is-hidden { display: none; }
@media (max-width: 900px) { .ticket-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ticket-grid { grid-template-columns: 1fr; } }

/* ---------- Reviews: spread ---------- */
.spread-section {
  padding: clamp(3em, 7vw, 5.5em) var(--edge);
  background: var(--fog);
}
.spread-frame { max-width: 900px; margin: 0 auto; }
.spread-open {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  margin-bottom: 2em;
  flex-wrap: wrap;
}
.spread-open .rating-num { font-family: var(--font-display); font-size: 2.4rem; color: var(--graphite); }
.spread-open .rating-note { color: var(--mute); font-size: 0.95rem; }
.spread-set { display: grid; gap: 2.2em; }
.spread-item {
  display: grid;
  grid-template-columns: 3.5em 1fr;
  gap: 1.2em;
}
.spread-item:nth-child(even) { grid-template-columns: 1fr 3.5em; }
.spread-item:nth-child(even) .spread-quote { order: 1; }
.spread-item:nth-child(even) .spread-mark { order: 2; }
.spread-mark {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--ice);
  line-height: 1;
}
.spread-quote p { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; color: var(--ink); margin-bottom: 0.5em; }
.spread-who { font-size: 0.85rem; color: var(--mute); }
@media (max-width: 700px) {
  .spread-item, .spread-item:nth-child(even) { grid-template-columns: 2.5em 1fr; }
  .spread-item:nth-child(even) .spread-quote { order: 0; }
  .spread-item:nth-child(even) .spread-mark { order: -1; }
}

/* ---------- Service area: zone ---------- */
.zone-section { padding: clamp(2em, 5vw, 3em) var(--edge); text-align: center; }
.zone-tags { display: flex; flex-wrap: wrap; gap: 0.6em; justify-content: center; margin-top: 1em; }
.zone-tags span { background: var(--fog); color: var(--ink); padding: 0.5em 1em; border-radius: 999px; font-size: 0.88rem; }

/* ---------- Closer CTA: signal ---------- */
.signal {
  position: relative;
  padding: clamp(4em, 10vw, 7em) var(--edge);
  color: #fff;
  text-align: center;
  overflow: hidden;
  background: var(--graphite);
}
.signal-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(23, 27, 32, 0.2) 0%, rgba(23, 27, 32, 0.85) 70%);
  z-index: 0;
}
.signal-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 140%;
  background: radial-gradient(circle, rgba(63, 182, 211, 0.25), transparent 70%);
  z-index: 0;
}
.signal-content { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; }
.signal h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.signal .dial-big {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: #fff;
  text-decoration: none;
  margin: 0.5em 0 1.1em;
}
.signal-actions { display: flex; gap: 1em; justify-content: center; flex-wrap: wrap; }

/* ---------- Contact + footer ---------- */
.panel-section {
  padding: clamp(3em, 7vw, 5.5em) var(--edge);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3em;
}
.panel-section .dial-lead {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  display: block;
  margin-bottom: 0.3em;
  text-decoration: none;
  color: var(--graphite);
}
.readingsfield { margin-bottom: 1em; }
.readingsfield label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 0.35em; }
.readingsfield input, .readingsfield select, .readingsfield textarea {
  width: 100%;
  padding: 0.75em 0.9em;
  border: 1.5px solid rgba(23, 27, 32, 0.18);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--ink);
}
.readingsfield input:focus, .readingsfield select:focus, .readingsfield textarea:focus {
  border-color: var(--ice-dim);
  outline: none;
}
.wire-note { font-size: 0.85rem; margin-top: 0.8em; min-height: 1.2em; }
.wire-note[data-state="ok"] { color: var(--ice-dim); }
.wire-note[data-state="err"] { color: var(--ember-dim); }
.readout-list { list-style: none; margin: 0; padding: 0; }
.readout-item { margin-bottom: 1.3em; }
.readout-item strong { display: block; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--steel-light); margin-bottom: 0.25em; }
.readout-item a, .readout-item span { color: var(--ink); text-decoration: none; font-size: 1.02rem; }
.readout-item a:hover { color: var(--ice-dim); }
@media (max-width: 800px) { .panel-section { grid-template-columns: 1fr; } }

.base {
  background: var(--graphite);
  color: var(--fog);
  padding: 3em var(--edge) 2em;
}
.base-top { display: flex; flex-wrap: wrap; gap: 2.5em; justify-content: space-between; margin-bottom: 2em; }
.base .mark { color: #fff; }
.base-tagline { max-width: 32ch; color: var(--steel-light); font-size: 0.92rem; }
.base-nav { display: flex; flex-direction: column; gap: 0.6em; }
.base-nav a { color: var(--fog); text-decoration: none; font-size: 0.92rem; }
.base-nav a:hover { color: #fff; }
.base-bottom {
  border-top: 1px solid rgba(245, 248, 250, 0.12);
  padding-top: 1.4em;
  font-size: 0.8rem;
  color: var(--steel-light);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6em;
}

/* ---------- Persistent CTA: alert-bar ---------- */
.alert-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--ember);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.9em;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 -6px 18px rgba(23, 27, 32, 0.2);
}
.alert-bar strong { font-family: var(--font-display); }

@media (min-width: 861px) {
  .alert-bar { display: none; }
}
@media (max-width: 860px) {
  body { padding-bottom: 60px; }
}
