/* ═══ Mobile-first UX enhancements ═══ */

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-height) + var(--safe-top) + 12px);
}

body {
  -webkit-tap-highlight-color: rgba(201, 168, 76, 0.15);
}

/* Logo */
.nav__logo-img {
  height: 44px;
  width: auto;
  max-width: 48px;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
}

.nav__brand .nav__name {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
}

.nav__logo-img--footer {
  height: 36px;
  max-width: 40px;
}

.footer__brand .nav__name {
  font-size: 0.8rem;
}

/* Hamburger → X */
.nav__toggle {
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background 0.25s;
}

.nav__toggle:active { background: var(--gold-dim); }

.nav.is-menu-open .nav__toggle span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav.is-menu-open .nav__toggle span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav.is-menu-open .nav__toggle span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-menu {
  justify-content: flex-start;
  padding: calc(var(--nav-height) + var(--safe-top) + 2rem) 1.5rem calc(2rem + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  transform: translateY(-8px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out), visibility 0.35s;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.mobile-menu.open {
  transform: translateY(0);
  visibility: visible;
  opacity: 1;
  pointer-events: all;
}

.mobile-menu__close {
  position: absolute;
  top: calc(var(--safe-top) + 1rem);
  right: max(1rem, var(--safe-right));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.mobile-menu__close .icon { width: 20px; height: 20px; }

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.mobile-menu__nav a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.75rem);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  transition: color 0.25s, padding-left 0.25s;
}

.mobile-menu__nav a::after {
  content: '→';
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: var(--gold);
  opacity: 0.6;
}

.mobile-menu__nav a:active {
  color: var(--gold-light);
  padding-left: 0.5rem;
}

.mobile-menu__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 420px;
  margin: 2rem auto 0;
}

.mobile-menu__actions .btn {
  width: 100%;
  justify-content: center;
  min-height: 52px;
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  :root {
    --nav-height: 68px;
    --container: min(1280px, calc(100% - 1.5rem));
    --section-pad: clamp(3.5rem, 10vh, 6rem);
  }

  .nav {
    height: calc(var(--nav-height) + var(--safe-top));
    padding-top: var(--safe-top);
  }

  .nav__cta .btn--primary {
    padding: 0.7rem 1.1rem;
    font-size: 0.68rem;
  }

  /* Hero */
  .hero {
    min-height: 100svh;
    padding-top: calc(var(--nav-height) + var(--safe-top) + 1.5rem);
  }

  .hero__content { padding-bottom: 2rem; }

  .hero__actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 52px;
  }

  .display-xl { font-size: clamp(2.5rem, 11vw, 3.5rem); }

  /* Touch targets */
  .btn { min-height: 48px; }
  input, select, textarea { font-size: 16px !important; }

  /* Gallery lightbox */
  .lightbox {
    padding: 1rem;
    padding-top: calc(1rem + var(--safe-top));
    padding-bottom: calc(1rem + var(--safe-bottom));
  }

  .lightbox__nav {
    width: 44px;
    height: 44px;
  }

  .lightbox__nav--prev { left: 0.5rem; }
  .lightbox__nav--next { right: 0.5rem; }

  .lightbox__close {
    top: calc(0.75rem + var(--safe-top));
    right: 0.75rem;
    width: 44px;
    height: 44px;
  }

  .lightbox__img {
    max-width: 100%;
    max-height: 70svh;
  }

  /* Video player */
  .video-player__controls {
    opacity: 1;
    transform: none;
    padding: 0.65rem 0.75rem;
    gap: 0.4rem;
  }

  .vp-btn {
    width: 40px;
    height: 40px;
  }

  .vp-volume { display: none; }

  .vp-time { font-size: 0.7rem; min-width: 2.2rem; }

  .video-player__play-btn {
    width: 68px;
    height: 68px;
  }

  /* Track page */
  .track-banner { min-height: 200px; padding-bottom: 1.75rem; }
  .track-banner__content .display-lg { font-size: 2rem; }
  .track-search__card { padding: 1.15rem; }
  .track-form__input { font-size: 16px; }

  .nav__brand .nav__name {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
  }

  .nav__logo-img { height: 36px; max-width: 36px; }

  /* Contact / forms */
  .contact-form input,
  .contact-form textarea,
  .contact-form select {
    min-height: 48px;
  }

  .office-item__header { min-height: 48px; }

  /* Reduce motion on parallax for perf */
  .parallax-img { transform: none !important; }
}

@media (max-width: 480px) {
  .stats__grid { grid-template-columns: 1fr; }
  .stat { text-align: center; }
  .gallery__grid { grid-auto-rows: 180px; }

  .marquee__track span {
    font-size: 0.75rem;
    padding: 0 1rem;
  }

  .location__map,
  .location__map iframe { min-height: 320px; }

  .page-hero { padding-top: calc(var(--nav-height) + var(--safe-top) + 2rem); }

  .cta-band__actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .cta-band__actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 52px;
  }
}

@media (max-width: 768px) and (pointer: coarse) {
  .btn-magnetic { transform: none !important; }
}
