/* =========================================================
   Shayantani & Avik — "Regal Maroon" wedding invitation
   Style: deep maroon ground, metallic gold rules, cream type
   ========================================================= */

:root {
  --maroon-900: #3d0815;
  --maroon-800: #4d0d1d;
  --maroon-700: #5c1226;
  --maroon-600: #6b1227;
  --maroon-500: #7a1a33;
  --gold: #d9b453;
  --gold-light: #f3dc9a;
  --gold-deep: #a97e26;
  --cream: #f7ecd8;
  --cream-dim: #e6d5b8;
  --muted: #d7bd9c;
  --line: rgba(217, 180, 83, 0.42);
  --line-soft: rgba(217, 180, 83, 0.22);
  --radius: 16px;
  --shadow: 0 24px 60px rgba(20, 3, 8, 0.45);
  --font-script: 'Great Vibes', 'Cormorant Garamond', Georgia, serif;
  --font-initial: 'Alex Brush', 'Great Vibes', 'Cormorant Garamond', Georgia, serif;
  --font-caps: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  background:
    radial-gradient(circle at 15% 8%, rgba(217, 180, 83, 0.16), transparent 40%),
    radial-gradient(circle at 85% 92%, rgba(217, 180, 83, 0.12), transparent 45%),
    radial-gradient(circle at 50% 50%, var(--maroon-600), var(--maroon-900) 78%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--gold-light); }
button, a { -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

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

.state-pause, .state-unmute { display: none; }
#playPause[data-state='pause'] .state-play,
#muteToggle[data-state='unmute'] .state-mute { display: none; }
#playPause[data-state='pause'] .state-pause,
#muteToggle[data-state='unmute'] .state-unmute { display: inline; }

/* ---------- Gold frame (double rule + notched corners) ---------- */

.gold-frame {
  position: absolute;
  inset: 14px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid var(--line);
}

.gold-frame::after {
  content: '';
  position: absolute;
  inset: 7px;
  border: 3px double var(--line);
}

.frame-edge, .frame-corner { position: absolute; display: block; }

.frame-top, .frame-bottom {
  right: -2px; left: -2px; height: 12px;
  background:
    linear-gradient(90deg, transparent, var(--gold-deep) 12%, var(--gold) 50%, var(--gold-deep) 88%, transparent)
    center / 100% 1px no-repeat;
}
.frame-top { top: -6px; }
.frame-bottom { bottom: -6px; }

.frame-left, .frame-right {
  top: -2px; bottom: -2px; width: 12px;
  background:
    linear-gradient(180deg, transparent, var(--gold-deep) 12%, var(--gold) 50%, var(--gold-deep) 88%, transparent)
    center / 1px 100% no-repeat;
}
.frame-left { left: -6px; }
.frame-right { right: -6px; }

.frame-corner {
  width: 56px;
  height: 56px;
  background: url('assets/images/floral-corner.svg') no-repeat center / contain;
}
.corner-tl { top: -4px; left: -4px; }
.corner-tr { top: -4px; right: -4px; transform: scaleX(-1); }
.corner-bl { bottom: -4px; left: -4px; transform: scaleY(-1); }
.corner-br { right: -4px; bottom: -4px; transform: scale(-1); }

/* ---------- Cover gate ---------- */

.cover {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: calc(3.5rem + env(safe-area-inset-top, 0px)) 2rem 3.5rem;
  text-align: center;
  cursor: pointer;
  background:
    radial-gradient(circle at 50% 30%, rgba(217, 180, 83, 0.18), transparent 55%),
    radial-gradient(circle at 50% 50%, var(--maroon-700), var(--maroon-900) 80%);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.cover.opening {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

.cover .gold-frame { inset: 18px; }

.cover-eyebrow {
  margin: 0;
  color: var(--gold);
  font-family: var(--font-caps);
  font-size: clamp(0.72rem, 3vw, 0.95rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.monogram {
  width: clamp(140px, 42vw, 210px);
  margin: 0.4rem 0 0.2rem;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}

.cover-title {
  margin: 0;
  color: var(--cream);
  font-family: var(--font-caps);
  font-size: clamp(0.8rem, 3.4vw, 1.05rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  line-height: 1.9;
}

.cover-names {
  display: block;
  color: var(--gold-light);
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 13vw, 4.4rem);
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.15;
}

.cover-names em,
.hero .amp,
.footer-names em { font-style: normal; color: var(--gold); }

/* Groom's capital A: Alex Brush is a close calligraphic match to Great Vibes,
   but its uppercase A has a clear, full-height capital form. */
.initial {
  font-family: var(--font-initial);
  font-size: 1.12em;
}

.cover-date {
  margin: 0;
  color: var(--cream-dim);
  font-family: var(--font-caps);
  font-size: clamp(0.75rem, 3vw, 0.95rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.cover-hint {
  margin: 0.6rem 0 0;
  padding: 0.55rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(217, 180, 83, 0.1);
  color: var(--gold-light);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

.cover-hint::after {
  content: ' ↓';
  animation: nudge 1.8s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---------- Invitation shell ---------- */

.invitation {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(3.5rem + env(safe-area-inset-top, 0px)) 1.25rem calc(3.5rem + env(safe-area-inset-bottom, 0px));
}

.invitation > header,
.invitation > section,
.invitation > footer {
  position: relative;
  z-index: 1;
}

.divider {
  width: min(220px, 68%);
  margin: 1.5rem auto 0;
  opacity: 0.9;
}

/* ---------- Blessing ---------- */

.blessing {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0.5rem 0.5rem;
  text-align: center;
}

.blessing-om {
  margin: 0;
  color: var(--gold);
  font-size: 2.4rem;
  line-height: 1;
}

.blessing-line {
  max-width: 40ch;
  margin: 0.7rem auto 0;
  color: var(--cream-dim);
  font-size: 1.12rem;
  font-style: italic;
}

.blessing .divider { margin-top: 1.1rem; }

/* ---------- Hero ---------- */

.hero {
  padding: 1.4rem 0 1rem;
  text-align: center;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--gold);
  font-family: var(--font-caps);
  font-size: 0.78rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

h1 { margin: 0; line-height: 1.05; font-weight: 400; }

h1 .name {
  display: block;
  color: var(--gold-light);
  font-family: var(--font-script);
  font-size: clamp(3rem, 15vw, 5.2rem);
  line-height: 1.05;
}

h1 .amp {
  display: block;
  margin: 0.15rem 0;
  font-family: var(--font-caps);
  font-size: clamp(1.1rem, 5vw, 1.5rem);
  letter-spacing: 0.3em;
}

.invitation-line {
  max-width: 36ch;
  margin: 1.2rem auto 1.6rem;
  color: var(--cream-dim);
  font-size: 1.08rem;
  font-style: italic;
}

/* date block: SATURDAY | 12 | DEC 2026 */

.date-block {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(0.75rem, 4vw, 1.5rem);
  padding: 1.1rem 0.75rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.date-cell { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }

.date-label {
  color: var(--muted);
  font-family: var(--font-caps);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.date-value {
  color: var(--cream);
  font-family: var(--font-caps);
  font-size: clamp(1rem, 5vw, 1.5rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.date-rule { width: 1px; background: var(--line); }

.ceremony-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.6rem;
  margin: 1.2rem 0 0;
  color: var(--cream-dim);
  font-family: var(--font-caps);
  font-size: 0.86rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ceremony-line b { color: var(--gold-light); font-weight: 600; }

/* ---------- Music controls ---------- */

.music-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 0 auto 1.8rem;
}

.music-controls button {
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(217, 180, 83, 0.08);
  color: var(--cream);
  font-family: var(--font-caps);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.music-controls #tapToPlay {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--maroon-900);
}

/* ---------- Sections ---------- */

.section {
  margin: 2rem 0;
  padding: 1.6rem 1.4rem;
  background: linear-gradient(180deg, rgba(255, 245, 226, 0.055), rgba(255, 245, 226, 0.02));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(2px);
}

.section h2 {
  margin: 0 0 1.2rem;
  color: var(--gold);
  font-family: var(--font-caps);
  font-size: clamp(1.05rem, 4.6vw, 1.3rem);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-align: center;
  text-transform: uppercase;
}

/* ---------- Event card ---------- */

.events-section { text-align: center; }

.event-card h3 {
  margin: 0 0 0.6rem;
  color: var(--gold-light);
  font-family: var(--font-script);
  font-size: clamp(1.9rem, 8vw, 2.5rem);
  font-weight: 400;
  line-height: 1.2;
}

.event-timing {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.9rem;
  margin: 0 0 0.4rem;
  color: var(--cream);
  font-family: var(--font-caps);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.event-timing span + span { position: relative; }
.event-timing span + span::before {
  content: '·';
  position: absolute;
  left: -0.6rem;
  color: var(--gold);
}

.event-note {
  margin: 0 0 1.1rem;
  color: var(--gold-light);
  font-style: italic;
}

.map-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 6px);
  background: rgba(0, 0, 0, 0.28);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: min(58vw, 300px);
  min-height: 200px;
  border: 0;
  filter: sepia(0.25) saturate(0.9);
}

.venue-name {
  margin: 1rem 0 0;
  color: var(--cream);
  font-family: var(--font-caps);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.venue-address {
  margin: 0.3rem 0 0.9rem;
  color: var(--muted);
}

.map-link {
  font-family: var(--font-caps);
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-underline-offset: 4px;
}

/* ---------- Order of the day ---------- */

.schedule-section { text-align: center; }

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.timeline li {
  position: relative;
  display: grid;
  gap: 0.15rem 0;
  padding: 0 0 1.4rem 1.6rem;
  border-left: 1px solid var(--line-soft);
}

.timeline li:last-child { padding-bottom: 0.2rem; border-left-color: transparent; }

.timeline li::before {
  content: '';
  position: absolute;
  top: 0.45rem;
  left: -6px;
  width: 11px;
  height: 11px;
  transform: rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 180, 83, 0.18);
}

.timeline .time {
  color: var(--gold);
  font-family: var(--font-caps);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.timeline .what { color: var(--cream); font-size: 1.15rem; }
.timeline .where { color: var(--muted); font-size: 0.98rem; }

.gift-note {
  margin: 1.6rem 0 0;
  padding: 1.1rem 1.2rem;
  border: 1px dashed var(--line);
  border-radius: calc(var(--radius) - 6px);
  background: rgba(217, 180, 83, 0.07);
  text-align: center;
}

.gift-note p {
  margin: 0;
  color: var(--gold-light);
  font-style: italic;
  font-size: 1.08rem;
}

/* ---------- WhatsApp ---------- */

.whatsapp-section { text-align: center; }

.whatsapp-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  background: #25d366;
  color: #073b20;
  font-family: var(--font-caps);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.28);
}

.whatsapp-note {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Footer ---------- */

.footer {
  padding: 1.8rem 0 0.5rem;
  text-align: center;
}

.footer-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.footer-corner { width: 74px; opacity: 0.85; }
.footer-corner.left { transform: scaleX(-1); }
.footer-monogram { width: 78px; }

.footer-names {
  margin: 0;
  color: var(--gold-light);
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 8vw, 2.4rem);
  line-height: 1.2;
}

.footer-date {
  margin: 0.35rem 0 0;
  color: var(--gold);
  font-family: var(--font-caps);
  font-size: 0.78rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}

.footer-made {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

/* ---------- Pre-wedding photo gallery ---------- */

.photos-section { text-align: center; }

.photos-viewport {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: calc(var(--radius) - 6px);
}

.photos-track {
  display: flex;
  transition: transform 0.45s ease;
}

.photo-slide {
  position: relative;
  flex: 0 0 100%;
  margin: 0;
}

.photo-slide.is-broken { display: none; }

.photo-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.3);
  cursor: zoom-in;
}

.photo-slide img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
}

.photo-slide figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(transparent, rgba(20, 3, 8, 0.8));
  color: var(--gold-light);
  font-family: var(--font-caps);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.photo-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.9rem;
}

.photo-nav {
  min-width: 44px;
  min-height: 44px;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(217, 180, 83, 0.08);
  color: var(--gold-light);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.photo-dots { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; }

.photo-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(217, 180, 83, 0.35);
  cursor: pointer;
}

.photo-dots button[aria-current='true'] {
  background: var(--gold);
  transform: scale(1.3);
}

.photo-empty {
  max-width: 42ch;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}

.photo-empty code { color: var(--gold-light); font-style: normal; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(20, 3, 8, 0.92);
}

.lightbox figure { margin: 0; max-width: 100%; text-align: center; }

.lightbox img {
  max-height: 82vh;
  width: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.lightbox figcaption {
  margin-top: 0.75rem;
  color: var(--gold-light);
  font-family: var(--font-caps);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

#lightboxClose {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--maroon-800);
  color: var(--gold-light);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  body { font-size: 17px; }
  .gold-frame { inset: 10px; }
  .cover .gold-frame { inset: 12px; }
  .frame-corner { width: 40px; height: 40px; }
  .cover { gap: 0.75rem; padding-inline: 1.6rem; }
  .invitation { padding-inline: 1rem; }
  .section { padding: 1.2rem 1rem; margin: 1.5rem 0; }
  .date-block { gap: 0.7rem; padding-inline: 0.35rem; }
  .ceremony-line { font-size: 0.74rem; letter-spacing: 0.12em; }
  .timeline li { padding-bottom: 1.1rem; }
  .footer-corner { width: 54px; }
  .footer-monogram { width: 62px; }
  .photo-slide img { aspect-ratio: 1 / 1; }
}

@media (min-width: 700px) {
  .invitation { padding-left: 2.25rem; padding-right: 2.25rem; }
  .section { padding: 2rem 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
