/* =============================================
   VARIABLES
   ============================================= */
:root {
  --dark:          #1a1014;
  --cream:         #FFF5EE;
  --blush:         #D4A0A0;
  --lilac:         #C8A2C8;
  --pink-vibrant:  #FF6B8A;
  --gold:          #D4AF37;
  --gold-light:    #FFF8E7;
  --text-dark:     #2a1f24;
  --text-light:    #FFF5EE;

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

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--dark);
  overflow-x: hidden;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
}

/* =============================================
   GRAIN TEXTURE
   ============================================= */
.grain {
  position: relative;
}

.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}

/* =============================================
   SECTION BASE
   ============================================= */
.section {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

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

/* =============================================
   S1: HERO
   ============================================= */
#s1 {
  background: var(--dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15vh 2rem;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.2;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero__date {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(3rem, 11vw, 7.5rem);
  color: var(--text-light);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero__date .word {
  display: inline-block;
  margin: 0 0.12em;
  opacity: 0;
  will-change: transform, opacity;
}

.hero__subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.1rem, 3.5vw, 1.9rem);
  color: var(--blush);
  margin-top: 1.5rem;
  letter-spacing: 0.1em;
  opacity: 0;
  will-change: opacity;
}

.scroll-arrow {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  opacity: 0;
  animation: arrowFade 2s 2.5s ease forwards, arrowBounce 2.5s 2.5s ease infinite;
}

@keyframes arrowFade {
  to { opacity: 1; }
}

@keyframes arrowBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* =============================================
   S2: HAY MUCHAS COSAS
   ============================================= */
#s2 {
  background: var(--cream);
  padding: 15vh 6vw;
}

.s2__layout {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}

@media (min-width: 768px) {
  .s2__layout {
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
  }
}

.s2__text {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.s2__p {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: 1.85;
  color: var(--text-dark);
  will-change: transform, opacity;
}

.s2__photos {
  position: relative;
  height: 480px;
}

@media (min-width: 768px) {
  .s2__photos { height: 560px; }
}

.s2__photo {
  position: absolute;
  border-radius: 3px;
  overflow: hidden;
}

.s2__photo--large {
  width: 62%;
  height: 72%;
  top: 0;
  left: 0;
  box-shadow: 10px 10px 40px rgba(212, 160, 160, 0.35);
}

.s2__photo--small {
  width: 42%;
  height: 46%;
  top: 8%;
  right: 0;
  box-shadow: -4px 8px 28px rgba(212, 160, 160, 0.28);
}

.s2__photo--overlap {
  width: 38%;
  height: 30%;
  bottom: 0;
  right: 6%;
  box-shadow: 4px 6px 22px rgba(212, 160, 160, 0.22);
}

/* =============================================
   S3: TIMELINE
   ============================================= */
#s3 {
  background: linear-gradient(165deg, var(--cream) 0%, #f2dada 100%);
  padding: 15vh 5vw;
}

#s3 .section-title {
  color: var(--text-dark);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.timeline__line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--blush);
  transform: translateX(-50%) scaleY(0);
  transform-origin: top;
  will-change: transform;
}

@media (max-width: 767px) {
  .timeline__line { left: 16px; }
}

.timeline__item {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 4.5rem;
  will-change: transform, opacity;
}

@media (max-width: 767px) {
  .timeline__item {
    grid-template-columns: 32px 1fr;
    gap: 1.2rem;
  }
  .timeline__item .timeline__dot   { grid-column: 1; grid-row: 1; }
  .timeline__item .timeline__content { grid-column: 2; grid-row: 1; text-align: left !important; }
  .timeline__item .timeline__photo  { grid-column: 2; grid-row: 2; }
}

.timeline__dot {
  width: 10px;
  height: 10px;
  background: var(--blush);
  border-radius: 50%;
  margin: 0 auto;
  flex-shrink: 0;
}

.timeline__item--right .timeline__content { text-align: right; }
.timeline__item--right .timeline__photo   { order: 1; }
.timeline__item--left  .timeline__content { text-align: left; }
.timeline__item--left  .timeline__photo   { order: -1; }

.timeline__label {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.timeline__content p {
  font-size: 0.93rem;
  line-height: 1.75;
  color: #5a4550;
}

.timeline__photo {
  border-radius: 4px;
  overflow: hidden;
  height: 210px;
}

/* =============================================
   S4: CONTIGO TODO SE SIENTE NATURAL
   ============================================= */
#s4 {
  background: #e6cccc;
  padding: 15vh 6vw;
}

.s4__parallax-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.s4__parallax-img {
  width: 100%;
  height: 130%;
  object-fit: cover;
  opacity: 0.1;
  will-change: transform;
}

.s4__content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.s4__p {
  font-size: clamp(1.05rem, 2.6vw, 1.4rem);
  line-height: 1.9;
  color: var(--text-dark);
  margin-bottom: 2rem;
  will-change: transform, opacity;
}

.s4__inline-photo {
  border-radius: 4px;
  overflow: hidden;
  height: 320px;
  width: 68%;
  margin-bottom: 2.5rem;
  box-shadow: 6px 8px 32px rgba(212, 160, 160, 0.45);
  will-change: transform, opacity;
}

.s4__inline-photo--left  { margin-left: 0; }
.s4__inline-photo--right { margin-left: auto; }

.s4__fullbleed {
  position: relative;
  z-index: 1;
  margin-top: 4rem;
  height: 58vh;
  min-height: 320px;
  border-radius: 6px;
  overflow: hidden;
}

.s4__fullbleed img {
  width: 100%;
  height: 115%;
  object-fit: cover;
  will-change: transform;
}

.s4__fullbleed-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 16, 20, 0.52);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  padding: 2.5rem 3rem;
}

.s4__fullbleed-overlay p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.8vw, 1.7rem);
  color: var(--text-light);
  line-height: 1.65;
  max-width: 580px;
}

/* =============================================
   S5: DE DESCONOCIDOS AL AMOR
   ============================================= */
#s5 {
  background: #d8c6d8;
  overflow: visible;
}

.s5__inner {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10vh 4vw;
  gap: 3rem;
}

.s5__words-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.8rem;
  width: 100%;
}

.s5__word {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 3.2vw, 2.2rem);
  color: #b0a0b0;
  transition: color 0.5s ease;
  display: inline-block;
  white-space: nowrap;
}

.s5__word.active {
  color: var(--pink-vibrant);
}

.s5__sep {
  font-family: var(--font-body);
  font-size: clamp(0.8rem, 2vw, 1.2rem);
  color: rgba(176, 160, 176, 0.5);
}

.s5__photos-wrap {
  position: relative;
  width: 240px;
  height: 300px;
  flex-shrink: 0;
}

@media (min-width: 600px) {
  .s5__photos-wrap { width: 280px; height: 360px; }
}

.s5__photo-stage {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  overflow: hidden;
  opacity: 0;
  will-change: opacity, transform;
  box-shadow: 0 8px 40px rgba(200, 162, 200, 0.35);
}

/* =============================================
   S6: LAS CANCIONES
   ============================================= */
#s6 {
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15vh 6vw;
}

.s6__content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.s6__song {
  margin: 2rem 0;
}

.s6__reveal-wrap {
  display: inline-block;
  overflow: hidden;
}

.s6__title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(4.5rem, 16vw, 11rem);
  color: var(--text-light);
  line-height: 0.95;
  clip-path: inset(0 100% 0 0);
  will-change: clip-path;
}

.s6__artist {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  color: var(--blush);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 0.6rem;
  opacity: 0;
  will-change: opacity;
}

.s6__divider {
  width: 1px;
  height: 50px;
  background: rgba(255, 245, 238, 0.15);
  margin: 0.5rem auto;
}

.s6__body {
  font-size: clamp(0.95rem, 2.3vw, 1.25rem);
  line-height: 1.85;
  color: rgba(255, 245, 238, 0.65);
  max-width: 580px;
  margin: 3rem auto 0;
  opacity: 0;
  will-change: opacity;
}

/* =============================================
   S7: PROMESAS
   ============================================= */
#s7 {
  background: var(--gold-light);
  padding: 15vh 6vw;
}

#s7 .section-title {
  color: var(--text-dark);
}

.s7__items {
  display: flex;
  flex-direction: column;
  gap: 5rem;
  max-width: 720px;
  margin: 0 auto;
}

.s7__item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  will-change: transform, opacity;
}

@media (min-width: 600px) {
  .s7__item {
    grid-template-columns: 1fr 1fr;
  }
  .s7__item:nth-child(even) .s7__item-photo { order: 2; }
  .s7__item:nth-child(even) .s7__item-text  { order: 1; }
}

.s7__item-photo {
  border-radius: 5px;
  overflow: hidden;
  height: 280px;
  box-shadow: 5px 8px 36px rgba(212, 175, 55, 0.22);
}

.s7__item-text h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  color: var(--text-dark);
  margin-bottom: 0.7rem;
}

.s7__item-text p {
  font-size: 0.97rem;
  line-height: 1.8;
  color: #4a3540;
}

.s7__closing {
  max-width: 620px;
  margin: 5rem auto 0;
  font-size: clamp(0.95rem, 2.3vw, 1.2rem);
  line-height: 1.85;
  color: #4a3540;
  text-align: center;
  font-style: italic;
  will-change: opacity;
}

/* =============================================
   S8: ME ENCANTA TODO DE TI
   ============================================= */
#s8 {
  background: var(--pink-vibrant);
  padding: 15vh 5vw;
}

.s8__intro {
  text-align: center;
  margin-bottom: 3rem;
}

.s8__intro h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  color: #fff;
  letter-spacing: -0.01em;
}

.s8__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto 4rem;
}

.s8__chip {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  color: rgba(255, 255, 255, 0.92);
  display: inline-block;
  will-change: transform, opacity;
}

.s8__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px;
  grid-auto-flow: row dense;
  gap: 6px;
  max-width: 1000px;
  margin: 0 auto 4rem;
}

@media (min-width: 600px) {
  .s8__gallery { grid-auto-rows: 240px; }
}

.s8__gi {
  border-radius: 3px;
  overflow: hidden;
  opacity: 0;
  will-change: transform, opacity;
}

.s8__gi--w2 { grid-column: span 2; }

.s8__gi img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.s8__gi:hover img {
  transform: scale(1.05);
}

.s8__bottom {
  max-width: 640px;
  margin: 0 auto;
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
  will-change: opacity;
}

/* =============================================
   S9: KIRA
   ============================================= */
#s9 {
  background: linear-gradient(145deg, #f0e8f0 0%, var(--cream) 100%);
  padding: 15vh 6vw;
}

#s9 .section-title {
  color: var(--text-dark);
}

.s9__inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.s9__lead {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.8vw, 1.7rem);
  color: #7a5870;
  margin-bottom: 3rem;
  will-change: opacity;
}

.s9__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 220px 220px;
  gap: 10px;
  margin-bottom: 3rem;
}

@media (min-width: 600px) {
  .s9__grid {
    grid-template-rows: 260px 260px;
  }
}

.s9__photo {
  border-radius: 5px;
  overflow: hidden;
  will-change: opacity, transform;
  box-shadow: 0 4px 28px rgba(200, 162, 200, 0.28);
}

.s9__photo--main {
  grid-row: span 2;
}

.s9__body {
  font-size: clamp(0.97rem, 2.4vw, 1.2rem);
  line-height: 1.9;
  color: #5a4558;
  max-width: 640px;
  margin: 0 auto;
  will-change: opacity;
}

/* =============================================
   S10: CIERRE
   ============================================= */
#s10 {
  background: var(--dark);
  color: var(--text-light);
  padding: 15vh 6vw 6vh;
  overflow: visible;
}

.s10__future {
  max-width: 660px;
  margin: 0 auto 6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.s10__future p {
  font-size: clamp(1.05rem, 2.6vw, 1.38rem);
  line-height: 1.85;
  color: rgba(255, 245, 238, 0.82);
  will-change: opacity;
}

/* Counter */
.s10__counter {
  text-align: center;
  margin-bottom: 8rem;
}

.s10__counter-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--blush);
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  display: block;
}

.s10__counter-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
}

.s10__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
}

.s10__num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  color: var(--text-light);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: block;
}

.s10__unit-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blush);
  margin-top: 0.35rem;
}

.s10__sep {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4rem);
  color: var(--blush);
  opacity: 0.35;
  line-height: 1.1;
  padding-top: 0.05em;
}

/* Finale: TE AMO MAS */
.s10__finale {
  position: relative;
}

.s10__finale-scene {
  height: 100vh;
  position: relative;
}

.s10__finale-word {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18vw, 22vw, 28vw);
  color: var(--text-light);
  opacity: 0;
  letter-spacing: -0.03em;
  line-height: 1;
  will-change: opacity, transform;
}

/* End / last photo */
.s10__end {
  text-align: center;
  padding: 6rem 0 3rem;
  opacity: 0;
  will-change: opacity;
}

.s10__last-photo {
  width: min(380px, 85vw);
  height: min(480px, 70vw);
  border-radius: 6px;
  overflow: hidden;
  margin: 0 auto 3rem;
  box-shadow: 0 8px 60px rgba(255, 107, 138, 0.2);
}

.s10__back-btn {
  background: transparent;
  border: 1px solid rgba(255, 245, 238, 0.25);
  color: rgba(255, 245, 238, 0.6);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1rem 2.5rem;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.s10__back-btn:hover {
  background: rgba(255, 245, 238, 0.07);
  color: var(--text-light);
  border-color: rgba(255, 245, 238, 0.4);
}

/* Hearts canvas */
#hearts {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
}

/* =============================================
   PREFERS REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  .hero__date .word,
  .hero__subtitle {
    opacity: 1 !important;
  }

  .s2__p,
  .s7__item,
  .s7__closing,
  .s8__chip,
  .s8__bottom,
  .s9__lead,
  .s9__photo,
  .s9__body,
  .s10__future p,
  .s10__finale-word,
  .s10__end {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  .timeline__line {
    transform: translateX(-50%) scaleY(1) !important;
  }

  .timeline__item {
    opacity: 1 !important;
    transform: none !important;
  }

  .s6__title {
    clip-path: inset(0 0% 0 0) !important;
  }

  .s6__artist, .s6__body {
    opacity: 1 !important;
  }

  .s5__photo-stage {
    opacity: 1 !important;
  }

  .scroll-arrow {
    animation: none;
    opacity: 1;
  }
}
