/* ===========================================================
   AMARA · Baby Shower — Tema Fresas
   =========================================================== */

:root{
  --cream:        #FFF8F3;
  --cream-deep:   #FFEFE6;
  --pink-soft:    #FBD3DC;
  --pink:         #F4A6B7;
  --pink-deep:    #E8637E;
  --red:          #D64550;
  --red-deep:     #B93142;
  --leaf:         #7BA88C;
  --leaf-deep:    #5E8E71;
  --ink:          #5A3A3E;
  --ink-soft:     #8A6468;
  --white:        #FFFFFF;

  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-script:  'Caveat', cursive;
  --font-body:    'Quicksand', system-ui, sans-serif;
}

*{ box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}

img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; cursor: pointer; border: none; background: none; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* =================== FRESITAS FLOTANTES DE FONDO =================== */
.floaties{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.floaty{
  position: absolute;
  top: -60px;
  font-size: 22px;
  opacity: 0.55;
  animation: floatDown linear infinite;
  filter: drop-shadow(0 2px 4px rgba(214,69,80,0.15));
  will-change: transform;
}
@keyframes floatDown{
  0%{ transform: translateY(0) translateX(0) rotate(0deg); }
  50%{ transform: translateY(50vh) translateX(18px) rotate(180deg); }
  100%{ transform: translateY(105vh) translateX(-14px) rotate(360deg); }
}

/* =================== SOBRE / OVERLAY DE ENTRADA =================== */
.envelope-overlay{
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #FBD9E1;
  overflow: hidden;
  transition: opacity 0.9s ease, visibility 0.9s ease;
  padding: 0;
  margin: 0;
  border: none;
  display: block;
  width: 100%;
  cursor: pointer;
}
.envelope-overlay.is-hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s cubic-bezier(.4,0,.2,1), opacity 0.5s ease;
  z-index: 1;
  pointer-events: none;
}
.envelope-overlay.is-opening .envelope-bg{
  transform: scale(1.06);
  opacity: 0;
}

/* lluvia tenue de fresas + brillitos */
.envelope-fx{
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}
.fx-berry, .fx-sparkle{
  position: absolute;
  top: -40px;
  will-change: transform;
}
.fx-berry img{ width: 100%; display:block; }
.fx-berry{ animation: fxFall linear infinite; opacity: 0.5; }
.fx-sparkle{
  color: #fff;
  font-size: 14px;
  animation: fxTwinkle ease-in-out infinite;
  opacity: 0;
}
@keyframes fxFall{
  0%{ transform: translateY(0) rotate(0deg); }
  100%{ transform: translateY(115vh) rotate(220deg); }
}
@keyframes fxTwinkle{
  0%, 100%{ opacity: 0; transform: scale(0.6); }
  50%{ opacity: 0.9; transform: scale(1.15); }
}

/* =================== DESTELLO BLANCO DE TRANSICIÓN =================== */
.flash-overlay{
  position: fixed;
  inset: 0;
  z-index: 150;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.flash-overlay.is-flashing{
  animation: flashPulse 1.1s ease forwards;
}
@keyframes flashPulse{
  0%{ opacity: 0; }
  45%{ opacity: 1; }
  100%{ opacity: 0; }
}

/* =================== INVITACIÓN PRINCIPAL =================== */
.invite{
  position: relative;
  z-index: 5;
  opacity: 0;
  transition: opacity 1s ease;
}
.invite.is-visible{ opacity: 1; }

.music-toggle{
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--white);
  color: var(--red);
  box-shadow: 0 6px 16px rgba(214,69,80,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--pink-soft);
}
.mt-icon{ width: 18px; height: 18px; }
.mt-paused{ display: none; }
.music-toggle.is-paused .mt-playing{ display: none; }
.music-toggle.is-paused .mt-paused{ display: block; }

/* ---- Hero ---- */
.hero{
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px 88px;
  overflow: hidden;
}
.hero-berries{
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-berries img{
  position: absolute;
  width: 54px;
  opacity: 0.6;
  filter: drop-shadow(0 6px 10px rgba(214,69,80,0.18));
}
.hero-berries img:nth-child(1){ top: 6%; left: -4%; transform: rotate(-18deg); width: 60px; }
.hero-berries img:nth-child(2){ top: 60%; right: -6%; transform: rotate(15deg); width: 70px; }
.hero-berries img:nth-child(3){ bottom: 3%; left: 4%; transform: rotate(8deg); width: 44px; }

/* ---- Card de bienvenida con imagen de fondo + texto encima ---- */
.hero-card{
  position: relative;
  width: min(94vw, 380px);
  margin-bottom: 20px;
}
.hero-card-bg{
  width: 100%;
  display: block;
}
.hero-card-content{
  position: absolute;
  top: 14%;
  left: 12%;
  right: 12%;
  bottom: 6%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}
.hc-rule{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: var(--pink-deep);
  margin: 10px 0;
}
.hc-rule::before,
.hc-rule::after{
  content: '';
  flex: 1;
  height: 1px;
  background: var(--pink-deep);
  opacity: 0.5;
}
.hc-rule span{ font-size: 13px; }
.hero-card .hero-eyebrow{
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.4;
  color: var(--pink-deep);
  margin: 2px 0 10px;
  max-width: 260px;
}
.hero-card-name{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(46px, 13vw, 60px);
  line-height: 0.95;
  color: var(--red-deep);
  margin: 0;
}
.hero-card-last{
  font-family: var(--font-script);
  font-weight: 600;
  font-size: clamp(28px, 9vw, 36px);
  color: var(--pink-deep);
  margin: 2px 0 6px;
}
.hero-card .hero-tag{
  font-family: var(--font-script);
  font-size: 26px;
  color: var(--ink);
  margin: 8px 0 0;
}
.hero-scroll{
  position: absolute;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
}
.hero-scroll span{
  width: 22px;
  height: 34px;
  border: 2px solid var(--pink-deep);
  border-radius: 14px;
  position: relative;
}
.hero-scroll span::before{
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: var(--pink-deep);
  border-radius: 3px;
  transform: translateX(-50%);
  animation: scrollDot 1.6s ease-in-out infinite;
}
@keyframes scrollDot{
  0%{ opacity: 1; top: 6px; }
  70%{ opacity: 0; top: 18px; }
  100%{ opacity: 0; top: 6px; }
}
.hero-scroll p{
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0;
}

/* ---- Secciones generales ---- */
.section{
  position: relative;
  padding: 60px 24px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}
.section-eyebrow{
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--leaf-deep);
  margin: 0 0 8px;
}
.section-title{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 10vw, 46px);
  color: var(--red-deep);
  margin: 0 0 32px;
}

/* ---- Cuenta regresiva ---- */
.countdown-section{ padding-top: 70px; }
.countdown{
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.cd-box{
  background: var(--white);
  border-radius: 22px;
  padding: 20px 12px;
  width: 84px;
  box-shadow: 0 10px 24px -8px rgba(214,69,80,0.22);
  border: 1.5px solid var(--pink-soft);
}
.cd-num{
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  color: var(--red);
  line-height: 1;
}
.cd-label{
  display: block;
  font-size: 11.5px;
  color: var(--ink-soft);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 7px;
}
.countdown-done{
  font-family: var(--font-script);
  font-size: 30px;
  color: var(--red-deep);
  margin-top: 20px;
}

/* ---- Detalles: fecha / lugar ---- */
.detail-cards{
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.detail-card{
  background: var(--white);
  border-radius: 22px;
  padding: 26px 22px;
  box-shadow: 0 12px 28px -10px rgba(214,69,80,0.2);
  border: 1.5px solid var(--pink-soft);
}
.detail-icon{
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--pink-soft);
  color: var(--red-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-icon svg{ width: 25px; height: 25px; }
.detail-label{
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--leaf-deep);
  font-weight: 700;
  margin: 0 0 5px;
}
.detail-main{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  color: var(--ink);
  margin: 0;
}
.detail-sub{
  font-size: 15px;
  color: var(--ink-soft);
  margin: 5px 0 0;
}
.detail-map-link{
  display: inline-block;
  margin-top: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
  border-bottom: 1.5px solid var(--red);
  padding-bottom: 1px;
}

/* ---- Rifa de pañales ---- */
.raffle-section{ padding-top: 20px; }
.raffle-card{
  position: relative;
  background: linear-gradient(160deg, #FFE0E7, var(--pink));
  border-radius: 26px;
  padding: 34px 26px;
  box-shadow: 0 16px 34px -12px rgba(214,69,80,0.35);
  overflow: hidden;
}
.raffle-berry{
  width: 62px;
  margin: 0 auto 12px;
  display: block;
  animation: wiggle 2.6s ease-in-out infinite;
  filter: drop-shadow(0 6px 10px rgba(150,30,55,0.2));
}
@keyframes wiggle{
  0%,100%{ transform: rotate(-8deg); }
  50%{ transform: rotate(8deg); }
}
.raffle-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  color: var(--red-deep);
  margin: 0 0 14px;
}
.raffle-text{
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 320px;
  margin: 0 auto;
}

/* ---- Mesa de regalos ---- */
.gift-text{
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 340px;
  margin: 0 auto 28px;
}
.gift-btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: 17px;
  padding: 17px 34px;
  border-radius: 999px;
  box-shadow: 0 14px 28px -10px rgba(214,69,80,0.55);
}
.gift-btn svg{ width: 19px; height: 19px; }

/* ---- Cierre ---- */
.closing-section{ padding-bottom: 30px; }
.closing-berry{ width: 48px; margin: 0 auto 16px; }
.closing-text{
  font-size: 17.5px;
  color: var(--ink);
  max-width: 310px;
  margin: 0 auto 22px;
  line-height: 1.6;
}
.closing-sign{
  font-family: var(--font-script);
  font-size: 27px;
  color: var(--red-deep);
  line-height: 1.3;
}
.closing-sign span{ font-size: 31px; }

/* ---- Footer Dynvitia ---- */
#brand-footer{
  text-align: center;
  padding: 30px 24px 40px;
  background: var(--red-deep);
}
#brand-footer .wrap{
  margin-top: 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.14);
  display: inline-block;
}
#brand-footer .brand-kicker{
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
#brand-footer .brand-logo-link{
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.92);
  opacity: 0.9;
}
#brand-footer .brand-social{
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}
#brand-footer .brand-social a{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.75);
}

/* ---- Confetti canvas ---- */
#confetti-canvas{
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

/* Ligero ajuste responsive para pantallas muy pequeñas */
@media (max-width: 340px){
  .hero-card{ width: 96vw; }
}
