/* ==========================================================================
   IPM Environmental Services — main stylesheet
   Static HTML site. No build step, no framework, no external requests.
   Sections: 1 tokens · 2 base · 3 layout · 4 header/nav · 5 hero · 6 blocks
             7 cards · 8 forms · 9 footer · 10 utilities · 11 print
   ========================================================================== */

/* 1 — design tokens ------------------------------------------------------ */
:root {
  /* Brand palette, sampled from the IPM logo and the previous site */
  --navy:        #0e3a78;
  --navy-dark:   #092a59;
  --blue:        #1a4fa0;
  --blue-mid:    #2f6bc4;
  --blue-light:  #eaf1fb;
  --teal:        #013537;

  --ink:         #16212b;
  --body:        #4c5a68;
  --muted:       #616e7c;   /* darkened from #6e7d8c to clear WCAG AA (4.5:1) on both white and --bg-soft */
  --line:        #e2e8f0;
  --bg:          #ffffff;
  --bg-soft:     #f5f7fa;
  --white:       #ffffff;

  --focus:       #ffb703;

  --font-head: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  --radius:    10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(14, 58, 120, .06), 0 2px 8px rgba(14, 58, 120, .06);
  --shadow-md: 0 4px 12px rgba(14, 58, 120, .09), 0 12px 32px rgba(14, 58, 120, .10);
  --shadow-lg: 0 8px 24px rgba(14, 58, 120, .12), 0 24px 60px rgba(14, 58, 120, .14);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* 2 — base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Offset in-page anchor targets so the sticky header never covers them */
  scroll-padding-top: 110px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5 {
  margin: 0 0 .6em;
  color: var(--teal);
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.015em;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.08rem; }

p  { margin: 0 0 1.15em; }
p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }

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

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

strong { color: var(--ink); font-weight: 700; }

/* A single, consistent focus ring everywhere — keyboard users can always
   see where they are, including on dark backgrounds. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: .85rem 1.4rem;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: var(--white); }

/* 3 — layout ------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 820px; }

.section { padding-block: clamp(3.25rem, 7vw, 6rem); }
.section--soft  { background: var(--bg-soft); }
.section--tight { padding-block: clamp(2.25rem, 5vw, 3.75rem); }

.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: block;
  margin-bottom: .75rem;
  color: var(--blue-mid);
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--body); }

/* 4 — header & navigation ------------------------------------------------ */
.topbar {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, .85);
  font-size: .875rem;
}
.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .4rem 1.5rem;
  min-height: 42px;
  padding-block: .35rem;
}
.topbar a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}
.topbar a:hover { color: var(--white); text-decoration: underline; }
.topbar__note { margin-right: auto; color: rgba(255, 255, 255, .7); }
.topbar svg { width: 15px; height: 15px; flex: none; fill: currentColor; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s var(--ease);
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 82px;
  padding-block: .6rem;
}

.brand { flex: none; line-height: 0; }
.brand img { width: clamp(150px, 20vw, 215px); height: auto; }

.nav { margin-left: auto; }
.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(.35rem, 1.4vw, 1.35rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__link {
  position: relative;
  display: block;
  padding: .55rem .2rem;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--blue-mid);
  transform: scaleX(0);
  transition: transform .22s var(--ease);
}
.nav__link:hover { color: var(--blue); }
.nav__link:hover::after,
.nav__link[aria-current]::after { transform: scaleX(1); }
.nav__link[aria-current] { color: var(--blue); }

.header-cta { flex: none; }
.nav__cta { display: none; }

/* Hamburger — hidden until the desktop nav no longer fits */
.nav-toggle {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-left: auto;
  padding: 0;
  background: var(--white);
  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;
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.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); }

@media (max-width: 1080px) {
  /* The drawer is transformed, which gives it its own stacking context and puts
     it above the button. Lift the toggle so the close (X) stays visible. */
  .nav-toggle { display: inline-flex; position: relative; z-index: 2; }
  .header-cta { display: none; }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(340px, 84vw);
    margin: 0;
    padding: 5.5rem 1.75rem 2rem;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform .3s var(--ease);
    overflow-y: auto;
    visibility: hidden;
  }
  .nav.is-open { transform: none; visibility: visible; }

  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link {
    padding: .95rem .25rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .nav__link::after { display: none; }
  .nav__link[aria-current] { color: var(--blue); }
  .nav__cta { display: block; margin-top: 1.5rem; }
  .nav__cta .btn { width: 100%; }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(9, 42, 89, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s var(--ease);
  }
  .nav-backdrop.is-open { opacity: 1; visibility: visible; }
  body.nav-open { overflow: hidden; }
}

/* 5 — buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .85rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: .98rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              border-color .18s var(--ease), color .18s var(--ease),
              box-shadow .18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--blue); border-color: var(--blue); color: var(--white); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--navy); border-color: var(--navy); color: var(--white); box-shadow: var(--shadow-md); }

.btn--ghost { background: transparent; border-color: var(--blue); color: var(--blue); }
.btn--ghost:hover { background: var(--blue); color: var(--white); }

.btn--light { background: var(--white); border-color: var(--white); color: var(--navy); box-shadow: var(--shadow-sm); }
.btn--light:hover { background: var(--blue-light); border-color: var(--blue-light); color: var(--navy); }

.btn--outline-light { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .8); color: var(--white); }
.btn--outline-light:hover { background: var(--white); border-color: var(--white); color: var(--navy); }

.btn--sm { padding: .6rem 1.15rem; font-size: .9rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; }

/* 6 — hero --------------------------------------------------------------- */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: clamp(460px, 68vh, 660px);
  padding-block: clamp(3.5rem, 9vw, 7rem);
  background: var(--navy-dark) center / cover no-repeat;
  color: var(--white);
  isolation: isolate;
}
/* Gradient keeps headline contrast well above 4.5:1 whatever the photo does */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg,
              rgba(9, 42, 89, .93) 0%,
              rgba(9, 42, 89, .82) 42%,
              rgba(9, 42, 89, .55) 75%,
              rgba(9, 42, 89, .42) 100%);
}
.hero__inner { max-width: 760px; }
.hero h1 { color: var(--white); margin-bottom: .45em; text-wrap: balance; }
.hero__sub {
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, .92);
  font-family: var(--font-head);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero__text { margin-bottom: 2rem; color: rgba(255, 255, 255, .92); font-size: 1.1rem; }

/* Compact hero used on interior pages */
.page-hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  background: var(--navy-dark) center / cover no-repeat;
  color: var(--white);
  isolation: isolate;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(9, 42, 89, .94), rgba(9, 42, 89, .72));
}
.page-hero h1 { color: var(--white); margin-bottom: .3em; }
.page-hero p { max-width: 720px; margin-bottom: 0; color: rgba(255, 255, 255, .9); font-size: 1.08rem; }

.breadcrumb { margin-bottom: 1.1rem; font-size: .88rem; color: rgba(255, 255, 255, .75); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-right: .45rem; opacity: .6; }
.breadcrumb a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.breadcrumb a:hover { color: var(--white); text-decoration: underline; }

/* 7 — content blocks ----------------------------------------------------- */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--media-right .split__media { order: 2; }
}
.split__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Tick list — the "meeting and exceeding your needs" points */
.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: .8rem; }
@media (min-width: 720px) { .ticks--2col { grid-template-columns: 1fr 1fr; gap: .8rem 2rem; } }
.ticks li {
  position: relative;
  padding-left: 2.15rem;
  color: var(--body);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--blue-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a4fa0' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / .85rem no-repeat;
}
.ticks--light li { color: rgba(255, 255, 255, .92); }
.ticks--light li::before {
  background-color: rgba(255, 255, 255, .16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* Dark callout band */
.band {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5rem);
  background: var(--navy) center / cover no-repeat;
  color: var(--white);
  isolation: isolate;
}
.band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(9, 42, 89, .95), rgba(14, 58, 120, .86));
}
.band h2, .band h3 { color: var(--white); }
.band p { color: rgba(255, 255, 255, .9); }
.band .eyebrow { color: #9dc0f0; }

/* 8 — cards & grids ------------------------------------------------------ */
.grid { display: grid; gap: clamp(1.1rem, 2.4vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(1.5rem, 2.6vw, 2.1rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
/* Lift only cards that are (or contain) a link — a hover effect on a plain
   card falsely suggests it can be clicked. */
a.card:hover, .card:has(a):hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
a.card { color: inherit; text-decoration: none; }
a.card h3 { transition: color .2s var(--ease); }
a.card:hover h3 { color: var(--blue); }
.card__more { display: block; margin-top: auto; padding-top: .9rem; color: var(--blue); font-family: var(--font-head); font-weight: 600; font-size: .95rem; }
a.card[aria-current="page"] { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
a.card[aria-current="page"] .card__more { color: var(--muted); }
.card h3 { margin-bottom: .5rem; }
.card__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 1.15rem;
  background: var(--blue-light);
  border-radius: 14px;
  color: var(--blue);
}
.card__icon svg { width: 27px; height: 27px; stroke: currentColor; fill: none; stroke-width: 1.9; }

/* Sector tiles — photo with a caption bar, as on the old Services page */
.tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--navy-dark);
}
.tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .5s var(--ease), opacity .3s var(--ease);
}
.tile:hover img { transform: scale(1.06); opacity: .85; }
.tile__label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem .95rem .85rem;
  background: linear-gradient(to top, rgba(9, 42, 89, .92), rgba(9, 42, 89, 0));
  color: var(--white);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .01em;
}

/* Client logo wall */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  border-radius: var(--radius-lg);
  overflow: hidden;
}
/* The 1px rules come from each cell's own outline rather than from gaps over a
   coloured container, so a part-filled final row leaves no stray grey blocks. */
.logo-grid__item {
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 1.4rem 1.15rem;
  background: var(--white);
  box-shadow: 0 0 0 1px var(--line);
}
.logo-grid__item img {
  max-height: 58px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .62;
  transition: filter .28s var(--ease), opacity .28s var(--ease), transform .28s var(--ease);
}
.logo-grid__item:hover img { filter: grayscale(0); opacity: 1; transform: scale(1.05); }

/* Stats strip */
.stats { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); text-align: center; }
.stat__num {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  font-weight: 700;
  line-height: 1;
  color: var(--white);
}
.stat__label { margin-top: .5rem; font-size: .95rem; color: rgba(255, 255, 255, .82); }

/* Accordion — bio-security Q&A and pest guide sections */
.accordion { border-top: 1px solid var(--line); }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__btn {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 1.35rem 0;
  background: none;
  border: 0;
  color: var(--teal);
  font-family: var(--font-head);
  font-size: clamp(1.05rem, 1.9vw, 1.25rem);
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.accordion__btn:hover { color: var(--blue); }
.accordion__icon {
  flex: none;
  position: relative;
  width: 24px;
  height: 24px;
  margin-top: .15em;
  border-radius: 50%;
  background: var(--blue-light);
  transition: background-color .2s var(--ease);
}
.accordion__icon::before, .accordion__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.accordion__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.accordion__btn[aria-expanded="true"] .accordion__icon { background: var(--blue); }
.accordion__btn[aria-expanded="true"] .accordion__icon::before,
.accordion__btn[aria-expanded="true"] .accordion__icon::after { background: var(--white); }
.accordion__btn[aria-expanded="true"] .accordion__icon::after { transform: translate(-50%, -50%) rotate(0); opacity: 0; }

.accordion__panel { display: none; padding-bottom: 1.6rem; }
.accordion__panel.is-open { display: block; }
/* With JS off every panel stays visible, so no content is ever unreachable */
.no-js .accordion__panel { display: block; }
.no-js .accordion__btn { cursor: default; }
.no-js .accordion__icon { display: none; }

/* Pest guide cards */
.pest-card { overflow: hidden; padding: 0; }
.pest-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.pest-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.4rem 1.5rem 1.6rem; }
.pest-card__body h3 { margin-bottom: .4rem; font-size: 1.2rem; }
.pest-card__body p { margin-bottom: 0; font-size: .97rem; }

/* Species gallery on the pest guide pages */
.species {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: clamp(.85rem, 2vw, 1.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.species figure {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.species img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 600px) {
  /* Two across on phones: 15 full-width photos is a very long scroll. */
  .species { grid-template-columns: 1fr 1fr; }
  .species figcaption { padding: .55rem .7rem .65rem; font-size: .92rem; }
}
.species figcaption {
  padding: .7rem .9rem .8rem;
  color: var(--teal);
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.3;
}

/* Accreditation logos */
.accreditations__title {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-align: center;
  text-transform: uppercase;
}
.accreditations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.accreditations img { width: auto; height: clamp(58px, 8vw, 84px); object-fit: contain; }

/* Video embeds — responsive, lazy, no layout shift */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow-md); }
/* The fogging demos were filmed on a phone, so they are 9:16 — framing them
   as portrait avoids letterboxing them inside black bars. */
.video--portrait { aspect-ratio: 9 / 16; width: 100%; max-width: 320px; margin-inline: auto; }
/* width:100% is load-bearing: the auto inline margins make this grid item
   shrink-to-fit, and its only child is absolutely positioned, so without an
   explicit width the box collapses to zero. */
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 9 — contact & forms ---------------------------------------------------- */
.contact-layout { display: grid; gap: clamp(2rem, 5vw, 3.5rem); grid-template-columns: 1fr; }
@media (min-width: 900px) { .contact-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); } }

.contact-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 1.5rem; }
.contact-list li { display: flex; gap: 1rem; }
.contact-list__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--blue-light);
  border-radius: 12px;
  color: var(--blue);
}
.contact-list__icon svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.contact-list h3 { margin-bottom: .2rem; font-size: 1rem; }
.contact-list a { font-weight: 500; }
.contact-list address { font-style: normal; }

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-family: var(--font-head); font-weight: 600; font-size: .93rem; color: var(--ink); }
.field .req { color: #c0392b; }

.field input, .field textarea, .field select {
  width: 100%;
  padding: .8rem .95rem;
  background: var(--white);
  border: 1px solid #cfd8e3;
  border-radius: var(--radius);
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: #a9b8ca; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26, 79, 160, .16);
  outline: none;
}
.field .hint { font-size: .85rem; color: var(--muted); }

.field--row { display: grid; gap: 1.1rem; }
@media (min-width: 620px) { .field--row { grid-template-columns: 1fr 1fr; } }

/* Honeypot: hidden from people, irresistible to bots */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form__note { font-size: .88rem; color: var(--muted); }

.alert { padding: 1rem 1.2rem; border-radius: var(--radius); border-left: 4px solid; font-size: .97rem; }
.alert--ok    { background: #e9f7ef; border-color: #1e8449; color: #14532d; }
.alert--error { background: #fdecea; border-color: #c0392b; color: #7f1d1d; }

.map-embed { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 16 / 10; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Client portal (FieldMotion) box */
.portal-box {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
#fm-customer-portal table { width: 100%; border-collapse: collapse; }
#fm-customer-portal th {
  padding: .4rem .9rem .4rem 0;
  font-family: var(--font-head);
  font-size: .93rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
}
#fm-customer-portal td { padding: .35rem 0; }
#fm-customer-portal input {
  width: 100%;
  max-width: 320px;
  padding: .6rem .8rem;
  border: 1px solid #cfd8e3;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
}
#fm-customer-portal input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26, 79, 160, .16); outline: none; }
#fm-customer-portal button {
  padding: .6rem 1.4rem;
  background: var(--blue);
  border: 0;
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
}
#fm-customer-portal button:hover { background: var(--navy); }

/* 10 — footer ------------------------------------------------------------ */
.site-footer { background: var(--navy-dark); color: rgba(255, 255, 255, .78); font-size: .97rem; }
.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }

.footer__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  padding-block: clamp(3rem, 6vw, 4.25rem);
}
.footer__col h2 {
  margin-bottom: 1.1rem;
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.footer__brand { font-family: var(--font-head); line-height: 1.1; }
.footer__brand strong {
  display: block;
  color: var(--white);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.footer__brand span {
  display: block;
  margin-top: .3rem;
  color: rgba(255, 255, 255, .72);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .21em;
  text-transform: uppercase;
}
.footer__list { margin: 0; padding: 0; list-style: none; display: grid; gap: .6rem; }
.site-footer address { font-style: normal; line-height: 1.75; }

.social { display: flex; gap: .65rem; margin-top: 1.35rem; }
.social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, .1);
  border-radius: 50%;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.social a:hover { background: var(--blue-mid); transform: translateY(-2px); }
.social svg { width: 18px; height: 18px; fill: var(--white); }

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding-block: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, .13);
  font-size: .88rem;
  color: rgba(255, 255, 255, .62);
}
.footer__bar ul { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }

/* Back-to-top */
.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--blue);
  border: 0;
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  box-shadow: var(--shadow-md);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s var(--ease), background-color .2s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--navy); }
.to-top svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2.4; }

/* 11 — utilities & motion ------------------------------------------------ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Gentle reveal on scroll; JS adds .is-in. Without JS everything is visible. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* 12 — print ------------------------------------------------------------- */
@media print {
  .topbar, .site-header, .site-footer, .to-top, .nav-backdrop, .btn-row, .video, .map-embed { display: none !important; }
  body { color: #000; font-size: 11pt; }
  .hero, .page-hero, .band { background: none !important; color: #000; padding-block: 1rem; }
  .hero::after, .page-hero::after, .band::after { display: none; }
  .hero h1, .page-hero h1, .band h2, .band h3, .band p, .hero__sub, .hero__text { color: #000 !important; }
  .accordion__panel { display: block !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
