/* ============================================
   DANI'S 26th — MAMMA MIA BIRTHDAY INVITE
   Design tokens
   ============================================ */
:root {
  --sky: #d8e8f4;
  --sky-soft: #eaf3fa;
  --navy: #1c3f5f;
  --navy-deep: #142c44;
  --azure: #3c6f9c;
  --bougainvillea: #d94f8c;
  --bougainvillea-deep: #b8336e;
  --cream: #faf7f1;
  --white: #ffffff;
  --gold-shimmer: #dfe6ea;

  --font-script: "Alex Brush", cursive;
  --font-display: "Cormorant Garamond", serif;
  --font-body: "EB Garamond", serif;

  --section-pad: clamp(48px, 8vw, 96px);
  --edge-pad: clamp(20px, 6vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--sky);
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--navy); margin: 0; }

.script { font-family: var(--font-script); }

a { color: inherit; }

button { font-family: var(--font-body); cursor: pointer; }

/* ---------- Tile border motif (signature device) ---------- */
.tile-border {
  background-image:
    linear-gradient(45deg, var(--navy) 25%, transparent 25%),
    linear-gradient(-45deg, var(--navy) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--navy) 75%),
    linear-gradient(-45deg, transparent 75%, var(--navy) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  height: 10px;
  width: 100%;
  opacity: 0.55;
}

/* ---------- Section base ---------- */
.section {
  position: relative;
  padding: var(--section-pad) var(--edge-pad);
  max-width: 640px;
  margin: 0 auto;
}
.section--wide { max-width: 900px; }
.section--band-cream { background: var(--cream); }
.section--band-navy { background: var(--navy); color: var(--cream); }
.section--band-navy h1, .section--band-navy h2, .section--band-navy h3 { color: var(--cream); }
.full-bleed { max-width: none; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Nav dots (scroll progress) ---------- */
.scroll-nav {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 40;
}
.scroll-nav button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--navy);
  background: transparent;
  padding: 0;
  opacity: 0.5;
  transition: all 0.3s ease;
}
.scroll-nav button.active {
  background: var(--bougainvillea);
  border-color: var(--bougainvillea);
  opacity: 1;
  transform: scale(1.3);
}
@media (max-width: 640px) { .scroll-nav { display: none; } }

/* ---------- Sound toggle ---------- */
.sound-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 50;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--cream);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 14px rgba(28, 63, 95, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.2s ease;
}
.sound-toggle.visible { opacity: 1; pointer-events: auto; }
.sound-toggle:active { transform: scale(0.92); }

/* ============================================
   COVER
   ============================================ */
.cover {
  height: 100svh;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  background: radial-gradient(ellipse at 50% 20%, var(--sky-soft), var(--sky) 70%);
  text-align: center;
}
.cover__name {
  font-size: clamp(3rem, 12vw, 5rem);
  color: var(--navy);
}
.cover__ball {
  width: 64px;
  height: 64px;
  opacity: 0.85;
}
.btn {
  display: inline-block;
  background: var(--navy);
  color: var(--cream);
  border: none;
  padding: 16px 44px;
  border-radius: 999px;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-body);
  box-shadow: 0 8px 24px rgba(28, 63, 95, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(28, 63, 95, 0.35); }
.btn:active { transform: translateY(0); }
.btn--pink { background: var(--bougainvillea); }
.btn--outline { background: transparent; border: 1.5px solid var(--navy); color: var(--navy); box-shadow: none; }

/* ============================================
   HERO INVITE CARD
   ============================================ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  position: relative;
  overflow: hidden;
  padding: 40px var(--edge-pad);
}
.hero__frame {
  position: relative;
  max-width: 460px;
  width: 100%;
}
.hero__image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(28,63,95,0.18);
}
.hero__placeholder {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 18px;
}

/* ============================================
   COUNTDOWN
   ============================================ */
.countdown-copy { text-align: center; }
.countdown-copy p { font-size: 1.1rem; line-height: 1.7; max-width: 440px; margin: 18px auto 0; }
.countdown {
  display: flex;
  justify-content: center;
  margin: 32px auto 0;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(28,63,95,0.12);
  overflow: hidden;
  max-width: 420px;
}
.countdown__unit {
  flex: 1;
  padding: 16px 8px;
  text-align: center;
  position: relative;
}
.countdown__unit + .countdown__unit::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 16%;
  width: 1px;
  background: var(--sky);
}
.countdown__unit .num { font-size: 1.6rem; font-weight: 700; color: var(--navy); font-family: var(--font-display); }
.countdown__unit .lbl { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--azure); }

/* ============================================
   PARTY / VENUE
   ============================================ */
.venue { text-align: center; }
.venue h2 { font-size: 2rem; margin-bottom: 6px; }
.venue .when { font-size: 1.15rem; color: var(--bougainvillea-deep); margin-bottom: 24px; }
.photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(28,63,95,0.18);
  margin: 0 auto 24px;
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--sky-soft), var(--sky) 60%, #cfe1ee);
  color: var(--azure);
  font-size: 0.85rem;
  text-align: center;
  padding: 16px;
}
.photo-placeholder .icon { font-size: 1.8rem; }
.photo-placeholder code {
  background: rgba(255,255,255,0.6);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
}
.venue address { font-style: normal; margin-bottom: 20px; line-height: 1.6; }

/* ============================================
   RSVP
   ============================================ */
.rsvp-box {
  background: var(--white);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 10px 30px rgba(28,63,95,0.12);
  text-align: center;
}
.rsvp-box p { line-height: 1.7; }
.radio-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  max-width: 260px;
  margin: 20px auto;
}
.radio-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  cursor: pointer;
}
.radio-row input { accent-color: var(--bougainvillea); width: 18px; height: 18px; }
.text-input {
  width: 100%;
  max-width: 320px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--sky);
  background: var(--sky-soft);
  font-family: var(--font-body);
  font-size: 1rem;
  margin: 6px 0 20px;
}
.text-input:focus { outline: 2px solid var(--azure); outline-offset: 2px; }
.field-label { display: block; text-align: left; max-width: 320px; margin: 0 auto; font-size: 0.9rem; color: var(--azure); }

.tally-embed {
  width: 100%;
  border: none;
  margin-top: 20px;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline { text-align: center; }
.timeline-list {
  list-style: none;
  padding: 0;
  margin: 32px auto 0;
  max-width: 360px;
  position: relative;
}
.timeline-list::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--azure);
  opacity: 0.4;
}
.timeline-list li {
  position: relative;
  padding: 12px 0 12px 32px;
  font-size: 1.05rem;
  text-align: left;
}
.timeline-list li strong { color: var(--bougainvillea-deep); }
.timeline-list li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bougainvillea);
  z-index: 1;
  box-shadow: 0 0 0 4px var(--sky-soft);
}
.timeline-list li span { display: block; background: var(--sky-soft); padding: 8px 12px; border-radius: 10px; }

/* ============================================
   TEASER CARDS (music / dress code / notes)
   ============================================ */
.teaser-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
.teaser-card {
  background: var(--white);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(28,63,95,0.1);
  transition: transform 0.3s ease;
}
.teaser-card:hover { transform: translateY(-4px); }
.teaser-card .icon { font-size: 2.2rem; margin-bottom: 12px; display: block; }
.teaser-card h3 { font-size: 1.4rem; margin-bottom: 8px; }
.teaser-card p { color: var(--azure); font-size: 0.95rem; margin-bottom: 20px; }

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 44, 68, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--sky-soft);
  border-radius: 20px;
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  animation: modalIn 0.35s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--navy);
  color: var(--cream);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal h3 { font-size: 1.5rem; margin-bottom: 16px; }
.modal p { line-height: 1.7; margin-bottom: 12px; }
.modal .white-box {
  background: var(--white);
  border-radius: 14px;
  padding: 20px;
  margin-top: 16px;
  text-align: left;
}
.form-embed-note {
  background: var(--white);
  border: 1.5px dashed var(--azure);
  border-radius: 12px;
  padding: 16px;
  font-size: 0.85rem;
  color: var(--azure);
  margin-top: 16px;
  text-align: left;
}

/* ============================================
   GALLERY (inspiration)
   ============================================ */
#gallery {
  max-width: none;
  overflow: hidden;
}
.gallery-viewport {
  --gallery-item-w: clamp(160px, calc((100vw - var(--edge-pad) * 2 - 60px) / 4), 280px);
  --gallery-gap: 20px;
  overflow: hidden;
  width: calc(var(--gallery-item-w) * 4 + var(--gallery-gap) * 3);
  max-width: calc(100vw - var(--edge-pad) * 2);
  margin: 24px auto 0;
}
.gallery-track {
  display: flex;
  gap: var(--gallery-gap);
  width: max-content;
  padding: 4px;
}
.gallery-item {
  flex: 0 0 var(--gallery-item-w);
  width: var(--gallery-item-w);
  aspect-ratio: 3/4;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(28,63,95,0.15);
  position: relative;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.gallery-item:hover { transform: scale(1.02); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-track.animating {
  animation: scrollGallery 38s linear infinite;
}
@keyframes scrollGallery {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Lightbox for gallery images ---------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 30, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  color: var(--navy);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 201;
}

/* ============================================
   GIFTS
   ============================================ */
.gifts { text-align: center; }
.gifts p { line-height: 1.8; }

/* ============================================
   CLOSING
   ============================================ */
.closing {
  text-align: center;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.closing__thanks { font-size: 1.3rem; color: var(--azure); }
.closing__name { font-family: var(--font-script); font-size: 3rem; color: var(--navy); margin-bottom: 32px; }
.closing-links { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.closing-links a {
  color: var(--navy);
  text-decoration: none;
  font-size: 1rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.closing-links a:hover { border-color: var(--bougainvillea); }

/* ============================================
   Floral watermark decoration
   (images/hero-floral-top.png reused at low opacity,
   flipped/rotated for variety across sections)
   ============================================ */
.floral-decor {
  position: absolute;
  width: 220px;
  max-width: 45%;
  height: auto;
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}
.floral-decor--tl { top: -10px; left: -10px; }
.floral-decor--tr { top: -10px; right: -10px; transform: scaleX(-1); }
.floral-decor--bl { bottom: -10px; left: -10px; transform: scaleY(-1); }
.floral-decor--br { bottom: -10px; right: -10px; transform: rotate(180deg); }
/* Intro: same orientation/transparency as former RSVP decor, upper left */
.floral-decor--intro {
  top: -10px;
  left: -10px;
  transform: scaleX(-1);
}
/* Timeline: natural orientation, upper right, aligned with section boundary */
.floral-decor--timeline {
  top: 0;
  right: 0;
}
/* Gifts: rotated 180°, upper right */
.floral-decor--gifts {
  top: -10px;
  right: -10px;
  transform: ;
}
/* keep real content above the watermark */
.section > *:not(.floral-decor) { position: relative; z-index: 1; }

/* Footer credit spacing safety */
.section:last-of-type { padding-bottom: 64px; }
