/* Jackman Mechanical dev page.
   Tokens live here and nowhere else. Each colour says what it may touch. */
:root {
  --paper: #FFFFFF;   /* page ground, drawing paper */
  --grid: #EEF1F4;    /* drafting grid behind the hero and the sheet ONLY */
  --ink: #161616;     /* text, linework, the commercial panel (his black) */
  --ink-2: #5B6168;   /* secondary text, captions, leaders */
  --rule: #D5DAE0;    /* hairlines and borders */
  --red: #D10522;     /* HIS red (Squarespace theme + logo): call buttons, focus ring,
                         legend for heating; in the drawing only the expansion tank
                         and the main shutoff lever */
  --red-dk: #A8031B;  /* hover on red buttons only */
  --copper: #B8733F;  /* copper pipe: drawing and the water legend swatch only */
  --gas: #F2C230;     /* gas tags: drawing and the gas legend swatch only */

  --display: "Montserrat", "Segoe UI", system-ui, sans-serif; /* close to his logo's lettering */
  --text: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: 24px;
  --top-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.5rem; line-height: 1.2; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
[id] { scroll-margin-top: calc(var(--top-h) + 16px); }

.wrap { width: min(var(--wrap), calc(100% - 2 * var(--gutter))); margin-inline: auto; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 4px; }
.skip:focus { top: 12px; color: var(--paper); }

.todo { color: var(--ink-2); font-style: italic; }

/* ── preview strip ─────────────────────────────────────────────────────── */
.preview { background: var(--ink); color: var(--paper); font-size: 0.875rem; text-align: center; padding: 6px var(--gutter); }

/* ── buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 20px; border-radius: 3px;
  font: 700 1rem/1 var(--text); text-decoration: none; white-space: nowrap;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--lg { min-height: 56px; padding: 0 26px; font-size: 1.0625rem; }
.btn--red { background: var(--red); color: var(--paper); }
.btn--red:hover { background: var(--red-dk); color: var(--paper); }
.btn--red:focus-visible { outline-color: var(--ink); }
.btn--line { border-color: var(--ink); color: var(--ink); background: var(--paper); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--light { border-color: var(--paper); color: var(--paper); background: transparent; }
.btn--light:hover { background: var(--paper); color: var(--ink); }
.btn--light:focus-visible { outline-color: var(--paper); }

/* ── header ────────────────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 2px solid var(--ink); }
.top__in { display: flex; align-items: center; gap: 28px; min-height: var(--top-h); }
.brand { display: block; flex: none; }
.brand img { width: 200px; height: auto; }
.nav { display: flex; gap: 26px; margin-left: auto; font-weight: 600; }
.nav a { text-decoration: none; padding: 12px 0; }
.nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.mnav { display: none; position: relative; }
.mnav summary { list-style: none; display: grid; place-items: center; width: 46px; height: 46px; border: 2px solid var(--ink); border-radius: 3px; cursor: pointer; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav nav { position: absolute; right: 0; top: calc(100% + 10px); background: var(--paper); border: 2px solid var(--ink); min-width: 220px; display: flex; flex-direction: column; padding: 6px 0; }
.mnav nav a { padding: 12px 18px; text-decoration: none; font-weight: 600; }
.mnav nav a:hover { background: var(--grid); color: var(--ink); }

/* ── hero ──────────────────────────────────────────────────────────────── */
.hero, .sheet {
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}
.hero__in { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 48px 56px; padding: 72px 0 64px; }
.hero__copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero__title { font-size: clamp(2.4rem, 5.4vw, 4.1rem); line-height: 1.02; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__title .line > span { display: inline-block; }
.hero__lede { max-width: 600px; font-size: 1.1875rem; color: #33393F; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* title block: a real table, as on a drawing sheet */
.tblock { flex: 0 1 400px; min-width: 0; border-collapse: collapse; background: var(--paper); border: 2px solid var(--ink); font-size: 0.9375rem; }
.tblock caption { caption-side: top; text-align: left; font: 700 0.875rem/1.4 var(--text); padding: 0 0 8px; color: var(--ink-2); }
.tblock th, .tblock td { border: 1px solid var(--ink); padding: 9px 12px; text-align: left; vertical-align: top; }
.tblock th { width: 120px; font-weight: 500; color: var(--ink-2); }
.tblock td { font-weight: 700; }
.tblock a { text-decoration: none; }

/* ── the sheet: sticky drawing + steps ─────────────────────────────────── */
.sheet { border-top: 2px solid var(--ink); padding: 72px 0 24px; }
.sheet__head { display: flex; flex-wrap: wrap; gap: 12px 48px; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; }
.sheet__head h2 { flex: 1 1 520px; max-width: 760px; }
.sheet__head p { flex: 1 1 320px; max-width: 460px; color: var(--ink-2); }
.sheet__body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 0 56px; }
.stage { position: relative; }
.stage__frame {
  position: sticky; top: calc(var(--top-h) + 24px);
  margin: 0; background: var(--paper); border: 2px solid var(--ink); padding: 14px;
}
.drawing { display: block; width: 100%; height: auto; }
.drawing text { font: 600 17px var(--text); fill: var(--ink); letter-spacing: 0.03em; }
.drawing .tagt { font: 700 11.5px var(--text); letter-spacing: 0.08em; }
.stage__frame figcaption { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 0.8125rem; color: var(--ink-2); }

.steps { display: flex; flex-direction: column; }
.step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 40px 0; }
.step:last-child { min-height: 70vh; }
.step h3 { font-size: clamp(1.5rem, 2.3vw, 2rem); }
.step p:not(.key) { color: #33393F; }
.step .btn { align-self: flex-start; margin-top: 8px; }
.key { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.sw { width: 34px; height: 12px; border: 1.5px solid var(--ink); flex: none; }
.sw--gas { background: linear-gradient(90deg, var(--ink) 0 34%, var(--gas) 34% 66%, var(--ink) 66%); }
.sw--water { background: var(--copper); }
.sw--heat { background: var(--red); border-radius: 6px; width: 22px; height: 22px; }
.sw--drain { border: 0; height: 3px; background: repeating-linear-gradient(90deg, var(--ink-2) 0 8px, transparent 8px 13px); }

/* ── two faces ─────────────────────────────────────────────────────────── */
.faces { padding: 72px 0; border-top: 2px solid var(--ink); }
.faces__in { display: flex; flex-wrap: wrap; gap: 24px; }
.face { flex: 1 1 440px; min-width: 0; border: 2px solid var(--ink); padding: 40px; display: flex; flex-direction: column; gap: 16px; }
.face__k { font-weight: 700; color: var(--red); }
.face h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
.face ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.face .btn { align-self: flex-start; margin-top: auto; }
.face--dark { background: var(--ink); color: var(--paper); }
.face--dark h2 { color: var(--paper); }
.face--dark .face__k { color: var(--paper); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.face--dark :focus-visible { outline-color: var(--paper); }

/* ── work ──────────────────────────────────────────────────────────────── */
.work { padding: 72px 0; border-top: 1px solid var(--rule); }
.work__lede { color: var(--ink-2); margin: 10px 0 32px; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: 1px solid var(--ink); }
.gallery figcaption { font-size: 0.875rem; color: var(--ink-2); margin-top: 8px; line-height: 1.4; }

/* ── areas ─────────────────────────────────────────────────────────────── */
.areas { padding: 72px 0; border-top: 1px solid var(--rule); }
.areas__in { display: flex; flex-wrap: wrap; gap: 24px 64px; align-items: flex-start; }
.areas__in > div { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.areas__in > div p { color: var(--ink-2); max-width: 440px; }
.towns { flex: 1 1 440px; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.towns li { border: 2px solid var(--ink); padding: 10px 18px; font-weight: 700; }

/* ── contact ───────────────────────────────────────────────────────────── */
.contact { padding: 72px 0; border-top: 2px solid var(--ink); background: var(--grid); }
.contact__in { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; }
.contact__copy { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.contact__copy > p:first-of-type { color: #33393F; max-width: 460px; }
.contact__mail { overflow-wrap: anywhere; }
.form { flex: 1 1 440px; min-width: 0; background: var(--paper); border: 2px solid var(--ink); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.form__who { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.form__who legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.form__who label { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
.form__who input { width: 20px; height: 20px; accent-color: var(--red); }
.fld { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.fld input, .fld select, .fld textarea {
  font: 400 1rem/1.4 var(--text); color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--ink-2); border-radius: 3px; padding: 11px 12px; min-height: 46px; width: 100%;
}
.fld input:focus-visible, .fld select:focus-visible, .fld textarea:focus-visible { border-color: var(--ink); }
.form .btn { align-self: flex-start; }
.form__sent { font-weight: 600; color: var(--ink); border-left: 4px solid var(--red); padding-left: 10px; }

/* ── footer ────────────────────────────────────────────────────────────── */
.foot { background: var(--ink); color: #C9CDD2; padding: 44px 0; font-size: 0.9375rem; }
.foot a { color: var(--paper); }
.foot a:hover { color: var(--paper); text-decoration-color: var(--red); }
.foot :focus-visible { outline-color: var(--paper); }
.foot__in { display: flex; flex-wrap: wrap; gap: 24px 64px; justify-content: space-between; }
.foot__in > div { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.foot__name { color: var(--paper); font-family: var(--display); font-weight: 800; font-size: 1.125rem; }
.foot .todo { color: #A9AFB6; }
.foot__note { margin-top: 8px; }

/* ── narrower screens ──────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .nav { display: none; }
  .mnav { display: block; }
  .top__call { margin-left: auto; }
}
@media (max-width: 860px) {
  :root { --top-h: 64px; }
  .brand img { width: 160px; }
  .sheet__body { grid-template-columns: minmax(0, 1fr); }
  .stage { position: sticky; top: var(--top-h); z-index: 5; background: var(--paper); padding: 10px 0; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); border-bottom: 1px solid var(--rule); }
  .stage__frame { position: static; padding: 8px; }
  .stage__frame figcaption { display: none; }
  .drawing .co { display: none; } /* labels cannot be read at phone size; colour and the step text carry it */
  .step { min-height: 64vh; justify-content: flex-end; padding: 32px 0 48px; }
  .step:last-child { min-height: 56vh; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* sideways phones: the drawing and its text side by side, like the desktop */
@media (max-width: 860px) and (orientation: landscape) and (max-height: 520px) {
  .sheet__body { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0 24px; }
  .stage { position: relative; margin-inline: 0; padding: 0; border: 0; background: none; }
  .stage__frame { position: sticky; top: calc(var(--top-h) + 8px); }
  .step { min-height: 90vh; justify-content: center; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .top__in { gap: 12px; }
  .brand img { width: 132px; }
  .top__call { padding: 0 12px; font-size: 0.9375rem; }
  .hero__in { padding: 44px 0 40px; }
  .face { padding: 28px 22px; }
  .form { padding: 22px 18px; }
  .tblock th { width: 104px; }
}
.top__short { display: none; }
@media (max-width: 400px) {
  .brand img { width: 120px; }
  .top__num { display: none; }
  .top__short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
