/* ================================
   KARELY & CARLOS — Wedding CSS
   ================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:      #fbf9f6;
  --cream-dark: #f4ede3;
  --gold:       #a78358; /* Slightly darker gold for better readability and contrast */
  --gold-light: #cfa878;
  --dark:       #2a211a; /* Richer dark color for headers */
  --text:       #3a3128; /* Darker text color for maximum readability */
  --text-light: #70655b; /* Darker light text */
  --white:      #ffffff;
  --border:     #e2d7c7;
}

html { scroll-behavior: smooth; }
body { font-family: 'Montserrat', sans-serif; background-color: var(--cream); color: var(--text); font-size: 17px; line-height: 1.7; }

.playfair  { font-family: 'Playfair Display', serif; }
.cormorant { font-family: 'Cormorant Garamond', serif; }
.alex-brush { font-family: 'Alex Brush', cursive; }
.great-vibes { font-family: 'Great Vibes', cursive; }

/* ── Scroll animations ── */
.fade-up    { opacity: 0; transform: translateY(44px);  transition: opacity 1.1s cubic-bezier(.25,1,.5,1), transform 1.1s cubic-bezier(.25,1,.5,1); }
.fade-left  { opacity: 0; transform: translateX(-44px); transition: opacity 1.1s cubic-bezier(.25,1,.5,1), transform 1.1s cubic-bezier(.25,1,.5,1); }
.fade-right { opacity: 0; transform: translateX(44px);  transition: opacity 1.1s cubic-bezier(.25,1,.5,1), transform 1.1s cubic-bezier(.25,1,.5,1); }
.fade-up.active, .fade-left.active, .fade-right.active { opacity: 1; transform: translate(0); }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .26s; }
.delay-3 { transition-delay: .42s; }
.delay-4 { transition-delay: .58s; }

/* ── Partículas ── */
@keyframes float-up {
  0%   { transform: translateY(0)    rotate(0deg);   opacity:.55; }
  100% { transform: translateY(-120vh) rotate(360deg); opacity:0;   }
}
.particle { position:fixed; bottom:-20px; width:7px; height:7px; border-radius:50%; pointer-events:none; z-index:0; animation:float-up linear infinite; }

/* ── Shimmer line ── */
@keyframes shimmer { 0%{background-position:-200% center} 100%{background-position:200% center} }
.shimmer-line { height:1px; background:linear-gradient(90deg,transparent,var(--gold),transparent); background-size:200% auto; animation:shimmer 3s linear infinite; }

/* ── Hero — Arch ── */
.hero-bg-pattern {
  position: absolute; inset: 0; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23b8966a' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* El arco: borde redondeado sólo arriba (semicírculo), recto abajo */
.arch-wrapper {
  position: relative;
  width: 280px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 140px 140px 18px 18px; /* mitad del ancho para semicírculo perfecto */
  padding: 14px 14px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
}

/* La foto dentro del arco */
.arch-photo {
  width: 100%;
  height: 340px;
  border-radius: 118px 118px 10px 10px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ── Countdown boxes ── */
.timer-box {
  background:var(--white);
  border:1px solid var(--border);
  border-radius:14px;
  padding:1.1rem 1.2rem;
  min-width:72px;
  box-shadow:0 4px 18px rgba(0,0,0,0.04);
  text-align:center;
}

.hero-timer-box {
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  min-width: 68px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  text-align: center;
}

/* ── Marcos de foto y Tarjeta Romántica ── */
.arch-frame { border-top-left-radius:50%; border-top-right-radius:50%; border-bottom-left-radius:12px; border-bottom-right-radius:12px; overflow:hidden; }
.oval-frame { border-radius:50%; border:8px solid var(--white); box-shadow:0 10px 30px rgba(0,0,0,0.08); overflow:hidden; }

/* ── Galería de 6 Fotos con Arcos ── */
.gallery-arch-frame {
  position: relative;
  aspect-ratio: 3/4;
  border-top-left-radius: 50% 38%;
  border-top-right-radius: 50% 38%;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}
.gallery-arch-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 50% 38%;
  border-top-right-radius: 50% 38%;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.gallery-arch-frame:hover img {
  transform: scale(1.06);
}

/* ── Galería de Fotos Rectangulares con Bordes Redondeados (Paisaje) ── */
.gallery-rect-frame {
  position: relative;
  aspect-ratio: 3/2;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}
.gallery-rect-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.gallery-rect-frame:hover img {
  transform: scale(1.06);
}
.romantic-border {
  border: 1px solid var(--border);
  padding: 10px;
}
.romantic-border-inner {
  border: 1px solid var(--border);
  height: 100%;
  padding: 2rem;
}
.accent-color { color: var(--gold); }

/* ── Event card ── */
.event-card { background:var(--white); border:1px solid var(--border); border-radius:20px; padding:2.5rem; box-shadow:0 4px 20px rgba(0,0,0,0.04); transition:transform .4s,box-shadow .4s; }
.event-card:hover { transform:translateY(-6px); box-shadow:0 12px 40px rgba(0,0,0,0.08); }

/* ── Color swatch ── */
.color-swatch { width:44px;height:44px;border-radius:50%;border:3px solid var(--white);box-shadow:0 4px 12px rgba(0,0,0,0.12);transition:transform .3s;cursor:default; }
.color-swatch:hover { transform:scale(1.15); }

/* ── Buttons ── */
.btn-primary { display:inline-block;background:var(--dark);color:var(--white);padding:14px 44px;border-radius:999px;font-size:10px;font-weight:700;letter-spacing:.3em;text-transform:uppercase;text-decoration:none;transition:background .3s,box-shadow .3s,transform .2s;box-shadow:0 8px 24px rgba(61,50,40,.22); }
.btn-primary:hover { background:var(--gold);transform:translateY(-2px);box-shadow:0 12px 32px rgba(184,150,106,.4); }
.btn-outline { display:inline-block;border:1px solid var(--gold);color:var(--gold);padding:10px 32px;border-radius:999px;font-size:9px;font-weight:600;letter-spacing:.25em;text-transform:uppercase;text-decoration:none;transition:background .3s,color .3s; }
.btn-outline:hover { background:var(--gold);color:var(--white); }

/* ── Music button ── */
#music-control { position:fixed;bottom:28px;right:28px;z-index:200;width:50px;height:50px;border-radius:50%;background:var(--dark);color:var(--white);border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 20px rgba(0,0,0,0.22);transition:background .3s,transform .2s; }
#music-control:hover { background:var(--gold);transform:scale(1.1); }

@media(max-width:400px){ .arch-wrapper{width:240px;} .arch-photo{height:290px;} .arch-wrapper{border-radius:120px 120px 16px 16px;} .arch-photo{border-radius:100px 100px 8px 8px;} }

/* ── Stacking / Sliding Transitions from premiun.html ── */
.sticky-panel {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
}

.sliding-content {
  position: relative;
  z-index: 10;
  background-color: var(--cream);
  box-shadow: 0 -20px 40px rgba(0,0,0,0.15);
}

.wave-top {
  position: absolute;
  top: -99px;
  left: 0;
  width: 100%;
  height: 100px;
  z-index: 10;
  overflow: hidden;
}
.wave-top svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Reveal on scroll — used by section content blocks ── */
.reveal {
  opacity: 0;
  transform: translateY(70px);
  transition: opacity 0.9s cubic-bezier(.25,1,.5,1), transform 0.9s cubic-bezier(.25,1,.5,1);
  will-change: transform, opacity;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Sobre de Invitación (Envelope) ── */
#envelope-container {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #dfd7c6;
}

.envelope-panel {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50vh;
  transition: transform 1.3s cubic-bezier(0.77, 0, 0.175, 1);
  background-color: #faf8f5; /* Color del papel de la imagen */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.045'/%3E%3C/svg%3E");
}

.envelope-top {
  top: 0;
  background-color: #faf8f5;
  background-image: 
    linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(240,235,224,0.3) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.045'/%3E%3C/svg%3E");
  z-index: 2;
  border-bottom: 1.5px solid rgba(167, 131, 88, 0.2);
  box-shadow: 0 4px 20px rgba(61, 50, 40, 0.05);
}

.envelope-bottom {
  bottom: 0;
  background-color: #f7f4ec; /* Contraste sutil para la solapa de abajo */
  background-image: 
    linear-gradient(0deg, rgba(255,255,255,0.4) 0%, rgba(229,222,206,0.3) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.045'/%3E%3C/svg%3E");
  z-index: 1;
}

#envelope-container.open .envelope-top {
  transform: translateY(-100%);
}

#envelope-container.open .envelope-bottom {
  transform: translateY(100%);
}

/* Contenedor del sello para que flote sobre las solapas */
.wax-seal-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

#envelope-container.open .wax-seal-wrapper {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  pointer-events: none;
}

/* Sello de Lacre (Wax Seal) */
.wax-seal {
  width: 120px;
  height: 120px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-gold 2s infinite ease-in-out;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.wax-seal:hover {
  animation-play-state: paused;
  transform: scale(1.08) rotate(5deg);
}

.wax-seal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* El drop-shadow se encarga de sombrear la silueta orgánica irregular del lacre PNG */
  filter: drop-shadow(0 6px 12px rgba(125, 94, 53, 0.4));
}

@keyframes pulse-gold {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 6px 12px rgba(125, 94, 53, 0.35));
  }
  50% {
    transform: scale(1.06);
    filter: drop-shadow(0 12px 24px rgba(125, 94, 53, 0.55));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 6px 12px rgba(125, 94, 53, 0.35));
  }
}

/* ── Degradado Acuarela ── */
.watercolor-wash {
  position: relative;
}
.watercolor-wash::before,
.watercolor-wash::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: 5;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 1;
}
/* Mancha azul — esquina superior izquierda */
.watercolor-wash::before {
  width: 60%;
  height: 55%;
  top: -5%;
  left: -10%;
  background: radial-gradient(ellipse at center, rgba(163,189,213,0.55) 0%, rgba(176,196,216,0.3) 45%, transparent 72%);
}
/* Mancha dorada — esquina superior derecha */
.watercolor-wash::after {
  width: 50%;
  height: 50%;
  top: 0%;
  right: -5%;
  background: radial-gradient(ellipse at center, rgba(207,168,120,0.45) 0%, rgba(167,131,88,0.2) 45%, transparent 72%);
}

/* Variante: manchas en la parte inferior */
.watercolor-wash-bottom {
  position: relative;
}
.watercolor-wash-bottom::before,
.watercolor-wash-bottom::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: 5;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 1;
}
.watercolor-wash-bottom::before {
  width: 55%;
  height: 55%;
  bottom: -5%;
  right: -5%;
  background: radial-gradient(ellipse at center, rgba(163,189,213,0.5) 0%, rgba(176,196,216,0.25) 45%, transparent 72%);
}
.watercolor-wash-bottom::after {
  width: 45%;
  height: 50%;
  bottom: -3%;
  left: -5%;
  background: radial-gradient(ellipse at center, rgba(207,168,120,0.4) 0%, rgba(167,131,88,0.18) 45%, transparent 72%);
}

