/* ============================================
   ATLANTIS DIVING CONTRACTORS — Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* Color Palette */
  --navy-900: #0B1623;
  --navy-800: #121F30;
  --navy-700: #1A2B3F;
  --navy-600: #212E3C;
  --navy-500: #2C3E50;
  --gold-500: #FBCF00;
  --gold-400: #FFD833;
  --gold-600: #D4AD00;
  --blue-400: #4B9CD3;
  --blue-300: #6BB3E0;
  --white: #FFFFFF;
  --white-90: rgba(255, 255, 255, 0.9);
  --white-70: rgba(255, 255, 255, 0.7);
  --white-50: rgba(255, 255, 255, 0.5);
  --white-20: rgba(255, 255, 255, 0.2);
  --white-10: rgba(255, 255, 255, 0.1);
  --white-05: rgba(255, 255, 255, 0.05);

  /* Typography */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-pad: clamp(80px, 10vw, 140px);
  --container-max: 1320px;
  --gap: clamp(16px, 2vw, 32px);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 0.25s;
  --t-med: 0.5s;
  --t-slow: 0.8s;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--navy-900);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 60px);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: background var(--t-med) var(--ease-out),
    padding var(--t-med) var(--ease-out),
    backdrop-filter var(--t-med) var(--ease-out);
}

.nav.scrolled {
  background: rgba(11, 22, 35, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0;
  border-bottom: 1px solid var(--white-10);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav__logo-img {
  height: 44px;
  width: auto;
  display: block;
  transition: transform var(--t-fast) var(--ease-out), opacity var(--t-fast);
}

.nav__logo:hover .nav__logo-img {
  transform: scale(1.05);
  opacity: 0.9;
}

.nav__logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(14px, 1.4vw, 18px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}

.nav__logo-text span {
  display: block;
  font-weight: 400;
  font-size: 0.7em;
  letter-spacing: 0.2em;
  color: var(--white-70);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
}

.nav__link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white-70);
  position: relative;
  padding: 4px 0;
  transition: color var(--t-fast) var(--ease-out);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-500);
  transition: width var(--t-fast) var(--ease-out);
}

.nav__link:hover,
.nav__link.active {
  color: var(--white);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__cta {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--gold-500);
  color: var(--navy-900);
  padding: 12px 28px;
  border: none;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}

.nav__cta:hover {
  background: var(--gold-400);
  transform: translateY(-1px);
}

.nav__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav__icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--gold-500);
  color: var(--gold-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

.nav__icon-btn:hover {
  background: var(--gold-500);
  color: var(--navy-900);
  transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav__toggle span {
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: transform var(--t-fast) var(--ease-out),
    opacity var(--t-fast);
}

.nav__toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(180px, 12vh, 160px);
  overflow: hidden;
}

.hero__bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: brightness(0.4);
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(11, 22, 35, 0.3) 0%,
      rgba(11, 22, 35, 0.1) 40%,
      rgba(11, 22, 35, 0.6) 70%,
      rgba(11, 22, 35, 0.95) 100%);
}

.hero__slide-bg {
  position: absolute;
  inset: 0;
}

.hero__bg-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  mix-blend-mode: screen;
  filter: brightness(0.55) saturate(1.8) hue-rotate(12deg);
  opacity: 0;
  transition: opacity 2.5s ease-in-out;
}

.hero__bg-slide--active {
  opacity: 0.82;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 56px;
  align-items: center;
}

.hero__logo-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__logo-img {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.5));
}

@media (max-width: 768px) {
  .hero__layout {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1;
    gap: 0;
  }
  .hero__logo-col {
    display: none;
  }
  .nav.at-hero .nav__logo-img {
    height: 140px;
  }
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 28px;
}

.hero__label::before {
  content: '';
  width: 40px;
  height: 2px;
  background: var(--gold-500);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  max-width: 900px;
}

.hero__title em {
  font-style: normal;
  color: var(--gold-500);
}

.hero__desc {
  font-size: clamp(16px, 1.3vw, 20px);
  color: var(--white-70);
  max-width: 560px;
  margin-bottom: 44px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom:12px;
}

@media (max-width: 768px) {
  .hero__actions {
    flex-wrap: nowrap;
  }

  .hero__actions .btn {
    flex: 1;
    text-align: center;
    padding-left: 12px;
    padding-right: 12px;
  }
}

.btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 16px 36px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all var(--t-fast) var(--ease-out);
}

.btn--primary {
  background: var(--gold-500);
  color: var(--navy-900);
}

.btn--primary:hover {
  background: var(--gold-400);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(251, 207, 0, 0.25);
}

.btn--outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--white-50);
}

.btn--outline:hover {
  border-color: var(--white);
  background: var(--white-10);
}

.btn__arrow {
  transition: transform var(--t-fast) var(--ease-out);
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

/* Hero Stats Strip */
.hero__stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(11, 22, 35, 0.7);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--white-10);
  z-index: 2;
}

.hero__stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.hero__stat {
  padding: 28px 32px;
  text-align: center;
  border-right: 1px solid var(--white-10);
  transition: background var(--t-fast);
}

.hero__stat:last-child {
  border-right: none;
}

.hero__stat:hover {
  background: var(--white-05);
}

.hero__stat-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3vw, 42px);
  color: var(--gold-500);
  line-height: 1;
  margin-bottom: 6px;
}

.hero__stat-label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-50);
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section {
  padding: var(--section-pad) 0;
  position: relative;
  z-index: 1;
}

.section--dark {
  background: var(--navy-900);
}

.section--darker {
  background: var(--navy-800);
}

.section__header {
  margin-bottom: clamp(48px, 6vw, 80px);
}

.section__label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 20px;
}

.section__label::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--gold-500);
}

.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 64px);
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.01em;
}

.section__title em {
  font-style: normal;
  color: var(--gold-500);
}

.section__subtitle {
  font-size: clamp(16px, 1.2vw, 18px);
  color: var(--white-50);
  max-width: 600px;
  margin-top: 20px;
  line-height: 1.7;
}

/* ============================================
   SERVICES
   ============================================ */
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--gap);
  
}

.service-card {
  background: var(--navy-700);
  border: 1px solid var(--white-10);
  padding: clamp(32px, 3vw, 48px);
  position: relative;
  overflow: hidden;
  container-type: inline-size;
  transition: border-color var(--t-med) var(--ease-out),
    transform var(--t-med) var(--ease-out);
}

.service-card__bg {
  position: absolute;
  inset: 0;
  background-image: var(--card-bg);
  background-size: cover;
  transform: scale(var(--card-bg-scale, 1));
  transform-origin: center;
  background-position: center;
  opacity: 0.15;
  transition: opacity var(--t-med) var(--ease-out);
  z-index: 0;
}

.service-card:hover .service-card__bg {
  opacity: 0.05;
}

.service-card > *:not(.service-card__bg) {
  position: relative;
  z-index: 1;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-600));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-med) var(--ease-out);
  z-index: 2;
}

.service-card:hover {
  border-color: var(--white-20);
  transform: translateY(-4px);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card__icon {
  width: 52px;
  height: 52px;
  border: 1px solid var(--gold-500);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  color: var(--gold-500);
  font-size: 22px;
}

.service-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 1.6vw, 24px);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  line-height: 1.2;
}

.service-card__text {
  font-size: 15px;
  color: var(--white-50);
  line-height: 1.7;
  margin-bottom: 24px;
}

.service-card__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-card__tag {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  background: var(--white-05);
  border: 1px solid var(--white-10);
  color: var(--white-70);
}

/* ---- Mobile: collapsible cards (body + toggle are added by main.js) ---- */
.service-card__toggle {
  display: none;
}

@media (max-width: 768px) {
  .services__grid--collapsible .service-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    align-items: center;
    padding: 24px 24px 0;
  }

  .services__grid--collapsible .service-card:not(.is-open) {
    cursor: pointer;
  }

  .services__grid--collapsible .service-card__icon,
  .services__grid--collapsible .service-card__title {
    margin-bottom: 0;
  }

  .services__grid--collapsible .service-card__body {
    grid-column: 1 / -1;
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows var(--t-med) var(--ease-out),
      visibility 0s linear var(--t-med);
  }

  .services__grid--collapsible .service-card.is-open .service-card__body {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows var(--t-med) var(--ease-out),
      visibility 0s;
  }

  .services__grid--collapsible .service-card__body-inner {
    min-height: 0;
    overflow: hidden;
  }

  .services__grid--collapsible .service-card__text {
    margin-top: 20px;
  }

  .services__grid--collapsible .service-card__toggle {
    display: block;
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 16px;
    padding: 12px 0;
    line-height: 1;
    background: none;
    border: none;
    border-top: 1px solid var(--white-10);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-500);
    cursor: pointer;
  }
}

.cert-strip {
  background: #fff;
  padding: 28px;
  position: relative;
  z-index: 1;
  width: 100%;
}

.cert-strip .section__label {
  color: #000;
}

.cert-strip .section__label::before {
  background: #000;
}

.cert-strip__logos {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6%;
}

.cert-strip__logos img {
  max-height: auto;
  width: 15%;
  max-width:180px;
  display: block;
  object-fit: contain;
}

/* ============================================
   ABOUT
   ============================================ */
.about__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: stretch;
}

.about__image-wrap {
  position: relative;
  display: flex;
  min-height: 480px;
}

.about__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  filter: brightness(0.85) contrast(1.05);
  opacity: 0;
  transition: opacity 1.2s var(--ease-in-out);
}

.about__slide--active {
  opacity: 1;
}

.about__image-accent {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 140px;
  height: 140px;
  border: 2px solid var(--gold-500);
  z-index: -1;
}

.about__text p {
  font-size: clamp(15px, 1.1vw, 17px);
  color: var(--white-70);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about__highlight {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding: 24px;
  background: var(--white-05);
  border-left: 3px solid var(--gold-500);
}

.about__highlight-icon {
  font-size: 32px;
  color: var(--gold-500);
}

.about__highlight-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.about__highlight-text span {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--white-50);
  margin-top: 4px;
  text-transform: none;
  letter-spacing: 0;
}

/* ============================================
   CLIENTS
   ============================================ */
/* Less blank space under the marquee: 1/3 of the standard section padding */
#clients {
  padding-bottom: calc(var(--section-pad) / 3);
}

.clients__marquee {
  overflow: hidden;
  padding: 40px 0;
  border-top: 1px solid var(--white-10);
  border-bottom: 1px solid var(--white-10);
}

.clients__track {
  display: flex;
  gap: clamp(40px, 5vw, 80px);
  animation: marquee 30s linear infinite;
  width: max-content;
}

.clients__item {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 2vw, 26px);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white-20);
  white-space: nowrap;
  transition: color var(--t-fast);
  cursor: default;
  display: flex;
  align-items: center;
  gap: 16px;
}

.clients__item::before {
  content: '◆';
  font-size: 8px;
  color: var(--gold-500);
}

.clients__item:hover {
  color: var(--white-50);
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ============================================
   GALLERY / PROJECTS
   ============================================ */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: 4px;
}

.gallery__item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery__item--wide {
  grid-column: span 2;
}

.gallery__item--tall {
  grid-row: span 2;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform var(--t-slow) var(--ease-out),
    filter var(--t-med);
  filter: brightness(0.7) saturate(0.8);
}

.gallery__item:hover img {
  transform: scale(1.08);
  filter: brightness(0.9) saturate(1);
}

.gallery__item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(11, 22, 35, 0.9) 100%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity var(--t-med) var(--ease-out);
}

.gallery__item:hover .gallery__item-overlay {
  opacity: 1;
}

.gallery__item-caption {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Staggered tile reveal (mobile, added by main.js) */
.gallery__item {
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.gallery__item--pending {
  opacity: 0;
  transform: translateY(24px);
}

/* Mobile: no hover, so captions are always shown */
@media (max-width: 768px) {
  .gallery__item-overlay {
    opacity: 1;
    padding: 10px 12px;
    background: linear-gradient(180deg, transparent 55%, rgba(11, 22, 35, 0.85) 100%);
  }

  .gallery__item-caption {
    font-size: 11px;
    line-height: 1.3;
  }
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  position: relative;
  overflow: hidden;
}

.contact__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.contact__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.25);
}

.contact__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
}

.contact__info {
  container: contact-info / inline-size;
}

.contact__info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.contact__info-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--white-20);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold-500);
  font-size: 18px;
}

.contact__info-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 6px;
}

.contact__info-value {
  font-size: 15px;
  color: var(--white-70);
  line-height: 1.6;
  margin-bottom:12px;
}

/* Membership: smaller, comma-separated run of text */
.contact__info-value--inline {
  font-size: 13px;
}

.contact__info-value a[href^="tel:"] {
  white-space: nowrap;
}

.contact__info-value a[href^="mailto:"] {
  overflow-wrap: anywhere;
}

/* Phone + Email side by side; Address & Membership span full width */
.contact__info-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 32px;
}

.contact__info-item--full {
  grid-column: 1 / -1;
}

/* Last row sits flush with the panel bottom so the form box lines up with it */
.contact__info-grid > :last-child,
.contact__info-grid > :last-child .contact__info-value:last-child {
  margin-bottom: 0;
}

/* Stack Phone/Email when the panel itself is too narrow (small laptops, phones) */
@container contact-info (max-width: 520px) {
  .contact__info-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Service Area Map (full width under info + form) ---- */
.contact__area {
  grid-column: 1 / -1;
}

.contact__info-item--map {
  margin-bottom: 12px;
}

.contact__map {
  width: 100%;
  height: clamp(280px, 34vw, 440px);
  border: 1px solid var(--white-10);
}

.contact__map.leaflet-container {
  background: var(--navy-800);
  font-family: var(--font-body);
}

/* Dark-theme the OSM tiles to sit in the navy palette (marker stays gold) */
.contact__map .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.7);
}

.contact__map .leaflet-bar {
  border: 1px solid var(--white-20);
  border-radius: 0;
}

.contact__map .leaflet-bar a,
.contact__map .leaflet-bar a:hover {
  background: var(--navy-800);
  color: var(--white-90);
  border-bottom-color: var(--white-10);
  border-radius: 0;
}

.contact__map .leaflet-bar a:hover {
  color: var(--gold-500);
}

.contact__map .leaflet-control-attribution {
  background: rgba(11, 22, 35, 0.8);
  color: var(--white-50);
}

.contact__map .leaflet-control-attribution a {
  color: var(--white-70);
}

.contact__map .leaflet-tooltip {
  background: var(--navy-900);
  border: 1px solid var(--gold-500);
  border-radius: 0;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: none;
}

.contact__map .leaflet-tooltip-top::before {
  border-top-color: var(--gold-500);
}

/* Form box stretches to the info panel's height; the message box absorbs the slack */
.contact__form {
  background: var(--navy-800);
  border: 1px solid var(--white-10);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.contact__form form {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.form__group--grow,
.form__group--grow .form__textarea {
  flex-grow: 1;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.form__row .form__group {
  margin-bottom: 0;
}

.form__group {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.form__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white-50);
  margin-bottom: 4px;
}

.form__input,
.form__textarea {
  background: var(--white-05);
  border: 1px solid var(--white-10);
  padding: 10px 16px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color var(--t-fast);
  outline: none;
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--gold-500);
}

.form__textarea {
  min-height: 72px;
  resize: vertical;
}

.form__submit {
  width: 100%;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--navy-900);
  border-top: 1px solid var(--white-10);
  padding: 60px 0 28px;
  position: relative;
  z-index: 1;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 3vw, 48px);
  padding-bottom: 40px;
  border-bottom: 1px solid var(--white-10);
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.footer__col-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 14px;
}

.footer__contact-link {
  display: block;
  font-size: 13px;
  color: var(--white-70);
  margin-bottom: 6px;
  transition: color var(--t-fast);
  word-break: break-all;
}

.footer__contact-link:hover {
  color: var(--gold-500);
}

.footer__col-text {
  font-size: 13px;
  color: var(--white-50);
  line-height: 1.8;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__link {
  font-size: 13px;
  color: var(--white-50);
  transition: color var(--t-fast);
}

.footer__link:hover {
  color: var(--gold-500);
}

.footer__bottom {
  display: flex;
  justify-content: center;
  padding-top: 24px;
}

.footer__copy {
  font-size: 13px;
  color: var(--white-50);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--t-slow) var(--ease-out),
    transform var(--t-slow) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

.reveal-delay-5 {
  transition-delay: 0.5s;
}

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */
@media (max-width: 1024px) {
  .about__layout {
    grid-template-columns: 1fr;
  }

  .about__image-accent {
    display: none;
  }

  /* Stacked About: title + first paragraph sit on the image in a 75% panel */
  .about__layout {
    row-gap: 0;
  }

  .about__text {
    display: contents;
  }

  /* Full-bleed: cancel the .container side padding so image + panel run edge to edge */
  .about__image-wrap,
  .about__intro {
    grid-row: 1;
    grid-column: 1;
    margin-inline: calc(-1 * clamp(20px, 4vw, 60px));
  }

  .about__intro {
    align-self: end;
    position: relative;
    z-index: 1;
    padding: 24px clamp(20px, 4vw, 60px);
    background: rgba(11, 22, 35, 0.75);
  }

  .about__intro br {
    display: none;
  }

  .about__intro .section__title {
    margin-bottom: 14px;
  }

  .about__intro p {
    margin-bottom: 0;
    color: var(--white-90);
  }

  .about__intro + p {
    margin-top: 32px;
  }

  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
  }

  .contact__inner {
    grid-template-columns: 1fr;
  }

  .form__textarea {
    min-height: 120px;
  }

  .hero {
    padding-bottom: 260px;
  }

  .hero__stats-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__stat:nth-child(2) {
    border-right: none;
  }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--navy-800);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 80px 28px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform var(--t-med) var(--ease-out);
    border-left: 1px solid var(--white-10);
  }

  .nav__links.open {
    transform: translateX(0);
  }

  .nav__toggle {
    display: flex;
  }

  .nav__link {
    font-size: 22px;
  }

  /* Call + Email: large buttons splitting the panel width 50/50 */
  .nav__actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
  }

  .nav__icon-btn {
    width: auto;
    height: 80px;
    font-size: 30px;
  }

  .nav__icon-btn svg {
    width: 30px;
    height: 30px;
  }

  .nav__cta {
    width: 100%;
    text-align: center;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  /* Mobile mosaic: 2 wide, short rows; tall = 2 rows, wide = full-width strip */
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: clamp(120px, 36vw, 180px);
  }

  .hero__stats-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .form__row {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    align-items: stretch;
    padding-top: 180px;
    padding-bottom: 220px;
    min-height: calc(100vh + 110px);
    min-height: calc(100dvh + 110px);
  }

  .hero__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .hero__stats {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .cert-strip__logos img {
    width: 80px;
  }
}

@media (max-width: 480px) {
  .hero__stat {
    padding: 20px 16px;
  }
}

/* ============================================
   GALLERY — CLIP REVEAL
   ============================================ */
.gallery__clip {
  position: relative;
  max-height: 484px; /* 2 rows: (240px × 2) + 4px gap */
  overflow: hidden;
  transition: max-height 1s var(--ease-out);
}

/* Mobile mosaic rows are shorter, so show a bit more before "See More" */
@media (max-width: 768px) {
  .gallery__clip {
    max-height: 600px;
  }
}

.gallery__clip-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to bottom, transparent, var(--navy-900));
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}

.gallery__clip.expanded .gallery__clip-fade {
  opacity: 0;
}

.gallery__more-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(32px, 4vw, 56px);
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 10, 18, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease-out);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  display: block;
  transition: opacity var(--t-fast);
}

.lightbox__img.loading {
  opacity: 0;
}

.lightbox__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 14px;
  padding: 0 4px;
  gap: 24px;
}

.lightbox__caption {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-70);
}

.lightbox__counter {
  font-size: 12px;
  color: var(--white-50);
  white-space: nowrap;
}

.lightbox__close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: 1px solid var(--white-20);
  color: var(--white);
  font-size: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast);
  padding: 0;
  line-height: 1;
  font-family: var(--font-body);
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  border-color: var(--gold-500);
  color: var(--gold-500);
  outline: none;
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--white-20);
  color: var(--white);
  font-size: 32px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast);
  padding: 0;
  line-height: 1;
  font-family: var(--font-body);
}

.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

.lightbox__nav:hover,
.lightbox__nav:focus-visible {
  border-color: var(--gold-500);
  color: var(--gold-500);
  outline: none;
}

@media (max-width: 768px) {
  .lightbox__nav {
    width: 40px;
    height: 40px;
    font-size: 26px;
  }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
  .lightbox__close { top: 12px; right: 12px; }
}

/* ============================================
   FORMSPREE FORM STATE MESSAGES
   ============================================ */
.form__success-msg,
.form__error-msg {
  display: none;
  border-radius: 4px;
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.form__success-msg:not(:empty) {
  display: block;
  background: rgba(40, 167, 69, 0.12);
  border: 1px solid rgba(40, 167, 69, 0.35);
  color: #6dd67f;
}

.form__error-msg:not(:empty) {
  display: block;
  background: rgba(220, 53, 69, 0.12);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #f97583;
}

.form__field-error {
  display: block;
  color: #f97583;
  font-size: 0.78rem;
  margin-top: 5px;
  min-height: 1em;
}

.form__input[aria-invalid="true"],
.form__textarea[aria-invalid="true"] {
  border-color: rgba(220, 53, 69, 0.6);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}