/* Mine Lake Mechanical: styles
   Colour and type are taken from the business card: one deep navy, a charcoal
   for secondary lettering, and a near-white "card stock" background. */

:root {
  --navy: #0b3059;
  --navy-deep: #082647;
  --navy-soft: #1b4474;
  --ink: #1d2733;
  --ink-muted: #4a5663;
  --paper: #f7f8f9;
  --white: #ffffff;
  --mist: #e4e9ef;
  --line: rgba(11, 48, 89, 0.16);
  --on-navy: #ffffff;
  --on-navy-muted: rgba(255, 255, 255, 0.78);
  --error: #b3261e;
  --focus: #f2b632;

  --font-display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(64px, 10vw, 128px);
  --header-h: 68px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.12; color: var(--navy); }
p { margin: 0; }
a { color: var(--navy); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

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

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white);
  padding: 10px 16px; font-weight: 600; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before {
  content: ""; width: 28px; height: 2px; background: currentColor;
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-deep); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--white); text-decoration: none; }
.btn { white-space: nowrap; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 0.8125rem; }

.copy-btn {
  font: inherit; font-family: var(--font-display); font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--navy); background: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  min-height: 36px; padding: 0 12px; cursor: pointer;
}
.copy-btn:hover { border-color: var(--navy); }
.copy-status { font-size: 0.9375rem; color: var(--ink-muted); }

/* ---------- Brand lockup (header / footer) ---------- */

.brand {
  display: inline-flex; flex-direction: column; align-items: center;
  text-decoration: none; color: var(--navy); line-height: 1;
  white-space: nowrap; flex: 0 0 auto;
}
.brand-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.375rem; letter-spacing: 0.02em; text-transform: uppercase;
}
.brand-sub {
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink); margin-top: 4px; margin-right: -0.28em;
}
.brand--light, .brand--light .brand-sub { color: var(--white); }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 248, 249, 0.94);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 20px -16px rgba(8, 38, 71, 0.5);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 24px;
}
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.875rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
}
.site-nav a:hover { color: var(--navy); text-decoration: underline; }

.nav-toggle { display: none; }

@media (max-width: 759px) {
  .header-inner { gap: 12px; }
  .header-cta { margin-left: auto; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0;
    background: none; border: 1px solid var(--line); border-radius: var(--radius);
    color: var(--navy); cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
    display: block; width: 20px; height: 2px; background: currentColor;
    transition: transform 0.2s, background-color 0.2s;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 24px -20px rgba(8, 38, 71, 0.6);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; }
  .site-nav a { min-height: 52px; width: 100%; padding: 0; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .site-nav li:last-child a { border-bottom: 0; }
}
@media (max-width: 459px) {
  .hide-narrow { display: none; }
}
@media (max-width: 379px) {
  .brand-name { font-size: 1.125rem; }
  .brand-sub { font-size: 0.5rem; }
  .header-cta { padding: 0 12px; }
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: var(--paper);
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding-top: clamp(36px, 5.5vw, 72px);
  padding-bottom: clamp(20px, 3vw, 36px);
}
.hero h1 {
  margin-top: 20px;
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3.625rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.lead {
  margin-top: 20px;
  max-width: 34em;
  font-size: clamp(1.125rem, 1rem + 0.35vw, 1.3125rem);
  color: var(--ink-muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-email {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  margin-top: 20px; font-weight: 600;
}

/* The logo, cut from the business card and traced to SVG (tools/extract_logo.py). */
.emblem {
  display: block;
  width: 100%; max-width: 540px; height: auto; margin-inline: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .emblem { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both 0.1s; }
  .hero-copy > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > :nth-child(n + 4) { animation-delay: 0.18s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.landscape {
  height: clamp(110px, 17vw, 280px);
  background: url("../img/landscape.svg") center bottom / cover no-repeat;
  margin-bottom: -1px; /* no hairline gap before the navy section */
}

@media (max-width: 859px) {
  .hero-inner { grid-template-columns: 1fr; }
  /* Stacked: copy first, then the logo sits above the treeline like on the card. */
  .emblem { max-width: min(420px, 88%); margin-top: 8px; }
  .hero-actions .btn { flex: 1 1 200px; }
}

/* ---------- Wrench divider (from the card) ---------- */

.wrench-divider {
  display: flex; align-items: center; gap: 14px;
  width: 220px; color: var(--navy);
}
.wrench-divider svg { flex: 0 0 auto; width: 50%; height: auto; aspect-ratio: 120 / 32; }
.wrench-divider::before, .wrench-divider::after {
  content: ""; flex: 1; height: 2px; background: currentColor; opacity: 0.8;
}
.wrench-divider--light { color: var(--white); margin: 20px auto 0; }

/* ---------- Services: the back of the card ---------- */

.services {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--on-navy);
  padding: clamp(40px, 6vw, 72px) 0 var(--section);
  text-align: center;
}
.services .wrap { position: relative; }

.group-label {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 1rem; color: var(--on-navy-muted);
  margin-bottom: 28px;
}
.service-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
}
.service-list li { padding: 0 clamp(12px, 2.4vw, 32px); position: relative; }
.service-list li + li::before {
  /* the card's bullet separators */
  content: ""; position: absolute; left: -4px; top: 0.72rem;
  width: 8px; height: 8px; border-radius: 50%; background: var(--white);
}
.service-list h3 {
  color: var(--white);
  font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.25rem, 0.95rem + 1vw, 1.75rem);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.service-list p {
  margin: 12px auto 0; max-width: 22em;
  color: var(--on-navy-muted); font-size: 1.0625rem;
}
.card-rule {
  border: 0; height: 2px; background: rgba(255, 255, 255, 0.85);
  margin: clamp(36px, 5vw, 56px) auto; max-width: 980px;
}
.area {
  margin-top: clamp(48px, 6vw, 72px);
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); color: var(--white);
}

@media (max-width: 759px) {
  .service-list { grid-template-columns: 1fr; gap: 28px; }
  .service-list li { padding: 0; }
  .service-list li + li { padding-top: 28px; }
  .service-list li + li::before { left: 50%; top: 0; margin-left: -4px; }
}

/* ---------- How it works ---------- */

.how { padding: var(--section) 0; background: var(--white); }
.how h2 {
  margin-top: 16px; max-width: 18em;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); font-weight: 800;
  text-wrap: balance;
}
.steps {
  list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 2px solid var(--navy); padding-top: 20px; }
.steps li::before {
  content: "0" counter(step);
  display: block; margin-bottom: 14px;
  font-family: var(--font-display); font-weight: 800; font-size: 0.875rem;
  letter-spacing: 0.16em; color: var(--navy);
}
.steps h3 { font-size: 1.375rem; font-weight: 700; }
.steps p { margin-top: 8px; color: var(--ink-muted); }

@media (max-width: 759px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Contact / request form ---------- */

.contact { padding: var(--section) 0; background: var(--paper); border-top: 1px solid var(--line); }
.contact-inner {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 96px); align-items: start;
}
.contact-intro h2 {
  margin-top: 16px;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); font-weight: 800;
}
.contact-intro > p:not(.eyebrow):not(.contact-meta) { margin-top: 16px; color: var(--ink-muted); max-width: 30em; }
.contact-email {
  display: inline-block; margin-top: 28px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1rem, 0.8rem + 0.9vw, 1.375rem);
  overflow-wrap: anywhere;
}
.contact-meta {
  margin-top: 12px; color: var(--ink-muted);
  font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1rem;
}
@media (min-width: 900px) {
  .contact-intro { position: sticky; top: calc(var(--header-h) + 32px); }
}
@media (max-width: 899px) {
  .contact-inner { grid-template-columns: minmax(0, 1fr); }
}

.request {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  padding: clamp(20px, 4vw, 40px);
  display: grid; gap: 22px;
}
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend {
  display: block; margin-bottom: 8px; padding: 0;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem;
  color: var(--ink);
}
.optional { font-weight: 500; color: var(--ink-muted); }
.field input, .field textarea {
  width: 100%;
  font: inherit; font-size: 1.0625rem; color: var(--ink);
  background: var(--paper);
  border: 1px solid #b9c3cf; border-radius: var(--radius);
  padding: 12px 14px; min-height: 50px;
  transition: border-color 0.15s, background-color 0.15s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input::placeholder, .field textarea::placeholder { color: #7a8591; }
.field input:hover, .field textarea:hover { border-color: var(--navy-soft); }
.field input:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--navy); background: var(--white);
}
.field [aria-invalid="true"] { border-color: var(--error); background: #fdf5f4; }
.field-hint { margin-top: 6px; font-size: 0.9375rem; color: var(--ink-muted); }
.field-error { margin-top: 6px; font-size: 0.9375rem; font-weight: 600; color: var(--error); }
.field-error:empty { display: none; }

.choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.choice { margin: 0 !important; position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 50px; padding: 6px 8px;
  border: 1px solid #b9c3cf; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 600; font-size: 0.875rem; color: var(--ink);
  background: var(--paper);
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.choice:hover span { border-color: var(--navy); }
.choice input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
fieldset[aria-invalid="true"] .choice span { border-color: var(--error); }
@media (max-width: 559px) {
  .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.form-submit { display: grid; gap: 10px; }
.form-submit .btn { justify-self: start; white-space: normal; text-align: center; }
@media (max-width: 559px) {
  .form-submit .btn { justify-self: stretch; }
}

.form-errors {
  border-left: 4px solid var(--error); background: #fdf5f4;
  padding: 14px 18px; color: var(--ink);
}
.form-errors ul { margin: 6px 0 0; padding-left: 20px; }
.form-errors a { color: var(--error); font-weight: 600; }
.form-errors:focus { outline: none; }

.form-result {
  border-left: 4px solid var(--navy); background: var(--mist);
  padding: 18px 20px; display: grid; gap: 10px;
}
.form-result:focus { outline: none; }
.form-result-title { font-family: var(--font-display); font-weight: 700; color: var(--navy); }
.form-result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.message-preview {
  width: 100%; font: inherit; font-size: 0.9375rem;
  padding: 12px; border: 1px solid #b9c3cf; border-radius: var(--radius); background: var(--white);
}

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

.site-footer {
  background: var(--navy-deep); color: var(--on-navy-muted);
  padding: 48px 0; font-size: 1rem;
}
.site-footer a { color: var(--white); }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px;
}
.footer-legal { font-size: 0.875rem; }
@media (max-width: 759px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .site-footer .brand { align-items: flex-start; }
}
