/* ===== Tokens ===== */
:root {
  --cream: #FBF6F0;
  --cream-soft: #FFFDFB;
  --blush: #F6D8DE;
  --blush-soft: #FCEEF0;
  --wine: #882845;
  --terracotta: #7A3B33;
  --espresso: #2E1B12;
  --espresso-soft: #4A2E1F;
  --gold: #B98D4A;
  --ink: #3a2a26;

  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Playfair Display', serif;

  --max-w: 650px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--espresso);
  color: var(--ink);
  font-family: var(--font-serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

main {
  max-width: var(--max-w);
  margin: 0 auto;
  background: var(--cream);
  box-shadow: 0 0 60px rgba(0,0,0,.35);
}

img { max-width: 100%; display: block; }

/* Icon masks: tint flat PNG icons with our palette via CSS mask */
.icon-mask {
  display: inline-block;
  background-color: var(--wine);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

a { color: inherit; }

.section {
  position: relative;
  padding: 72px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background-size: cover;
  background-position: center;
}

/* ===== Reveal on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Typography helpers ===== */
.script-title {
  font-family: var(--font-script);
  color: var(--wine);
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  line-height: 1.15;
  margin: 0;
}
.script-title--light { color: var(--blush); }
.script-title.small { font-size: clamp(1.6rem, 6vw, 2.1rem); }

.body-copy {
  font-style: italic;
  font-weight: 400;
  color: var(--terracotta);
  font-size: clamp(1rem, 3.6vw, 1.15rem);
  line-height: 1.7;
  max-width: 420px;
  margin: 0;
}

.lead-in {
  font-style: italic;
  color: var(--terracotta);
  margin: 12px 0 0;
}

.date-script {
  font-family: var(--font-script);
  color: var(--wine);
  font-size: clamp(1.8rem, 6.5vw, 2.4rem);
  line-height: 1.3;
  margin: 0;
}

.deco-photo {
  width: 220px;
  border-radius: 4px;
  margin-top: 18px;
  box-shadow: 0 10px 30px rgba(122,59,51,.25);
}

/* ===== 1. Opening ===== */
.section--opening {
  min-height: 100svh;
  justify-content: center;
  background: linear-gradient(180deg, var(--cream-soft), var(--blush-soft));
}
.opening__frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.opening__crest { width: 140px; height: auto; }
.opening__seal {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0;
}
.opening__seal svg {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 8px 18px rgba(136,40,69,.45));
  transition: transform .3s ease;
}
.opening__seal:hover svg,
.opening__seal:focus-visible svg { transform: scale(1.06) rotate(-2deg); }
.opening__cta {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--wine);
}
.opening__hint {
  font-family: var(--font-serif);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--terracotta);
  opacity: .75;
  margin: 0;
}
.opening__frame.opened .opening__seal svg { transform: scale(.92) rotate(6deg); opacity: .7; }

/* ===== 2. Hero ===== */
.section--hero {
  min-height: 78svh;
  justify-content: center;
  background-color: var(--blush);
}
.hero__frame { width: 100%; max-width: 300px; }
.hero__ornament { width: 100%; height: auto; }

/* ===== 3. Welcome ===== */
.section--welcome { background: var(--cream); padding-top: 64px; padding-bottom: 64px; gap: 10px; }

/* ===== 4. Location ===== */
.section--location {
  padding: 0;
  background: var(--cream-soft);
  overflow: hidden;
}
.location__pattern {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  background-size: 260px;
  opacity: .16;
}
.location__content {
  position: relative;
  z-index: 1;
  padding: 72px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.venue-name {
  font-family: var(--font-serif);
  font-variant: small-caps;
  letter-spacing: .06em;
  font-size: 1.2rem;
  color: var(--terracotta);
  margin: 0;
}
.venue-icon { width: 90px; height: 90px; margin: 8px 0; opacity: .85; }
.map-link {
  font-style: italic;
  font-size: .9rem;
  color: var(--wine);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 22px;
}
.time-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--terracotta);
  margin: 0;
}

/* ===== 5. Countdown ===== */
.section--countdown {
  background: var(--cream-soft);
  padding: 40px 20px;
  border-top: 1px solid var(--blush);
  border-bottom: 1px solid var(--blush);
}
.countdown {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-serif);
}
.countdown__unit { display: flex; flex-direction: column; align-items: center; min-width: 50px; }
.countdown__unit span {
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  font-weight: 600;
  color: var(--ink);
}
.countdown__unit span.accent { color: var(--wine); }
.countdown__unit label {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--terracotta);
}
.countdown__sep {
  font-size: 1.6rem;
  color: var(--blush);
  transform: translateY(-8px);
}

/* ===== 6. Dress code ===== */
.section--dresscode {
  background: linear-gradient(180deg, var(--espresso), var(--espresso-soft));
}
.section--dresscode .subtitle {
  color: var(--blush);
  font-family: var(--font-serif);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .95rem;
  margin: 0;
}
.palette-label {
  color: #fff8;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 18px 0 4px;
}
.palette-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 0;
  margin: 0;
}
.palette-row li {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 2px #ffffff33, 0 4px 10px rgba(0,0,0,.25);
}
.palette-row--small li { width: 22px; height: 22px; }

/* ===== 7. Reserved ===== */
.section--reserved {
  min-height: 60svh;
  justify-content: center;
  background-color: var(--blush);
}
.reserved__card {
  background: var(--cream-soft);
  border-radius: 999px / 60px;
  padding: 40px 36px;
  box-shadow: 0 14px 40px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ===== 8. RSVP ===== */
.section--rsvp { background: var(--blush-soft); gap: 18px; }
.envelope-icon { width: 110px; height: 90px; margin: 4px 0; }
.hourglass-icon { width: 34px; height: 44px; margin-top: 8px; opacity: .8; }
.phone-text {
  font-family: var(--font-serif);
  letter-spacing: .04em;
  color: var(--terracotta);
  margin: 0;
}
.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: var(--ink);
  border: 1px solid #25D36655;
  border-radius: 999px;
  padding: 12px 22px;
  font-family: var(--font-serif);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(37,211,102,.25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.whatsapp-btn:hover, .whatsapp-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(37,211,102,.35);
}
.whatsapp-btn__icon { width: 26px; height: 26px; flex-shrink: 0; }

/* ===== 9. Closing ===== */
.section--closing {
  min-height: 70svh;
  justify-content: center;
  background-color: var(--espresso);
}
.closing__card {
  background: var(--cream-soft);
  padding: 46px 40px;
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold);
  outline-offset: 6px;
}
.closing__card .script-title { color: var(--wine); }

/* ===== Footer ===== */
.footer {
  background: var(--espresso);
  color: #ffffff99;
  text-align: center;
  padding: 22px;
  font-size: .8rem;
  font-family: var(--font-serif);
  font-style: italic;
}

/* ===== Floating audio player ===== */
.player {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
}
.player__toggle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: var(--wine);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
  animation: playerPulse 2.4s ease-in-out infinite;
}
.player__toggle:hover { transform: scale(1.05); }
.icon { width: 22px; height: 22px; background-color: currentColor; }
@keyframes playerPulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(136,40,69,.35); }
  50% { box-shadow: 0 8px 30px rgba(136,40,69,.7); }
}
.player.is-playing .player__toggle { animation: none; }

.player__panel {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffffee;
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  box-shadow: 0 8px 22px rgba(0,0,0,.2);
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width .35s ease, opacity .35s ease, padding .35s ease;
}
.player.is-open .player__panel {
  max-width: 160px;
  opacity: 1;
}
.player__mute {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--blush);
  color: var(--wine);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.player__mute .icon { width: 16px; height: 16px; background-color: currentColor; }
.player__volume { width: 90px; accent-color: var(--wine); }

@media (max-width: 480px) {
  .section { padding: 56px 22px; }
}
