/* ==========================================================================
   JR Infotech — the ledger
   Exact alignment, monospaced labels, hairlines that separate data.
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------

   Self-hosted so no visitor request reaches a third party to render text, and
   so a CDN hiccup cannot leave the page in fallback. Files come from Google
   Fonts (all four families are SIL Open Font License 1.1) and were fetched by
   the css2 endpoint with a modern browser UA, then trimmed to the latin and
   latin-ext subsets. Regenerate the same way if a family or weight changes.

   Bricolage Grotesque and Public Sans are variable fonts: one file covers the
   whole weight range declared on it.
   ------------------------------------------------------------------------- */

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/public-sans-400-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/public-sans-400-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-600-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-600-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Bangers";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/bangers-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Bangers";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/bangers-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* --- Tokens ------------------------------------------------------------- */

:root {
  --paper:      #F6F7F5;
  --ink:        #0E1512;
  --pine:       #0B5C2E;
  --pine-deep:  #06381D;
  --coal:       #16191A;
  --graphite:   #5A625C;
  --rule:       #DCDFD9;
  --signal:     #00E01E;

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-brand:   "Bangers", system-ui;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --section-pad: clamp(4rem, 9vw, 7.5rem);
  --measure: 1180px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 200ms;
  --dur-slow: 240ms;

  --bar-h: 77px;
}

/* --- Reset -------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + var(--space-5));
}

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

body.is-locked { overflow: hidden; }

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

figure { margin: 0; }

button { font: inherit; color: inherit; }

/* --- Type --------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: clamp(1.125rem, 1.6vw, 1.3rem); letter-spacing: -0.01em; }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  color: var(--graphite);
  max-width: 62ch;
}

a { color: var(--pine); }

/* Underline grows from the left on hover rather than blinking on. */
.link {
  font-weight: 500;
  text-decoration: none;
  background-image: linear-gradient(var(--pine), var(--pine));
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--dur) var(--ease);
  padding-bottom: 2px;
}

.link:hover,
.link:focus-visible { background-size: 100% 1px; }

.link--arrow::after {
  content: " \2192";
  display: inline-block;
  transition: transform var(--dur) var(--ease);
}

.link--arrow:hover::after { transform: translateX(3px); }

/* --- Focus -------------------------------------------------------------- */

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

.on-dark :focus-visible,
.drawer :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--signal);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 200;
  background: var(--pine-deep);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}

.skip-link:focus { top: var(--space-3); }

/* --- Layout ------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.section { padding-block: var(--section-pad); }

.section + .section { border-top: 1px solid var(--rule); }

.section__head { max-width: 62ch; margin-bottom: var(--space-8); }

.section__head h2 { margin-bottom: var(--space-5); }

/* --- Eyebrow / labels --------------------------------------------------- */

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: var(--space-4);
}

.eyebrow--marked { display: flex; align-items: center; gap: var(--space-3); }

.eyebrow--marked::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  flex: none;
}

/* --- Field row (the signature device) ----------------------------------- */

.field-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.field-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--rule);
}

.field-row__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
  flex: none;
  white-space: nowrap;
}

/* The hairline that carries the eye from label to value. */
.field-row__rule {
  flex: 1 1 auto;
  height: 0;
  border-bottom: 1px solid var(--rule);
  transform: translateY(-3px);
  min-width: var(--space-4);
}

.field-row__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-align: right;
  flex: 0 1 auto;
  min-width: 0;
  overflow-wrap: break-word;
}

.field-row__value a { text-decoration: none; }
.field-row__value a:hover { text-decoration: underline; }

.field-rows--lg .field-row { padding-block: var(--space-4); }
.field-rows--lg .field-row__value { font-size: clamp(1.25rem, 2vw, 1.6rem); }

/* Contact values are addresses, hours and an email — sentences, not figures.
   The display face at --lg sizes warped them mid-word, so they read as body. */
.field-rows--contact .field-row { padding-block: var(--space-4); }

.field-rows--contact .field-row__value {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.45;
}

.on-dark .field-row,
.on-dark .field-rows { border-color: rgba(255, 255, 255, 0.18); }
.on-dark .field-row__rule { border-color: rgba(255, 255, 255, 0.18); }
.on-dark .field-row__label { color: rgba(255, 255, 255, 0.62); }

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.btn--primary { background: var(--pine); color: #fff; }
.btn--primary:hover { background: var(--pine-deep); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}

.btn--ghost:hover { border-color: var(--ink); }

.on-dark .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.on-dark .btn--ghost:hover { border-color: #fff; }

/* Pine on pine-deep has too little separation, so invert the primary on dark. */
.on-dark .btn--primary { background: #fff; color: var(--pine-deep); }
.on-dark .btn--primary:hover { background: rgba(255, 255, 255, 0.86); }

.btn:disabled { opacity: 0.6; cursor: progress; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

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

.site-bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--bar-h);
  background: rgba(246, 247, 245, 0.94);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(140%) blur(8px);
}

.site-bar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 19px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.brand img {
  width: 48px;
  height: 53px;
  object-fit: contain;
  flex: none;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.275rem;
  letter-spacing: -0.02em;
}

/* Brand wordmark only — never body, headings, or .brand__since. */
.bangers-regular {
  font-family: var(--font-brand);
  font-weight: 400;
  font-style: normal;
}

/* Bangers is a display face; the tight tracking meant for Bricolage cramps it. */
.brand__name.bangers-regular {
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.drawer__mark .brand__name {
  color: #fff;
}

.brand__since {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
  display: block;
  line-height: 1.2;
}

.bar-link {
  font-family: var(--font-mono);
  font-size: 0.825rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 14px 10px;
  min-height: 53px;
  display: inline-flex;
  align-items: center;
}

.bar-link:hover { color: var(--pine); }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 53px;
  padding: 10px 19px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color var(--dur) var(--ease);
}

.menu-btn:hover { border-color: var(--ink); }

.menu-btn__bars {
  display: grid;
  gap: 4px;
  width: 19px;
}

.menu-btn__bars span {
  display: block;
  height: 1.8px;
  background: currentColor;
}

/* --- Drawer ------------------------------------------------------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(14, 21, 18, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-slow) var(--ease), visibility var(--dur-slow);
}

.backdrop[data-open="true"] { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  width: min(380px, 86vw);
  background: var(--pine-deep);
  color: #fff;
  transform: translateX(-100%);
  transition: transform var(--dur-slow) var(--ease);
  display: flex;
  flex-direction: column;
  padding: var(--space-5) var(--space-6) calc(var(--space-6) + env(safe-area-inset-bottom));
  overflow-y: auto;
}

.drawer[data-open="true"] { transform: translateX(0); }

.drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-7);
}

.drawer__mark {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.drawer__close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  color: #fff;
  width: 44px;
  height: 44px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
}

.drawer__close:hover { border-color: #fff; }

.drawer__nav { list-style: none; margin: 0 0 auto; padding: 0; }

.drawer__nav li { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.drawer__nav li:first-child { border-top: 1px solid rgba(255, 255, 255, 0.14); }

.drawer__nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  min-height: 44px;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}

.drawer__nav a::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  flex: none;
}

.drawer__nav a:hover::before,
.drawer__nav a:focus-visible::before,
.drawer__nav a[aria-current="page"]::before { opacity: 1; }

.drawer__nav a:hover { padding-left: var(--space-2); }

.drawer__foot {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  display: grid;
  gap: var(--space-2);
}

.drawer__foot a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.drawer__foot a:hover { color: var(--signal); }

/* --- Hero --------------------------------------------------------------- */

.hero {
  padding-top: calc(var(--bar-h) + clamp(3rem, 7vw, 5.5rem));
  padding-bottom: var(--section-pad);
}

.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
}

.hero h1 { margin-bottom: var(--space-5); }

.hero__figure { position: relative; }

.hero__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
}

.hero__stats { margin-top: clamp(2.5rem, 5vw, 4rem); }

/* --- Cards -------------------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--3 { grid-template-columns: 1fr; }

.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: var(--space-5);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.card:hover { transform: translateY(-2px); border-color: #C7CCC3; }

.card__media {
  margin: calc(var(--space-5) * -1) calc(var(--space-5) * -1) 0;
  overflow: hidden;
  border-radius: 2px 2px 0 0;
}

.card__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card h3 { margin-bottom: var(--space-1); }

.card p { color: var(--graphite); font-size: 1rem; }

.card__num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--graphite);
}

/* Product cards are pure ledger — no imagery, just record and figures. */
.product {
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.product:hover { transform: translateY(-2px); border-color: #C7CCC3; }

.product h3 { font-size: 1.375rem; margin-bottom: var(--space-3); }

.product p {
  color: var(--graphite);
  font-size: 1rem;
  margin-bottom: var(--space-5);
  flex: 1;
}

/* Trade names vary from "AHC" to "Hire purchase finance and Leasing". Fixing the
   value column keeps the connecting hairline the same length on every card, so a
   value that wraps reads as a right-aligned block rather than a broken row. */
.product .field-row__value { flex: 0 0 56%; }
.product .field-row__rule { min-width: var(--space-4); }

.section__foot {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-3) var(--space-5);
}

.section__foot p { color: var(--graphite); margin: 0; }

/* --- Services list ------------------------------------------------------ */

.services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }

.service {
  display: grid;
  gap: var(--space-2) var(--space-6);
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--rule);
}

.service__index {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--graphite);
}

.service p { color: var(--graphite); margin: 0; max-width: 62ch; }

/* --- About -------------------------------------------------------------- */

/* Trades the software runs in — real photographs, one per trade. */
.trades {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin: 0;
  padding: 0;
}

.trades img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 2px;
}

/* Label above the photo, under a hairline — the field row, applied to images. */
.trades li {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--rule);
}

/* --- Dark CTA band ------------------------------------------------------ */

.band {
  background: var(--pine-deep);
  color: #fff;
  padding-block: var(--section-pad);
}

.band h2 { margin-bottom: var(--space-5); }
.band .lede { color: rgba(255, 255, 255, 0.78); }

/* --- Prose -------------------------------------------------------------- */

/* Running text that has to be read start to finish, as on the privacy page.
   Capped near 68ch so lines stay scannable on a wide screen. */
.prose { max-width: 68ch; }

.prose h2 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

.prose > h2:first-child { margin-top: 0; }

.prose p { margin-bottom: var(--space-4); }

.prose .field-rows { margin-block: var(--space-5); }

/* The one line that qualifies the list above it, so it is set apart. */
.prose__note {
  padding-left: var(--space-4);
  border-left: 2px solid var(--pine);
  color: var(--graphite);
}

/* --- Form --------------------------------------------------------------- */

.form { max-width: 640px; }

.form__field { margin-bottom: var(--space-6); }

.form__label {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: var(--space-2);
}

.form__label .opt { color: var(--graphite); letter-spacing: 0.08em; }

.form__help {
  display: block;
  font-size: 0.875rem;
  color: var(--graphite);
  margin-bottom: var(--space-2);
}

/* Sits between the last field and the submit button. Deliberately plain text
   rather than a checkbox — there is nothing here for the visitor to agree to. */
.form__consent {
  font-size: 0.9375rem;
  color: var(--graphite);
  padding-top: var(--space-5);
  border-top: 1px solid var(--rule);
  margin-bottom: var(--space-6);
  max-width: 62ch;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.textarea { min-height: 150px; resize: vertical; line-height: 1.6; }

.input:hover,
.select:hover,
.textarea:hover { border-color: #C7CCC3; }

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(11, 92, 46, 0.14);
}

.input[aria-invalid="true"],
.textarea[aria-invalid="true"],
.select[aria-invalid="true"] { border-color: #A5251A; }

.form__error {
  display: block;
  margin-top: var(--space-2);
  font-size: 0.875rem;
  color: #A5251A;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
  min-height: 48px;
}

.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--pine); flex: none; }

.check span { font-size: 1rem; }

.callback-fields {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-5);
  padding-left: var(--space-5);
  border-left: 2px solid var(--rule);
}

/* Collapsed only when JS can reopen it — without JS the fields stay reachable. */
html.js .callback-fields[data-collapsed="true"] { display: none; }

/* Honeypot: off-screen rather than display:none so bots still fill it. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: 2px;
  margin-bottom: var(--space-6);
  border: 1px solid;
}

.alert--error { background: #FCF2F1; border-color: #E2BEB9; color: #7A1B12; }

.alert--error a { color: #7A1B12; }

.success { max-width: 640px; }
.success h2 { margin-bottom: var(--space-5); }

.success__mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pine);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: var(--space-5);
  font-size: 1.25rem;
}

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

.site-footer {
  position: relative;
  isolation: isolate;
  /* coal sits under the image so a failed load still yields AA text. */
  background: var(--coal) url("../img/footer-sub.jpg") center bottom / cover no-repeat;
  color: #fff;
  padding-block: var(--section-pad) var(--space-6);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(22, 25, 26, 0.82);
}

.footer__grid {
  display: grid;
  gap: var(--space-7);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.footer__col h2 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: var(--space-5);
}

.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }

.footer__col a,
.footer__col address {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-style: normal;
}

.footer__col a:hover { color: #fff; text-decoration: underline; }

.footer__bottom {
  padding-top: var(--space-5);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.62);
}

/* Brighter than the copyright text around it, which is what marks it as the
   one thing in this line you can click. */
.footer__bottom a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.footer__bottom a:hover,
.footer__bottom a:focus-visible { color: #fff; text-decoration: underline; }

.footer__sep { margin-inline: var(--space-2); }

/* --- Floating actions --------------------------------------------------- */

.floaters {
  position: fixed;
  right: max(var(--space-4), env(safe-area-inset-right));
  bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
  z-index: 50;
  display: grid;
  gap: var(--space-3);
  justify-items: end;
}

.floater {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  height: 48px;
  min-width: 48px;
  padding: 0 var(--space-3);
  border-radius: 24px;
  background: var(--pine-deep);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 12px rgba(14, 21, 18, 0.18);
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.floater:hover,
.floater:focus-visible { background: var(--pine); transform: translateY(-2px); }

.floater:focus-visible { outline-color: var(--signal); }

.floater svg { width: 20px; height: 20px; flex: none; margin-inline: auto; }

/* Label unrolls on hover/focus; hidden from layout otherwise. */
.floater__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width var(--dur-slow) var(--ease), opacity var(--dur) var(--ease),
              margin-right var(--dur-slow) var(--ease);
}

.floater:hover .floater__label,
.floater:focus-visible .floater__label {
  max-width: 140px;
  opacity: 1;
  margin-right: var(--space-2);
}

/* --- Scroll reveal ------------------------------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

.reveal.is-in { opacity: 1; transform: none; }

/* Without JS nothing would ever add .is-in, so opt in only when JS is present. */
html:not(.js) .reveal { opacity: 1; transform: none; }

/* --- Utilities ---------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.stack-5 > * + * { margin-top: var(--space-5); }

/* --- Breakpoints -------------------------------------------------------- */

@media (min-width: 640px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .hero__stats .field-rows--lg { max-width: 560px; }
  .service { grid-template-columns: 3rem minmax(0, 16rem) minmax(0, 1fr); align-items: baseline; }
  .callback-fields { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .trades { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .hero__grid { grid-template-columns: 1.15fr 1fr; }
  /* Five trades read as one strip only when there is room for all of them. */
  .trades { grid-template-columns: repeat(5, 1fr); }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-8); }
  /* Three short figures side by side. Scoped to --lg so the Contact rows,
     whose values are addresses and hours, keep the full width of one column. */
  .hero__stats .field-rows--lg { max-width: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 var(--space-8); }
  .hero__stats .field-rows--lg .field-row:first-child { border-top: 0; }
}

@media (max-width: 520px) {
  /* Long values (address, hours) need the full width, so drop the hairline. */
  .field-rows--lg .field-row { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
  .field-rows--lg .field-row__rule { display: none; }
  .field-rows--lg .field-row__value { text-align: left; }
}

@media (max-width: 639px) {
  /* Address and hours need the full width, so stack and drop the hairline. */
  .field-rows--contact .field-row { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
  .field-rows--contact .field-row__rule { display: none; }
  .field-rows--contact .field-row__value { text-align: left; }

  .floater { height: 44px; min-width: 44px; }
  .floater svg { width: 18px; height: 18px; }
  .bar-link--phone { display: none; }
}

/* --- Reduced motion ----------------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal { opacity: 1 !important; transform: none !important; }
}

@media print {
  .site-bar, .drawer, .backdrop, .floaters, .skip-link { display: none !important; }
  body { background: #fff; }
}
