/* Fennor Heating & Plumbing: after.
   Radiator white page, Frost for opened answers and the booking band, Ink text, Steel for the
   quiet lines. Flame blue is the only accent (call buttons, links, focus); Alarm red is for
   gas and carbon monoxide only. Schibsted Grotesk, one variable file. Phone first, widened. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/redesigns/fennor-heating/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --white: #fafaf8;
  --frost: #e8edf4;
  --ink: #16181b;
  --steel: #5d6670;
  --flame: #1f3fd6;
  --flame-deep: #1832b5;
  --alarm: #b3261e;
  --hair: rgba(22, 24, 27, 0.14);
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 20px;
  --bleed: 20px;
  --wrap: 1280px;
  --head-h: 56px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--head-h) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  overflow-x: clip;
}

header.top, main, footer.foot { box-sizing: border-box; }
header.top *, main *, footer.foot * { box-sizing: border-box; }

main h1, main h2, main h3, main p, main dl, main dd, main fieldset, main legend, main figure,
footer.foot p, header.top p { margin: 0; padding: 0; }

a { color: var(--flame); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--flame-deep); }

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

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.only-wide { display: none; }

/* ---------- header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--hair);
}

.skip {
  position: absolute;
  left: 8px; top: -60px;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: 4px;
  z-index: 30;
}
.skip:focus { top: 8px; }

.top__in {
  max-width: var(--wrap);
  margin: 0 auto;
  height: calc(var(--head-h) - 1px);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.1;
  min-height: 44px;
  justify-content: center;
}
.brand:hover { color: var(--ink); }
.brand__name { font-weight: 800; font-size: 17px; letter-spacing: -0.03em; }
.brand__place { font-size: 12px; color: var(--steel); letter-spacing: 0; margin-top: 2px; }

.top__nav { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 4px;
  background: var(--flame);
  color: #fff;
  font: 700 17px/1 var(--sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--flame-deep); color: #fff; }

.top__call { min-height: 44px; padding: 0 20px; }

/* ---------- hero: the triage ---------- */

.hero__in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 28px var(--gutter) 56px;
}

.triage { container-type: inline-size; }

main h1 {
  font-size: clamp(36px, 10vw, 44px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.alarm {
  margin-top: 16px;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--alarm);
  color: var(--alarm);
  font-size: 15px;
  line-height: 1.42;
  display: grid;
  gap: 8px;
}
.alarm strong { font-weight: 700; }
.alarm a { color: var(--alarm); font-weight: 700; text-decoration-thickness: 2px; white-space: nowrap; }
.alarm a:hover { color: #8a1d17; }
.alarm :focus-visible { outline-color: var(--alarm); }

.answers { margin: 14px calc(var(--bleed) * -1) 0; }

.answer {
  position: relative;
  padding: 0 var(--bleed);
  scroll-margin-top: calc(var(--head-h) + 8px);
}
.answer::before {
  content: "";
  position: absolute;
  top: 0; left: var(--bleed); right: var(--bleed);
  height: 1px;
  background: var(--hair);
}
.answer:first-child::before { display: none; }
.answer[open] { background: var(--frost); }
.answer[open]::before,
.answer[open] + .answer::before { display: none; }

.answer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 12px 12px;
  margin: 0 -12px;
  list-style: none;
  cursor: pointer;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  border-radius: 2px;
}
.answer summary::-webkit-details-marker { display: none; }
.answer summary:hover .answer__q { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.answer summary:focus-visible { outline-offset: -3px; }

/* the plus: two bars, the vertical one goes when it opens */
.answer summary::after {
  content: "";
  flex: none;
  width: 16px; height: 16px;
  background:
    linear-gradient(var(--flame), var(--flame)) center / 100% 2px no-repeat,
    linear-gradient(var(--flame), var(--flame)) center / 2px 100% no-repeat;
}
.answer[open] summary::after {
  background: linear-gradient(var(--flame), var(--flame)) center / 100% 2px no-repeat;
}

.answer__body {
  display: grid;
  gap: 18px;
  padding: 2px 0 26px;
  max-width: 62ch;
}
.answer__block h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin-bottom: 3px;
}
.answer__block p {
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--ink);
}

@container (min-width: 520px) {
  .answer__body {
    max-width: none;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
  }
  .answer__block--try { grid-column: 1 / -1; max-width: 62ch; }
}
@container (min-width: 640px) {
  .answer__body { grid-template-columns: 1.35fr 1fr 1fr; }
  .answer__block--try { grid-column: auto; max-width: none; }
  .answer__block p { font-size: 16px; }
}

.more {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.more__q { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.more .btn { min-height: 52px; }
.hours { margin-top: 14px; color: var(--steel); font-size: 14.5px; line-height: 1.4; }

/* photo goes after the list on a phone: 4:3 crop of the 3:4 frame */
.photo { margin-top: 48px; }
.photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 74%;
  border-radius: 2px;
  background: var(--frost);
}

/* ---------- sections ---------- */

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

main h2 {
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
main h2.vh { font-size: 1px; }

.prices { padding: 24px 0 72px; }
.prices__body { margin-top: 24px; max-width: 720px; }

.plist > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 15px 0;
  border-top: 1px solid var(--hair);
}
.plist > div:last-child { border-bottom: 1px solid var(--hair); }
.plist dt { font-size: 17.5px; font-weight: 500; line-height: 1.35; }
.plist dd {
  flex: none;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
  text-align: right;
}
.plist__long dd { font-variant-numeric: normal; font-size: 17.5px; font-weight: 600; letter-spacing: -0.01em; max-width: 16em; text-align: left; }
.plist__long { flex-direction: column; gap: 4px !important; }
.prices__note { margin-top: 18px; color: var(--steel); font-size: 14.5px; line-height: 1.5; max-width: 60ch; }

.book { background: var(--frost); padding: 64px 0 72px; }
.book__head p { margin-top: 16px; font-size: 18px; line-height: 1.45; max-width: 28ch; }

.form {
  margin-top: 28px;
  display: grid;
  gap: 18px;
  max-width: 600px;
}
.form fieldset { border: 0; min-width: 0; }
.form legend, .field label { font-size: 15px; font-weight: 700; margin-bottom: 6px; display: block; padding: 0; }

.radios { display: flex; flex-wrap: wrap; gap: 0 28px; }
.radios label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  cursor: pointer;
}
.radios input { width: 24px; height: 24px; margin: 0; accent-color: var(--flame); }

.field input,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1.5px solid var(--steel);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: 500 17px/1.2 var(--sans);
}
.field select { padding-right: 10px; }
.field input:focus-visible, .field select:focus-visible { outline-offset: 1px; }

.form__send { display: grid; gap: 12px; justify-items: start; padding-top: 4px; }
.form__price { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.form__price b { font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.form__status { font-size: 16px; font-weight: 600; min-height: 0; }
.form__status:empty { display: none; }
.form .btn { width: 100%; }

.where { padding: 72px 0 80px; }
.where__towns {
  margin-top: 22px;
  max-width: 17em;
  font-size: clamp(32px, 9vw, 44px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: pretty;
}
.where__towns span { color: var(--steel); }
.where__ask { margin-top: 28px; font-size: 18px; line-height: 1.5; }
.where__ask a { font-weight: 600; white-space: nowrap; }

.foot {
  border-top: 1px solid var(--hair);
  padding: 28px 0 40px;
  font-size: 14.5px;
  color: var(--steel);
  line-height: 1.6;
}
footer.foot p { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.foot a { color: var(--steel); white-space: nowrap; }
.foot a:hover { color: var(--ink); }

/* ---------- 480+ ---------- */

@media (min-width: 480px) {
  .form { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .form fieldset, .form__send { grid-column: 1 / -1; }
  .form .btn { width: auto; }
  .plist__long { flex-direction: row; gap: 24px !important; align-items: baseline; }
  .plist__long dd { text-align: right; }
}

/* ---------- tablet ---------- */

@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .answer summary { font-size: 26px; min-height: 68px; }
  .alarm { font-size: 16.5px; }
  .photo img { aspect-ratio: 16 / 10; object-position: 50% 76%; }
}

/* ---------- desktop ---------- */

@media (min-width: 860px) {
  :root { --head-h: 72px; }
  html { scroll-padding-top: 20px; }
  .top { position: static; border-bottom: 0; }
  .top__in { gap: 28px; }
  .brand { min-height: 0; }
  .brand__name { font-size: 20px; }
  .top__nav { display: flex; gap: 24px; white-space: nowrap; margin-left: auto; font-size: 16px; font-weight: 500; }
  .top__nav a { color: var(--ink); text-decoration: none; padding: 10px 0; }
  .top__nav a:hover { color: var(--flame); text-decoration: underline; text-underline-offset: 0.25em; }
  .only-wide { display: inline; }
  .only-narrow { display: none; }
  .top__call { min-height: 46px; }
  .answer { scroll-margin-top: 20px; }
}

@media (min-width: 1100px) {
  .brand { flex-direction: row; align-items: baseline; gap: 12px; }
  .brand__name { font-size: 22px; }
  .brand__place { font-size: 14px; margin: 0; }
  .top__in { gap: 40px; }
  .top__nav { gap: 28px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 40px; --bleed: 20px; }

  .hero__in {
    display: grid;
    grid-template-columns: 7fr 5fr;
    column-gap: clamp(48px, 6vw, 96px);
    align-items: start;
    padding-top: 32px;
    padding-bottom: 72px;
  }
  main h1 { font-size: clamp(52px, 4.6vw, 66px); line-height: 0.98; letter-spacing: -0.045em; margin-top: -0.06em; }
  .alarm { margin-top: 24px; font-size: 16px; }
  .answers { margin-top: 20px; }
  .answer summary { min-height: 64px; font-size: 26px; padding: 10px 12px; }
  .more { margin-top: 28px; gap: 14px 24px; }
  .photo {
    margin-top: 0;
    position: sticky;
    top: 24px;
    align-self: start;
  }
  .photo img { aspect-ratio: 3 / 4; object-position: 50% 50%; }

  .prices { padding: 40px 0 104px; }
  .book .sec__in {
    display: grid;
    grid-template-columns: 4fr 8fr;
    column-gap: 48px;
    align-items: start;
  }
  .prices__body { margin-top: 36px; max-width: 760px; }
  main h2 { font-size: clamp(36px, 3.4vw, 48px); }
  .book { padding: 112px 0 120px; }
  .book .sec__in { grid-template-columns: 4fr 8fr; }
  .form { margin-top: 0; }
  .where { padding: 120px 0 128px; }
  .where__towns { font-size: clamp(44px, 4.8vw, 68px); max-width: 16em; margin-top: 28px; }
  .where__ask { font-size: 19px; }
  .foot { padding: 32px 0 48px; }
}

@media (min-width: 1280px) {
  .book .sec__in { grid-template-columns: 5fr 7fr; }
}
