/* Mike HVAC Automation: shared styles */
:root {
  --ink: #10303a;        /* deep line-set teal, used for dark bands and text */
  --ink-soft: #3d5a63;
  --paper: #f3f6f5;      /* cool off-white */
  --white: #ffffff;
  --steel: #c7d1d0;      /* galvanized duct grey, rules and borders */
  --tag: #f2b824;        /* service-tag yellow, the one accent */
  --teal: #2a7774;

  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --body: "Instrument Sans", "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 70rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.625rem); }
h3 { font-size: 1.1875rem; letter-spacing: 0; line-height: 1.25; }

p { margin: 0 0 1em; max-width: 62ch; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--tag);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--tag);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

/* ---------- Header ---------- */
.site-head {
  background: var(--ink);
  color: var(--white);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.wordmark {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.wordmark { white-space: nowrap; }
.wordmark::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--tag);
  flex: none;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.975rem;
}
.site-nav a.plain { text-decoration: none; opacity: 0.85; }
.site-nav a.plain:hover { opacity: 1; text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  padding: 0.85rem 1.35rem;
  border-radius: 6px;
  border: 2px solid transparent;
}
.btn-primary { background: var(--tag); color: var(--ink); }
.btn-primary:hover { background: #ffc93a; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.45); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); }
.btn-small { padding: 0.6rem 1rem; font-size: 0.95rem; }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--white);
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5rem);
}
.hero h1 { max-width: 17ch; }
.hero .lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  max-width: 54ch;
  margin: 1.75rem 0 2.25rem;
  color: #d6e2e1;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* The customer path: one line, six stations */
.path {
  list-style: none;
  margin: clamp(3rem, 7vw, 5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  position: relative;
}
.path::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: calc(100% * 5 / 6);
  height: 3px;
  background: var(--tag);
  transform-origin: left center;
  animation: draw 1.4s cubic-bezier(0.6, 0, 0.2, 1) 0.2s both;
}
.path li {
  position: relative;
  padding: 1.9rem 1rem 0 0;
  font-family: var(--display);
  font-stretch: 105%;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
}
.path li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--tag);
}
.path li:last-child::before { background: var(--tag); }

@keyframes draw {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------- Sections ---------- */
.band { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.band-white { background: var(--white); }
.band-ink { background: var(--ink); color: var(--white); }
.band-ink p { color: #d6e2e1; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.familiar {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  border-top: 1px solid var(--steel);
}
.familiar li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--steel);
  font-weight: 500;
}

/* The system, grouped by where it sits on the customer path */
.system-intro { margin: 1.25rem 0 3rem; font-size: 1.125rem; }

.stages {
  position: relative;
  padding-left: 2.25rem;
}
.stages::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 3px;
  background: var(--tag);
}
.stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
  gap: 1rem clamp(1.5rem, 4vw, 3.5rem);
  padding-bottom: 2.75rem;
}
.stage:last-child { padding-bottom: 0; }
.stage::before {
  content: "";
  position: absolute;
  left: -2.25rem;
  top: 0.15rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--tag);
}
.stage-name {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 0;
}
.parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem clamp(1.5rem, 3vw, 2.5rem);
}
.parts.single { grid-template-columns: minmax(0, 1fr); }
.part h3 { margin-bottom: 0.4rem; }
.part p { font-size: 1rem; color: var(--ink-soft); }

/* Managed for you */
.managed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}
.managed li {
  padding-left: 1.25rem;
  border-left: 3px solid var(--tag);
}
.managed h3 { margin-bottom: 0.3rem; }
.managed p { font-size: 1rem; }

/* What to expect */
.expect {
  background: var(--white);
  border: 1px solid var(--steel);
  border-radius: 10px;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.expect h2 { margin-bottom: 1.25rem; }

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.portrait {
  aspect-ratio: 4 / 5;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ink);
  display: grid;
  place-items: center;
  color: var(--tag);
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 5rem;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.about h2 { margin-bottom: 1rem; }

/* Closing call to action */
.close h2 { max-width: 18ch; }
.close p { margin: 1.25rem 0 2rem; font-size: 1.125rem; }

/* ---------- Footer ---------- */
.site-foot {
  background: #0b242c;
  color: #b9c9c8;
  font-size: 0.95rem;
  padding: 2.5rem 0;
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.site-foot strong { color: var(--white); font-family: var(--display); font-stretch: 112%; }
.site-foot address { font-style: normal; line-height: 1.7; }
.foot-links { display: flex; flex-direction: column; gap: 0.35rem; }

/* ---------- Legal pages ---------- */
.legal { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.legal .wrap { max-width: 46rem; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.5rem; }
.legal .updated { color: var(--ink-soft); margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.375rem; margin: 2.25rem 0 0.6rem; }
.legal ul { padding-left: 1.2rem; margin: 0 0 1em; max-width: 62ch; }
.legal li { margin-bottom: 0.35rem; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .site-nav a.plain { display: none; }
  .wordmark { font-size: 0.9rem; gap: 0.45rem; }
  .site-head .wrap { gap: 0.5rem; }
  .btn-small { padding: 0.55rem 0.7rem; font-size: 0.85rem; white-space: nowrap; }

  .path {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .path::before {
    left: 0.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 3px;
    height: auto;
    transform-origin: center top;
    animation-name: draw-down;
  }
  .path li { padding: 0 0 1.25rem 2rem; }
  .path li:last-child { padding-bottom: 0; }

  .split, .stage, .about { grid-template-columns: minmax(0, 1fr); }
  .parts { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 12rem; }
}

@keyframes draw-down {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .path::before { animation: none; }
}

@media (max-width: 385px) {
  .wordmark { white-space: normal; line-height: 1.15; }
}

/* ---------- Outcome line under each part ---------- */
.part p.gain {
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

/* ---------- Worked example ---------- */
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.story {
  list-style: none;
  margin: 0;
  padding: 0 0 0 2.25rem;
  position: relative;
  counter-reset: step;
}
.story::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 3px;
  background: var(--tag);
}
.story li {
  position: relative;
  padding-bottom: 1.6rem;
}
.story li:last-child { padding-bottom: 0; }
.story li::before {
  content: "";
  position: absolute;
  left: -2.25rem;
  top: 0.15rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--tag);
}
.story li:last-child::before { background: var(--tag); }
.story h3 { margin-bottom: 0.25rem; }
.story p { font-size: 1rem; color: var(--ink-soft); }

.demo {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--steel);
  border-radius: 10px;
  padding: 1.25rem;
}
.demo figcaption {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--steel);
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.demo > h3 { margin-bottom: 1rem; }

.thread-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.thread .note {
  align-self: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 0.25rem;
}
.thread .msg {
  margin: 0;
  max-width: 85%;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.4;
}
.thread .msg.out {
  align-self: flex-end;
  background: var(--ink);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.thread .msg.in {
  align-self: flex-start;
  background: #e6ecea;
  border-bottom-left-radius: 4px;
}

.board-fig { margin-top: clamp(2rem, 5vw, 3.5rem); }
.board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}
.board .col {
  background: var(--paper);
  border-radius: 8px;
  padding: 0.75rem;
}
.board .col-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0 0 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--tag);
}
.board .card {
  background: var(--white);
  border: 1px solid var(--steel);
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--ink-soft);
}
.board .card:last-child { margin-bottom: 0; }
.board .card strong { display: block; color: var(--ink); }

.report-row { margin-top: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.report-head { font-size: 1.5rem; margin-bottom: 0.75rem; }
.report dl { margin: 0; }
.report dl div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--steel);
}
.report dt { font-size: 0.975rem; }
.report dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .story-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Logo in the header ---------- */
.wordmark::before { display: none; }
.wordmark img { width: 2.25rem; height: 2.25rem; border-radius: 50%; flex: none; display: block; }

/* ---------- Mid-page call to action ---------- */
.cta-card {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  background: var(--ink);
  color: var(--white);
  border-radius: 10px;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.cta-card h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
.cta-card p { color: #d6e2e1; margin: 0.9rem 0 1.5rem; }

/* ---------- Report groups ---------- */
.report .group {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 1.1rem 0 0.25rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--tag);
  line-height: 1.2;
}
.report > h3 + .group { margin-top: 0; }
.report dl div { padding: 0.45rem 0; }
.report dl div:first-child { border-top: 0; }
.report dd { font-size: 1.125rem; }

@media (max-width: 760px) {
  .wordmark img { width: 1.9rem; height: 1.9rem; }
}
@media (max-width: 430px) {
  .wordmark { white-space: normal; line-height: 1.15; }
}
