/* ==========================================================
   Maharaj Temple Ghana, redesign
   Concept: the page is a temple doorway onto the water.
   Light "pearl" bands for reading, deep "sapphire" bands for impact,
   a wave line wherever one band meets the next.
   ========================================================== */

:root {
  --abyss: #04122a;
  --sapphire: #071e3d;
  --tide: #0b2f57;
  --pearl: #edf3f5;
  --foam: #f8fbfc;
  --ink: #0a2540;
  --ink-soft: #3b546d;

  --gold: #e0b865;
  --gold-soft: #f0d9a0;
  --gold-line: #c49a45;
  --gold-text: #6a4d0d;   /* gold for small text on pearl: 7:1 */
  --aqua: #4cc3c9;

  --on-dark: #f4f8fa;
  --on-dark-soft: #c3ccd6;

  --display: 'Marcellus', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  --text: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --wave-h: clamp(28px, 5vw, 72px);
  --nav-h: 64px;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--abyss);
  color: var(--on-dark);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol { margin-top: 0; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.band-light :focus-visible { outline-color: var(--ink); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 12px 18px; border-radius: 999px;
  background: var(--gold); color: var(--ink);
  font-weight: 700; text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 999px;
  font-family: var(--text); font-size: 1rem; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), box-shadow 160ms ease, border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn img { width: 22px; height: 22px; }

.btn-gold {
  background: linear-gradient(135deg, #f0d9a0 0%, #d6a94f 100%);
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(224, 184, 101, 0.28);
}
.btn-ghost-dark {
  border-color: rgba(244, 248, 250, 0.45);
  color: var(--on-dark);
}
.btn-ghost-light {
  border-color: rgba(10, 37, 64, 0.4);
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .btn-gold:hover { box-shadow: 0 8px 28px rgba(224, 184, 101, 0.5); }
  .btn-ghost-dark:hover { border-color: var(--gold); color: var(--gold); }
  .btn-ghost-light:hover { background: var(--ink); color: var(--on-dark); }
}

/* ---------- header and navigation ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
}

.site-header::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(7, 30, 61, 0.94);
  border-bottom: 1px solid rgba(224, 184, 101, 0.2);
  opacity: 0; transition: opacity 200ms ease;
}
.site-header.is-scrolled::before,
body.menu-open .site-header::before { opacity: 1; }
.site-header.is-scrolled::before { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }

.header-inner {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px;
}

.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.brand img { width: 38px; height: auto; flex: none; }
.brand-text { font-family: var(--display); font-size: 1.05rem; line-height: 1.15; color: var(--gold); }

.menu-btn {
  position: relative; z-index: 45;
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 6px;
  width: 44px; height: 44px; margin-right: -8px; padding: 0 8px;
  border: 0; background: transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn span {
  display: block; height: 2px; border-radius: 2px; background: var(--gold);
  transition: transform 260ms var(--ease-out), opacity 160ms ease, width 260ms var(--ease-out);
}
.menu-btn span:nth-child(1) { width: 28px; }
.menu-btn span:nth-child(2) { width: 18px; }
.menu-btn span:nth-child(3) { width: 24px; }
.menu-btn[aria-expanded='true'] span:nth-child(1) { width: 26px; transform: translateY(8px) rotate(45deg); }
.menu-btn[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded='true'] span:nth-child(3) { width: 26px; transform: translateY(-8px) rotate(-45deg); }

/* Mobile menu: a ripple that spreads from the menu button across the whole screen */
.primary-nav {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 12px) 28px calc(32px + env(safe-area-inset-bottom));
  background:
    radial-gradient(90% 55% at 15% 100%, rgba(76, 195, 201, 0.18), transparent 70%),
    linear-gradient(180deg, var(--sapphire), var(--abyss));
  clip-path: circle(0 at calc(100% - 36px) 32px);
  visibility: hidden;
  transition: clip-path 260ms var(--ease-out), visibility 0s linear 260ms;
}
.primary-nav.is-open {
  clip-path: circle(150vmax at calc(100% - 36px) 32px);
  visibility: visible;
  transition: clip-path 600ms var(--ease-out), visibility 0s;
}

.nav-list { margin: 0; padding: 0; list-style: none; }
.nav-list li {
  opacity: 0; transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.primary-nav.is-open .nav-list li {
  opacity: 1; transform: none;
  transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
}
.primary-nav.is-open .nav-list li:nth-child(1) { transition-delay: 140ms; }
.primary-nav.is-open .nav-list li:nth-child(2) { transition-delay: 190ms; }
.primary-nav.is-open .nav-list li:nth-child(3) { transition-delay: 240ms; }
.primary-nav.is-open .nav-list li:nth-child(4) { transition-delay: 290ms; }

.nav-list a {
  display: flex; align-items: center; min-height: 64px;
  border-bottom: 1px solid rgba(244, 248, 250, 0.12);
  font-family: var(--display); font-size: 1.85rem; line-height: 1.2;
  text-decoration: none; color: var(--on-dark);
  transition: color 150ms ease;
}
.nav-list a[aria-current='true'] { color: var(--gold); }
.nav-call { align-self: flex-start; margin-top: 32px; }

@media (hover: hover) and (pointer: fine) {
  .nav-list a:hover { color: var(--gold); }
}

/* ---------- hero (full-bleed artwork, glass card on phones) ---------- */
.hero {
  position: relative; display: flex; align-items: flex-end;
  min-height: 100vh; min-height: 100svh;
  padding-bottom: var(--wave-h);
  overflow: hidden; isolation: isolate;
  background: var(--abyss);
}

.hero-art {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 18%;
  will-change: transform;
}

.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(4, 18, 42, 0.75) 0%, rgba(4, 18, 42, 0.05) 26%, rgba(4, 18, 42, 0.55) 52%, rgba(4, 18, 42, 0.94) 72%, var(--abyss) 100%);
}

.hero-inner {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: calc(var(--nav-h) + 24px) 20px 16px;
}

/* No box: the copy sits straight on the artwork, left aligned, over a deep scrim */
.hero-card { max-width: 36rem; }

.hero-title { margin: 0 0 14px; font-weight: 400; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55); }
.title-lead { display: block; margin-bottom: 4px; font-family: var(--text); font-size: 1rem; font-weight: 500; color: var(--gold-soft); }
.title-main {
  display: block; font-family: var(--display);
  font-size: clamp(2.35rem, 9.6vw, 3.4rem); line-height: 1.05;
  text-wrap: balance;
}

.lede { margin: 0 0 16px; font-size: 1.0625rem; line-height: 1.6; color: var(--on-dark-soft); max-width: 34rem; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5); }

.status {
  display: inline-flex; align-items: flex-start; gap: 10px; margin: 0;
  font-size: 0.9375rem; font-weight: 600; line-height: 1.4;
}
.status-dot { flex: none; width: 9px; height: 9px; margin-top: 0.38em; border-radius: 50%; background: #8493a6; }
.status.is-open .status-dot { background: #3ddc84; box-shadow: 0 0 10px rgba(61, 220, 132, 0.7); }
.status.is-closed .status-dot { background: var(--gold); }

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.cta-group .btn { flex: 1 1 140px; }

/* Hero intro in plain CSS so it plays on the very first paint, with no script to wait for.
   Only transforms move: the image and the paragraph stay fully opaque, so the browser
   counts them as painted straight away (that is what Lighthouse calls LCP).
   fill-mode "backwards" lets GSAP's scroll parallax and the button press take over afterwards. */
@media (prefers-reduced-motion: no-preference) {
  .hero-art { animation: hero-art-in 1.6s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
  .title-lead { animation: rise 0.7s var(--ease-out) 0.05s backwards; }
  .title-main .wi { animation: word-up 0.9s var(--ease-out) backwards; }
  .title-main .w:nth-child(1) .wi { animation-delay: 0.1s; }
  .title-main .w:nth-child(2) .wi { animation-delay: 0.18s; }
  .title-main .w:nth-child(3) .wi { animation-delay: 0.26s; }
  .hero .lede { animation: lift 0.8s var(--ease-out) 0.2s backwards; }
  .hero .status { animation: rise 0.7s var(--ease-out) 0.35s backwards; }
  .hero .cta-group .btn { animation: rise 0.7s var(--ease-out) 0.42s backwards; }
  .hero .cta-group .btn + .btn { animation-delay: 0.5s; }
}
@keyframes hero-art-in { from { transform: scale(1.12); } to { transform: none; } }
@keyframes word-up { from { transform: translateY(110%); } to { transform: none; } }
@keyframes lift { from { transform: translateY(16px); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* split-text helpers created by script.js */
.w  { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.2em; margin-bottom: -0.2em; }
.wi { display: inline-block; }
.wo { display: inline; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- bands (full-width sections) and their wave edge ---------- */
.band {
  --band-bg: var(--pearl);
  --band-fg: var(--ink);
  --band-soft: var(--ink-soft);
  position: relative;
  padding: calc(var(--wave-h) + 40px) 0 72px;
  background: var(--band-bg);
  color: var(--band-fg);
}

.band-light { --band-bg: var(--pearl); --band-fg: var(--ink); --band-soft: var(--ink-soft); }
.band-deep  { --band-bg: var(--tide);  --band-fg: var(--on-dark); --band-soft: var(--on-dark-soft); }
.band-dark  { --band-bg: var(--sapphire); --band-fg: var(--on-dark); --band-soft: var(--on-dark-soft); }

.band::before,
.band::after {
  content: ''; position: absolute; left: 0; right: 0;
  top: calc(var(--wave-h) * -1 + 1px); height: var(--wave-h);
  pointer-events: none;
}
.band::before {
  background: var(--band-bg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100V58C180 10 360 10 540 50S900 100 1080 50S1320 14 1440 46V100Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100V58C180 10 360 10 540 50S900 100 1080 50S1320 14 1440 46V100Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.band::after {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 58C180 10 360 10 540 50S900 100 1080 50S1320 14 1440 46' fill='none' stroke='%23c49a45' stroke-width='1.5' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  opacity: 0.75;
}

.band > .container { position: relative; z-index: 1; }

.section-title {
  margin: 0 0 36px;
  font-family: var(--display); font-size: clamp(2.1rem, 7vw, 3.6rem); font-weight: 400; line-height: 1.1;
  text-wrap: balance;
}

.band-title {
  margin: 0 0 16px;
  font-family: var(--display); font-size: clamp(1.7rem, 4.6vw, 2.3rem); font-weight: 400; line-height: 1.15;
  color: var(--gold-text);
}
.band-deep .band-title,
.band-dark .band-title { color: var(--gold); }

.prose { margin: 0; max-width: 62ch; font-size: 1.0625rem; line-height: 1.75; color: var(--band-soft); }

/* ---------- story ---------- */
.story-row { display: grid; gap: 32px; align-items: start; }

.video {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 6px; background: #000;
  box-shadow: 0 14px 36px rgba(7, 30, 61, 0.35);
}
.video iframe,
.video-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-poster { display: block; background: linear-gradient(135deg, var(--tide), var(--abyss)); -webkit-tap-highlight-color: transparent; }
.video-poster img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; }

.play {
  position: absolute; top: 50%; left: 50%;
  display: grid; place-items: center; width: 68px; height: 68px; margin: -34px 0 0 -34px;
  border: 2px solid var(--gold); border-radius: 50%;
  background: rgba(7, 30, 61, 0.74);
  transition: transform 180ms var(--ease-out), background-color 180ms ease;
}
.play svg { width: 28px; height: 28px; margin-left: 3px; fill: var(--gold); }
.video-poster:active .play { transform: scale(0.95); }

@media (hover: hover) and (pointer: fine) {
  .video-poster:hover .play { transform: scale(1.07); background: rgba(7, 30, 61, 0.92); }
}

/* Story photos: 2x2 grid of framed tiles */
.story-title { margin-bottom: 20px; }
.story-gallery {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
  margin: 0; padding: 0; list-style: none;
}
.gallery-item {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden;
  aspect-ratio: 4 / 5; border: 1px solid rgba(196, 154, 69, 0.75); border-radius: 14px;
  background: var(--abyss); box-shadow: 0 6px 18px rgba(7, 30, 61, 0.28);
  cursor: zoom-in; -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out);
}
.gallery-item:active { transform: scale(0.97); }
.gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transition: transform 320ms var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover img { transform: scale(1.05); }
}

.story-copy .video { margin-top: 28px; }

/* ---------- mission ---------- */
.mission-art { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.mission-inner { max-width: 46rem; }
.mission-inner .prose { max-width: none; font-size: clamp(1.1rem, 2.4vw, 1.3rem); line-height: 1.7; color: var(--on-dark); }

.mission-crest {
  position: absolute; left: -30px; bottom: -20px;
  width: min(64vw, 440px); height: auto; opacity: 0.08;
  pointer-events: none;
}

/* ---------- services: a ruled list, no boxes ---------- */
.services-head { max-width: 46rem; margin-bottom: 40px; }

.services { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(10, 37, 64, 0.2); }

.service {
  position: relative; display: grid; gap: 6px; padding: 26px 0;
  border-bottom: 1px solid rgba(10, 37, 64, 0.2);
}
.service::before {
  content: ''; position: absolute; left: -20px; top: 18px; bottom: 18px; width: 3px;
  background: var(--gold-line); transform: scaleY(0); transform-origin: center;
  transition: transform 260ms var(--ease-out);
}

.service-title { margin: 0; font-family: var(--display); font-size: 1.55rem; font-weight: 400; line-height: 1.2; color: var(--ink); }
.service-desc { margin: 0; max-width: 56ch; color: var(--ink-soft); line-height: 1.65; }
.service-when { margin: 6px 0 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.5; color: var(--gold-text); }

@media (hover: hover) and (pointer: fine) {
  .service:hover::before { transform: scaleY(1); }
}

/* ---------- featured ---------- */
.featured-head { max-width: 46rem; margin-bottom: 36px; }
.featured-head .section-title { margin-bottom: 18px; }

.carousel-track {
  display: flex; gap: 16px; padding: 4px 0 8px; overflow-x: auto;
  overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-item { flex: 0 0 min(88%, 480px); scroll-snap-align: center; }
.carousel-item .video { box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45); }

.carousel-controls { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.carousel-count { min-width: 64px; margin: 0; text-align: center; font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--gold); }
.carousel-btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(224, 184, 101, 0.5); border-radius: 50%;
  background: transparent; color: var(--gold); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), border-color 160ms ease, opacity 160ms ease;
}
.carousel-btn:active:not(:disabled) { transform: scale(0.94); }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }
.carousel-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (hover: hover) and (pointer: fine) {
  .carousel-btn:hover:not(:disabled) { border-color: var(--gold); }
}

/* ---------- visit ---------- */
.visit-grid { display: grid; gap: 40px; }

.detail { padding: 0 0 28px; margin: 0 0 28px; border-bottom: 1px solid rgba(10, 37, 64, 0.18); }
.detail:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.detail-label { margin: 0 0 8px; font-family: var(--display); font-size: 1.25rem; font-weight: 400; color: var(--gold-text); }
.detail-main { margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.35; }
.detail-sub { margin: 2px 0 12px; color: var(--ink-soft); }

.text-link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--gold-line); text-decoration-thickness: 2px; text-underline-offset: 5px;
}

.phone {
  display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 12px;
  font-family: var(--display); font-size: clamp(1.7rem, 6.4vw, 2.5rem); line-height: 1.2;
  color: var(--ink); text-decoration: none; overflow-wrap: anywhere;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions .btn { flex: 1 1 150px; }

.follow { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.social-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; text-decoration: none; }
.social-link img { width: 24px; height: 24px; }

@media (hover: hover) and (pointer: fine) {
  .phone:hover, .social-link:hover { text-decoration: underline; text-decoration-color: var(--gold-line); text-decoration-thickness: 2px; text-underline-offset: 5px; }
}

/* Opening hours sit in an arched panel, echoing the hero doorway */
.hours {
  padding: 78px 22px 34px; text-align: center;
  border-radius: 220px 220px 20px 20px;
  background:
    radial-gradient(80% 50% at 50% 0%, rgba(76, 195, 201, 0.2), transparent 70%),
    linear-gradient(180deg, var(--tide), var(--sapphire));
  color: var(--on-dark);
  box-shadow: 0 20px 44px rgba(7, 30, 61, 0.35);
}
.hours-title { margin: 0 0 22px; font-family: var(--display); font-size: 1.5rem; font-weight: 400; color: var(--gold); }

.week {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px;
  margin: 0 auto 22px; padding: 0; list-style: none; max-width: 360px;
}
.week li {
  display: grid; place-items: center; aspect-ratio: 1;
  border: 1px solid rgba(244, 248, 250, 0.2); border-radius: 50%;
  font-size: 0.8125rem; font-weight: 600; color: var(--on-dark-soft);
}
.week .is-open-day { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.week .is-today { box-shadow: 0 0 0 2px var(--sapphire), 0 0 0 4px var(--aqua); }

.hours-main { margin: 0; font-family: var(--display); font-size: 1.6rem; line-height: 1.25; }
.hours-sub { margin: 4px 0 18px; font-size: 1.0625rem; color: var(--on-dark-soft); }
.hours .status { justify-content: center; text-align: left; }

/* ---------- footer ---------- */
.site-footer { position: relative; margin-top: 0; padding: calc(var(--wave-h) + 36px) 0 28px; background: var(--abyss); color: var(--on-dark); }
.site-footer::before,
.site-footer::after {
  content: ''; position: absolute; left: 0; right: 0;
  top: calc(var(--wave-h) * -1 + 1px); height: var(--wave-h); pointer-events: none;
}
.site-footer::before {
  background: var(--abyss);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100V58C180 10 360 10 540 50S900 100 1080 50S1320 14 1440 46V100Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100V58C180 10 360 10 540 50S900 100 1080 50S1320 14 1440 46V100Z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.site-footer::after {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0 58C180 10 360 10 540 50S900 100 1080 50S1320 14 1440 46' fill='none' stroke='%23c49a45' stroke-width='1.5' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  opacity: 0.75;
}
.site-footer > .container { position: relative; z-index: 1; }

.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.footer-crest { display: block; width: 96px; height: auto; margin-bottom: 14px; }
.footer-title { margin: 0; font-family: var(--display); font-size: 1.5rem; color: var(--gold); }
.footer-tag { margin: 4px 0 10px; color: var(--on-dark-soft); }
.footer-address { margin: 0 0 18px; font-style: normal; line-height: 1.7; color: var(--on-dark-soft); }
.footer-address a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-dark); font-weight: 600; text-decoration: none; }

.footer-nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; margin: 0 0 18px; padding: 0; list-style: none; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; color: var(--on-dark); text-decoration: none; }

.footer-bottom { width: 100%; padding-top: 18px; border-top: 1px solid rgba(244, 248, 250, 0.12); }
.footer-bottom p { margin: 0 0 2px; font-size: 0.875rem; color: var(--on-dark-soft); }
.developer-credit a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 600; color: var(--gold); text-decoration: none; }

@media (hover: hover) and (pointer: fine) {
  .footer-nav a:hover { color: var(--gold); }
  .developer-credit a:hover { text-decoration: underline; }
}

/* ---------- floating whatsapp + lightbox ---------- */
.fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 35;
  display: grid; place-items: center; width: 56px; height: 56px;
  border: 1px solid var(--gold-line); border-radius: 50%;
  background: var(--sapphire); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  -webkit-tap-highlight-color: transparent;
  transition: transform 200ms var(--ease-out), opacity 200ms ease, visibility 0s;
}
.fab img { width: 32px; height: 32px; }
.fab:active { transform: scale(0.95); }
.fab.is-hidden {
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(0.95); pointer-events: none;
  transition: transform 200ms var(--ease-out), opacity 200ms ease, visibility 0s linear 200ms;
}

.lightbox { max-width: min(92vw, 720px); max-height: 92vh; padding: 0; overflow: visible; border: 0; background: transparent; color: #fff; }
.lightbox::backdrop { background: rgba(4, 18, 42, 0.92); }
.lightbox[open] { animation: fade 200ms var(--ease-out); }
.lightbox img { display: block; width: auto; max-width: 100%; height: auto; max-height: 86vh; margin: 0 auto; border: 1px solid var(--gold-line); border-radius: 10px; }
.lightbox-close {
  position: fixed; top: 12px; right: 12px; display: grid; place-items: center;
  width: 48px; height: 48px; padding: 0; border: 1px solid var(--gold-line); border-radius: 50%;
  background: var(--sapphire); color: var(--gold); cursor: pointer;
}
.lightbox-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ==========================================================
   >= 640px
   ========================================================== */
@media (min-width: 640px) {
  .container { padding: 0 32px; }
  .header-inner { padding: 0 32px; }
  .band { padding-bottom: 96px; }
  .service-when { margin-top: 8px; }
}

/* ==========================================================
   >= 900px
   ========================================================== */
@media (min-width: 900px) {
  :root { --nav-h: 76px; }

  .menu-btn { display: none; }
  .header-inner { padding: 0 40px; }

  .primary-nav {
    position: static; inset: auto; z-index: auto;
    flex-direction: row; align-items: center; justify-content: flex-start; gap: 20px;
    padding: 0; background: none;
    clip-path: none; visibility: visible; transition: none;
  }
  .primary-nav.is-open { clip-path: none; transition: none; }

  .nav-list { display: flex; gap: 4px; }
  .nav-list li,
  .primary-nav.is-open .nav-list li { opacity: 1; transform: none; transition: none; transition-delay: 0ms; }
  .nav-list a {
    position: relative; min-height: 44px; padding: 0 14px; border: 0;
    font-family: var(--text); font-size: 0.95rem; font-weight: 500;
  }
  .nav-list a::after {
    content: ''; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px;
    background: var(--gold); transform: scaleX(0); transform-origin: left;
    transition: transform 220ms var(--ease-out);
  }
  .nav-list a[aria-current='true']::after { transform: scaleX(1); }
  .nav-call { align-self: auto; margin-top: 0; min-height: 44px; padding: 0 22px; }

  /* hero: copy left, artwork right */
  .hero { align-items: center; min-height: max(100svh, 680px); }
  .hero-art {
    left: auto; right: 0; width: min(58%, 900px); object-position: 50% 22%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40%);
            mask-image: linear-gradient(90deg, transparent 0, #000 40%);
  }
  .hero-scrim {
    background:
      linear-gradient(90deg, var(--abyss) 0%, rgba(4, 18, 42, 0.85) 32%, rgba(4, 18, 42, 0.1) 68%, transparent 100%),
      linear-gradient(180deg, rgba(4, 18, 42, 0.7) 0%, transparent 22%, transparent 72%, var(--abyss) 100%);
  }
  .hero-inner { padding: calc(var(--nav-h) + 40px) 40px 48px; }
  .hero-card { max-width: 36rem; }
  .title-lead { margin-bottom: 8px; font-size: 1.25rem; }
  .title-main { font-size: clamp(3.4rem, 5.6vw, 5.2rem); line-height: 1.02; }
  .lede { font-size: 1.1875rem; margin-bottom: 20px; }
  .cta-group { margin-top: 28px; }
  .cta-group .btn { flex: 0 0 auto; min-width: 170px; }

  /* about */
  .story-title { margin-bottom: 28px; }
  .story-gallery { gap: 16px; }
  .story-row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
  .story-copy .prose { margin-top: -6px; }
  .mission-inner { margin-inline: auto; }

  .services-head { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: end; max-width: none; }
  .services-head .band-title { margin: 0; }
  .service {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 0.7fr);
    column-gap: 40px; align-items: baseline; padding: 30px 0;
  }
  .service-when { margin: 0; text-align: right; }
  .service-desc { grid-column: 2; }
  .service-title { grid-column: 1; }
  .service-when { grid-column: 3; }

  /* featured: one large stage, two beside it */
  .carousel-track {
    display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr;
    gap: 20px; overflow: visible; padding: 0;
  }
  .carousel-item { flex: none; }
  .carousel-item:first-child { grid-row: 1 / span 2; }
  .carousel-item:not(:first-child) .video { height: 100%; aspect-ratio: auto; }
  .carousel-item:first-child .video { aspect-ratio: 16 / 9; }
  .carousel-controls { display: none; }
  .carousel-item:not(:first-child) .play { width: 52px; height: 52px; margin: -26px 0 0 -26px; }

  /* visit */
  .visit-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 72px; align-items: start; }
  .hours { padding: 96px 36px 44px; }

  .fab { right: 24px; bottom: 24px; }
}

/* ==========================================================
   Reduced motion: keep fades, drop movement
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  .primary-nav, .primary-nav.is-open { transition-duration: 0.01ms; }
  .nav-list li, .primary-nav.is-open .nav-list li { transform: none; transition-delay: 0ms; }
  .gallery-item img, .play, .btn, .fab { transition: none; }
}
