/* ============================================================
   Variables & Reset
   ============================================================ */
:root {
  --bg:              #fdf8f0;
  --bg-alt:          #f5ece0;
  --bg-deep:         #ecdfd0;
  --text-main:       #2c1f14;
  --text-muted:      #7a6355;
  --text-light:      #b09a89;
  --accent-terra:    #b8673e;
  --accent-rose:     #c4837a;
  --accent-gold:     #b8924a;
  --accent-sage:     #7a8c6e;
  --accent-sand:     #d4b896;
  --card-bg:         rgba(255,255,255,0.65);
  --card-border:     rgba(184,103,62,0.18);
  --radius:          1.4rem;
  --section-pad:     5rem 1.2rem;

  --font-display:    'Cormorant Garamond', Georgia, serif;
  --font-body:       'Jost', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font-body);
  font-weight: 300;
  overflow-x: hidden;
}

/* ============================================================
   Canvas — z-index 2 para que los fuegos sean visibles encima
   ============================================================ */
#fireworks {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('photos/1.png') center center / cover no-repeat;
  padding: 2rem 1.2rem;
}

/* Oscurecido sobre la foto */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.hero-content { max-width: 600px; position: relative; }

.hero-label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.4rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, 10vw, 6.5rem);
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1.2rem;
  letter-spacing: -0.01em;
}

.hero-title .name {
  font-style: italic;
  font-weight: 600;
  color: #fff;
}

.hero-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 3.5vw, 1.6rem);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 3rem;
  font-weight: 300;
}

.btn-scroll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  transition: background 0.3s, color 0.3s, transform 0.2s;
  animation: btnPulse 2.5s ease-in-out infinite;
}
.btn-scroll:hover { background: rgba(255,255,255,0.2); transform: scale(1.1); }

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184,103,62,0.25); }
  50%       { box-shadow: 0 0 0 10px rgba(184,103,62,0); }
}

/* ============================================================
   Sections (shared)
   ============================================================ */
section {
  position: relative;
  z-index: 1;
  padding: var(--section-pad);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  text-align: center;
  margin-bottom: 0.6rem;
  color: var(--text-main);
  letter-spacing: 0.01em;
}

.section-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--accent-terra);
  margin: 0.8rem auto 0;
  opacity: 0.5;
}

/* ============================================================
   Carousel
   ============================================================ */
.section-carousel {
  background: var(--bg-alt);
  padding-bottom: 4rem;
}

.gallery-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.7;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.gallery-hint code {
  background: rgba(184,103,62,0.1);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.74rem;
  color: var(--accent-terra);
}

.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
  /* sin overflow:hidden para que los botones laterales no se corten */
}

.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* padding lateral: izquierda pequeña, derecha grande para que la siguiente foto asoma */
  padding: 1rem 8% 1.4rem 1rem;
  flex: 1;
  /* clip para que el "peek" se corte limpiamente */
  overflow-y: visible;
}
.carousel-track::-webkit-scrollbar { display: none; }

/* Móvil: slide ocupa ~82% → el 18% restante muestra el inicio de la siguiente foto */
.carousel-slide {
  flex: 0 0 82%;
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 20px rgba(44,31,20,0.08);
}
.carousel-slide:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(184,103,62,0.18);
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, rgba(212,184,150,0.25), rgba(196,131,122,0.15));
}
.ph-icon { font-size: 2.2rem; opacity: 0.6; }
.ph-text {
  font-size: 0.78rem;
  color: var(--text-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Flechas */
.carousel-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  border: 1.5px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.carousel-btn:hover {
  background: var(--accent-terra);
  color: #fff;
  border-color: var(--accent-terra);
  transform: scale(1.08);
}
.carousel-btn.prev { margin-right: 0.6rem; }
.carousel-btn.next { margin-left: 0.6rem; }

/* Puntos */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-sand);
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  padding: 0;
}
.carousel-dot.active {
  background: var(--accent-terra);
  transform: scale(1.5);
}

/* ============================================================
   Message
   ============================================================ */
.section-message {
  background: var(--bg-alt);
}

.message-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.message-text {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.8vw, 1.25rem);
  line-height: 2;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 1.6rem;
}

.message-signature {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  color: var(--accent-terra);
  margin: 2.5rem 0 1.8rem;
  font-weight: 400;
}

.hearts-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 1.4rem;
}
.hearts-row span {
  display: inline-block;
  animation: heartFloat 2.4s ease-in-out infinite;
}
.hearts-row span:nth-child(2) { animation-delay: 0.3s; }
.hearts-row span:nth-child(3) { animation-delay: 0.6s; }
.hearts-row span:nth-child(4) { animation-delay: 0.9s; }
.hearts-row span:nth-child(5) { animation-delay: 1.2s; }

@keyframes heartFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* ============================================================
   Gift section
   ============================================================ */
.section-gift {
  background: var(--bg-deep);
  text-align: center;
}

/* --- Bloqueado --- */
.gift-locked { max-width: 500px; margin: 0 auto; }

.lock-icon-wrap {
  margin-bottom: 1.5rem;
}
.lock-icon {
  font-size: 3.5rem;
  display: inline-block;
  animation: lockPulse 2.5s ease-in-out infinite;
  filter: drop-shadow(0 4px 16px rgba(184,103,62,0.35));
}
@keyframes lockPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  10%       { transform: scale(1.12) rotate(-4deg); }
  20%       { transform: scale(1.12) rotate(4deg); }
  30%       { transform: scale(1) rotate(0deg); }
}

.gift-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--text-main);
  margin-bottom: 0.8rem;
}
.gift-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 1px;
  background: var(--accent-terra);
  margin: 0.8rem auto 0;
  opacity: 0.5;
}

.gift-locked-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  letter-spacing: 0.03em;
}
.gift-locked-sub strong { color: var(--accent-terra); font-weight: 500; }

/* Mini contador dentro del regalo */
.gift-mini-countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1rem;
  padding: 1rem 1.4rem;
  box-shadow: 0 2px 16px rgba(44,31,20,0.07);
}
.gcd-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.8rem;
}
.gcd-card span:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  color: var(--accent-terra);
  line-height: 1;
}
.gcd-card span:last-child {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 0.25rem;
}
.gcd-sep {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent-sand);
  line-height: 1;
  margin-bottom: 0.8rem;
}

/* --- Desbloqueado --- */
.gift-content { max-width: 600px; margin: 0 auto; }

.gift-ribbon {
  font-size: 4rem;
  display: inline-block;
  margin-bottom: 1.2rem;
  animation: ribbonBounce 0.8s ease forwards;
  transform-origin: bottom center;
}
@keyframes ribbonBounce {
  0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.2) rotate(5deg);  opacity: 1; }
  80%  { transform: scale(0.95) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg);    opacity: 1; }
}

.gift-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 24px rgba(44,31,20,0.08);
  margin-top: 2rem;
  backdrop-filter: blur(4px);
}

.gift-poem {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  line-height: 2;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 1.5rem;
}
.gift-poem--small {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: var(--text-light);
  border-top: 1px solid var(--card-border);
  padding-top: 1.5rem;
  margin-bottom: 0;
  font-style: normal;
}

.gift-btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.85rem 2.2rem;
  background: var(--accent-terra);
  color: #fff;
  text-decoration: none;
  border-radius: 2rem;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  font-family: var(--font-body);
  font-weight: 500;
  transition: background 0.25s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(184,103,62,0.3);
}
.gift-btn:hover {
  background: #9a5530;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(184,103,62,0.4);
}

/* Animación de entrada al desbloquear */
.gift-content.unlocking {
  animation: giftReveal 0.9s ease forwards;
}
@keyframes giftReveal {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 1rem;
  background: var(--bg-deep);
  border-top: 1px solid var(--card-border);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.footer-years {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
}

.heart-beat {
  display: inline-block;
  color: var(--accent-rose);
  animation: heartBeat 1.4s ease-in-out infinite;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  14%       { transform: scale(1.4); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.2); }
  56%       { transform: scale(1); }
}

/* ============================================================
   Reveal animations
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 1.1s 0.2s ease forwards;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Desktop (≥768px)
   ============================================================ */
@media (min-width: 768px) {
  :root { --section-pad: 6rem 2rem; }

  .carousel-btn { display: flex; }

  /* Desktop: 3 fotos visibles, sin peek */
  .carousel-slide { flex: 0 0 calc(33.333% - 0.7rem); }
  .carousel-track  { padding: 1rem 0.5rem 1.4rem; }


}

/* ============================================================
   Large screens (≥1024px)
   ============================================================ */
@media (min-width: 1024px) {
  :root { --section-pad: 8rem 4rem; }
}
