/* Small layer on top of Tailwind for things utilities can't express cleanly. */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Keep anchored sections clear of the sticky header. */
[id] {
  scroll-margin-top: 7rem;
}

/* Reserve room for the header before the loader injects it, so the page doesn't jump. */
#site-header:empty {
  min-height: 4.5rem;
}

@media (min-width: 768px) {
  #site-header:empty {
    min-height: 7.5rem;
  }
}

/* Mobile call bar sits over the bottom of the page; pad the footer so nothing hides behind it. */
@media (max-width: 767px) {
  body {
    padding-bottom: 4.25rem;
  }
}

/* ---------- Header ---------- */
[data-site-header].is-scrolled {
  box-shadow: 0 8px 24px -16px rgba(10, 21, 32, 0.45);
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 60;
}

/* Desktop flyout for Services. On small screens the links simply list under the parent. */
@media (min-width: 1024px) {
  .nav-dropdown {
    opacity: 0;
    visibility: hidden;
    margin-top: 6px;
    transition: opacity 0.15s ease, margin-top 0.15s ease, visibility 0.15s;
  }

  .nav-group:hover .nav-dropdown,
  .nav-group:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    margin-top: 0;
  }
}

/* ---------- Hero ---------- */
.hero-shade {
  background: linear-gradient(90deg, rgba(10, 21, 32, 0.92) 0%, rgba(10, 21, 32, 0.78) 42%, rgba(10, 21, 32, 0.25) 100%);
}

@media (max-width: 767px) {
  .hero-shade {
    background: linear-gradient(180deg, rgba(10, 21, 32, 0.7) 0%, rgba(10, 21, 32, 0.88) 100%);
  }
}

/* A thin "glass edge" highlight used on dark panels. */
.glass-edge {
  position: relative;
}

.glass-edge::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 184, 245, 0.7), transparent);
}

/* ---------- Photo tiles ---------- */
.photo-tile img {
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.photo-tile:hover img,
.photo-tile:focus-visible img {
  transform: scale(1.04);
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .photo-tile img {
    transition: none;
  }
}

/* ---------- Lightbox ---------- */
dialog.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(6, 12, 18, 0.95);
  color: #fff;
}

dialog.lightbox::backdrop {
  background: rgba(6, 12, 18, 0.6);
}

body.modal-open {
  overflow: hidden;
}

/* ---------- Gallery filter ---------- */
[data-filter-btn][aria-pressed="true"] {
  background: #152636;
  border-color: #152636;
  color: #fff;
}
