:root {
  --logo-tile-size: 72px;
  --logo-tile-opacity-light: 0.008;
  --logo-tile-opacity-dark: 0.018;
}

section,
footer {
  position: relative;
  isolation: isolate;
}

section::before,
footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('images/logo.webp');
  background-size: var(--logo-tile-size) auto;
  background-repeat: repeat;
  opacity: var(--logo-tile-opacity-light);
  pointer-events: none;
  z-index: 0;
}

section.hero-mesh::before,
section.page-hero::before,
section.bg-brand-950::before,
footer.bg-brand-950::before,
section[class*='from-brand-700']::before {
  opacity: var(--logo-tile-opacity-dark);
  filter: invert(1) brightness(1.8);
}

section > *,
footer > * {
  position: relative;
  z-index: 1;
}

.hero-mesh {
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(16, 184, 146, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(249, 115, 22, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 60% 80%, rgba(5, 150, 115, 0.15) 0%, transparent 50%),
    linear-gradient(180deg, #022c22 0%, #064e3b 40%, #047857 100%);
}
.page-hero {
  background:
    radial-gradient(ellipse 70% 50% at 30% 30%, rgba(16, 184, 146, 0.2) 0%, transparent 60%),
    linear-gradient(180deg, #022c22 0%, #064e3b 60%, #047857 100%);
}
.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.glass-light {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #10b892;
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.gallery-item {
  overflow: hidden;
}
.gallery-item img {
  transition: transform 0.5s ease;
}
.gallery-item:hover img {
  transform: scale(1.05);
}

/* ── Mobile responsiveness ── */
html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

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

@media (max-width: 640px) {
  :root {
    --logo-tile-size: 56px;
  }

  .hero-mesh .animate-float {
    transform: scale(0.55);
  }

  .marquee-bar .animate-marquee {
    animation-duration: 28s;
  }
}

@media (max-width: 380px) {
  .nav-brand-wrap {
    max-width: 9.5rem;
  }

  .nav-brand-wrap .nav-text {
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate-marquee,
  .animate-float {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 639px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

body.menu-open {
  overflow: hidden;
}

#mobile-menu.glass-light-mobile {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(5, 150, 115, 0.15);
}

#mobile-menu.glass-light-mobile .mobile-link {
  color: #0f172a;
}

#mobile-menu.glass-light-mobile .mobile-link:last-child {
  background: #059673;
  color: white;
}
