/*
  Shared layout & component styles — E.T. General Contractor.
  Theme tokens come from theme.css (load that file first).
  System per DESIGN.md: bone canvas + navy bands, 1px hairline structure,
  no resting shadows, Machine Orange rationed to actions only.
*/

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg-alt);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 var(--space-2);
}

p { margin: 0 0 var(--space-2); }

a { color: var(--color-primary); text-decoration: none; }

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

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

section { padding: var(--section-pad) 0; }
.alt-bg { background: var(--color-bg-alt); }
.bg-white { background: var(--color-bg); }

/* Navy interstitial band */
.band-navy {
  background: var(--color-primary);
  color: var(--color-white);
}
.band-navy h2, .band-navy h3 { color: var(--color-white); }
.band-navy p { color: var(--color-text-muted-dark); }

/* Eyebrow — the recurring Space Mono instrument stamp */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 var(--space-2);
}
.band-navy .eyebrow { color: var(--color-text-muted-dark); }

/* Section headings — editorial, left-aligned */
.section-heading { max-width: 720px; margin: 0 0 var(--space-4); }
.section-heading h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.15; }
.section-heading p { color: var(--color-text-muted); font-size: 1.125rem; max-width: 65ch; margin-bottom: 0; }
.band-navy .section-heading p { color: var(--color-text-muted-dark); }

.lead { font-size: 1.125rem; line-height: 1.55; }
.max-prose { max-width: 65ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--duration) var(--ease),
              background-color var(--duration) var(--ease),
              box-shadow var(--duration) var(--ease);
}
.btn:hover { transform: translateY(-2px); }

/* Orange = THE action color. One filled orange element per screenful. */
.btn-primary { background: var(--color-accent); color: var(--color-white); }
.btn-primary:hover { background: var(--color-accent-dark); box-shadow: var(--shadow-soft); }

/* Ghost buttons — border color follows the surface */
.btn-ghost-light { border-color: var(--color-white); color: var(--color-white); background: transparent; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.08); }
.btn-ghost-dark { border-color: var(--color-primary); color: var(--color-primary); background: transparent; }
.btn-ghost-dark:hover { background: rgba(22, 35, 47, 0.08); }
.btn-navy { background: var(--color-primary); color: var(--color-white); }
.btn-navy:hover { background: var(--color-primary-dark); }
/* Legacy alias used by template shells */
.btn-secondary { border-color: var(--color-primary); color: var(--color-primary); background: transparent; }
.btn-secondary:hover { background: rgba(22, 35, 47, 0.08); }

/* Text link with arrow — navy at rest, orange on hover */
.link-arrow {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-primary);
  transition: color var(--duration) var(--ease);
}
.link-arrow:hover { color: var(--color-accent-dark); }

/* Skip link (accessibility) */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-1) var(--space-2);
  z-index: 1000;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

/* ---------- Header — solid navy bar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
}

/* On the homepage the header floats over the full-screen hero */
.site-header[data-hero-nav] {
  position: fixed;
  width: 100%;
  background: transparent;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.site-header[data-hero-nav].is-scrolled {
  background: var(--color-primary);
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-3);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-white);
  min-width: 0;
}
.logo img {
  width: 48px;
  height: 48px;
  border-radius: 4px; /* crest ships on a white tile — read as a badge chip */
  flex-shrink: 0;
}
.logo-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

.main-nav > ul { display: flex; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a {
  display: inline-block;
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.375rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--duration) var(--ease);
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a[aria-current="page"] { border-bottom-color: var(--color-accent); }
.nav-caret { width: 10px; height: 10px; margin-left: 2px; vertical-align: middle; }

/* Dropdowns (Services / Service Areas) */
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 8px);
  min-width: 240px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-1) 0;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.dropdown a {
  display: block;
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.625rem var(--space-2);
  border-bottom: none;
}
.dropdown a:hover { background: var(--color-bg-alt); color: var(--color-primary); }

.header-actions { display: flex; align-items: center; gap: var(--space-3); }
.header-call {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-white);
  white-space: nowrap;
}
.header-call:hover { color: var(--color-accent); }
.header-actions .btn { padding: 0.65rem 1.25rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: transform var(--duration) var(--ease), opacity var(--duration) var(--ease);
}

@media (max-width: 1080px) {
  .main-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-primary);
    border-top: 1px solid var(--color-border-dark);
    border-bottom: 1px solid var(--color-border-dark);
    display: none;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }
  .main-nav.is-open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; padding: var(--space-2) var(--space-3); }
  .main-nav > ul > li > a { display: block; padding: 0.75rem 0; font-size: 1rem; border-bottom: none; }
  .main-nav > ul > li > a:hover,
  .main-nav > ul > li > a[aria-current="page"] { color: var(--color-accent); }
  .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border: none;
    padding: 0 0 var(--space-1) var(--space-2);
  }
  .dropdown a { color: var(--color-text-muted-dark); padding: 0.5rem 0; }
  .dropdown a:hover { background: transparent; color: var(--color-white); }
  .nav-caret { display: none; }
  .nav-toggle { display: flex; }
}
@media (max-width: 640px) {
  .header-actions .btn, .header-call { display: none; }
  .logo-name { font-size: 0.9375rem; white-space: normal; max-width: 180px; }
}

/* ---------- Hero — full-bleed photo with navy overlay ---------- */
.hero--photo {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  padding: var(--space-6) 0 var(--space-5);
  overflow: hidden;
  background: var(--color-primary-dark);
}
.hero-media {
  position: absolute;
  inset: 0;
}
.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(13, 23, 35, 0.86) 0%,
    rgba(13, 23, 35, 0.55) 45%,
    rgba(13, 23, 35, 0.25) 100%);
}
.hero--photo .container { position: relative; z-index: 1; }
.hero-content { max-width: 800px; }
.hero--photo .eyebrow { color: var(--color-accent); }
.hero--photo h1 {
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--color-white);
  margin-bottom: var(--space-3);
}
.hero--photo .lead {
  color: rgba(255, 255, 255, 0.9);
  max-width: 640px;
  margin-bottom: var(--space-4);
}
.hero-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* Trust strip — Space Mono badges under the hero CTAs */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-4);
  padding: 0;
  list-style: none;
}
.trust-strip li {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--color-text-muted);
  border-radius: 4px;
  padding: var(--space-1) 0.75rem;
  white-space: nowrap;
}
.trust-strip .star { color: #f5b301; }
@media (max-width: 640px) {
  .trust-strip li { white-space: normal; }
}

/* ---------- Interior page hero — navy band, optional photo ---------- */
.page-hero {
  position: relative;
  background: var(--color-primary);
  padding: var(--space-5) 0;
  overflow: hidden;
}
.page-hero--photo {
  display: flex;
  align-items: flex-end;
  min-height: 520px;
  padding: var(--space-6) 0 var(--space-5);
  background: var(--color-primary-dark);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--color-white);
  max-width: 760px;
  margin-bottom: var(--space-3);
}
.page-hero .lead {
  color: rgba(255, 255, 255, 0.9);
  max-width: 65ch;
  margin-bottom: var(--space-4);
}
.page-hero .lead a {
  color: var(--color-white);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Service cards ---------- */
.grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.grid--two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .grid--two { grid-template-columns: 1fr; } }

/* Muted note under a towns checklist (service-area pages) */
.towns-note { color: var(--color-text-muted); margin-top: var(--space-3); max-width: 65ch; }

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.card h3 { font-size: 1.375rem; margin-bottom: var(--space-1); }
.card p { font-size: 0.9375rem; color: var(--color-text-muted); }
.card .link-arrow { font-size: 0.875rem; }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}
.card-icon svg { width: 24px; height: 24px; }

/* ---------- Featured split (photo + editorial text) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}
.split-media img {
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}
.split-media figcaption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}
/* Portrait-orientation photo in a split (e.g. crew shots on About) */
.split-media--tall img { aspect-ratio: 3 / 4; }
.split-body h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.15; }
.split-body p { color: var(--color-text-muted); font-size: 1.0625rem; max-width: 55ch; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: var(--space-4); }
}

/* ---------- Sub-service editorial rows (service pages) ---------- */
.subservices { max-width: 880px; }
.subservice {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--space-3);
  padding: var(--space-4) 0;
}
.subservice + .subservice { border-top: 1px solid var(--color-border); }
.subservice-index {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-accent);
  padding-top: 0.5rem;
}
.subservice h2 { font-size: 1.75rem; line-height: 1.2; margin-bottom: var(--space-1); }
.subservice p { color: var(--color-text-muted); max-width: 65ch; margin-bottom: 0; }
@media (max-width: 560px) {
  .subservice { grid-template-columns: 1fr; gap: var(--space-1); padding: var(--space-3) 0; }
  .subservice-index { padding-top: 0; }
}

/* ---------- Trust checklist (service pages) ---------- */
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2) var(--space-4);
  max-width: 880px;
}
.checklist li { display: flex; gap: 0.75rem; align-items: flex-start; }
.checklist svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 3px; color: var(--color-primary); }
@media (max-width: 640px) { .checklist { grid-template-columns: 1fr; } }

/* ---------- Benefit blocks (navy band) ---------- */
.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4) var(--space-3);
  margin-top: var(--space-5);
}
.benefit-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-sm);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2);
}
.benefit-icon svg { width: 22px; height: 22px; }
.benefit h3 { font-size: 1.125rem; color: var(--color-white); margin-bottom: var(--space-1); }
.benefit p { font-size: 0.875rem; color: var(--color-text-muted-dark); margin-bottom: 0; }
@media (max-width: 900px) { .benefits { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .benefits { grid-template-columns: 1fr; gap: var(--space-4); } }

/* ---------- Process steps with connector line ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4) var(--space-3);
  counter-reset: step;
}
.step { position: relative; padding-top: var(--space-3); }
/* square node */
.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 9px;
  height: 9px;
  background: var(--color-primary);
}
/* connector line to the next node */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 21px;
  right: calc(-1 * var(--space-3));
  height: 1px;
  background: var(--color-border);
}
.step-number {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-accent);
  display: block;
  margin-bottom: var(--space-1);
}
.step h3 { font-size: 1.25rem; margin-bottom: var(--space-1); }
.step p { font-size: 0.9375rem; color: var(--color-text-muted); margin-bottom: 0; }
@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2)::after { display: none; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .step::after { display: none; }
}

/* ---------- Service area ---------- */
.area-body { max-width: 65ch; }
.area-body p { color: var(--color-text-muted); font-size: 1.0625rem; }
.area-body strong { color: var(--color-text); }

/* ---------- Testimonials ---------- */
.testimonial { font-style: normal; display: flex; flex-direction: column; }
.testimonial .stars { display: flex; gap: 2px; margin-bottom: var(--space-2); color: #f5b301; }
.testimonial .stars svg { width: 16px; height: 16px; }
.testimonial blockquote {
  margin: 0 0 var(--space-3);
  font-size: 1rem;
  color: var(--color-text);
  flex-grow: 1;
}
.testimonial cite {
  display: block;
  font-style: normal;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text);
}
.testimonial .review-source {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 2px 0 0;
}
.testimonials-footer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}
.testimonials-footer .review-score {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.testimonials-footer .star { color: #f5b301; }

/* Reviews page — small disclosure note inside the section heading */
.section-heading .reviews-disclosure {
  font-size: 0.8125rem;
  max-width: 65ch;
}

/* ---------- Pull-quote band — single testimonial (use with .band-navy) ---------- */
.quote-band .stars { display: flex; gap: 2px; margin-bottom: var(--space-3); color: #f5b301; }
.quote-band .stars svg { width: 18px; height: 18px; }
.quote-band blockquote {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.5;
  color: var(--color-white);
  max-width: 65ch;
}
.quote-band cite {
  display: block;
  font-style: normal;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-white);
}
.quote-band .review-source { font-size: 0.8125rem; color: var(--color-text-muted-dark); margin: 2px 0 0; }

/* ---------- Stats / credentials strip (use with .band-navy) ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.stat {
  border-left: 1px solid var(--color-border-dark);
  padding-left: var(--space-3);
}
.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--color-white);
  margin-bottom: var(--space-1);
}
.stat-number .star { color: #f5b301; }
.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted-dark);
}
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Emergency / notice strip ---------- */
.emergency-strip,
.notice-strip {
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: var(--space-3) 0;
}
.emergency-strip .container,
.notice-strip .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.emergency-strip p, .notice-strip p { margin: 0; color: var(--color-text-muted-dark); font-size: 0.9375rem; }
.emergency-strip strong, .notice-strip strong { color: var(--color-white); font-family: var(--font-heading); }
.emergency-strip a, .notice-strip a { color: var(--color-accent); font-weight: 600; white-space: nowrap; }
.emergency-strip a:hover, .notice-strip a:hover { color: var(--color-accent-dark); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; }
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item summary {
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  padding: var(--space-3) var(--space-4) var(--space-3) 0;
  position: relative;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.125rem;
  color: var(--color-text-muted);
  transition: transform var(--duration) var(--ease);
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { color: var(--color-text-muted); padding-bottom: var(--space-3); max-width: 65ch; }

/* ---------- CTA band (bone, centered) ---------- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
.cta-band p { color: var(--color-text-muted); font-size: 1.125rem; max-width: 55ch; margin: 0 auto var(--space-4); }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Forms (contact page) ---------- */
.form-field { margin-bottom: var(--space-2); display: flex; flex-direction: column; gap: 0.35rem; }
.form-field label { font-family: var(--font-heading); font-weight: 500; font-size: 0.875rem; }
.form-field input, .form-field textarea, .form-field select {
  padding: 0.75rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font: inherit;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

/* Contact page — form card + info sidebar */
.contact-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-5);
  align-items: start;
}
/* let columns shrink below the intrinsic width of form controls */
.contact-layout > * { min-width: 0; }
.contact-layout .form-field input,
.contact-layout .form-field textarea,
.contact-layout .form-field select { width: 100%; }
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; gap: var(--space-4); }
}

.contact-form-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
}
@media (max-width: 560px) {
  .contact-form-card { padding: var(--space-3); }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--space-2);
}
.form-row .form-field { min-width: 0; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.form-field .field-hint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
}
.form-field input[type="file"] { padding: 0.6rem; }
.form-field input[type="file"]::file-selector-button {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--color-primary);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.5rem 1rem;
  margin-right: var(--space-2);
  cursor: pointer;
}
.form-smallprint {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: var(--space-2) 0 0;
}

/* Sidebar — mono-label instrument blocks separated by hairlines */
.contact-info-item {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-border);
}
.contact-info-item:first-child { border-top: none; padding-top: 0; }
.contact-info-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}
.contact-info-item p { margin: 0; }
.contact-info-item a {
  font-family: var(--font-heading);
  font-weight: 600;
  transition: color var(--duration) var(--ease);
}
.contact-info-item a:hover { color: var(--color-accent-dark); }
.contact-phone { font-size: 1.375rem; letter-spacing: -0.01em; }
.contact-social { display: flex; gap: var(--space-3); list-style: none; margin: 0; padding: 0; }

/* Emergency note — navy panel (same vocabulary as the emergency strip) */
.contact-emergency {
  background: var(--color-primary);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-top: var(--space-3);
}
.contact-emergency p { margin: 0; font-size: 0.9375rem; color: var(--color-text-muted-dark); }
.contact-emergency strong { color: var(--color-white); font-family: var(--font-heading); }
.contact-emergency a { color: var(--color-accent); font-weight: 600; white-space: nowrap; }
.contact-emergency a:hover { color: var(--color-accent-dark); }

/* Google Maps embed — contained, hairline-bordered like photos in cards */
.map-embed {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.map-embed iframe { display: block; width: 100%; height: 460px; border: 0; }
@media (max-width: 640px) { .map-embed iframe { height: 340px; } }

/* ---------- Gallery ---------- */
.gallery-item { position: relative; overflow: hidden; border-radius: var(--radius); }
.gallery-item img { aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- Footer — navy with deep-navy legal strip ---------- */
.site-footer {
  background: var(--color-primary);
  color: var(--color-text-muted-dark);
  padding: var(--space-5) 0 0;
}
.footer-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding-bottom: var(--space-5);
}
.footer-brand .logo { margin-bottom: var(--space-2); }
.footer-brand p { font-size: 0.875rem; max-width: 36ch; }
.footer-brand a { color: var(--color-text-muted-dark); transition: color var(--duration) var(--ease); }
.footer-brand a:hover { color: var(--color-white); }
.footer-brand .logo, .footer-brand .logo:hover { color: var(--color-white); }
.footer-values {
  font-style: italic;
  color: var(--color-text-muted-dark);
}
.footer-col h4 {
  color: var(--color-white);
  font-size: 0.9375rem;
  margin-bottom: var(--space-2);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.625rem; }
.footer-col a { color: var(--color-text-muted-dark); font-size: 0.875rem; transition: color var(--duration) var(--ease); }
.footer-col a:hover { color: var(--color-white); }
.footer-col p { font-size: 0.875rem; margin-bottom: 0.625rem; }
.footer-bottom {
  background: var(--color-primary-dark);
}
.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}
.footer-license {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted-dark);
  margin: 0;
}
.footer-bottom p { margin: 0; font-size: 0.8125rem; }
.footer-social { display: flex; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.footer-social a { color: var(--color-text-muted-dark); font-size: 0.8125rem; }
.footer-social a:hover { color: var(--color-white); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Sticky mobile call bar ---------- */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--color-bg);
  padding: var(--space-1) var(--space-2);
  padding-bottom: calc(var(--space-1) + env(safe-area-inset-bottom));
  gap: var(--space-1);
  /* the one permitted resting shadow on the site */
  box-shadow: 0 -4px 20px rgba(13, 23, 35, 0.12);
}
.mobile-cta-bar .btn { flex: 1; text-align: center; padding: 0.75rem; }

@media (max-width: 767px) {
  .mobile-cta-bar { display: flex; }
  body { padding-bottom: 72px; }
}

/* ---------- Responsive section rhythm ---------- */
@media (max-width: 767px) {
  :root { --section-pad: 48px; }
  .section-heading { margin-bottom: var(--space-4); }
}

/* 404 / thank-you simple pages */
.center-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
