/* Hearth & Flue: a tradesman's site. Warm paper, slab type, a headline card set over the fire. */

:root {
  --soot: #14110e;
  --char: #2a231c;
  --ash: #efe7da;
  --paper: #f8f3ea;
  --ember: #c8400e;
  --brass: #c9a24b;

  --bg: var(--paper);
  --fg: var(--soot);
  --accent: var(--ember);
  --accent-ink: #fff;
  --focus: #8a2c08;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --toggle-radius: 4px;
  --badge-bg: var(--soot);
  --slot-line: rgba(20, 17, 14, .4);
  --slot-pill: var(--soot);

  --display: "Zilla Slab", Rockwell, Georgia, serif;
  --body: "Work Sans", "Helvetica Neue", Arial, sans-serif;
}

body { font-family: var(--body); font-size: 1.0625rem; }

.heading {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  max-width: 20ch;
}
.heading--light { color: var(--paper); }

.button {
  display: inline-block;
  padding: .95rem 1.6rem;
  border: 0;
  border-radius: 4px;
  background: var(--ember);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 #7a2607;
  transition: transform .15s, box-shadow .15s;
}
.button:hover { transform: translateY(2px); box-shadow: 0 2px 0 #7a2607; }
.link { font-weight: 600; text-underline-offset: .3em; }

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
  background: linear-gradient(180deg, rgba(20, 17, 14, .85), rgba(20, 17, 14, 0));
  color: #fff;
  --focus: #fff;
}
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.6rem; text-decoration: none; }
.wordmark span { color: var(--brass); }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2.2rem); }
.site-nav a { font-weight: 600; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: .3em; }
@media (max-width: 46rem) { .site-nav__extra { display: none; } }

/* ---------- Hero: fire behind, paper card in front ---------- */

.hero {
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: 6rem var(--gutter) clamp(4.5rem, 9vh, 6rem);
  --hero-bg: #2a0d02;
}

.hero__content {
  max-width: 40rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 1.5rem 4rem rgba(20, 5, 0, .5);
}
.hero__title { font-family: var(--display); font-weight: 700; font-size: clamp(2.5rem, 6vw, 4.75rem); line-height: .98; letter-spacing: -.02em; }
.hero__lede { margin-top: 1.25rem; font-size: 1.125rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem 1.75rem; margin-top: 1.75rem; }

/* ---------- Trade ---------- */

.trade { padding-block: clamp(4.5rem, 9vw, 8rem); }

.jobs { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
@media (min-width: 54rem) { .jobs { grid-template-columns: repeat(3, 1fr); } }

.job { display: grid; gap: .75rem; align-content: start; padding: 1.75rem; border: 2px solid var(--soot); border-radius: 6px; background: #fff; }
.job h3 { font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1.1; }
.job__price { margin-top: .5rem; padding-top: .9rem; border-top: 2px dashed #b9ad9a; font-weight: 600; color: #8a2c08; }

.record { display: grid; gap: 1.5rem; margin-top: 3.5rem; }
@media (min-width: 40rem) { .record { grid-template-columns: repeat(3, 1fr); } }
.record div { display: flex; flex-direction: column; padding-left: 1.1rem; border-left: 6px solid var(--brass); }
.record dd { font-family: var(--display); font-weight: 700; font-size: clamp(2.8rem, 6vw, 4.5rem); line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- Before / after ---------- */

.work { padding-block: clamp(4.5rem, 9vw, 8rem); background: var(--soot); color: var(--paper); --focus: var(--brass); }
.work__grid { display: grid; gap: 2.5rem clamp(2rem, 6vw, 5rem); align-items: center; }
@media (min-width: 60rem) { .work__grid { grid-template-columns: .8fr 1.2fr; } }
.work__text { max-width: 30rem; margin-top: 1.25rem; color: #d8cdbb; }
.work__flag { display: inline-block; margin-top: 1.25rem; padding: .35rem .8rem; border: 1px dashed var(--brass); border-radius: 4px; font-size: .9rem; color: var(--brass); }

.compare { position: relative; aspect-ratio: 8 / 5; border-radius: 6px; overflow: hidden; --pos: 50%; }
.compare__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.compare__img--after { clip-path: inset(0 0 0 var(--pos)); }
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 4px; margin-left: -2px; background: #fff; pointer-events: none; }
.compare__handle::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 3rem; height: 3rem;
  margin: -1.5rem 0 0 -1.5rem;
  border-radius: 50%;
  background: #fff linear-gradient(90deg, transparent 30%, var(--soot) 30% 36%, transparent 36% 64%, var(--soot) 64% 70%, transparent 70%) center / 100% 40% no-repeat;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
}
.compare__range:focus-visible ~ .compare__handle::after { outline: 3px solid var(--brass); outline-offset: 3px; }
.compare__tag { position: absolute; bottom: .75rem; padding: .2rem .6rem; border-radius: 4px; background: rgba(20, 17, 14, .85); color: #fff; font-size: .85rem; font-weight: 600; pointer-events: none; }
.compare__tag--before { left: .75rem; }
.compare__tag--after { right: .75rem; }

/* ---------- Install: a plain list by default, pinned when motion is welcome ---------- */

.install { background: var(--ash); }
.install__stage { padding: clamp(4.5rem, 9vw, 8rem) var(--gutter); }
.install__bar { display: none; }

.steps { display: grid; gap: 2.5rem; margin-top: 2.5rem; max-width: 46rem; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; }
.step__num { font-family: var(--display); font-weight: 700; font-size: 3.5rem; line-height: .9; color: var(--ember); }
.step h3 { font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1; }
.step__time { margin-top: .5rem; font-weight: 600; color: #8a2c08; }
.step__time + p { margin-top: .75rem; max-width: 32rem; }

@media (prefers-reduced-motion: no-preference) {
  html.js .install { height: 380vh; }
  html.js .install__stage {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-rows: auto 1fr;
    height: 100vh;
    height: 100svh;
    padding-block: clamp(3rem, 8vh, 5.5rem);
    overflow: hidden;
  }
  html.js .install__bar { display: block; height: 10px; margin-top: 1.5rem; border-radius: 5px; background: #d8cdbb; overflow: hidden; }
  html.js .install__bar::after { content: ""; display: block; height: 100%; background: linear-gradient(90deg, var(--brass), var(--ember)); transform-origin: left; transform: scaleX(var(--p, 0)); }

  html.js .steps { position: relative; display: block; margin: 0; max-width: none; }
  html.js .step {
    position: absolute;
    inset: 0;
    align-content: center;
    align-items: center;
    gap: clamp(1.25rem, 5vw, 4rem);
    opacity: 0;
    transform: translateX(4rem);
    transition: opacity .5s, transform .5s cubic-bezier(.2, .7, .2, 1);
    pointer-events: none;
  }
  html.js .step.is-past { transform: translateX(-4rem); }
  html.js .step.is-active { opacity: 1; transform: none; pointer-events: auto; }
  html.js .step__num { font-size: clamp(7rem, 26vw, 22rem); }
}

/* ---------- Trust ---------- */

.trust { padding-block: clamp(4.5rem, 9vw, 8rem); }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 40rem; }
.badges .slot { aspect-ratio: 3 / 2; border-radius: 6px; background: var(--ash); }
.badges .slot__label { font-size: .75rem; padding-inline: .5rem; }

.quote { max-width: 52rem; margin-top: 3.5rem; }
.quote__flag { display: inline-block; padding: .2rem .7rem; border-radius: 4px; background: var(--brass); font-size: .85rem; font-weight: 600; }
.quote blockquote { margin-top: 1.1rem; font-family: var(--display); font-weight: 500; font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.15; }
.quote figcaption { margin-top: 1rem; color: #5d5246; }

/* ---------- Quote form ---------- */

.quote-form { padding-block: clamp(4.5rem, 9vw, 8rem); background: var(--char); color: var(--paper); --focus: var(--brass); }
.quote-form__grid { display: grid; gap: 3rem clamp(2rem, 6vw, 5rem); }
@media (min-width: 56rem) { .quote-form__grid { grid-template-columns: 1fr 1.1fr; } }
.quote-form__text { max-width: 28rem; margin-top: 1.25rem; color: #d8cdbb; }
.quote-form__text a { color: #fff; font-weight: 600; }

.form { display: grid; gap: 1.1rem; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 6px; background: var(--paper); color: var(--soot); --focus: #8a2c08; }
.form .button { justify-self: start; }
.form__pair { display: grid; gap: 1.1rem; }
@media (min-width: 34rem) { .form__pair { grid-template-columns: 1.4fr 1fr; } }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; }
.field input, .field select { width: 100%; min-height: 3.1rem; padding: .7rem .9rem; border: 2px solid #5d5246; border-radius: 4px; background: #fff; }
.form__status { min-height: 1.6em; font-weight: 600; color: #8a2c08; }

/* ---------- Footer ---------- */

.site-footer { padding-block: 2.5rem 6.5rem; background: var(--soot); color: #d8cdbb; }
.site-footer .wrap { display: grid; gap: 1rem; }
.site-footer p { max-width: 36rem; }
