/* AFM Engineering — homepage */

/* Self-hosted fonts (SIL OFL 1.1, see assets/fonts/OFL.txt). Latin subset, variable. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("../assets/fonts/plus-jakarta-sans-latin-variable.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0f172a;
  --navy-soft: #1e293b;
  --black: #000000;
  --white: #ffffff;
  --gray-100: #f8fafc;
  --gray-200: #e2e8f0;
  --gray-300: #c2c2c2;
  --gray-500: #64748b;
  --gray-600: #475569;
  /*
   * Brand greens (29 Oct 2026: Lionel asked for a brighter green throughout).
   * --green is now the business-card green (#43c25a) and is the site's main
   *   green: buttons, icon tiles, rules, dots, borders, underlines, the
   *   header/footer accents and links/focus rings on dark backgrounds.
   *   It is too light for white text (2.31:1), so anything sitting on it uses
   *   --on-green (#0a0a0a): 8.58:1. On dark bands it is 9.10:1 on black and
   *   7.74:1 on navy.
   * --green-hover (#5ccf71) is the lighter hover shade for green buttons
   *   (10.01:1 with --on-green).
   * --green-text (#2a833a) is the same card hue darkened just enough for small
   *   green text and focus rings on light surfaces: 4.77:1 on white, 4.56:1 on
   *   --gray-100. #43c25a itself is only 2.31:1 on white, so it is never used
   *   for text on light backgrounds.
   * --green-text-large (#36a94c) is for large display text on white only
   *   (the hero headline): 3.03:1, which meets AA for large text (3:1).
   * --green-text-hover (#22682e) is the hover shade for green text links
   *   (6.80:1 on white).
   */
  --green: #43c25a;
  --green-hover: #5ccf71;
  --on-green: #0a0a0a;
  --green-text: #2a833a;
  --green-text-large: #36a94c;
  --green-text-hover: #22682e;
  --radius: 8px;
  --radius-lg: 12px;
  --container: 1140px;
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --header-offset: 80px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input {
  font: inherit;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: 5rem 0;
}

.section--muted {
  background: var(--gray-100);
}

.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-text);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--navy);
}

.section-title::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--green);
  margin-top: 0.85rem;
  border-radius: 2px;
}

.section-head {
  text-align: center;
  margin-bottom: 2.75rem;
}

.section-head .section-title::after {
  margin-inline: auto;
}

.section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  text-align: left;
  margin-bottom: 2rem;
}

.section-head--row .section-title::after {
  margin-inline: 0;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.5rem;
  border-radius: 6px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--green);
  color: var(--on-green);
  border-color: var(--green);
}

.btn--primary:hover {
  background: var(--green-hover);
  border-color: var(--green-hover);
}

.btn--dark {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn--dark:hover {
  background: var(--navy-soft);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--white);
}

.btn--outline-light {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn--outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn--sm {
  padding: 0.65rem 1.15rem;
  font-size: 0.875rem;
}

.text-link {
  color: var(--green-text);
  font-weight: 600;
  font-size: 0.9rem;
}

.text-link:hover {
  color: var(--green-text-hover);
}

/* Accessibility helpers */

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 300;
  background: var(--navy);
  color: var(--white);
  padding: 0.65rem 1rem;
  border-radius: 6px;
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--green-text);
  outline-offset: 3px;
  border-radius: 4px;
}

/* On dark bands the bright card green is the focus ring (9.10:1 on black, 7.74:1 on navy) */
.site-header a:focus-visible,
.about-band__panel a:focus-visible,
.mid-cta a:focus-visible,
.site-footer a:focus-visible {
  outline-color: var(--green);
}

.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;
}

.eyebrow--light {
  color: var(--green);
}

.section-intro {
  color: var(--gray-600);
  max-width: 38rem;
  margin: 0.25rem auto 0;
}

/* Logo band + navigation */

/* Black band with the card logo and green name, matching the business card */
.site-header {
  background: var(--black);
  border-bottom: 3px solid var(--green);
}

.logo-band {
  display: flex;
  justify-content: center;
  padding: 0.85rem 0;
}

.brand {
  display: block;
  min-width: 0;
}

.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.brand picture {
  display: block;
  flex-shrink: 0;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3.2vw, 2.1rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green);
}

.brand__logo {
  display: block;
  height: 72px;
  width: auto;
  max-width: 100%;
}

.brand__tag {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0;
  position: relative;
}

.nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 1.75rem;
  flex-wrap: wrap;
}

.nav__links a:not(.btn) {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-soft);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav__links a:not(.btn):hover,
.nav__links a.is-active {
  color: var(--navy);
  border-bottom-color: var(--green);
}

.nav__cta {
  flex-shrink: 0;
}

.nav__toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
}

.nav__toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav__toggle-bars span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
}

/* Hero */

.hero {
  padding: 4.5rem 0 3.5rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.15rem);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 1.15rem;
  color: var(--navy);
}

.hero__title span {
  color: var(--green-text-large);
}

.hero__lead {
  color: var(--gray-600);
  font-size: 1.05rem;
  max-width: 36rem;
  margin: 0 0 1.75rem;
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  margin-top: 1.75rem;
}

.hero__stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-soft);
}

.hero__stat::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* Services */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--green);
}

.service-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--green);
  color: var(--on-green);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.55rem;
}

.service-card p {
  margin: 0 0 1rem;
  color: var(--gray-600);
  font-size: 0.925rem;
}


/* About band */

.about-band {
  padding: 0 0 5rem;
}

.about-band__panel {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(255, 255, 255, 0.02) 8px,
    rgba(255, 255, 255, 0.02) 16px
  );
}

.about-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin: 0 0 1rem;
  line-height: 1.25;
}

.about-band p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 1.5rem;
  max-width: 32rem;
}

/* Four service cards in one row on wide screens */

.services-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* Hero additions */

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__media {
  min-width: 0;
}

.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--gray-200);
}

.photo--hero {
  aspect-ratio: 3 / 2; /* matches the hero photo, so its signage is not cropped */
  box-shadow: var(--shadow-md);
}

.prose p {
  color: var(--gray-600);
  margin: 0 0 1.15rem;
}

.prose--center {
  max-width: 48rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.capability {
  max-width: 48rem;
  margin: 3rem auto 0;
  padding: 1.75rem 2rem;
  background: var(--gray-100);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
}

.capability h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.6rem;
}

.capability p {
  margin: 0;
  color: var(--gray-600);
}

.about-band__media {
  min-width: 0;
}

.about-band__media .photo {
  aspect-ratio: 4 / 3;
}

/* Service detail sections */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.split__text {
  min-width: 0;
}

.split__text p {
  color: var(--gray-600);
  margin: 0;
}

.split-section--reverse .split__text {
  order: 2;
}

.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  min-width: 0;
}

.media {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
}

.media--wide {
  grid-column: 1 / -1;
}

.media--wide img {
  aspect-ratio: 16 / 10;
}

.media-grid--three .media:not(.media--wide) img {
  aspect-ratio: 1 / 1;
}

/* Gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.gallery__item {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--gray-200);
  aspect-ratio: 1 / 1;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery__item:hover img {
  transform: scale(1.04);
}

/* Lightbox */

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(2, 6, 23, 0.94);
  color: var(--white);
}

.lightbox[open] {
  display: flex;
  flex-direction: column;
}

.lightbox::backdrop {
  background: rgba(2, 6, 23, 0.94);
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

.lightbox__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.5rem 1rem;
}

.lightbox__figure {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

/* Hide the previous photo while the next one loads, so the counter never shows a different photo. */
.lightbox__img.is-loading {
  visibility: hidden;
}

.lightbox__img.is-error {
  display: none;
}

.lightbox__error {
  margin: 0;
  max-width: 40rem;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
}

.lightbox__error strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--white);
  font-size: 1rem;
}

.lightbox__btn {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  font-size: 1rem;
}

.lightbox__prev,
.lightbox__next {
  font-size: 1.75rem;
  line-height: 1;
  padding: 0.4rem 0.7rem;
  flex-shrink: 0;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox__btn:focus-visible {
  outline-color: var(--green);
}

body.has-lightbox {
  overflow: hidden;
}

/* Mid CTA */

.mid-cta {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 4.5rem 0;
}

.mid-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 0.85rem;
  line-height: 1.25;
  max-width: 34rem;
  margin-inline: auto;
}

.mid-cta p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 36rem;
  margin: 0 auto 1.75rem;
}

.mid-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}


/* Quality */

.quality-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2.5rem;
  align-items: center;
}

.quality-layout__media {
  min-width: 0;
}

.quality-layout__media .photo {
  aspect-ratio: 4 / 5;
  max-height: 520px;
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  min-width: 0;
}

.contact-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.9rem;
  border-radius: 8px;
  background: var(--green);
  color: var(--on-green);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
}

.contact-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.contact-card p,
.contact-card address {
  margin: 0;
  font-style: normal;
  color: var(--gray-600);
  overflow-wrap: anywhere;
}

.contact-card a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-underline-offset: 3px;
}

.contact-card a:hover {
  color: var(--green-text);
}

.contact-cta {
  text-align: center;
  margin-top: 2rem;
}

/* Footer */

.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-brand .brand {
  margin-bottom: 1rem;
}

.footer-brand .brand__logo {
  height: 72px;
}

.footer-brand p {
  margin: 0;
  font-size: 0.9rem;
  color: #cbd5e1;
  max-width: 22rem;
}

.footer-heading {
  color: var(--white);
  font-size: 1rem;
  margin: 0 0 1rem;
  font-family: var(--font-display);
}

.footer-col li + li {
  margin-top: 0.55rem;
}

.footer-col a:hover {
  color: var(--green);
}

.footer-col address {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #cbd5e1;
}

.footer-col address a {
  color: #cbd5e1;
}

.footer-col address a:hover {
  color: var(--green);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 1.15rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Responsive */

@media (max-width: 1024px) {
  .hero__grid,
  .about-band__panel,
  .quality-layout,
  .split {
    grid-template-columns: 1fr;
  }

  .split-section--reverse .split__text {
    order: 0;
  }

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

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .nav {
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
  }

  .nav__toggle {
    display: inline-flex;
    justify-content: center;
    width: 100%;
  }

  .nav__links {
    display: none;
  }

  .nav.is-open .nav__links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.25rem;
    padding: 0.75rem 0 0.5rem;
  }

  .nav.is-open .nav__links a:not(.btn) {
    padding: 0.7rem 0.25rem;
    border-bottom: 1px solid var(--gray-200);
  }

  .nav.is-open .nav__cta {
    margin-top: 0.5rem;
  }

  .quality-layout__media .photo {
    aspect-ratio: 4 / 3;
  }

  .capability {
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 1.5rem, var(--container));
  }

  .section {
    padding: 3.5rem 0;
  }

  .brand__logo {
    height: 56px;
  }

  .site-header .brand {
    gap: 0.7rem;
  }

  .brand__tag {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }

  .services-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .about-band__panel {
    padding: 1.75rem;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero__actions .btn {
    flex: 1 1 100%;
  }

  .lightbox__stage {
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
  }

  .lightbox__figure {
    order: -1;
    flex: 1 1 100%;
    height: calc(100% - 4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .gallery__item img {
    transition: none;
  }
}
