/* ==============================================
   NATHANIEL & SOPHIA — Wedding RSVP Website
   ============================================== */


/* ─────────────────────────────────────────────
   DESIGN TOKENS
   ───────────────────────────────────────────── */
:root {
  --ivory:       #FAF7F1;
  --cream:       #F3EDE3;
  --white:       #FFFFFF;
  --espresso:    #1A0F07;
  --coffee:      #2C1A0E;
  --brown:       #5C3A1E;
  --mocha:       #7B5B3A;
  --gold:        #8B6035;
  --gold-light:  #C4A06A;
  --tan:         #D4B896;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Montserrat', sans-serif;
  --font-script:  'Dancing Script', cursive;

  --nav-h: 62px;
  --max-w: 1100px;
}


/* ─────────────────────────────────────────────
   SCROLL REVEAL ANIMATIONS
   ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero entrance — staggered, no scroll needed */
.hero-label    { animation: heroFadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.2s both; }
.hero-names    { animation: heroFadeUp 0.9s cubic-bezier(0.22,1,0.36,1) 0.4s both; }
.hero-date     { animation: heroFadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.55s both; }
.hero-location { animation: heroFadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.65s both; }
.hero-verse    { animation: heroFadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.75s both; }
.hero-cta      { animation: heroFadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.9s both; }

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────
   RESET
   ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--ivory);
  color: var(--coffee);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-h);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--gold); }


/* ─────────────────────────────────────────────
   CONTAINER
   ───────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}


/* ─────────────────────────────────────────────
   SECTION LABELS
   ───────────────────────────────────────────── */
.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  text-align: center;
}
.section-eyebrow.light { color: rgba(196, 160, 106, 0.8); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--espresso);
  text-align: center;
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-title.light { color: #FAF7F1; }

.section-divider {
  width: 48px;
  height: 1px;
  background: var(--gold-light);
  margin: 0 auto 48px;
}
.section-divider.light { background: rgba(196, 160, 106, 0.5); }


/* ─────────────────────────────────────────────
   TOP NAV
   ───────────────────────────────────────────── */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 999;
  background: var(--gold);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-names {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 400;
  color: #FAF7F1;
  letter-spacing: 0.02em;
}

.nav-rsvp-btn {
  background: #FAF7F1;
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 11px 24px;
  transition: background 0.2s, color 0.2s;
  display: inline-block;
}
.nav-rsvp-btn:hover { background: var(--cream); color: var(--espresso); text-decoration: none; }


/* ─────────────────────────────────────────────
   HERO
   ───────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 580px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 55%;
  filter: brightness(0.55);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26, 15, 7, 0.45) 0%,
    rgba(26, 15, 7, 0.60) 60%,
    rgba(26, 15, 7, 0.80) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px 60px; /* padding-bottom keeps CTA away from section edge */
  color: #FAF7F1;
  width: 100%;
  max-width: 800px;
}

.hero-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 20px;
}

.hero-names {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 9vw, 6rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.1;
  color: #FAF7F1;
  margin-bottom: 20px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.3);
  white-space: nowrap;
}

.hero-amp {
  font-family: var(--font-script);
  font-size: 0.8em;
  color: var(--gold-light);
}

.hero-date {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250, 247, 241, 0.85);
  margin-bottom: 6px;
}

.hero-location {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(250, 247, 241, 0.55);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hero-verse {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(250, 247, 241, 0.75);
  margin-top: 8px;
  margin-bottom: 36px;
  line-height: 1.5;
}
.hero-verse-ref {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-style: normal;
  opacity: 0.85;
}

.hero-cta {
  display: inline-block;
  background: var(--gold);
  color: #FAF7F1;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 17px 44px;
  transition: background 0.2s, transform 0.15s;
}
.hero-cta:hover { background: var(--brown); color: #FAF7F1; text-decoration: none; transform: translateY(-2px); }


/* ─────────────────────────────────────────────
   WEDDING DETAILS
   ───────────────────────────────────────────── */
.details {
  background: var(--white);
  padding: 84px 0;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  gap: 0;
  align-items: stretch; /* both cards grow to the same height */
  margin-top: 8px;
}

.detail-card {
  text-align: center;
  padding: 24px 28px 32px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
}
.detail-card:hover {
  box-shadow: 0 8px 32px rgba(139, 96, 53, 0.1);
}

/* Push the map + button to the bottom so both cards align */
.venue-map { margin-top: auto; padding-top: 20px; }

.detail-icon {
  color: var(--gold);
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.detail-heading {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.detail-time {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  font-style: italic;
  color: var(--espresso);
  margin-bottom: 12px;
  line-height: 1;
}

.detail-venue {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--coffee);
  margin-bottom: 2px;
  line-height: 1.3;
}

.detail-venue-sub {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--mocha);
  margin-bottom: 12px;
}

.detail-address {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--mocha);
  margin-bottom: 14px;
}

.detail-note {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--tan);
  line-height: 1.5;
}

.venue-map {
  border: 1px solid #EDE3D6;
  overflow: hidden;
  line-height: 0;
  /* margin-top handled by flex + auto above */
}

.venue-directions-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 13px 22px;
  background: var(--espresso);
  color: #FAF7F1;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s;
}
.venue-directions-btn:hover {
  background: var(--brown);
  color: #FAF7F1;
  text-decoration: none;
}

.details-sep {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: auto;   /* stretches with the grid row */
  margin-top: 0;
  padding: 40px 0;
}
.sep-line { flex: 1; width: 1px; background: var(--tan); opacity: 0.5; min-height: 20px; }
.sep-diamond { font-size: 0.5rem; color: var(--gold-light); flex-shrink: 0; }


/* ─────────────────────────────────────────────
   COUNTDOWN
   ───────────────────────────────────────────── */
.countdown-section {
  background: var(--espresso);
  padding: 64px 0;
  text-align: center;
}

.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 88px;
  padding: 0 8px;
}

.cd-num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 300;
  color: #FAF7F1;
  line-height: 1;
}

.cd-lbl {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-top: 6px;
}

.cd-sep {
  font-size: 2.2rem;
  color: var(--gold);
  opacity: 0.4;
  align-self: flex-start;
  margin-top: 8px;
  padding-bottom: 20px;
}

.countdown-ended {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-style: italic;
  color: #FAF7F1;
}


/* ─────────────────────────────────────────────
   PHOTO GALLERY CAROUSEL
   ───────────────────────────────────────────── */
.gallery-section {
  background: var(--ivory);
  padding: 84px 0 0;
}

.gallery-carousel {
  position: relative;
  overflow: hidden;
  background: #111;
  margin-top: 32px;
  user-select: none;
}

.gallery-track {
  display: flex;
  gap: 2px;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.gallery-item {
  flex: 0 0 calc((100% - 4px) / 3); /* 3 visible, 2 × 2px gaps */
  height: 340px;
  overflow: hidden;
  background: #111;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
  pointer-events: none;
}
.gallery-item:hover img { transform: scale(1.05); }

/* Arrows */
.gal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(26, 15, 7, 0.65);
  color: #FAF7F1;
  border: 1px solid rgba(196, 160, 106, 0.4);
  width: 46px; height: 46px;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.gal-arrow:hover { background: rgba(26, 15, 7, 0.95); }
.gal-prev { left: 16px; }
.gal-next { right: 16px; }

/* Dots — hidden (27 photos = too many dots; swipe + arrows are used instead) */
.gal-dots { display: none; }


/* ─────────────────────────────────────────────
   SAVE THE DATE VIDEO
   ───────────────────────────────────────────── */
.video-section {
  background: var(--espresso);
  padding: 84px 0;
  text-align: center;
}

.video-wrap {
  position: relative;
  max-width: 760px;
  margin: 40px auto 0;
  /* Elegant gold frame */
  padding: 10px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  box-shadow: 0 12px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(196,160,106,0.3);
}

.video-inner {
  position: relative;
  line-height: 0;
}

.std-video {
  width: 100%;
  display: block;
  max-height: 480px;
  object-fit: cover;
}

.video-unmute-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(196, 160, 106, 0.18);
  border: 1.5px solid rgba(196, 160, 106, 0.55);
  color: #C4A06A;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}
.video-unmute-btn:hover {
  background: rgba(196, 160, 106, 0.32);
  border-color: rgba(196, 160, 106, 0.85);
  transform: scale(1.08);
}
.vol-icon {
  width: 18px;
  height: 18px;
}

.video-caption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: rgba(196, 160, 106, 0.65);
  margin-top: 20px;
}


/* ─────────────────────────────────────────────
   RSVP SECTION
   ───────────────────────────────────────────── */
.rsvp-section {
  background: var(--cream);
  padding: 84px 0 96px;
}

.rsvp-deadline {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--mocha);
  text-align: center;
  margin-bottom: 48px;
}
.rsvp-deadline strong { color: var(--coffee); font-weight: 700; }

.rsvp-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  padding: 52px 52px;
  box-shadow: 0 8px 48px rgba(92, 58, 30, 0.1);
  border-top: 3px solid var(--gold);
}


/* ─────────────────────────────────────────────
   FORM ELEMENTS
   ───────────────────────────────────────────── */
.form-group { margin-bottom: 28px; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coffee);
  margin-bottom: 10px;
}

.form-input {
  width: 100%;
  border: 2px solid #DDD3C0;
  background: var(--ivory);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 16px 18px;
  outline: none;
  border-radius: 0;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus {
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(139, 96, 53, 0.1);
}
.form-input::placeholder { color: #B8A090; font-style: italic; }

.form-error {
  font-size: 0.85rem;
  color: #8B2500;
  font-style: italic;
  margin-top: 10px;
  padding: 12px 16px;
  background: rgba(139, 37, 0, 0.06);
  border-left: 3px solid #8B2500;
}


/* ─────────────────────────────────────────────
   RADIO BUTTONS
   ───────────────────────────────────────────── */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  user-select: none;
  padding: 17px 20px;
  border: 2px solid #DDD3C0;
  background: var(--ivory);
  transition: border-color 0.2s, background 0.2s;
}
.radio-label:hover { border-color: var(--gold); background: var(--white); }

.radio-label input[type="radio"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}

.radio-box {
  width: 22px;
  height: 22px;
  border: 2px solid #C4A06A;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.radio-label input[type="radio"]:checked ~ .radio-box {
  border-color: var(--gold);
  background: var(--gold);
}
.radio-label input[type="radio"]:checked ~ .radio-box::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 7px; height: 7px;
  background: white;
  border-radius: 50%;
}
.radio-label:has(input:checked) { border-color: var(--gold); background: rgba(139, 96, 53, 0.05); }

.radio-text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--espresso);
}


/* ─────────────────────────────────────────────
   RSVP NOTE
   ───────────────────────────────────────────── */
.rsvp-note {
  background: rgba(139, 96, 53, 0.05);
  border-left: 3px solid var(--gold-light);
  padding: 16px 20px;
  margin: 24px 0;
}

.rsvp-note-text {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--coffee);
}

.rsvp-note-link {
  background: none;
  border: none;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  transition: color 0.2s;
}
.rsvp-note-link:hover { color: var(--brown); }


/* ─────────────────────────────────────────────
   SUBMIT BUTTON
   ───────────────────────────────────────────── */
.submit-group {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid #EDE3D6;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 20px 32px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  border-radius: 0;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--espresso); color: #FAF7F1; }
.btn-primary:hover { background: var(--brown); }
.btn-primary:disabled { background: var(--mocha); cursor: not-allowed; }
.btn-full { width: 100%; text-align: center; }

.btn.loading { position: relative; color: transparent; }
.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }


/* ─────────────────────────────────────────────
   SUCCESS SCREEN
   ───────────────────────────────────────────── */
.success-inner {
  text-align: center;
  padding: 16px 0;
  animation: fadeUp 0.4s ease forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.success-icon { font-size: 2.5rem; color: var(--gold); margin-bottom: 16px; }
.success-heading {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 300;
  font-style: italic;
  color: var(--espresso);
  margin-bottom: 20px;
}
.success-message { font-family: var(--font-body); font-size: 1rem; color: var(--coffee); line-height: 1.75; margin-bottom: 12px; }
.success-subtext { font-size: 0.9rem; color: var(--mocha); font-style: italic; margin-bottom: 28px; }
.success-names { font-family: var(--font-display); font-size: 2rem; font-style: italic; font-weight: 300; color: var(--espresso); margin-bottom: 4px; }
.success-date { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); }


/* ─────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────── */
.site-footer {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.footer-photo { position: absolute; inset: 0; background-size: cover; background-position: center 35%; }
.footer-overlay { position: absolute; inset: 0; background: rgba(26, 15, 7, 0.72); }
.footer-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 64px 28px;
  color: #FAF7F1;
}
.footer-names {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 300;
  font-style: italic;
  color: #FAF7F1;
  margin-bottom: 12px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
.footer-date {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 4px;
}
.footer-location {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250, 247, 241, 0.45);
  margin-bottom: 24px;
}
.footer-divider { width: 40px; height: 1px; background: rgba(196, 160, 106, 0.4); margin: 0 auto 20px; }
.footer-verse {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: rgba(250, 247, 241, 0.8);
  margin-bottom: 4px;
}
.footer-verse-ref {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.7;
}


/* ─────────────────────────────────────────────
   INFO POPUP MODAL
   ───────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(26, 15, 7, 0.7);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: pointer;
}
.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--white);
  max-width: 480px;
  width: 100%;
  padding: 40px 36px 36px;
  text-align: center;
  border-top: 4px solid var(--gold);
  animation: slideUp 0.3s ease;
  box-shadow: 0 24px 80px rgba(26, 15, 7, 0.35);
  max-height: 90vh;
  max-height: 90svh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: default;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

.modal-icon { font-size: 2.2rem; display: block; }
.modal-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 300;
  font-style: italic;
  color: var(--espresso);
}
.modal-divider { width: 40px; height: 1px; background: var(--gold-light); margin: 0 auto; }

.modal-lang-block {
  text-align: left;
  background: var(--ivory);
  border: 1px solid #EDE3D6;
  padding: 20px 22px;
}
.modal-message {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--coffee);
  margin-bottom: 12px;
}
.modal-message:last-of-type { margin-bottom: 0; }
.modal-sub {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--mocha);
  margin-top: 4px;
}

.modal-btn {
  display: block;
  background: var(--espresso);
  color: #FAF7F1;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 18px 40px;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s;
}
.modal-btn:hover { background: var(--brown); }



/* ─────────────────────────────────────────────
   RESPONSIVE — TABLET (768px)
   ───────────────────────────────────────────── */
@media (max-width: 768px) {

  body { font-size: 16px; }

  .container { padding: 0 24px; }

  .top-nav { padding: 0 20px; }
  .nav-names { font-size: 0.92rem; }
  .nav-rsvp-btn { padding: 9px 16px; font-size: 0.68rem; }

  .hero-names { white-space: normal; font-size: clamp(2.2rem, 8vw, 4rem); }

  .details { padding: 60px 0; }
  .details-grid { grid-template-columns: 1fr; }
  .details-sep {
    flex-direction: row;
    height: auto;
    width: 100%;
    padding: 16px 0;
    gap: 12px;
    margin-top: 0;
  }
  .sep-line { flex: 1; height: 1px; width: auto; }

  /* Gallery carousel — 2 visible at tablet */
  .gallery-item { flex: 0 0 calc((100% - 2px) / 2); height: 280px; }

  .rsvp-card { padding: 36px 28px; }

  .modal-overlay { padding: 16px; }
  .modal-box { padding: 32px 24px 28px; gap: 14px; }
  .modal-title { font-size: 1.6rem; }

  .video-wrap { padding: 8px; }

  .site-footer { min-height: 320px; }
}


/* ─────────────────────────────────────────────
   RESPONSIVE — MOBILE (480px)
   ───────────────────────────────────────────── */
@media (max-width: 480px) {

  body { font-size: 15px; }

  .container { padding: 0 16px; }

  .hero-names { font-size: clamp(2rem, 9vw, 2.6rem); white-space: normal; }
  .hero-content { padding: 0 16px 48px; }
  .hero-verse { font-size: 0.95rem; }
  .hero-cta { padding: 15px 32px; font-size: 0.75rem; }

  /* Gallery carousel — 1 visible on mobile */
  .gallery-item { flex: 0 0 100%; height: 300px; }
  .gal-arrow { width: 38px; height: 38px; font-size: 0.95rem; }
  .gal-prev { left: 8px; }
  .gal-next { right: 8px; }

  .gallery-section { padding: 60px 0 0; }

  .rsvp-card { padding: 28px 18px; }
  .rsvp-section { padding: 60px 0 72px; }

  .cd-unit { min-width: 60px; }
  .cd-sep { font-size: 1.6rem; }
  .countdown-section { padding: 48px 0; }

  .details { padding: 48px 0; }
  .detail-card { padding: 20px 16px 24px; }

  .video-section { padding: 60px 0; }
  .video-wrap { padding: 6px; }
  .std-video { max-height: none; }

  .modal-box { padding: 24px 16px 20px; gap: 12px; }
  .modal-title { font-size: 1.4rem; }
  .modal-message { font-size: 0.92rem; }
  .modal-btn { padding: 16px; font-size: 0.85rem; }

  .bg-music-btn { bottom: 16px; left: 16px; }

  .music-hint { bottom: 16px; right: 16px; width: 42px; height: 42px; }

  .site-footer { min-height: 280px; }
  .footer-content { padding: 48px 20px; }
  .footer-verse { font-size: 1rem; }
}


/* ─────────────────────────────────────────────
   RESPONSIVE — SMALL PHONES (360px)
   ───────────────────────────────────────────── */
@media (max-width: 360px) {

  .hero-names { font-size: 1.85rem; }
  .hero-cta { padding: 14px 24px; font-size: 0.72rem; letter-spacing: 0.15em; }

  .cd-unit { min-width: 52px; padding: 0 4px; }
  .cd-num { font-size: 2.2rem; }
  .cd-sep { font-size: 1.4rem; }

  .nav-names { font-size: 0.82rem; }
  .nav-rsvp-btn { padding: 8px 12px; font-size: 0.62rem; letter-spacing: 0.1em; }

  .rsvp-card { padding: 22px 14px; }
  .form-input { padding: 14px 14px; }
  .radio-label { padding: 14px 16px; gap: 12px; }
}


/* ─────────────────────────────────────────────
   LANDSCAPE PHONE — short viewport
   ───────────────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {

  .hero {
    height: auto;
    min-height: 100vh;
    padding: 80px 0 40px;
  }

  .hero-content { padding: 0 16px 24px; }
  .hero-names { font-size: clamp(1.8rem, 5vw, 2.8rem); margin-bottom: 10px; }
  .hero-verse { display: none; }
  .hero-cta { margin-top: 0; }

  .countdown { gap: 2px; }
  .cd-unit { min-width: 64px; }
}


/* ─────────────────────────────────────────────
   GLOBAL TOUCH IMPROVEMENTS
   ───────────────────────────────────────────── */
button, a, .radio-label, .gal-arrow, .nav-rsvp-btn, .hero-cta, .modal-btn, .btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Prevent horizontal overflow on all screen sizes */
html, body { max-width: 100%; overflow-x: hidden; }

/* ── Music hint button ── */
.music-hint {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(196,160,106,0.90);
  color: #FAF7F1;
  border: 1.5px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9000;
  backdrop-filter: blur(8px);
  transition: opacity 0.7s ease, transform 0.3s ease;
  animation: musicPulse 2.2s ease-in-out infinite;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.music-hint:hover { transform: scale(1.1); }
.music-hint.hidden { opacity: 0; pointer-events: none; }

@keyframes musicPulse {
  0%,100% { box-shadow: 0 2px 12px rgba(0,0,0,0.25), 0 0 0 0 rgba(196,160,106,0.5); }
  50%      { box-shadow: 0 2px 12px rgba(0,0,0,0.25), 0 0 0 10px rgba(196,160,106,0); }
}
