/* ============================================================
   INVITACIÓN DIGITAL - CARLOS & ALEJANDRA
   Paleta: Azul #1B2A4A | Dorado #C5A44E | Blanco #FFFFFF
   Fuentes: Playfair Display | Montserrat | Great Vibes
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=Montserrat:wght@300;400;500;600;700&family=Great+Vibes&display=swap');

:root {
  --blue: #1B2A4A;
  --blue-light: #2D4373;
  --blue-lighter: #3A5A8C;
  --gold: #C5A44E;
  --gold-dark: #A88B3C;
  --gold-light: #E8D5A3;
  --gold-pale: #F5EFE0;
  --white: #FFFFFF;
  --off-white: #FAFAFA;
  --gray-light: #F5F5F5;
  --gray: #6B7280;
  --text: #2C2C2C;
  --text-light: #FFFFFF;
  --shadow: 0 4px 20px rgba(27, 42, 74, 0.08);
  --shadow-lg: 0 10px 40px rgba(27, 42, 74, 0.12);
  --shadow-card: 0 8px 32px rgba(27, 42, 74, 0.1);
  --transition: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  scroll-snap-type: y mandatory;
}

/* ============================================================
   SECTION BASE
   ============================================================ */

section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 40px;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.section-container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--blue);
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  letter-spacing: 2px;
}

.section-title::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  background: var(--gold);
  transform: rotate(45deg);
  margin: 0 auto 14px;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 2px;
  background: var(--gold);
  margin: 20px auto 0;
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.section-hero {
  background: var(--blue);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.section-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(197, 164, 78, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(197, 164, 78, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 50%, rgba(45, 67, 115, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    repeating-linear-gradient(45deg, var(--gold-light) 0px, var(--gold-light) 1px, transparent 1px, transparent 20px),
    repeating-linear-gradient(-45deg, var(--gold-light) 0px, var(--gold-light) 1px, transparent 1px, transparent 20px);
  pointer-events: none;
}

.hero-frame {
  position: absolute;
  inset: 30px;
  border: 1px solid rgba(197, 164, 78, 0.2);
  pointer-events: none;
}

.hero-frame::before,
.hero-frame::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: var(--gold);
}

.hero-frame::before {
  top: -1px;
}

.hero-frame::after {
  bottom: -1px;
}

.hero-ornament-top,
.hero-ornament-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 40px;
  pointer-events: none;
}

.hero-ornament-top {
  top: 60px;
}

.hero-ornament-bottom {
  bottom: 60px;
}

.hero-ornament-top::before,
.hero-ornament-bottom::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold);
}

.hero-ornament-top::after,
.hero-ornament-bottom::after {
  content: '\2666';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--gold);
  font-size: 14px;
  background: var(--blue);
  padding: 0 16px;
}

.hero-content {
  position: relative;
  z-index: 3;
}

.hero-names {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: 4px;
}

.hero-names .ampersand {
  display: block;
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--gold);
  font-weight: 400;
  line-height: 1;
  margin: 0.3rem 0;
  letter-spacing: 0;
}

.hero-decorative-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 1.5rem 0;
}

.hero-decorative-line .line {
  width: 60px;
  height: 1px;
  background: var(--gold);
}

.hero-decorative-line .diamond {
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

.hero-date {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 300;
  color: var(--gold-light);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-top: 1.5rem;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  text-align: center;
  cursor: pointer;
}

.hero-scroll-indicator span {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.hero-scroll-indicator .scroll-icon {
  color: var(--gold);
  font-size: 1rem;
  animation: bounceDown 2s infinite;
}

@keyframes bounceDown {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(8px);
  }

  60% {
    transform: translateY(4px);
  }
}

/* ============================================================
   STORY SECTION (con Portada.jpeg de fondo)
   ============================================================ */

.section-story {
  background: url('../assets/img/Portada.jpeg') center/cover no-repeat;
  /* Retira opacidad a un 50% */

  background-attachment: fixed;
  position: relative;
}

@media (hover: none) and (pointer: coarse) {
  .section-story {
    background-attachment: scroll;
  }
}

.story-overlay {
  position: absolute;
  inset: 0;
  background: rgba(27, 42, 74, 0.9);
  z-index: 1;
}

.story-frame {
  position: relative;
  z-index: 2;
  border: 1px solid rgba(197, 164, 78, 0.3);
  padding: 60px 50px;
  max-width: 750px;
  margin: 0 auto;
}

.story-frame::before,
.story-frame::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: var(--gold);
}

.story-frame::before {
  top: -1px;
}

.story-frame::after {
  bottom: -1px;
}

.story-ornament-top,
.story-ornament-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 30px;
}

.story-ornament-top {
  top: -15px;
}

.story-ornament-bottom {
  bottom: -15px;
}

.story-ornament-top::before,
.story-ornament-bottom::before {
  content: '\2666';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--gold);
  font-size: 12px;
  background: rgba(27, 42, 74, 0.88);
  padding: 0 12px;
}

.story-title-light {
  color: var(--white) !important;
}

.story-title-light::before,
.story-title-light::after {
  background: var(--gold) !important;
}

.story-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.story-text-light {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 2;
  margin-bottom: 1.8rem;
}

.story-strong {
  color: var(--gold-light);
}

.story-hearts {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 1rem;
}

.story-hearts i {
  color: var(--gold);
  font-size: 1.2rem;
  opacity: 0.9;
}

/* ============================================================
   GALLERY SECTION
   ============================================================ */

.section-gallery {
  background: var(--gray-light);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto auto;
  grid-auto-rows: 320px;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: var(--shadow);
  cursor: pointer;
  background: var(--white);
}

.gallery-item-inner {
  width: 100%;
  position: relative;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-photo {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27, 42, 74, 0.5) 0%, transparent 50%);
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.gallery-item {
  height: 100%;
}

.gallery-item-inner {
  height: 100%;
  width: 100%;
  display: block;
}

.gallery-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: scale(1.03);
}

.gallery-item:hover .gallery-photo {
  transform: scale(1.06);
}

.gallery-item-border {
  position: absolute;
  inset: 12px;
  border: 1px solid transparent;
  transition: border-color 0.4s ease;
  z-index: 2;
  pointer-events: none;
}

.gallery-item:hover .gallery-item-border {
  border-color: rgba(197, 164, 78, 0.45);
}

.gallery-item-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
  pointer-events: none;
}

.gallery-item-corner::before,
.gallery-item-corner::after {
  content: '';
  position: absolute;
  background: var(--gold);
}

.gallery-item-corner.tl {
  top: 16px;
  left: 16px;
}

.gallery-item-corner.tr {
  top: 16px;
  right: 16px;
}

.gallery-item-corner.bl {
  bottom: 16px;
  left: 16px;
}

.gallery-item-corner.br {
  bottom: 16px;
  right: 16px;
}

.gallery-item-corner.tl::before,
.gallery-item-corner.tr::before {
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
}

.gallery-item-corner.tl::after,
.gallery-item-corner.tr::after {
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
}

.gallery-item-corner.bl::before,
.gallery-item-corner.br::before {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
}

.gallery-item-corner.bl::after,
.gallery-item-corner.br::after {
  bottom: 0;
  left: 0;
  width: 1px;
  height: 100%;
}

.gallery-item-corner.tr::after,
.gallery-item-corner.br::after {
  left: auto;
  right: 0;
}

.gallery-item:hover .gallery-item-corner {
  opacity: 1;
}

/* Overlay items positioned above the wide image to form a mosaic */
/* Wide bottom image spans both columns */
.gallery-item--wide {
  grid-column: 1 / -1;
  grid-row: 2;
  z-index: 1;
}

.gallery-item--overlay {
  /* legacy helper — neutral by default */
  position: static !important;
  width: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  box-shadow: var(--shadow);
}

.gallery-item--left,
.gallery-item--right {
  position: static !important;
}

@media (max-width: 1024px) {
  .gallery-item--overlay {
    width: 46%;
    top: 6%;
  }
}

@media (max-width: 768px) {
  .gallery-item--overlay {
    position: static;
    width: 100%;
    transform: none;
    box-shadow: var(--shadow);
    margin-top: 12px;
  }
  .gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .gallery-item--wide {
    grid-column: 1 / -1;
  }
}

/* Grid placement for top cells */
.gallery-item--top-left { grid-column: 1; grid-row: 1; }
.gallery-item--top-right { grid-column: 2; grid-row: 1; }

/* Make the wide bottom image slightly taller */
.gallery-item--wide .gallery-item-inner { min-height: 420px; }

/* Imagen a todo ancho dentro de la galería */
.gallery-item--wide {
  grid-column: 1 / -1;
}

/* ============================================================
   DRESS CODE STYLES
   ============================================================ */
.section-dresscode {
  background: linear-gradient(180deg, var(--off-white) 0%, #fff 100%);
}

.dresscode-content {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  font-size: 1rem;
  color: var(--text);
}

.dresscode-intro {
  margin-bottom: 1rem;
  color: var(--gray);
}

.dresscode-list {
  list-style: none;
  display: flex;
  gap: 18px;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  margin: 12px 0 14px;
  flex-wrap: wrap;
}

.dresscode-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(197,164,78,0.06);
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--blue);
  font-weight: 500;
}

.dresscode-list li i {
  color: var(--gold);
  font-size: 0.95rem;
}

.dresscode-note {
  color: var(--gray);
  margin-top: 8px;
  font-size: 0.95rem;
}

/* ============================================================
   ORNAMENTS FOR SECTION CORNERS
   ============================================================ */
section:not(.section-hero)::before,
section:not(.section-hero)::after {
  content: '\2666';
  position: absolute;
  color: var(--gold);
  font-size: 18px;
  opacity: 0.08;
  pointer-events: none;
}

section:not(.section-hero)::before {
  top: 18px;
  left: 18px;
  transform: rotate(0deg);
}

section:not(.section-hero)::after {
  bottom: 18px;
  right: 18px;
  transform: rotate(180deg);
}

/* Ensure wide gallery image remains full width on smaller screens */
@media (max-width: 768px) {
  .gallery-item--wide {
    grid-column: 1 / -1;
  }
  .dresscode-list {
    gap: 10px;
  }
}

/* ============================================================
   EVENT SECTIONS (Ceremonia & Recepción)
   ============================================================ */

.section-ceremony,
.section-reception {
  background: var(--white);
}

.section-reception {
  background: var(--gray-light);
}

.event-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

/* -- Event Info Card -- */

.event-card {
  position: relative;
  background: var(--white);
  border-radius: 2px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gold-pale);
}

.event-card-ornament-top,
.event-card-ornament-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 24px;
  width: 80px;
  z-index: 3;
}

.event-card-ornament-top {
  top: -12px;
}

.event-card-ornament-bottom {
  bottom: -12px;
}

.event-card-ornament-top::before,
.event-card-ornament-bottom::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold);
}

.event-card-ornament-top::after {
  content: '\2666';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--gold);
  font-size: 11px;
  background: var(--white);
  padding: 0 10px;
}

.event-card-ornament-bottom::after {
  content: '\2666';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--gold);
  font-size: 11px;
  background: var(--white);
  padding: 0 10px;
}

.event-card-inner {
  padding: 45px 35px 35px;
  position: relative;
}

.event-card-divider {
  width: 50px;
  height: 2px;
  background: var(--gold);
  margin: 1.2rem auto 1.8rem;
}

.event-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 6px var(--white), 0 0 0 7px var(--gold-pale);
}

.event-icon-circle i {
  font-size: 1.8rem;
  color: var(--gold);
}

.event-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--blue);
  text-align: center;
  margin-bottom: 0;
  line-height: 1.3;
}

.event-detail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 1rem;
}

.event-detail-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.event-detail-icon i {
  color: var(--blue);
  font-size: 0.85rem;
}

.event-detail-text {
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.event-detail-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2px;
}

.event-detail-text span:last-child {
  font-size: 0.98rem;
  color: var(--text);
}

.event-detail-strong {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: var(--blue) !important;
}

.event-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray);
  margin-top: 1.2rem;
  font-style: italic;
  line-height: 1.6;
}

/* -- Map Card -- */

.map-card {
  padding: 6px;
  background: var(--white);
}

.map-card .event-map {
  border-radius: 2px;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid var(--gold-pale);
  height: 100%;
}

.map-card .event-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 440px;
  border: 0;
}

.ceremony-card,
.reception-card {
  background: var(--white);
}

.reception-card {
  background: var(--off-white);
}

.reception-card .event-card-ornament-top::after,
.reception-card .event-card-ornament-bottom::after {
  background: var(--off-white);
}

/* ============================================================
   RSVP SECTION
   ============================================================ */

.section-rsvp {
  background: var(--white);
}

.rsvp-container {
  max-width: 550px;
  margin: 0 auto;
  background: var(--off-white);
  padding: 50px 45px;
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gold-pale);
  position: relative;
}

.rsvp-container::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border: 1px solid var(--gold-pale);
  border-radius: 2px;
  pointer-events: none;
}

.rsvp-subtitle {
  text-align: center;
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.rsvp-form .form-group {
  margin-bottom: 1.5rem;
}

.rsvp-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--blue);
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.rsvp-form input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #E0E0E0;
  border-radius: 2px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  color: var(--text);
  background: var(--white);
  transition: all 0.3s ease;
  outline: none;
}

.rsvp-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 164, 78, 0.1);
}

.rsvp-form .btn-submit {
  width: 100%;
  padding: 16px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 2px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.rsvp-form .btn-submit:hover {
  background: var(--blue-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(27, 42, 74, 0.25);
}

.rsvp-form .btn-submit:active {
  transform: translateY(0);
}

/* RSVP Confirmed Message */
.rsvp-confirmed {
  text-align: center;
  padding: 20px 0;
}

.rsvp-confirmed .confirmed-icon {
  font-size: 3.5rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  animation: scaleInBounce 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.rsvp-confirmed h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--blue);
  margin-bottom: 1rem;
}

.rsvp-confirmed p {
  color: var(--gray);
  font-size: 1.05rem;
  line-height: 1.8;
}

@keyframes scaleInBounce {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  60% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* RSVP Loading */
.rsvp-loading {
  display: none;
  text-align: center;
  padding: 20px;
}

.rsvp-loading.active {
  display: block;
}

.rsvp-loading .spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--gold-pale);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.rsvp-error {
  background: #FEF2F2;
  color: #991B1B;
  padding: 14px 18px;
  border-radius: 2px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  display: none;
  border-left: 3px solid #991B1B;
}

.rsvp-error.active {
  display: block;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--blue);
  color: var(--text-light);
  text-align: center;
  padding: 40px 20px;
}

.footer-names {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.footer-date {
  font-size: 0.85rem;
  letter-spacing: 3px;
  color: var(--gold-light);
  text-transform: uppercase;
}

.footer .ampersand-footer {
  color: var(--gold);
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  font-weight: 400;
}

/* ============================================================
   ANIMATIONS (Intersection Observer)
   ============================================================ */

.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-photo {
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transition: opacity 0.7s ease, clip-path 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-photo.visible {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

.hero-animate {
  opacity: 0;
  transform: translateY(30px);
}

.hero-animate.visible {
  animation: heroReveal 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes heroReveal {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate-delay-1 {
  animation-delay: 0.2s;
}

.hero-animate-delay-2 {
  animation-delay: 0.5s;
}

.hero-animate-delay-3 {
  animation-delay: 0.8s;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .event-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .map-card .event-map iframe {
    min-height: 300px;
  }

  .gallery-grid {
    gap: 18px;
  }
}

@media (max-width: 768px) {
  section {
    padding: 80px 24px;
    scroll-snap-align: start;
  }

  .section-title {
    font-size: 2.1rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 600px;
  }

  .hero-frame {
    inset: 20px;
  }

  .hero-frame::before,
  .hero-frame::after {
    width: 140px;
  }

  .event-layout {
    gap: 30px;
  }

  .event-card-inner {
    padding: 35px 25px 28px;
  }

  .event-name {
    font-size: 1.6rem;
  }

  .event-icon-circle {
    width: 60px;
    height: 60px;
  }

  .event-icon-circle i {
    font-size: 1.5rem;
  }

  .story-frame {
    padding: 40px 30px;
  }

  .story-text-light {
    font-size: 1.05rem;
    line-height: 1.8;
  }

  .rsvp-container {
    padding: 35px 25px;
  }

  .footer-names {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  section {
    padding: 60px 16px;
    scroll-snap-align: start;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 400px;
  }

  .hero-names {
    letter-spacing: 2px;
  }

  .hero-decorative-line .line {
    width: 40px;
  }

  .hero-ornament-top,
  .hero-ornament-bottom {
    width: 80px;
  }

  .hero-ornament-top {
    top: 40px;
  }

  .hero-ornament-bottom {
    bottom: 40px;
  }

  .event-card-inner {
    padding: 30px 20px 24px;
  }

  .story-frame {
    padding: 30px 20px;
    border: 1px solid rgba(197, 164, 78, 0.2);
  }

  .story-text-light {
    font-size: 0.95rem;
  }

  .rsvp-container {
    padding: 25px 18px;
  }

  .rsvp-container::before {
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
  }
}