/* Zateemee Bride — the gallery (where you arrive after "Enter Your Dream").
 *
 * The hall itself is drawn with WebGL by scripts/gallery.js (a wide museum corridor of warm stone, a carved
 * star-lattice ceiling, stands on both walls, a cinema at the far end) — smooth and steady, no flicker.
 * This file styles what sits over it: the words, the Begin circle, the stand list, the petals and the
 * pop-up that tells each stand's story.
 */
@font-face { font-family: "DM Sans"; src: url("../assets/fonts/dm-sans-latin.woff2") format("woff2"); font-display: swap; }

.gallery {
  --stone: #fbf3ee;
  --ink: #2a2522;
  --muted: #9a8478;
  --gold: #c39a55;
  position: relative;
  background: var(--stone);
  color: var(--ink);
  font-family: "DM Sans", Arial, sans-serif;
}
.gallery-view {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  background: var(--stone);
}
.gallery-walk { height: 400vh; }                 /* scroll length; set exactly by the script */
.hall-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.hall-gl.is-pointing { cursor: pointer; }
.hall-film { position: fixed; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }   /* plays onto the cinema screen */

/* ---------- the words over the hall ---------- */
.gallery-head {
  position: absolute;
  left: 0; right: 0; top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 3vw, 32px) clamp(16px, 4vw, 48px);
  z-index: 3;
}
.gallery-logo { height: clamp(34px, 5vw, 48px); width: auto; display: block; }
.gallery-menu {
  font: 11px/1 "DM Sans", Arial, sans-serif;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  background: none;
  border: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.gallery-menu::after { content: ""; width: 26px; height: 1px; background: currentColor; }
.gallery-intro {
  position: absolute;
  left: 50%;
  top: clamp(90px, 16vh, 160px);
  transform: translateX(-50%);
  width: min(92vw, 760px);
  text-align: center;
  z-index: 2;
  transition: opacity 0.6s ease;
}
.gallery-intro::before {
  content: "";
  position: absolute;
  inset: -40px -60px;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(251, 248, 243, 0.92), rgba(251, 248, 243, 0.6) 60%, rgba(251, 248, 243, 0));
}
.gallery.is-walking-on .gallery-intro { opacity: 0; pointer-events: none; }
.gallery-eyebrow { margin: 0; font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); }
.gallery-title {
  margin: 14px 0 0;
  font-family: "Italiana", "Didot", Georgia, serif;
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 56px);
  line-height: 1.04;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.gallery-hint { margin: 14px 0 0; font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink); }

/* the stand list along the foot: jump to any stand */
.rooms::before {                                 /* a soft band of light behind the list, so it never fights the stands */
  content: "";
  position: absolute;
  left: 0; right: 0; top: -60px; bottom: -120px;
  z-index: -1;
  background: linear-gradient(to top, rgba(246, 241, 234, 0.97) 40%, rgba(246, 241, 234, 0));
  pointer-events: none;
}
.rooms {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(52px, 8vh, 84px);
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: 0 clamp(16px, 4vw, 48px);
}
.rooms ol {
  list-style: none;
  margin: 0;
  padding: 12px 0 0;
  max-width: 1180px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  border-top: 1px solid rgba(201, 164, 106, 0.4);
}
.rooms a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.rooms a:hover, .rooms a:focus-visible, .rooms a.is-here { color: var(--ink); outline: none; }
.rooms a.is-here { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; }
.room-no { font-size: 10px; color: var(--gold); }

/* ---------- arriving: the words and the list appear once we have glided in ---------- */
.gallery .gallery-head, .gallery .rooms { transition: opacity 1.2s ease 1.6s; }
.gallery.is-arriving .gallery-intro, .gallery.is-arriving .gallery-head, .gallery.is-arriving .rooms { opacity: 0; }
.gallery.is-arriving.is-in .gallery-head, .gallery.is-arriving.is-in .rooms { opacity: 1; }
.gallery.is-arriving.is-in:not(.is-walking-on) .gallery-intro { opacity: 1; transition: opacity 1.2s ease 1.6s; }

/* ======================= the pop-up: a stand's story ======================= */
.pop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; }
.pop[hidden] { display: none; }
.pop-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 80% at 50% 45%, rgba(255, 246, 240, 0.72), rgba(243, 217, 210, 0.82));
  -webkit-backdrop-filter: blur(10px) saturate(0.9);
  backdrop-filter: blur(10px) saturate(0.9);
  opacity: 0;
  transition: opacity 0.7s ease;
}
.pop-panel {
  position: relative;
  width: min(1180px, 92vw);
  height: min(720px, 86svh);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: #fffdf9;
  box-shadow: 0 0 0 1px rgba(195, 154, 85, 0.35), 0 60px 120px -40px rgba(150, 80, 60, 0.4);
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  filter: blur(6px);
  transition: opacity 0.8s ease, transform 1s cubic-bezier(0.16, 0.84, 0.3, 1), filter 0.8s ease;
}
.pop.is-open .pop-veil { opacity: 1; }
.pop.is-open .pop-panel { opacity: 1; transform: none; filter: none; transition-delay: 0.12s; }
.pop-close {
  position: absolute;
  right: 14px; top: 10px;
  z-index: 3;
  width: 44px; height: 44px;
  border: 0;
  background: none;
  font: 300 30px/1 "DM Sans", Arial, sans-serif;
  color: var(--ink);
  cursor: pointer;
}
.pop-close:hover, .pop-close:focus-visible { color: #8c6a33; outline: none; }
@media (max-width: 760px) { .pop-close { background: rgba(255, 253, 249, 0.85); border-radius: 50%; right: 10px; top: 10px; } }

/* the carousel: photographs drift softly from one to the next */
.pop-carousel { position: relative; overflow: hidden; background: #efe8de; touch-action: pan-y; }
.pop-slides { position: absolute; inset: 0; }
.pop-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1s ease, transform 6s ease-out;
}
.pop-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pop-slide.is-on { opacity: 1; transform: scale(1); }
.pop-step {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.pop-prev { left: 16px; }
.pop-next { right: 16px; }
.pop-step:hover, .pop-step:focus-visible { background: #111; color: #fff; outline: none; }
.pop-dots { position: absolute; left: 0; right: 0; bottom: 18px; z-index: 2; display: flex; justify-content: center; gap: 10px; }
.pop-dots button {
  width: 28px; height: 3px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background-color 0.4s ease;
}
.pop-dots button.is-on { background: #fff; }
.pop-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pop-cap {
  position: absolute;
  left: 0; right: 0; bottom: 44px;
  text-align: center;
  font-family: "Pinyon Script", "Snell Roundhand", cursive;
  font-size: 40px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(60, 30, 20, 0.45);
  pointer-events: none;
}
.pop-cta {
  display: inline-block;
  margin-top: 6px;
  padding: 14px 22px;
  border-radius: 999px;
  background: #111;
  color: #fff !important;
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
}
.pop-cta:hover, .pop-cta:focus-visible { background: #8c6a33; outline: none; }
.pop-text a:not(.pop-cta) { color: #8c6a33; }
.pop-part[data-slide] { cursor: pointer; }

/* the words */
.pop-text { overflow-y: auto; padding: 56px 52px 48px; scrollbar-width: thin; overscroll-behavior: contain; }
.pop-eyebrow { margin: 0; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.pop-title {
  margin: 16px 0 0;
  font-family: "Italiana", "Didot", Georgia, serif;
  font-weight: 400;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.06;
  text-transform: uppercase;
}
.pop-lead { margin: 18px 0 0; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); line-height: 1.6; }
.pop-text p { font-size: 15px; line-height: 1.75; color: #4c443e; }
.pop-part { margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(201, 164, 106, 0.3); }
.pop-text .pop-kicker { margin: 0; font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); }
.pop-text h3 { margin: 10px 0 0; font-family: "Italiana", "Didot", Georgia, serif; font-weight: 400; font-size: 26px; text-transform: uppercase; }
.pop-stats, .pop-press, .pop-timeline { list-style: none; margin: 16px 0 0; padding: 0; }
.pop-stats li, .pop-press li { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid rgba(201, 164, 106, 0.22); }
.pop-stats b, .pop-timeline b { font-family: "Italiana", "Didot", Georgia, serif; font-weight: 400; font-size: 28px; }
.pop-stats span, .pop-press span { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #4c443e; line-height: 1.5; }
.pop-press b { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
.pop-timeline li { display: grid; grid-template-columns: 84px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(201, 164, 106, 0.22); }
.pop-timeline h3 { margin: 0; font-size: 20px; }
.pop-timeline p { margin: 6px 0 0; }
.pop-quote { margin: 30px 0 0; font-family: "Italiana", "Didot", Georgia, serif; font-size: 24px; line-height: 1.35; }
.pop-quote cite { display: block; margin-top: 10px; font: normal 11px/1 "DM Sans", Arial, sans-serif; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .rooms { justify-content: flex-start; padding: 0; }
  .rooms ol { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding: 12px 16px 6px; scrollbar-width: none; }
  .rooms ol::-webkit-scrollbar { display: none; }
  .pop-panel { grid-template-columns: 1fr; grid-template-rows: 42% 58%; height: 90svh; width: 94vw; }
  .pop-text { padding: 26px 22px 30px; }
  .pop-title { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .pop-panel, .pop-veil, .pop-slide { transition: none; }
}

/* ---------- rose petals drifting slowly through the hall (steady, never twinkling) ---------- */
.petals { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.petal {
  position: absolute;
  top: -40px;
  left: var(--x);
  width: var(--w);
  height: calc(var(--w) * 0.78);
  border-radius: 80% 0 80% 0;
  background: radial-gradient(120% 120% at 20% 20%, #fff6f3, #f4c9c1 55%, #e8aaa0);
  opacity: 0.75;
  box-shadow: 0 2px 6px rgba(200, 120, 110, 0.15);
  animation: petalFall var(--t) linear var(--d) infinite;
}
@keyframes petalFall {
  0%   { transform: translate3d(0, -6vh, 0) rotate(0deg); }
  25%  { transform: translate3d(6vw, 22vh, 0) rotate(80deg); }
  50%  { transform: translate3d(-3vw, 50vh, 0) rotate(160deg); }
  75%  { transform: translate3d(5vw, 78vh, 0) rotate(250deg); }
  100% { transform: translate3d(0, 108vh, 0) rotate(340deg); }
}
@media (prefers-reduced-motion: reduce) {
  .petals { display: none; }
}

/* the instructions: the mouse on a computer, a finger on a phone */
.hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .hint-mouse { display: none; } .hint-touch { display: inline; } }
.gallery-hint--soft { margin-top: 8px; font-size: 11px; color: var(--muted); }

/* at the far end (the cinema): a small note on how to walk back */
.gallery-end {
  position: absolute;
  left: 50%;
  bottom: calc(clamp(52px, 8vh, 84px) + 104px);
  transform: translate(-50%, 8px);
  z-index: 3;
  margin: 0;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(251, 246, 240, 0.86);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.gallery-end i { display: inline-block; margin-right: 10px; font-style: normal; color: var(--gold); animation: endNudge 1.8s ease-in-out infinite; }   /* a little arrow nudging downward */
.gallery.is-at-end .gallery-end { opacity: 1; transform: translate(-50%, 0); transition-delay: 0.6s; }
@keyframes endNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@media (max-width: 760px) { .gallery-end { font-size: 10px; letter-spacing: 0.16em; bottom: calc(clamp(52px, 8vh, 84px) + 70px); } }
@media (prefers-reduced-motion: reduce) { .gallery-end i { animation: none; } }

/* the credit, quietly at the very foot */
.gallery-credit {
  position: absolute;
  left: 0; right: 0;
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 4;                                    /* above the soft band behind the stand list */
  margin: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: opacity 1.2s ease 1.6s;
}
.gallery.is-arriving .gallery-credit { opacity: 0; }
.gallery.is-arriving.is-in .gallery-credit { opacity: 1; }

/* ---------- the Menu: every stand, large and calm, over the hall ---------- */
.gallery.is-menu .gallery-head { z-index: 45; }
.gallery.is-menu .rooms {
  position: fixed;
  inset: 0;
  z-index: 40;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 56px;
  background: rgba(251, 246, 240, 0.95);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 1;
  animation: menuIn 0.5s ease;
}
.gallery.is-menu .rooms::before { display: none; }
.gallery.is-menu .rooms ol {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(8px, 1.6vh, 14px);
  max-height: 100%;
  overflow-y: auto;
  padding: 0;
  border-top: 0;
}
.gallery.is-menu .rooms a { font-family: "Italiana", "Didot", Georgia, serif; font-size: clamp(17px, 2.3vw, 24px); letter-spacing: 0.14em; color: var(--ink); }
.gallery.is-menu .room-no { font-family: "DM Sans", Arial, sans-serif; font-size: 11px; }
@keyframes menuIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- a phone held sideways: a short screen, so only the essentials over the hall ---------- */
@media (max-height: 520px) {
  .gallery-view { min-height: 0; }
  .gallery-head { padding: 10px 16px; }
  .gallery-logo { height: 30px; }
  .gallery-intro { top: 52px; width: min(80vw, 620px); }
  .gallery-intro::before { inset: -20px -40px; }
  .gallery-eyebrow { font-size: 9px; }
  .gallery-title { margin-top: 6px; font-size: 26px; }
  .gallery-hint { margin-top: 8px; font-size: 10px; letter-spacing: 0.18em; }
  .gallery-hint--soft { margin-top: 4px; }
  .gallery-end { bottom: 40px; }
  .gallery-credit { bottom: max(8px, env(safe-area-inset-bottom)); font-size: 9px; }
  .gallery.is-menu .rooms { padding: 56px 24px 24px; }
  .gallery.is-menu .rooms ol { display: grid; grid-template-columns: repeat(2, auto); gap: 9px 36px; align-content: center; }
  .gallery.is-menu .rooms a { font-size: 14px; letter-spacing: 0.1em; }
  .pop-panel { height: 92svh; width: 94vw; grid-template-columns: 1fr 1.1fr; }
  .pop-text { padding: 22px 26px; }
  .pop-title { font-size: 26px; }
}

/* "I'm interested in": each a button that leads to the Write to Us card */
.pop-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.pop-text a.pop-chip {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid rgba(195, 154, 85, 0.55);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 250, 243, 0.6);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.pop-text a.pop-chip:hover, .pop-text a.pop-chip:focus-visible { background: #b88a49; border-color: #b88a49; color: #fff; outline: none; }

/* ---------- the stand list lives in the Menu; at the foot, one quiet line says where you are ---------- */
.gallery:not(.is-menu) .rooms { display: none; }
.gallery-where {
  position: absolute;
  left: 50%;
  bottom: clamp(44px, 7vh, 70px);
  transform: translateX(-50%);
  z-index: 3;
  max-width: 92vw;
  margin: 0;
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.74);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.gallery-where.is-on { opacity: 1; }
.gallery-end { bottom: calc(clamp(44px, 7vh, 70px) + 52px); }

/* ---------- "Book an appointment": always in view, beside the music ---------- */
.gallery-book {
  position: absolute;
  top: 50%;
  right: calc(clamp(116px, 11vw, 160px) + 136px);
  transform: translateY(-50%);
  padding: 10px 18px;
  border: 1px solid rgba(195, 154, 85, 0.75);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.75);
  font: 500 10.5px/1 "DM Sans", Arial, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.gallery-book:hover, .gallery-book:focus-visible { background: #b88a49; border-color: #b88a49; color: #fff; outline: none; }
.book-short { display: none; }

/* ---------- warm late-afternoon light over the whole hall ---------- */
.gallery-view::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(255, 224, 184, 0.12), rgba(255, 224, 184, 0) 38%),
    radial-gradient(130% 100% at 50% 42%, rgba(255, 236, 214, 0) 58%, rgba(190, 132, 100, 0.16) 100%);
}

@media (max-width: 760px) {
  .gallery-book { right: 198px; padding: 9px 14px; }
  .book-long { display: none; }
  .book-short { display: inline; }
  .gallery-where { font-size: 10px; letter-spacing: 0.16em; padding: 8px 14px; }
}
@media (max-height: 520px) {
  .gallery-where { bottom: 30px; }
  .gallery-end { bottom: 74px; }
}
@media (max-width: 420px) { .gallery-credit { font-size: 8.5px; letter-spacing: 0.1em; } }

/* "Powered by MAR": a small button that opens WhatsApp */
.credit-link {
  display: inline-block;
  padding: 5px 11px;
  border: 1px solid rgba(195, 154, 85, 0.6);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.credit-link:hover, .credit-link:focus-visible { background: #b88a49; border-color: #b88a49; color: #fff; outline: none; }
