/* ================================================================
   INVITACION BODA PRO — HolaInvitacion.com
   Motor de Invitaciones Premium
   Mobile-First · 100% Responsive · WordPress-Ready
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Birthstone&family=Lato:wght@300;400;700&display=swap');

:root {
  /* Personalizable por evento: Bautizo Azul Pastel */
  --color-primary:  #89B9D8;
  --color-dark:     #2C3E50;
  --color-soft:     #F4F8FA;
  --color-white:    #FFFFFF;
  --color-text:     #4A5568;
  --color-muted:    #A0AEC0;
  --color-gold:     #D4AF37;

  /* Tipografía */
  --font-serif:     'Cormorant Garamond', serif;
  --font-script:    'Birthstone', cursive;
  --font-sans:      'Lato', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Helpers ── */
.hidden    { display: none !important; }
.text-c    { text-align: center; }
.serif     { font-family: var(--font-serif); }
.script    { font-family: var(--font-script); }
.section   { padding: 90px 24px; max-width: 560px; margin: 0 auto; }
.divider   {
  width: 1px; height: 60px; background: var(--color-primary);
  margin: 0 auto; opacity: 0.25;
}
.divider-h {
  width: 40px; height: 1px; background: var(--color-primary);
  margin: 20px auto; opacity: 0.3;
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.15s; }
.reveal-d2 { transition-delay: 0.30s; }
.reveal-d3 { transition-delay: 0.45s; }


/* ================================================================
   1. SPLASH SCREEN
   ================================================================ */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--color-white);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0;
  text-align: center; /* Safari fix */
  transition: transform 0.9s cubic-bezier(0.77, 0, 0.18, 1);
}
#splash.exit { transform: translateY(-100%); }

.splash-monogram {
  font-family: var(--font-script);
  font-size: 5rem; color: var(--color-primary);
  line-height: 1; margin-bottom: 8px;
  text-align: center;
  animation: fadeUp 1s ease forwards;
}
.splash-subtitle {
  font-family: var(--font-serif);
  font-size: 0.8rem; letter-spacing: 2px;
  color: var(--color-dark); text-transform: uppercase;
  margin-bottom: 60px; text-align: center;
  line-height: 1.6; padding: 0 24px;
  animation: fadeUp 1s 0.2s ease forwards; opacity: 0;
}
.splash-btn {
  padding: 18px 50px; border-radius: 50px;
  background: var(--color-primary); color: white;
  font-family: var(--font-sans); font-weight: 700;
  font-size: 0.78rem; letter-spacing: 3px; text-transform: uppercase;
  border: none; cursor: pointer;
  box-shadow: 0 12px 40px rgba(0,71,171,0.25);
  animation: bubblePulse 2.5s 1.2s ease infinite, fadeUp 1s 0.6s ease forwards;
  opacity: 0; position: relative;
}
@keyframes bubblePulse {
  0%, 100% { box-shadow: 0 12px 40px rgba(0,71,171,0.25); transform: translateY(0); }
  50%       { box-shadow: 0 20px 60px rgba(0,71,171,0.35); transform: translateY(-6px); }
}
@keyframes fadeUp {
  from { opacity:0; transform: translateY(20px); }
  to   { opacity:1; transform: translateY(0); }
}


/* ================================================================
   2. MUSIC PLAYER (Floating)
   ================================================================ */
#music-fab {
  position: fixed; top: 20px; right: 20px; z-index: 1000;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(10px);
  border: 1px solid rgba(0,71,171,0.12);
  border-radius: 50px; padding: 8px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  cursor: pointer;
}
.music-bars { display: flex; gap: 3px; align-items: flex-end; height: 14px; }
.music-bars span {
  width: 3px; background: var(--color-primary); border-radius: 2px;
  animation: bar 1.2s ease infinite;
}
.music-bars span:nth-child(2) { animation-delay: 0.2s; }
.music-bars span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bar {
  0%, 100% { height: 3px; } 50% { height: 12px; }
}
#music-fab.paused .music-bars span { animation: none; height: 3px; }
.music-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 1px;
  color: var(--color-primary); text-transform: uppercase;
}


/* ================================================================
   3. HERO — Pantalla completa con foto
   ================================================================ */
#hero {
  height: 100dvh; min-height: 600px;
  position: relative; display: flex;
  flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 60px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-color: var(--color-soft); /* Fallback */
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: center top;
  display: block;
}
/* Degradado inferior para que el texto sea legible */
.hero-gradient {
  position: absolute; bottom: 0; left: 0; right: 0; height: 65%;
  background: linear-gradient(to top, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
}
.hero-text {
  position: relative; z-index: 2; text-align: center; padding: 0 24px;
}
.hero-above {
  font-family: var(--font-sans); font-size: 0.7rem;
  letter-spacing: 5px; text-transform: uppercase;
  color: var(--color-muted); margin-bottom: 8px;
  display: block;
}
.hero-names {
  font-family: var(--font-script);
  font-size: clamp(4.5rem, 20vw, 7rem);
  color: var(--color-primary);
  line-height: 0.9; display: block;
}
.hero-date {
  font-family: var(--font-serif);
  font-size: 1rem; letter-spacing: 4px;
  color: var(--color-dark); margin-top: 12px; display: block;
  font-weight: 300;
}
/* Flecha de scroll */
.scroll-arrow {
  position: absolute; bottom: 20px; left: 50%;
  transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.scroll-arrow span {
  display: block; width: 1px; height: 40px;
  background: var(--color-primary); opacity: 0.4;
}
.scroll-arrow i {
  width: 8px; height: 8px; border-right: 1px solid var(--color-primary);
  border-bottom: 1px solid var(--color-primary);
  transform: rotate(45deg); opacity: 0.4;
}


/* ================================================================
   4. SECCIÓN FRASE
   ================================================================ */
.section-frase {
  padding: 80px 32px;
  text-align: center;
  background: var(--color-white);
}
.frase-deco {
  font-size: 2rem; opacity: 0.15; display: block;
  margin-bottom: 20px; color: var(--color-primary);
}
.frase-text {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  color: var(--color-dark); font-style: italic;
  line-height: 1.6; max-width: 400px; margin: 0 auto;
  font-weight: 300;
}


/* ================================================================
   5. CUENTA REGRESIVA
   ================================================================ */
.section-countdown {
  padding: 80px 24px;
  background: var(--color-soft);
  text-align: center;
}
.section-label {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--color-primary); display: block; margin-bottom: 40px;
}
.countdown-grid {
  display: inline-flex; gap: 12px; align-items: flex-end;
}
.cd-item { text-align: center; min-width: 60px; }
.cd-num {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 10vw, 3.5rem);
  font-weight: 300; color: var(--color-dark);
  display: block; line-height: 1;
}
.cd-sep {
  font-family: var(--font-serif);
  font-size: 2rem; color: var(--color-primary);
  opacity: 0.3; margin-bottom: 16px;
}
.cd-label {
  font-size: 0.6rem; letter-spacing: 3px;
  text-transform: uppercase; color: var(--color-muted);
  display: block; margin-top: 6px;
}


/* ================================================================
   6. GALERÍA DE FOTOS
   ================================================================ */
.section-gallery { padding: 80px 16px; }
.gallery-title {
  font-family: var(--font-script);
  font-size: 3rem; color: var(--color-primary);
  text-align: center; margin-bottom: 30px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px; max-width: 600px; margin: 0 auto;
}
.gallery-item { aspect-ratio: 1; overflow: hidden; border-radius: 4px; }
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%; /* centra en el tercio superior — ideal para retratos */
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:first-child {
  grid-column: span 2; aspect-ratio: 2/1;
}


/* ================================================================
   7. PADRINOS
   ================================================================ */
.section-padrinos {
  padding: 80px 24px;
  background: var(--color-soft); text-align: center;
}
.padrinos-list { display: flex; flex-direction: column; gap: 32px; margin-top: 40px; }
.padrino-group {}
.padrino-rol {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 4px;
  text-transform: uppercase; color: var(--color-primary);
  display: block; margin-bottom: 6px;
}
.padrino-name {
  font-family: var(--font-serif);
  font-size: 1.5rem; font-weight: 400; font-style: italic;
  color: var(--color-dark);
}


/* ================================================================
   8. DETALLE DEL EVENTO (Hora, Dresscode)
   ================================================================ */
.section-details {
  padding: 80px 24px; text-align: center;
  display: flex; flex-direction: column; gap: 50px;
  max-width: 500px; margin: 0 auto;
}
.detail-block {}
.detail-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.detail-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 4px;
  text-transform: uppercase; color: var(--color-primary); margin-bottom: 8px; display: block;
}
.detail-value {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--color-dark);
  display: block;       /* ← línea propia */
  margin-bottom: 8px;
}
.detail-sub {
  font-size: 0.85rem;
  color: var(--color-muted);
  display: block;       /* ← línea propia */
  line-height: 1.6;
}


/* ================================================================
   9. UBICACIÓN
   ================================================================ */
.section-location {
  padding: 80px 24px; background: var(--color-soft); text-align: center;
}
.location-name {
  font-family: var(--font-serif); font-size: clamp(1.8rem, 6vw, 2.5rem);
  font-weight: 400; color: var(--color-dark); margin-bottom: 8px;
}
.location-addr { font-size: 0.9rem; color: var(--color-muted); margin-bottom: 35px; line-height: 1.6; }
.btn-map {
  display: inline-block; padding: 16px 45px; border-radius: 50px;
  background: var(--color-primary); color: white; text-decoration: none;
  font-weight: 700; font-size: 0.78rem; letter-spacing: 2px; text-transform: uppercase;
  transition: background 0.3s, transform 0.3s;
}
.btn-map:hover { background: var(--color-dark); transform: translateY(-2px); }
.btn-calendar {
  display: inline-block; margin-top: 14px; padding: 12px 35px;
  border-radius: 50px; border: 1px solid rgba(0,71,171,0.3);
  color: var(--color-primary); text-decoration: none;
  font-weight: 700; font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase;
  transition: all 0.3s;
}
.btn-calendar:hover { background: var(--color-primary); color: white; }


/* ================================================================
   10. MESA DE REGALOS
   ================================================================ */
.section-gifts { padding: 80px 24px; text-align: center; }
.gifts-intro { font-size: 0.9rem; color: var(--color-muted); max-width: 320px; margin: 12px auto 35px; line-height: 1.7; }
.gifts-grid { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.gift-link {
  padding: 14px 28px; border-radius: 50px;
  border: 1px solid rgba(0,71,171,0.2);
  color: var(--color-primary); text-decoration: none;
  font-weight: 700; font-size: 0.8rem;
  background: white; transition: all 0.3s;
}
.gift-link:hover { background: var(--color-primary); color: white; }


/* ================================================================
/* ================================================================
   11. RSVP
   ================================================================ */
.section-rsvp {
  padding: 100px 24px; text-align: center;
  background: linear-gradient(160deg, #dcf0f9 0%, #b3d2e5 100%);
}
.rsvp-script {
  font-family: var(--font-script);
  font-size: clamp(3.5rem, 12vw, 5.5rem);
  color: var(--color-primary); margin-bottom: 12px; display: block; line-height: 1;
}
.rsvp-sub {
  color: var(--color-text); font-size: 0.95rem;
  max-width: 320px; margin: 0 auto 40px; line-height: 1.7;
}
.btn-rsvp {
  display: inline-block; padding: 18px 50px; border-radius: 50px;
  background: var(--color-primary); color: white;
  text-decoration: none; font-weight: 700;
  font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(137,185,216,0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}
.btn-rsvp:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(137,185,216,0.4); background: var(--color-dark); }


/* ================================================================
   12. FOOTER
   ================================================================ */
.inv-footer {
  padding: 40px 24px; text-align: center;
  background: var(--color-white);
  border-top: 1px solid rgba(0,0,0,0.04);
}
.inv-footer p {
  font-size: 0.72rem; color: var(--color-muted); letter-spacing: 1px;
}
.inv-footer a { color: var(--color-primary); text-decoration: none; font-weight: 700; }


/* ================================================================
   DESKTOP — Invitación centrada sobre fondo azul elegante
   Mobile: pantalla completa (por defecto)
   Desktop +900px: card centrado con sombra, fondo degradado azul
   ================================================================ */
@media (min-width: 900px) {

  body {
    background: linear-gradient(135deg, #001845 0%, #002875 40%, #003fa0 100%);
    min-height: 100vh;
  }

  body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0;
    background-image:
      radial-gradient(circle at 20% 20%, rgba(255,255,255,0.04) 0%, transparent 50%),
      radial-gradient(circle at 80% 80%, rgba(201,168,76,0.05) 0%, transparent 50%);
    pointer-events: none;
  }

  /* Card #main centrado tipo "teléfono" */
  #main {
    position: relative;
    z-index: 1;
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--color-white);
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.08),
      0 40px 120px rgba(0,0,0,0.6),
      0 10px 40px rgba(0,0,0,0.4);
  }

  /* Splash: fixed y centrado correctamente en desktop */
  #splash {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    right: auto;
    width: 430px;
    max-width: 100vw;
    margin: 0;
    transform: translateX(-50%);
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.08),
      0 40px 120px rgba(0,0,0,0.6),
      0 10px 40px rgba(0,0,0,0.4);
  }
  #splash.exit {
    transform: translateX(-50%) translateY(-100%);
  }

  #music-fab {
    position: absolute;
    left: 50%;
    transform: translateX(calc(-50% + 185px));
  }

  #hero { height: 90vh; min-height: 550px; }
  .gallery-grid { max-width: 430px; }
}
