/* ==========================================================================
   HMH Investing Pty Ltd — hmhinvestingtec.site
   Art direction: "Cadastral" — the register of a Victorian land-title plan.
   Sharp shape language, hairline survey rules, contour-line SVG plates,
   monospace used as the data/utility face, deep river-green ink + brass.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens — every colour, space, radius and shadow used below comes from here
   -------------------------------------------------------------------------- */
:root {
  /* Brand + ink */
  --primary:        #17352E;   /* deep river green — dark bands, headings */
  --primary-mid:    #2E5B4F;   /* mid green — rules, hovers */
  --primary-deep:   #0E211C;   /* footer bottom bar */
  --accent:         #96631A;   /* brass — links, marks, CTAs on light */
  --accent-soft:    #D2A24C;   /* brass on dark green */
  --accent-wash:    #F3EADA;   /* brass tint — icon tiles */

  /* Neutral ramp (cool paper) */
  --bg:             #F5F6F3;
  --surface:        #FFFFFF;
  --surface-sunk:   #ECEFEA;
  --border:         #D8DCD6;
  --border-strong:  #B9C1BA;

  /* Text */
  --text-dark:      #131A18;   /* near-black, green-tinged — never #000 */
  --text-light:     #5A635E;   /* muted body on paper */
  --on-dark:        #F2F5F1;
  --on-dark-muted:  #A9BDB5;

  /* Type */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --font-mono: ui-monospace, "Cascadia Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --fs-hero: clamp(2.25rem, 5vw, 3.85rem);
  --fs-h2:   clamp(1.6rem, 3vw, 2.4rem);
  --fs-h3:   clamp(1.05rem, 1.4vw, 1.2rem);
  --fs-lede: clamp(1.05rem, 1.5vw, 1.2rem);
  --fs-body: 1.0625rem;
  --fs-sm:   0.875rem;
  --fs-xs:   0.78rem;

  /* Space */
  --s1: 0.5rem;
  --s2: 0.75rem;
  --s3: 1rem;
  --s4: 1.5rem;
  --s5: 2.5rem;
  --s6: 4rem;
  --s7: 6rem;

  /* Geometry */
  --container: 1140px;
  --measure: 64ch;
  --radius: 3px;
  --radius-sm: 2px;
  --hair: 1px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(19, 26, 24, .05);
  --shadow-md: 0 1px 2px rgba(19, 26, 24, .04), 0 8px 24px rgba(19, 26, 24, .06);
  --shadow-lg: 0 2px 4px rgba(19, 26, 24, .05), 0 18px 44px rgba(19, 26, 24, .10);

  --speed: 170ms;
  --ease: cubic-bezier(.2, .6, .3, 1);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s3);
  color: var(--primary);
}

h1 { font-size: var(--fs-hero); line-height: 1.05; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -0.01em; }

p { margin: 0 0 var(--s3); max-width: var(--measure); }

a { color: var(--accent); text-decoration-thickness: var(--hair); text-underline-offset: 3px; }
a:hover { color: var(--primary-mid); }

ul, ol { margin: 0 0 var(--s3); padding-left: var(--s4); max-width: var(--measure); }
li { margin-bottom: var(--s1); }

strong { font-weight: 650; color: var(--text-dark); }

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

.skip-link {
  position: absolute;
  left: var(--s3);
  top: -4rem;
  z-index: 60;
  background: var(--primary);
  color: var(--on-dark);
  padding: var(--s2) var(--s3);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: top var(--speed) var(--ease);
}
.skip-link:focus { top: var(--s2); color: var(--on-dark); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s4);
}

/* --------------------------------------------------------------------------
   3. Shared type devices
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin: 0 0 var(--s2);
}
.eyebrow-on-dark { color: var(--accent-soft); }

.lede {
  font-size: var(--fs-lede);
  line-height: 1.55;
  color: var(--text-light);
  max-width: 58ch;
}
.lede-on-dark { color: var(--on-dark-muted); }

.section-head { max-width: 62ch; margin-bottom: var(--s5); }
.section-head p { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   4. Sections
   -------------------------------------------------------------------------- */
.section { padding-block: var(--s7); }
.section-tight { padding-block: var(--s6); }
.section-alt { background: var(--surface); border-block: var(--hair) solid var(--border); }

.section-dark {
  background: var(--primary);
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
}
.section-dark h2, .section-dark h3 { color: var(--on-dark); }
.section-dark p { color: var(--on-dark-muted); }
.section-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(to right, rgba(242,245,241,.05) 0 var(--hair), transparent var(--hair) 88px),
    repeating-linear-gradient(to bottom, rgba(242,245,241,.05) 0 var(--hair), transparent var(--hair) 88px);
  pointer-events: none;
}
.section-dark > * { position: relative; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: .8rem 1.6rem;
  border-radius: var(--radius);
  border: var(--hair) solid transparent;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .01em;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--speed) var(--ease),
              background-color var(--speed) var(--ease),
              border-color var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease),
              color var(--speed) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn svg { flex: none; }

.btn-primary {
  background: var(--primary);
  color: var(--on-dark);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-mid);
  border-color: var(--primary-mid);
  color: var(--on-dark);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--primary);
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-accent {
  background: var(--accent-soft);
  color: var(--primary-deep);
  border-color: var(--accent-soft);
}
.btn-accent:hover { background: var(--on-dark); border-color: var(--on-dark); color: var(--primary-deep); }

.btn-ghost-dark {
  background: transparent;
  color: var(--on-dark);
  border-color: rgba(242,245,241,.38);
}
.btn-ghost-dark:hover { border-color: var(--on-dark); background: rgba(242,245,241,.08); color: var(--on-dark); }

.btn-sm { padding: .55rem 1.05rem; font-size: var(--fs-xs); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s4);
}

/* --------------------------------------------------------------------------
   6. Navigation
   -------------------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; }

.navbar {
  background: rgba(245, 246, 243, .82);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: var(--hair) solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  min-height: 68px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  text-decoration: none;
  color: var(--primary);
}
.wordmark-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  flex: none;
  background: var(--primary);
  color: var(--on-dark);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .04em;
  border-radius: var(--radius-sm);
}
.wordmark-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.wordmark-suffix {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-light);
}

.nav-menu { display: flex; align-items: center; gap: var(--s4); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s4);
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
}
.nav-links li { margin: 0; }

.nav-link {
  position: relative;
  display: inline-block;
  padding: var(--s1) 0;
  color: var(--text-dark);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--speed) var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--speed) var(--ease);
}
.nav-link:hover { color: var(--primary); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--primary); font-weight: 700; }
.nav-link.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  background: var(--surface);
  border: var(--hair) solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--primary);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--primary); }

/* --------------------------------------------------------------------------
   7. Hero + page hero (shared background craft)
   -------------------------------------------------------------------------- */
.hero, .page-hero {
  position: relative;
  isolation: isolate;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(to right, rgba(23,53,46,.055) 0 var(--hair), transparent var(--hair) 44px),
    repeating-linear-gradient(to bottom, rgba(23,53,46,.055) 0 var(--hair), transparent var(--hair) 44px),
    radial-gradient(90% 120% at 82% -10%, rgba(210,162,76,.20) 0%, rgba(210,162,76,0) 55%),
    linear-gradient(168deg, #FBFBF8 0%, #EDF1EC 58%, #E3E9E3 100%);
  border-bottom: var(--hair) solid var(--border);
  overflow: hidden;
}
.hero::after, .page-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 46rem; height: 46rem;
  right: -14rem; bottom: -30rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46,91,79,.16) 0%, rgba(46,91,79,0) 68%);
  filter: blur(8px);
  pointer-events: none;
}

.hero {
  padding-block: clamp(3.5rem, 8vw, 7rem);
  min-height: 60vh;
  display: flex;
  align-items: center;
}
.hero .container { width: 100%; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: var(--s6);
}

.hero-copy { min-width: 0; }
.hero-copy h1 { margin-bottom: var(--s4); }
.hero-copy .lede { margin-bottom: 0; }
.hero-plate { min-width: 0; }

.hero-note {
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: var(--hair) solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .04em;
  color: var(--text-light);
  max-width: 48ch;
}

.page-hero { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--s3); }
.page-hero .lede { margin-bottom: 0; }
.page-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s5);
}
.page-hero-plate { min-width: 0; }

/* Signature: the contour / survey plate */
.plate {
  position: relative;
  margin: 0;
  border: var(--hair) solid var(--border-strong);
  background: rgba(255,255,255,.72);
  border-radius: var(--radius);
  padding: var(--s3);
  box-shadow: var(--shadow-lg);
}
.plate::before {
  content: "";
  position: absolute;
  inset: var(--s1);
  border: var(--hair) dashed rgba(23,53,46,.22);
  border-radius: var(--radius-sm);
  pointer-events: none;
}
.plate svg { display: block; width: 100%; height: auto; }
.plate-caption {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  margin-top: var(--s2);
  padding-top: var(--s2);
  border-top: var(--hair) solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-light);
}
.plate-sm { width: 190px; max-width: 100%; padding: var(--s2); }

.contour-outer { stroke: rgba(23,53,46,.30); }
.contour-mid   { stroke: rgba(46,91,79,.55); }
.contour-inner { stroke: var(--primary); }
.contour-grid  { stroke: rgba(23,53,46,.14); }
.contour-mark  { stroke: var(--accent); }
.contour-fill  { fill: rgba(210,162,76,.16); }

/* --------------------------------------------------------------------------
   8. Value props
   -------------------------------------------------------------------------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: var(--hair) solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.value-item {
  padding: var(--s5) var(--s4);
  border-right: var(--hair) solid var(--border);
}
.value-item:last-child { border-right: 0; }
.value-item h3 { margin-bottom: var(--s2); }
.value-item p { margin-bottom: 0; color: var(--text-light); font-size: var(--fs-sm); }
.value-index {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .14em;
  color: var(--accent);
  margin-bottom: var(--s3);
}

/* --------------------------------------------------------------------------
   9. Services
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
}
.services-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: var(--hair) solid var(--border);
  border-radius: var(--radius);
  padding: var(--s5) var(--s4);
  transition: transform var(--speed) var(--ease),
              box-shadow var(--speed) var(--ease),
              border-color var(--speed) var(--ease);
}
.service-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.service-card h3 { margin-bottom: var(--s2); }
.service-card p { color: var(--text-light); margin-bottom: 0; font-size: var(--fs-sm); }
.service-card p + p { margin-top: var(--s2); }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width: 44px; height: 44px;
  margin-bottom: var(--s3);
  background: var(--accent-wash);
  color: var(--accent);
  border-radius: var(--radius);
}

.card-meta {
  margin-top: auto;
  padding-top: var(--s3);
  border-top: var(--hair) solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-light);
}
.service-card p + p.card-meta { margin-top: var(--s4); }

/* --------------------------------------------------------------------------
   10. Split bands + the numbered sequence
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: var(--s6);
}
.split-copy { min-width: 0; }
.split-copy p:last-child { margin-bottom: 0; }
.split-media { min-width: 0; }

/* The order carries information here, so it is numbered */
.process {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
  display: grid;
  border-top: var(--hair) solid rgba(242,245,241,.22);
}
.process li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: var(--s4);
  padding-block: var(--s4);
  border-bottom: var(--hair) solid rgba(242,245,241,.22);
  margin: 0;
}
.process-step {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .14em;
  color: var(--accent-soft);
  padding-top: .3rem;
}
.process h3 { margin-bottom: var(--s1); }
.process p { margin-bottom: 0; font-size: var(--fs-sm); max-width: 58ch; }

/* --------------------------------------------------------------------------
   11. Credentials / data plate
   -------------------------------------------------------------------------- */
.data-plate {
  border: var(--hair) solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.data-plate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  background: var(--surface-sunk);
  border-bottom: var(--hair) solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-light);
}
.data-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.data-row {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s4);
  border-right: var(--hair) solid var(--border);
  border-bottom: var(--hair) solid var(--border);
}
.data-row:nth-child(2n) { border-right: 0; }
.data-row:nth-last-child(-n+2) { border-bottom: 0; }
.data-key {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-light);
}
.data-val {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: .02em;
  color: var(--primary);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   12. CTA strip
   -------------------------------------------------------------------------- */
.cta-strip {
  background: var(--primary);
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
  padding-block: var(--s6);
}
.cta-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 140% at 88% 0%, rgba(210,162,76,.20) 0%, rgba(210,162,76,0) 60%);
  pointer-events: none;
}
.cta-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s5);
}
.cta-inner h2 { color: var(--on-dark); margin-bottom: var(--s2); }
.cta-inner p { color: var(--on-dark-muted); margin-bottom: 0; }
.cta-inner .btn-row { margin-top: 0; }

/* --------------------------------------------------------------------------
   13. Prose (legal + long-form pages)
   -------------------------------------------------------------------------- */
.prose-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: var(--s6);
  align-items: start;
}

.prose-nav {
  position: sticky;
  top: 92px;
  border-left: 2px solid var(--border);
  padding-left: var(--s3);
}
.prose-nav ul { list-style: none; margin: 0; padding: 0; max-width: none; }
.prose-nav li { margin-bottom: var(--s2); }
.prose-nav a {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-light);
  text-decoration: none;
}
.prose-nav a:hover { color: var(--accent); text-decoration: underline; }

.prose { max-width: 72ch; min-width: 0; }
.prose h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: var(--hair) solid var(--border);
  scroll-margin-top: 92px;
}
/* The first heading in a prose block opens it — no divider above it */
.prose > h2:first-child,
.prose > :first-child + h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.prose h3 { margin-top: var(--s4); }
.prose p, .prose li { color: var(--text-light); }
.prose strong { color: var(--text-dark); }
.prose ul, .prose ol { max-width: 72ch; }

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1) var(--s4);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s5);
  background: var(--surface);
  border: var(--hair) solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .04em;
  color: var(--text-light);
}

.callout {
  padding: var(--s4);
  margin-bottom: var(--s4);
  background: var(--accent-wash);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}
.callout p { margin-bottom: 0; color: var(--text-dark); font-size: var(--fs-sm); }

/* --------------------------------------------------------------------------
   14. Contact
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--s6);
  align-items: start;
}

.contact-card {
  background: var(--surface);
  border: var(--hair) solid var(--border);
  border-radius: var(--radius);
  padding: var(--s5);
  box-shadow: var(--shadow-md);
}
.contact-card h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }

.contact-list { list-style: none; margin: 0 0 var(--s5); padding: 0; max-width: none; }
.contact-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: var(--s3);
  align-items: center;
  padding-block: var(--s3);
  border-bottom: var(--hair) solid var(--border);
  margin: 0;
}
.contact-list li:first-child { padding-top: 0; }
.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: var(--accent-wash);
  color: var(--accent);
  border-radius: var(--radius);
}
.contact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 2px;
}
.contact-value {
  display: block;
  font-weight: 600;
  color: var(--primary);
  overflow-wrap: anywhere;
}
a.contact-value:hover { color: var(--accent); }

.form-grid { display: grid; gap: var(--s3); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }

.field { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.field label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-light);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .7rem var(--s2);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--text-dark);
  background: var(--bg);
  border: var(--hair) solid var(--border-strong);
  border-radius: var(--radius);
  transition: border-color var(--speed) var(--ease), background-color var(--speed) var(--ease);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--primary-mid); }
.field input:focus, .field select:focus, .field textarea:focus { background: var(--surface); }

.form-note {
  font-size: var(--fs-xs);
  color: var(--text-light);
  margin: 0;
  max-width: none;
}

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--primary);
  color: var(--on-dark-muted);
  border-top: 3px solid var(--accent);
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: var(--s5);
  padding-block: var(--s6);
}
.footer-col { min-width: 0; }
.footer h2 {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: var(--s3);
}
.footer-brand .wordmark { color: var(--on-dark); margin-bottom: var(--s3); }
.footer-brand .wordmark-mark { background: var(--accent-soft); color: var(--primary-deep); }
.footer-brand .wordmark-suffix { color: var(--on-dark-muted); }
.footer-blurb { color: var(--on-dark-muted); max-width: 40ch; margin-bottom: var(--s3); }

.footer-ids {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .04em;
  color: var(--on-dark-muted);
}
.footer-ids li { margin-bottom: var(--s1); }

.footer-links { list-style: none; margin: 0; padding: 0; max-width: none; }
.footer-links li { margin-bottom: var(--s2); overflow-wrap: anywhere; }
.footer-links a {
  color: var(--on-dark-muted);
  text-decoration: none;
  transition: color var(--speed) var(--ease);
}
.footer-links a:hover { color: var(--accent-soft); text-decoration: underline; }

.footer-bar {
  background: var(--primary-deep);
  border-top: var(--hair) solid rgba(242,245,241,.14);
}
.footer-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  padding-block: var(--s3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .04em;
  color: var(--on-dark-muted);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--s3); }
.footer-legal a { color: var(--on-dark-muted); text-decoration: none; }
.footer-legal a:hover { color: var(--accent-soft); text-decoration: underline; }

/* --------------------------------------------------------------------------
   16. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prose-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .prose-nav { position: static; }
  .hero-grid { gap: var(--s5); }
}

@media (max-width: 768px) {
  .section { padding-block: var(--s6); }
  .section-tight { padding-block: var(--s5); }

  .navbar { position: relative; }
  .nav-toggle { display: inline-flex; }

  .nav-menu {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s3);
    padding: var(--s4);
    background: var(--surface);
    border-bottom: var(--hair) solid var(--border);
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.is-open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links li { border-bottom: var(--hair) solid var(--border); }
  .nav-link { display: block; padding: var(--s2) 0; font-size: var(--fs-body); }
  .nav-link::after { display: none; }
  .nav-link.is-active { color: var(--accent); }
  .nav-menu .btn { justify-content: center; }

  .hero { min-height: 0; padding-block: var(--s6); display: block; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-plate { display: none; }

  .page-hero-inner { grid-template-columns: minmax(0, 1fr); }
  .page-hero-plate { display: none; }

  .value-grid { grid-template-columns: minmax(0, 1fr); }
  .value-item { border-right: 0; border-bottom: var(--hair) solid var(--border); }
  .value-item:last-child { border-bottom: 0; }

  .services-grid,
  .services-grid-2 { grid-template-columns: minmax(0, 1fr); }

  .split { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }

  .process li { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }

  .data-rows { grid-template-columns: minmax(0, 1fr); }
  .data-row { border-right: 0; }
  .data-row:nth-last-child(-n+2) { border-bottom: var(--hair) solid var(--border); }
  .data-row:last-child { border-bottom: 0; }

  .cta-inner { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }

  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .contact-card { padding: var(--s4); }
  .form-row { grid-template-columns: minmax(0, 1fr); }

  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s5); padding-block: var(--s5); }
  .footer-bar-inner { justify-content: flex-start; }
}

@media (max-width: 380px) {
  .wordmark-text { font-size: .95rem; }
  .btn { padding: .7rem 1.1rem; }
}

/* --------------------------------------------------------------------------
   17. Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .btn:hover, .service-card:hover { transform: none; }
}
