/* =========================================================================
   K.E.Y. Engineering PLC — site styles
   Plain CSS design system. No framework, no build step.
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Brand */
  --c-primary:      #1d3eb5;   /* royal brand blue (hero, headings, buttons) */
  --c-primary-700:  #16307f;   /* darker blue */
  --c-primary-900:  #0f2154;   /* deepest blue (footer, CTA) */
  --c-accent:       #d0322a;   /* brand red — WCAG AA on white & light-red (>=4.5:1) */
  --c-accent-700:   #b8281d;   /* darker red (hover) */

  /* Neutrals */
  --c-ink:    #16203a;   /* near-black headings */
  --c-body:   #3c4658;   /* body text */
  --c-muted:  #6b7280;   /* muted text / labels */
  --c-line:   #e5e9f0;   /* hairline borders */
  --c-bg:     #ffffff;
  --c-bg-soft:#f5f7fa;   /* light grey section */
  --c-bg-blue:#eef2fb;   /* faint blue tint */

  /* Type */
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gutter: 24px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16,33,84,.06), 0 4px 14px rgba(16,33,84,.05);
  --shadow-md: 0 10px 30px rgba(16,33,84,.10);
  --header-h: 74px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-body);
  background: var(--c-bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-700); }

h1, h2, h3, h4 {
  color: var(--c-ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 800;
  letter-spacing: -.02em;
}
p { margin: 0 0 1em; }

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

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: var(--c-primary);
  padding: 12px 18px;
  z-index: 200;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding: 84px 0; }
.section--soft { background: var(--c-bg-soft); }
.section--tight { padding: 56px 0; }
.text-center { text-align: center; }

/* Offset anchored service headings so the sticky header doesn't cover them
   when a #hash deep-link lands on the page (header height + breathing room). */
[id="groundwater-study-design"],
[id="borehole-drilling"],
[id="water-supply-materials"] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.eyebrow {
  display: inline-block;
  color: var(--c-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-title {
  color: var(--c-primary);
  font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem);
  margin-bottom: .35em;
}
.section-intro {
  max-width: 720px;
  font-size: 1.08rem;
  color: var(--c-body);
}
.section-head--center { text-align: center; }
.section-head--center .section-intro { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  --btn-pad-y: 13px;
  --btn-pad-x: 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: 10px;
  font-weight: 700;
  font-size: .98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s var(--ease), background-color .2s, color .2s, border-color .2s, box-shadow .2s;
  line-height: 1;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.btn--primary:hover { background: var(--c-accent-700); border-color: var(--c-accent-700); color: #fff; box-shadow: var(--shadow-md); }

.btn--blue { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn--blue:hover { background: var(--c-primary-700); border-color: var(--c-primary-700); color:#fff; }

.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--outline-light:hover { background: #fff; color: var(--c-primary); border-color: #fff; }

.btn--lg { --btn-pad-y: 16px; --btn-pad-x: 32px; font-size: 1.05rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: var(--c-accent);
}
.link-arrow .arr { transition: transform .2s var(--ease); }
.link-arrow:hover { color: var(--c-accent-700); }
.link-arrow:hover .arr { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow .25s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(16,33,84,.08); }
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { height: 42px; width: auto; }
.brand__name { display: none; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--c-ink);
  font-weight: 600;
  font-size: .96rem;
  padding: 10px 14px;
  border-radius: 8px;
  letter-spacing: .01em;
}
.main-nav a:hover { color: var(--c-primary); background: var(--c-bg-blue); }
.main-nav a.is-active { color: var(--c-primary); }
.main-nav a.is-active::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--c-primary);
  border-radius: 2px;
  margin-top: 4px;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
/* The nav's own Get-a-Quote button is for the mobile menu only;
   on desktop the header-actions button is used instead. */
.main-nav .btn { display: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--c-line);
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 22px; height: 2px;
  background: var(--c-ink);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (home, photo) ---------- */
.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  /* Clean brand-blue gradient (no background photo) */
  background: linear-gradient(120deg, var(--c-primary-900) 0%, var(--c-primary-700) 55%, var(--c-primary) 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.25fr .85fr;
  align-items: center;
  gap: 48px;
  min-height: 540px;
  padding: 72px 0;
}
.hero__eyebrow {
  color: #c9d6ff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.4rem, 1.4rem + 4.6vw, 4.1rem);
  line-height: 1.05;
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--c-accent); }
.hero__lead {
  font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem);
  color: #e6ecff;
  max-width: 520px;
  margin-bottom: 30px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* White logo card on the blue hero */
.logo-card {
  background: #fff;
  border-radius: 18px;
  padding: 34px;
  box-shadow: 0 20px 50px rgba(8,18,55,.35);
  display: grid;
  place-items: center;
  justify-self: end;
  width: 100%;
  max-width: 380px;
}
.logo-card img { width: 100%; height: auto; }

/* ---------- Page hero (interior pages, flat blue) ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--c-primary-700), var(--c-primary));
  color: #fff;
  padding: 92px 0 78px;
}
.page-hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.2rem);
  margin-bottom: 14px;
}
.page-hero p { color: #dde4ff; font-size: 1.15rem; max-width: 640px; margin: 0; }

/* ---------- Stats band ---------- */
.stats {
  background: #fff;
  border-bottom: 1px solid var(--c-line);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 52px 0;
}
.stat { text-align: center; padding: 6px 10px; }
.stat__num {
  color: var(--c-primary);
  font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
}
.stat__label {
  margin-top: 10px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* ---------- Two-column feature (text + image) ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.feature--reverse .feature__media { order: -1; }
.feature__media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
/* Compact media for a low-res source: cap the display size and keep the
   image at its natural ratio (contained, not stretched) so it stays sharp.
   Centered within its column for balance on desktop and mobile. */
.feature__media--compact { display: grid; place-items: center; }
.feature__media--compact img {
  width: 100%;
  max-width: 440px;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
}
.feature__body h2 { color: var(--c-primary); font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); }
.feature__list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.feature__list li { position: relative; padding-left: 30px; color: var(--c-body); }
.feature__list li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 9px; height: 9px;
  background: var(--c-accent);
  border-radius: 50%;
}

/* ---------- Card grid (services teaser, objectives) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d4dbe9; }
.card__icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  background: var(--c-bg-blue);
  color: var(--c-primary);
  border-radius: 12px;
  margin-bottom: 18px;
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { color: var(--c-primary); font-size: 1.25rem; margin-bottom: .4em; }
.card p { color: var(--c-body); font-size: .98rem; margin-bottom: 1em; }

/* Objective cards (lighter, on soft bg) */
.mini-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.mini-card .dot {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: 9px;
  background: #fdecea;
  color: var(--c-accent);
  display: grid; place-items: center;
}
.mini-card .dot svg { width: 20px; height: 20px; }
.mini-card p { margin: 0; font-size: .98rem; color: var(--c-body); }

/* ---------- Mission panel ---------- */
.panel-blue {
  background: linear-gradient(120deg, var(--c-primary), var(--c-primary-700));
  color: #fff;
  border-radius: 18px;
  padding: 48px clamp(28px, 4vw, 64px);
  text-align: center;
}
.panel-blue .eyebrow { color: #c9d6ff; }
.panel-blue p { color: #eef2ff; font-size: 1.2rem; max-width: 760px; margin: 0 auto; line-height: 1.6; }

/* ---------- Trusted-by strip ---------- */
.trust-group { margin-bottom: 26px; }
.trust-group:last-child { margin-bottom: 0; }
.trust-group h3 {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-muted);
  text-align: center;
  margin-bottom: 16px;
}
.chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.chip {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--c-ink);
  box-shadow: var(--shadow-sm);
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}
.team-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.team-card__photo {
  aspect-ratio: 1 / 1;        /* square slot — identical for real photos and placeholders */
  background: #d3d8e0;        /* neutral grey shown until/if an image loads */
  overflow: hidden;
}
.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;          /* fill the square; crop, never distort */
}
.team-card__body { padding: 24px 26px 28px; }
.team-card__body h3 { color: var(--c-primary); margin-bottom: 4px; font-size: 1.3rem; }
.team-card__role {
  color: var(--c-accent);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.team-card__body p { font-size: .96rem; margin: 0; }

/* ---------- Projects: filter + cards ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 38px;
}
.filter-btn {
  border: 1px solid var(--c-line);
  background: #fff;
  color: var(--c-ink);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s var(--ease);
}
.filter-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.filter-btn.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.project-card__tag {
  align-self: flex-start;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-accent-700);
  background: #fdecea;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.project-card h3 { color: var(--c-primary); font-size: 1.16rem; margin-bottom: .4em; }
.project-card p { font-size: .96rem; margin-bottom: 14px; }
.project-card__client {
  margin-top: auto;
  font-size: .85rem;
  color: var(--c-muted);
  border-top: 1px solid var(--c-line);
  padding-top: 12px;
}
.project-card.is-hidden { display: none; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-sm);
}
.gallery-item.gallery-item--lead { grid-column: span 2; }
.gallery-item button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .4s var(--ease); }
.gallery-item--lead img { aspect-ratio: 3 / 2; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item figcaption {
  padding: 14px 16px;
  font-size: .9rem;
  color: var(--c-body);
  background: #fff;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8,16,44,.9);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(94vw, 1100px); max-height: 84vh; border-radius: 10px; }
.lightbox figcaption { color: #dbe2f5; text-align: center; margin-top: 14px; font-size: .95rem; }
.lightbox__close {
  position: absolute;
  top: 20px; right: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox__close:hover { background: rgba(255,255,255,.28); }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--c-primary-900), var(--c-primary-700));
  color: #fff;
  text-align: center;
  padding: 72px 0;
}
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); margin-bottom: 12px; }
.cta-band p { color: #d7deff; font-size: 1.15rem; margin-bottom: 28px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.contact-info { display: grid; gap: 22px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item .ci-icon {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 11px;
  background: var(--c-bg-blue);
  color: var(--c-primary);
  display: grid; place-items: center;
}
.contact-item .ci-icon svg { width: 22px; height: 22px; }
.contact-item h3 { font-size: 1.02rem; margin-bottom: 2px; color: var(--c-ink); }
.contact-item p, .contact-item a { margin: 0; color: var(--c-body); font-size: .98rem; }
.contact-note {
  margin-top: 6px;
  font-size: .82rem;
  color: var(--c-muted);
  background: #fff8e6;
  border: 1px solid #f3e3b3;
  border-radius: 8px;
  padding: 10px 12px;
}

.form-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; color: var(--c-ink); margin-bottom: 7px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: .98rem;
  color: var(--c-ink);
  padding: 12px 14px;
  border: 1px solid #d4dbe9;
  border-radius: 10px;
  background: #fcfdff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(29,62,181,.14);
}
.field textarea { resize: vertical; min-height: 130px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-primary-900);
  color: #c8d2ef;
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr;
  gap: 40px;
}
.footer-brand .logo-chip {
  background: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  display: inline-block;
  margin-bottom: 18px;
}
.footer-brand .logo-chip img { height: 40px; width: auto; }
.footer-brand p { color: #aab8e0; max-width: 280px; }
.footer-col h2 {
  color: #fff;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-col a { color: #c8d2ef; font-size: .97rem; }
.footer-col a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 11px; align-items: flex-start; font-size: .97rem; }
.footer-contact svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 3px; color: #8fa3d8; }
.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  font-size: .86rem;
  color: #94a3cf;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; min-height: 0; }
  .logo-card { justify-self: start; max-width: 300px; }
  .feature { grid-template-columns: 1fr; gap: 30px; }
  .feature--reverse .feature__media { order: 0; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item--lead { grid-column: span 2; grid-row: auto; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 60px 0; }
  .stats__grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; }

  /* Mobile nav */
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow-md);
    padding: 10px 16px 18px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
  }
  .main-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 14px 12px; border-radius: 8px; font-size: 1.05rem; }
  .main-nav a.is-active::after { display: none; }
  .header-actions .btn { display: none; }
  .main-nav .btn { display: inline-flex; justify-content: center; margin-top: 8px; }

  .card-grid, .project-grid, .gallery-grid, .team-grid { grid-template-columns: 1fr; }
  .gallery-item--lead { grid-column: auto; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* Utility */
.nav-open-lock { overflow: hidden; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Respect users who prefer reduced motion: neutralize transitions,
   animations, and hover transforms across the board. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover, .card:hover, .project-card:hover, .gallery-item:hover img,
  .link-arrow:hover .arr { transform: none !important; }
}
