/* Heatmaster base: reset, typography, layout helpers, buttons, form fields. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hm-header-h) + 1rem); }
body {
  margin: 0;
  background: var(--hm-ivory);
  color: var(--hm-c-text);
  font-family: var(--hm-font-body);
  font-size: var(--hm-fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--hm-c-link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--hm-c-link-hover); }
:focus-visible { outline: none; box-shadow: var(--hm-ring); border-radius: 6px; }
::selection { background: var(--hm-gold-300); color: var(--hm-green-950); }
@view-transition { navigation: auto; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--hm-font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  line-height: 1.12;
  letter-spacing: -0.012em;
  color: var(--hm-c-heading);
  text-wrap: balance;
}
h1 { font-size: var(--hm-fs-h1); }
h2 { font-size: var(--hm-fs-h2); }
h3 { font-size: var(--hm-fs-h3); line-height: 1.2; }
h4 { font-size: var(--hm-fs-h4); line-height: 1.3; font-family: var(--hm-font-body); font-weight: 650; letter-spacing: 0; color: var(--hm-c-text); }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
strong { font-weight: 650; }
small { font-size: var(--hm-fs-sm); }

[hidden] { display: none !important; }
.hm-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hm-skip { position: absolute; left: 1rem; top: -4rem; z-index: 200; padding: 0.75rem 1rem; background: var(--hm-green-800); color: var(--hm-ivory); border-radius: var(--hm-r-sm); }
.hm-skip:focus { top: 1rem; color: var(--hm-ivory); }

/* Layout */
.hm-container { width: min(100% - 2 * var(--hm-gutter), var(--hm-container)); margin-inline: auto; }
.hm-container--narrow { width: min(100% - 2 * var(--hm-gutter), var(--hm-container-narrow)); }
.hm-section { padding-block: var(--hm-section); }
.hm-section--white { background: var(--hm-white); }
.hm-section--cream { background: var(--hm-cream); }
.hm-section--tight { padding-block: calc(var(--hm-section) * 0.6); }
.hm-section--green { background: var(--hm-green-800); }
.hm-stack > * + * { margin-top: var(--hm-s-4); }
.hm-grid { display: grid; gap: var(--hm-s-5); }
@media (min-width: 48rem) { .hm-grid--2 { grid-template-columns: repeat(2, 1fr); } .hm-grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 36rem) and (max-width: 47.99rem) { .hm-grid--3 { grid-template-columns: repeat(2, 1fr); } }

/* Grid children may shrink below their content's width, so a wide table scrolls inside its box instead of widening the page. */
.hm-grid > *, .hm-split > *, .hm-post > *, .hm-product > *, .hm-hero__in > *, .hm-cards > *, .hm-tiles > * { min-width: 0; }

/* Section heading: eyebrow, title, gold rule */
.hm-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6em; margin: 0 0 0.9rem;
  font-family: var(--hm-font-body); font-size: var(--hm-fs-xs); font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--hm-c-eyebrow);
}
@media (max-width: 29.99rem) { .hm-eyebrow { font-size: 0.75rem; letter-spacing: 0.1em; gap: 0.5em; } .hm-eyebrow::before, .hm-head--center .hm-eyebrow::after { width: 1.1rem !important; } }
.hm-eyebrow::before { content: ""; width: 1.75rem; height: 1px; background: currentColor; opacity: 0.7; }
.hm-head { max-width: 44rem; margin-bottom: var(--hm-s-6); }
.hm-head--center { margin-inline: auto; text-align: center; }
.hm-head--center .hm-eyebrow::after { content: ""; width: 1.75rem; height: 1px; background: currentColor; opacity: 0.7; }
.hm-head p:not(.hm-eyebrow) { color: var(--hm-c-muted); font-size: var(--hm-fs-lead); margin-bottom: 0; }
.hm-lead { font-size: var(--hm-fs-lead); color: var(--hm-c-muted); }
.hm-rule { display: flex; align-items: center; gap: 0.75rem; margin: var(--hm-s-5) 0; color: var(--hm-gold-500); }
.hm-rule::before, .hm-rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor 30%, currentColor 70%, transparent); opacity: 0.55; }
.hm-rule span { width: 7px; height: 7px; transform: rotate(45deg); background: currentColor; }

/* Buttons */
.hm-btn {
  --_bg: var(--hm-green-800); --_fg: var(--hm-ivory); --_bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 3.25rem; padding: 0.8rem 1.4rem;
  border: 1.5px solid var(--_bd); border-radius: var(--hm-r-md);
  background: var(--_bg); color: var(--_fg);
  font: 650 1rem/1.2 var(--hm-font-body); letter-spacing: 0.005em; text-decoration: none; text-align: center;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s var(--hm-ease), box-shadow 0.2s var(--hm-ease), background-color 0.2s, border-color 0.2s;
}
.hm-btn:hover { transform: translateY(-1px); color: var(--_fg); box-shadow: 0 6px 18px rgba(6, 35, 29, 0.18); }
.hm-btn:active { transform: translateY(0); box-shadow: none; }
.hm-btn svg { width: 1.2em; height: 1.2em; flex: none; }
.hm-btn--quote { --_bg: var(--hm-orange-500); --_fg: var(--hm-green-950); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(6, 35, 29, 0.2); }
.hm-btn--quote:hover { --_bg: var(--hm-orange-400); }
.hm-btn--call { --_bg: var(--hm-green-800); --_fg: var(--hm-ivory); }
/* Outline buttons take their colours from the surface they sit on (see "Surface context" in tokens.css). */
.hm-btn--outline { --_bg: transparent; --_fg: var(--hm-c-outline); --_bd: var(--hm-c-outline-border); }
.hm-btn--outline:hover { --_bg: var(--hm-c-outline-hover); --_bd: var(--hm-c-outline); }
.hm-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.hm-btn--sm { min-height: 2.75rem; padding: 0.55rem 1.1rem; font-size: var(--hm-fs-sm); white-space: nowrap; }
.hm-btn--block { width: 100%; }
.hm-btn-row { display: flex; flex-wrap: wrap; gap: var(--hm-s-3); }
.hm-link { display: inline-flex; align-items: center; gap: 0.4em; font-weight: 650; text-decoration: none; color: var(--hm-c-link); }
.hm-link svg { width: 1.1em; height: 1.1em; transition: transform 0.2s var(--hm-ease); }
.hm-link:hover svg { transform: translateX(3px); }

/* Form fields (16 px so iOS never zooms) */
.hm-field { display: grid; gap: 0.4rem; }
.hm-field label, .hm-label { font-weight: 600; font-size: var(--hm-fs-sm); color: var(--hm-c-text); }
.hm-field .hm-hint { font-size: var(--hm-fs-xs); color: var(--hm-c-faint); }
.hm-input, .hm-textarea, .hm-select {
  width: 100%; min-height: 3.25rem; padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--hm-line-2); border-radius: var(--hm-r-md);
  background: var(--hm-white); color: var(--hm-ink);
  font: 400 1rem/1.4 var(--hm-font-body);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hm-textarea { min-height: 7rem; resize: vertical; }
.hm-input:focus, .hm-textarea:focus, .hm-select:focus { outline: none; border-color: var(--hm-green-600); box-shadow: 0 0 0 4px rgba(19, 99, 79, 0.16); }
.hm-input[aria-invalid="true"] { border-color: var(--hm-error); }
.hm-error { color: var(--hm-error); font-size: var(--hm-fs-sm); font-weight: 600; }
.hm-secure { display: flex; align-items: flex-start; gap: 0.5rem; margin: 0; font-size: var(--hm-fs-xs); color: var(--hm-c-faint); }
.hm-secure svg { width: 1rem; height: 1rem; flex: none; margin-top: 0.15em; color: var(--hm-c-tick); }

/* Long-form text (pages' SEO copy and blog posts) */
.hm-prose { max-width: 44rem; }
.hm-prose > * + * { margin-top: 1em; }
.hm-prose h2 { margin-top: 1.8em; }
.hm-prose h3 { margin-top: 1.5em; }
.hm-prose ul { list-style: none; padding: 0; }
.hm-prose ul > li { position: relative; padding-left: 1.6em; margin-bottom: 0.5em; }
.hm-prose ul > li::before { content: ""; position: absolute; left: 0.25em; top: 0.68em; width: 6px; height: 6px; transform: rotate(45deg); background: var(--hm-gold-500); }
.hm-prose ol { padding-left: 1.3em; }
.hm-prose ol > li { margin-bottom: 0.5em; padding-left: 0.3em; }
.hm-prose ol > li::marker { color: var(--hm-gold-700); font-weight: 700; }
.hm-prose blockquote { margin: 1.5em 0; padding: 0.25em 0 0.25em 1.25em; border-left: 3px solid var(--hm-gold-500); font-family: var(--hm-font-display); font-size: 1.2em; color: var(--hm-c-heading); }
.hm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--hm-line); border-radius: var(--hm-r-md); background: var(--hm-white); }
.hm-prose table, .hm-table { width: 100%; border-collapse: collapse; font-size: var(--hm-fs-sm); min-width: 30rem; }
.hm-prose th, .hm-table th { background: var(--hm-green-800); color: var(--hm-ivory); text-align: left; font-weight: 600; }
.hm-prose th, .hm-prose td, .hm-table th, .hm-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--hm-line); vertical-align: top; }
.hm-prose tr:nth-child(even) td, .hm-table tr:nth-child(even) td { background: var(--hm-green-50); }

/* Entrance: content is visible by default; this only adds a gentle rise when motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .hm-reveal { animation: hm-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}
@keyframes hm-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
