/* =========================================================
   INVITACIÓN XV AÑOS · SARA CORREA
   v10.1: fondo de la invitación apuntando a "assets/fondo seccion 2.jpg"
   ========================================================= */

:root{
  --black-deep:#050505;
  --black-soft:#141210;
  --black-card:#1a1715;

  --gold-1:#b98a3d;
  --gold-2:#d9b26a;
  --gold-3:#f0d999;
  --gold-line: linear-gradient(90deg, transparent, #d9b26a, transparent);

  --rose-deep:#7a2340;

  --ivory:#efe7d8;
  --ivory-dim:#c9c0ae;

  --radius-lg: 4px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

*{ box-sizing:border-box; }
html,body{
  margin:0; padding:0;
  background:var(--black-deep);
  color:var(--ivory);
  font-family:'Jost', sans-serif;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  scroll-behavior:smooth;
}

h1,h2,.hero__name,.footer__name{ font-family:'Cormorant Garamond', serif; }
::selection{ background:var(--gold-1); color:var(--black-deep); }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}

.eyebrow{
  font-size:11px; letter-spacing:4px; color:var(--gold-2);
  text-transform:uppercase; margin:0 0 18px; position:relative; z-index:2;
  font-family:'Jost', sans-serif; font-weight:500;
}
.divider{
  width:64px; height:1px; background:var(--gold-line);
  margin:0 auto 28px; position:relative;
  transform:scaleX(0);
  transition:transform .8s var(--ease);
}
.divider.is-visible{ transform:scaleX(1); }
.divider::before{
  content:'✦'; position:absolute; left:50%; top:50%;
  transform:translate(-50%,-50%); font-size:9px; color:var(--gold-2);
  background:var(--black-deep); padding:0 6px;
}
.divider--sm{ width:40px; }
.icon{ width:20px; height:20px; stroke:var(--gold-2); flex-shrink:0; }
.icon-envelope{ width:34px; height:34px; stroke:var(--gold-2); margin-bottom:18px; }

.btn{
  display:inline-block; padding:15px 40px; font-size:11px;
  letter-spacing:3px; text-transform:uppercase; text-decoration:none;
  border-radius:2px;
  transition:transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease);
  cursor:pointer;
  font-family:'Jost', sans-serif;
}
.btn--outline{ background:transparent; border:1px solid var(--gold-1); color:var(--gold-2); }
.btn--outline:hover{
  background:rgba(217,178,106,0.08);
  box-shadow:0 0 22px rgba(217,178,106,0.18);
  transform:translateY(-2px);
}
.btn--solid{
  background:linear-gradient(135deg, var(--gold-2), var(--gold-1));
  color:var(--black-deep); border:1px solid var(--gold-2); font-weight:600;
}
.btn--solid:hover{ box-shadow:0 0 28px rgba(217,178,106,0.35); transform:translateY(-2px); }

/* =========================================================
   FONDO PANTALLA 1
   ========================================================= */
.bg-texture{ position:fixed; inset:0; z-index:0; overflow:hidden; background:#0d0a08; }
.bg-texture__img{
  position:absolute; inset:-8%; width:116%; height:116%;
  background-image: url('assets/fondo seccion 2.jpg');
  background-size:cover; background-position:center; background-repeat:no-repeat;
  animation: kenBurns 16s ease-in-out infinite alternate;
}
@keyframes kenBurns{
  0%{ transform:scale(1) translate(0,0) rotate(0deg); }
  100%{ transform:scale(1.22) translate(-3%, -2.5%) rotate(0.6deg); }
}
.bg-texture::after{
  content:''; position:absolute; inset:0; z-index:1;
  background: radial-gradient(ellipse at 50% 42%, rgba(0,0,0,0.15), rgba(0,0,0,0.48) 78%);
}
.bg-texture__sheen{
  position:absolute; top:0; bottom:0; left:-30%; width:35%;
  background:linear-gradient(100deg,
    transparent 0%, rgba(217,178,106,0.09) 45%,
    rgba(240,217,153,0.14) 50%, rgba(217,178,106,0.09) 55%, transparent 100%);
  z-index:1; animation: sheenSweep 7s ease-in-out infinite; pointer-events:none;
}
@keyframes sheenSweep{ 0%{ left:-40%; } 50%{ left:105%; } 100%{ left:105%; } }

.starfield{ position:fixed; inset:0; z-index:1; pointer-events:none; }
.starfield canvas{ position:absolute; inset:0; width:100%; height:100%; display:block; }

/* =========================================================
   PANTALLA 1 — SOBRE
   ========================================================= */
#envelope-screen{
  position:relative; min-height:100vh; min-height:100dvh;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:32px; overflow:hidden;
}
.footnote{
  font-size:10px; letter-spacing:3px; color:var(--ivory-dim);
  margin-top:30px; position:relative; z-index:2;
}
.envelope-wrap{
  position:relative; z-index:2;
  display:flex; align-items:center; justify-content:center; padding:40px;
}
.envelope-wrap::before{
  content:''; position:absolute;
  width:360px; height:360px; max-width:80vw; max-height:80vw;
  background: radial-gradient(circle, rgba(217,178,106,0.16) 0%, transparent 68%);
  z-index:-1; animation: haloPulse 4s ease-in-out infinite;
}
@keyframes haloPulse{ 0%,100%{ opacity:0.7; transform:scale(1); } 50%{ opacity:1; transform:scale(1.06); } }
.envelope{
  position:relative; width:min(380px, 78vw); min-height:220px; cursor:pointer; z-index:2;
  filter:drop-shadow(0 28px 55px rgba(0,0,0,0.75)); padding:14px; margin:-14px;
}
.envelope__img{
  display:block; width:100%; height:auto; min-height:200px; object-fit:contain;
  user-select:none; -webkit-user-drag:none; border-radius:2px;
  background: rgba(20,18,16,0.4);
  transition:opacity .5s var(--ease), transform .5s var(--ease), filter .5s var(--ease);
}
.envelope__body{ margin-top:16px; z-index:2; transition:opacity .35s var(--ease); }
.envelope__sub{
  font-size:11px; letter-spacing:2.5px; text-transform:uppercase;
  color:var(--gold-3); margin:0; text-shadow:0 2px 10px rgba(0,0,0,0.7);
}
@keyframes envelopeFloat{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-8px); } }
.envelope:not(.is-open) .envelope__img{ animation:envelopeFloat 4.5s ease-in-out infinite; }
.envelope:hover .envelope__img{ filter:brightness(1.1); }
.envelope.is-open .envelope__img{
  animation:none; transform:scale(1.08); filter:brightness(1.5) saturate(1.1); opacity:0;
  transition:opacity .75s var(--ease) .25s, transform .9s var(--ease), filter .5s var(--ease);
}
.envelope.is-open .envelope__body{ opacity:0; }
.burst{
  position:absolute; top:50%; left:50%; width:10px; height:10px; border-radius:50%;
  background:radial-gradient(circle, rgba(240,217,153,0.95), rgba(217,178,106,0.4) 40%, transparent 70%);
  transform:translate(-50%,-50%) scale(0); opacity:0; z-index:3; pointer-events:none;
}
.burst.is-active{ animation: burstOut 1.1s var(--ease) forwards; }
@keyframes burstOut{
  0%{ transform:translate(-50%,-50%) scale(0); opacity:0.9; }
  40%{ transform:translate(-50%,-50%) scale(20); opacity:0.55; }
  100%{ transform:translate(-50%,-50%) scale(42); opacity:0; }
}
#envelope-screen.is-leaving{ animation: fadeOutScreen .85s var(--ease) forwards; }
@keyframes fadeOutScreen{
  0%{ opacity:1; transform:scale(1); filter:brightness(1); }
  55%{ filter:brightness(1.35); }
  100%{ opacity:0; transform:scale(1.04); filter:brightness(1); }
}

/* =========================================================
   PANTALLA 2 — INVITACIÓN (fondo real: "fondo seccion 2.jpg")
   ========================================================= */
.invitation{ position:relative; max-width:520px; margin:0 auto; isolation:isolate; }

.invitation-bg{ position:fixed; inset:0; z-index:-1; overflow:hidden; background:#0d0a08; }
.invitation-bg__img{
  position:absolute; inset:-10%; width:120%; height:120%;
  background-image: url('assets/fondo seccion 2.jpg');
  background-size:cover; background-position:center; background-repeat:no-repeat;
  animation: invitationDrift 20s ease-in-out infinite alternate;
}
@keyframes invitationDrift{
  0%{ transform:scale(1.05) translate(0%, 0%); }
  50%{ transform:scale(1.16) translate(-2.5%, -3%); }
  100%{ transform:scale(1.05) translate(2%, 1.5%); }
}
.invitation-bg::after{
  content:''; position:absolute; inset:0;
  background: radial-gradient(ellipse at 50% 30%, rgba(0,0,0,0.25), rgba(0,0,0,0.72) 82%);
}

.invitation.is-entering .hero{ animation: sectionFadeIn .9s var(--ease) both; }
@keyframes sectionFadeIn{ from{ opacity:0; transform:translateY(14px); } to{ opacity:1; transform:translateY(0); } }

.music-toggle{
  position:fixed; bottom:22px; right:22px; width:46px; height:46px; border-radius:50%;
  background:var(--black-card); border:1px solid var(--gold-1);
  display:flex; align-items:center; justify-content:center; cursor:pointer; z-index:50;
  box-shadow:0 8px 22px rgba(0,0,0,0.5);
  transition:box-shadow .3s var(--ease);
}
.music-toggle:hover{ box-shadow:0 0 20px rgba(217,178,106,0.3); }
.icon-note{ width:18px; height:18px; stroke:var(--gold-2); }
.music-toggle.is-paused .icon-note{ opacity:.4; }

.section{
  padding:100px 28px; text-align:center; position:relative;
  opacity:0; transform:translateY(50px) scale(0.96);
  transition:opacity 1s var(--ease), transform 1s var(--ease);
}
.section.is-visible{ opacity:1; transform:translateY(0) scale(1); }
.section:not(.hero)::before{
  content:''; position:absolute; top:0; left:50%;
  transform:translateX(-50%) scaleX(0); width:60%; height:1px;
  background: linear-gradient(90deg, transparent, rgba(217,178,106,0.45), transparent);
  transition: transform 1.1s var(--ease) .15s;
}
.section.is-visible:not(.hero)::before{ transform:translateX(-50%) scaleX(1); }

.section-title{
  font-size:26px; font-weight:500; color:var(--gold-3);
  line-height:1.4; margin:0 0 14px; letter-spacing:0.3px;
  max-width:360px; margin-left:auto; margin-right:auto;
}
.section-text{
  font-size:14px; line-height:1.85; color:var(--ivory-dim);
  max-width:340px; margin:0 auto; font-weight:300;
}

.hero{ padding-top:70px; }

/* Marco interior de la foto: se mantiene dentro del recorte ovalado */
.photo-frame__ring {
  position: absolute;
  inset: 10px;
  z-index: 2;
  pointer-events: none;
  border-radius: 50%;
  border: 1px solid rgba(240, 217, 153, 0.85);
  box-shadow:
    0 0 0 1px rgba(217, 178, 106, 0.52),
    0 0 22px rgba(217, 178, 106, 0.22);
}

/* Evita que el aro antiguo cree un segundo borde o se salga */
.photo-frame__ring::after {
  display: none;
}

/* Borde dorado exterior, sin crear ningún cuadrado */
.photo-frame {
  outline: 1px solid rgba(217, 178, 106, 0.88);
  outline-offset: 8px;
}

.hero__name{
  font-size:44px; font-weight:500; color:var(--ivory);
  letter-spacing:0.5px; margin:0 0 14px; font-style:italic;
}
.hero__phrase{
  font-family:'Cormorant Garamond', serif;
  font-style:italic; font-size:17px; color:var(--gold-2);
  max-width:280px; margin:0 auto; letter-spacing:0.3px;
}

.details-list {
  position: relative;
  max-width: 320px;
  margin: 0 auto;
}

/* Línea vertical dorada que conecta las 3 tarjetas */
.details-list::before {
  content: '';
  position: absolute;
  left: 38px;
  top: 36px;
  bottom: 36px;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(217, 178, 106, 0.5),
    transparent
  );
  z-index: 0;
}

/* Tarjeta con doble fondo y borde degradado, sin mask */
.detail-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 auto 22px;
  padding: 20px 22px;
  border-radius: 12px;
  text-align: left;
  isolation: isolate;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease),
              transform 0.7s var(--ease),
              box-shadow 0.4s var(--ease);

  /* doble fondo: uno para el interior, otro para el borde */
  background:
    linear-gradient(145deg, rgba(28, 24, 21, 0.92), rgba(13, 11, 10, 0.92))
      padding-box,
    linear-gradient(135deg,
      rgba(217, 178, 106, 0.75),
      rgba(122, 35, 64, 0.4),
      rgba(217, 178, 106, 0.2)
    )
      border-box;
  border: 1px solid transparent;
}

.detail-row.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.detail-row:hover {
  box-shadow: 0 10px 32px rgba(217, 178, 106, 0.16);
  transform: translateY(-3px);
}

/* Número romano decorativo */
.detail-row__num {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--black-deep);
  border: 1px solid var(--gold-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  color: var(--gold-3);
  z-index: 2;
}

/* Icono dentro de círculo tenue */
.detail-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(217, 178, 106, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.detail-label {
  font-size: 10px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--gold-2);
  margin: 0 0 4px;
}

.detail-value {
  font-size: 16px;
  color: var(--ivory);
  margin: 0;
  font-weight: 500;
}

.gift{ background:rgba(10,8,7,0.4); backdrop-filter: blur(4px); }
.rsvp{ background:rgba(20,18,16,0.6); backdrop-filter: blur(4px); }

.footer{ padding-bottom:70px; }
.footer__text{ font-size:13px; color:var(--ivory-dim); margin-bottom:6px; font-style:italic; }
.footer__name{ font-size:30px; color:var(--gold-3); margin:0 0 12px; font-style:italic; }
.footer__initials{ font-size:11px; letter-spacing:6px; color:var(--gold-1); }

.reveal, .reveal-item{
  opacity:0; transform:translateY(18px);
  transition:opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-visible, .reveal-item.is-visible{ opacity:1; transform:translateY(0); }

@keyframes shimmer{ 0%,100%{ opacity:1; } 50%{ opacity:.55; } }

@media (min-width:600px){ .section{ padding:130px 40px; } }


/* =========================================================
   AJUSTE DE CONTRASTE PARA EL FONDO ROSA/DORADO
   Versión sin recuadro negro pesado
   ========================================================= */

/* SOBRE: sin caja ni borde; solo halo oscuro difuminado */
.envelope-wrap {
  position: relative;
  z-index: 2;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 20px;
}

/* Halo oscuro suave detrás del sobre */
.envelope-wrap::before {
  content: '';
  position: absolute;
  width: 390px;
  height: 290px;
  max-width: 92vw;
  background: radial-gradient(
    ellipse,
    rgba(10, 8, 7, 0.42) 0%,
    rgba(10, 8, 7, 0.22) 42%,
    transparent 74%
  );
  filter: blur(18px);
  z-index: -2;
  animation: haloPulse 4s ease-in-out infinite;
}

/* Reflejo dorado bajo el sobre: sustituye el panel negro */
.envelope-wrap::after {
  content: '';
  position: absolute;
  width: 230px;
  height: 25px;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(217, 178, 106, 0.23);
  filter: blur(24px);
  z-index: -1;
}

/* El sobre queda flotante y con sombra natural */
.envelope {
  position: relative;
  width: min(390px, 82vw);
  min-height: 220px;
  cursor: pointer;
  z-index: 2;
  padding: 0;
  margin: 0;
  filter:
    drop-shadow(0 18px 28px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 18px rgba(217, 178, 106, 0.14));
}

.envelope__img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 200px;
  object-fit: contain;
  background: transparent;
  border-radius: 2px;
  user-select: none;
  -webkit-user-drag: none;
  transition:
    opacity 0.75s var(--ease),
    transform 0.9s var(--ease),
    filter 0.5s var(--ease);
}

/* Texto legible sin usar un bloque de fondo */
.envelope__sub {
  margin: 16px 0 0;
  color: #fff4dc;
  font-size: 11px;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.95),
    0 0 14px rgba(0, 0, 0, 0.7);
}

#envelope-screen .eyebrow {
  color: #e3b867;
  text-shadow:
    0 2px 5px rgba(0, 0, 0, 0.9),
    0 0 12px rgba(0, 0, 0, 0.45);
}

#envelope-screen .footnote {
  color: #f1e4ce;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
}

/* Fondo de la segunda pantalla: contraste suave sin ocultar la imagen */
.invitation-bg::after {
  background: radial-gradient(
    ellipse at 50% 44%,
    rgba(5, 5, 5, 0.08) 0%,
    rgba(5, 5, 5, 0.25) 50%,
    rgba(5, 5, 5, 0.52) 100%
  );
}

/* Texto siempre legible sobre el fondo rosado */
.eyebrow,
.hero__name,
.hero__phrase,
.section-title,
.section-text,
.footer__text,
.footer__name,
.detail-label,
.detail-value {
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.88),
    0 0 12px rgba(0, 0, 0, 0.42);
}

.hero__name,
.section-title,
.footer__name {
  color: #fff6e5;
}

.hero__phrase,
.section-text,
.footer__text {
  color: #f1e8d9;
}

/* Panels oscuros únicamente en secciones que necesitan máxima lectura */
.gift,
.rsvp {
  background: rgba(5, 5, 5, 0.66);
  border-top: 1px solid rgba(217, 178, 106, 0.28);
  border-bottom: 1px solid rgba(217, 178, 106, 0.1);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(240, 217, 153, 0.04);
}

/* Tarjetas de fecha/hora/lugar */
.detail-row {
  background:
    linear-gradient(
      145deg,
      rgba(8, 8, 8, 0.90),
      rgba(25, 20, 17, 0.88)
    ) padding-box,
    linear-gradient(
      135deg,
      rgba(240, 217, 153, 0.88),
      rgba(185, 138, 61, 0.52),
      rgba(122, 35, 64, 0.34)
    ) border-box;
  border: 1px solid transparent;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

.detail-row:hover {
  box-shadow:
    0 10px 34px rgba(0, 0, 0, 0.5),
    0 0 22px rgba(217, 178, 106, 0.14);
}

/* Marco ovalado de la foto */
.photo-frame {
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}

.photo-frame__ring {
  border: 1px solid #0a0908;
  box-shadow:
    0 0 0 1px rgba(217, 178, 106, 0.88),
    0 0 0 7px rgba(5, 5, 5, 0.60),
    0 0 35px rgba(217, 178, 106, 0.34);
}

.photo-frame__ring::after {
  border-color: rgba(240, 217, 153, 0.82);
}

/* Botones visibles sobre fondo claro */
.btn--outline {
  background: rgba(5, 5, 5, 0.58);
  border-color: #d9b26a;
  color: #f0d999;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.btn--solid {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34);
}

.music-toggle {
  background: rgba(5, 5, 5, 0.84);
  border-color: #d9b26a;
}

@media (max-width: 599px) {
  .envelope-wrap {
    width: min(94vw, 390px);
    padding: 28px 16px;
  }
}

/* =========================================================
   PANELES PALO DE ROSA — reemplaza los paneles negros
   ========================================================= */

/* Lluvia de sobres y confirmación */
.gift,
.rsvp {
  background: linear-gradient(
    145deg,
    rgba(104, 58, 67, 0.78),
    rgba(77, 42, 50, 0.72)
  );
  border-top: 1px solid rgba(240, 217, 153, 0.55);
  border-bottom: 1px solid rgba(171, 103, 118, 0.42);
  box-shadow:
    0 22px 60px rgba(72, 35, 42, 0.24),
    inset 0 1px 0 rgba(255, 239, 223, 0.13);
  backdrop-filter: blur(7px);
}

/* Fondo de la tarjeta RSVP: un poco más profundo para diferenciarla */
.rsvp {
  background: linear-gradient(
    145deg,
    rgba(119, 67, 77, 0.83),
    rgba(82, 39, 48, 0.78)
  );
}

/* Tarjetas de fecha, hora y lugar */
.detail-row {
  background:
    linear-gradient(
      145deg,
      rgba(122, 73, 82, 0.91),
      rgba(83, 43, 51, 0.90)
    ) padding-box,
    linear-gradient(
      135deg,
      rgba(255, 231, 187, 0.95),
      rgba(217, 178, 106, 0.68),
      rgba(184, 101, 119, 0.65)
    ) border-box;
  border: 1px solid transparent;
  box-shadow:
    0 12px 28px rgba(72, 35, 42, 0.30),
    inset 0 1px 0 rgba(255, 239, 223, 0.12);
}

/* Círculo de los iconos: rosa claro translúcido */
.detail-icon-wrap {
  background: rgba(255, 222, 219, 0.13);
  border: 1px solid rgba(255, 231, 187, 0.22);
}

/* Números romanos: rosa oscuro, para que no queden negros */
.detail-row__num {
  background: #5c3039;
  border-color: #e2b86e;
  color: #fff0d6;
}

/* Línea vertical que une Fecha, Hora y Lugar */
.details-list::before {
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 218, 164, 0.82),
    transparent
  );
}

/* Etiquetas y valores más legibles sobre palo de rosa */
.detail-label {
  color: #f2c97d;
  text-shadow: 0 1px 3px rgba(55, 23, 29, 0.7);
}

.detail-value {
  color: #fff5e8;
  text-shadow: 0 2px 4px rgba(55, 23, 29, 0.6);
}

/* Botón de ubicación: palo de rosa profundo */
.btn--outline {
  background: rgba(91, 45, 54, 0.78);
  border-color: #e2b86e;
  color: #fff0d2;
  box-shadow: 0 8px 20px rgba(70, 30, 38, 0.20);
}

.btn--outline:hover {
  background: rgba(125, 65, 76, 0.88);
  box-shadow:
    0 10px 26px rgba(70, 30, 38, 0.30),
    0 0 20px rgba(226, 184, 110, 0.18);
}
/* =========================================================
   CORRECCIÓN DEFINITIVA DEL MARCO OVALADO EN MÓVIL
   Debe quedar al final de styles.css
   ========================================================= */

/* El contenedor recorta cualquier parte rectangular de la imagen */
.photo-frame {
  position: relative;
  width: 230px;
  height: 300px;
  margin: 0 auto 30px;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  outline: 1px solid rgba(217, 178, 106, 0.88);
  outline-offset: 8px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}

/* La foto no puede superar los límites del óvalo */
.photo-frame__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  z-index: 1;
}

/* El aro queda encima de la foto, pero dentro del óvalo */
.photo-frame__ring {
  position: absolute;
  inset: 10px;
  z-index: 2;
  pointer-events: none;
  border-radius: 50%;
  border: 1px solid rgba(240, 217, 153, 0.85);
  box-shadow:
    0 0 0 1px rgba(217, 178, 106, 0.52),
    0 0 22px rgba(217, 178, 106, 0.22);
}

/* Elimina decoraciones antiguas del aro */
.photo-frame__ring::after {
  display: none;
}

/* Safari/iPhone: fuerza el recorte del óvalo */
@supports (-webkit-touch-callout: none) {
  .photo-frame {
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    transform: translateZ(0);
  }

  .photo-frame__img {
    -webkit-transform: translateZ(0);
  }
}
/* =========================================================
   DRESS CODE — pegar al final de styles.css
   ========================================================= */

.dress-code {
  background: linear-gradient(
    145deg,
    rgba(119, 67, 77, 0.82),
    rgba(82, 39, 48, 0.78)
  );
  border-top: 1px solid rgba(240, 217, 153, 0.55);
  border-bottom: 1px solid rgba(171, 103, 118, 0.42);
  box-shadow:
    0 22px 60px rgba(72, 35, 42, 0.24),
    inset 0 1px 0 rgba(255, 239, 223, 0.13);
  backdrop-filter: blur(7px);
}

.dress-code__ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 22px;
}

.dress-code__ornament span {
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 231, 187, 0.85));
}

.dress-code__ornament span:last-child {
  background: linear-gradient(90deg, rgba(255, 231, 187, 0.85), transparent);
}

.dress-code__ornament b {
  color: #f2c97d;
  font-size: 11px;
  font-weight: 400;
}

.dress-code__title {
  margin: 0 0 22px;
  color: #fff5e8;
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-style: italic;
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(55, 23, 29, 0.7);
}

.dress-code__rule {
  max-width: 340px;
  margin: 0 auto;
  padding: 20px 18px;
  background: rgba(255, 239, 223, 0.08);
  border: 1px solid rgba(255, 231, 187, 0.28);
  border-radius: 10px;
}

.dress-code__swatches {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-bottom: 16px;
}

.dress-code__swatches i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 245, 232, 0.5);
  box-shadow: 0 2px 6px rgba(55, 23, 29, 0.28);
}

.dress-code__swatches i:nth-child(1) { background: #f7c6cf; }
.dress-code__swatches i:nth-child(2) { background: #e996aa; }
.dress-code__swatches i:nth-child(3) { background: #cc6b87; }
.dress-code__swatches i:nth-child(4) { background: #a74362; }
.dress-code__swatches i:nth-child(5) { background: #722940; }

.dress-code__rule p {
  margin: 0;
  color: #fff5e8;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
  text-shadow: 0 2px 4px rgba(55, 23, 29, 0.65);
}

.dress-code__note {
  max-width: 310px;
  margin: 20px auto 0;
  color: rgba(255, 245, 232, 0.82);
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-style: italic;
  line-height: 1.45;
}
/* Sexto tono: oro rosa reservado */
.dress-code__swatches i:nth-child(6) {
  background: linear-gradient(135deg, #d8a08d, #b76e79);
}
/* =========================================================
   LLUVIA DE SOBRES — carta editorial
   ========================================================= */

.gift {
  position: relative;
  overflow: visible;
  background:
    radial-gradient(
      circle at 50% 24%,
      rgba(255, 222, 219, 0.10),
      transparent 38%
    ),
    linear-gradient(
      145deg,
      rgba(119, 67, 77, 0.82),
      rgba(82, 39, 48, 0.78)
    );
  border-top: 1px solid rgba(240, 217, 153, 0.55);
  border-bottom: 1px solid rgba(171, 103, 118, 0.42);
  box-shadow:
    0 22px 60px rgba(72, 35, 42, 0.24),
    inset 0 1px 0 rgba(255, 239, 223, 0.13);
}

.gift > .eyebrow {
  margin-bottom: 28px;
  color: #f2c97d;
}

.gift-letter {
  position: relative;
  width: min(100%, 340px);
  margin: 0 auto;
  padding: 42px 28px 22px;
  overflow: visible;
  background:
    linear-gradient(
      145deg,
      rgba(255, 239, 223, 0.15),
      rgba(255, 239, 223, 0.06)
    );
  border: 1px solid rgba(255, 231, 187, 0.48);
  border-radius: 3px;
  box-shadow:
    0 20px 38px rgba(55, 23, 29, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

/* Textura de papel muy discreta */
.gift-letter::before {
  content: '';
  position: absolute;
  inset: 7px;
  pointer-events: none;
  border: 1px solid rgba(255, 231, 187, 0.13);
}

/* Sello con iniciales */
.gift-letter__seal {
  position: absolute;
  top: -20px;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translateX(-50%) rotate(-5deg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f1c77c, #b87855);
  border: 2px solid rgba(255, 239, 223, 0.72);
  color: #5c3039;
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-style: italic;
  font-weight: 600;
  box-shadow: 0 5px 12px rgba(55, 23, 29, 0.35);
  z-index: 2;
}

.gift-letter__top {
  position: relative;
  z-index: 1;
}

.gift-letter__icon {
  width: 31px;
  height: 31px;
  margin-bottom: 12px;
  stroke: #ffe7bb;
}

.gift-letter__title {
  margin: 0 0 12px;
  color: #fff5e8;
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-style: italic;
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(55, 23, 29, 0.65);
}

.gift-letter__lead {
  margin: 0;
  color: #fff5e8;
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-style: italic;
  line-height: 1.35;
  text-shadow: 0 2px 4px rgba(55, 23, 29, 0.55);
}

.gift-letter__bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 25px;
}

.gift-letter__bottom span {
  width: 42px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 231, 187, 0.80)
  );
}

.gift-letter__bottom span:last-child {
  background: linear-gradient(
    90deg,
    rgba(255, 231, 187, 0.80),
    transparent
  );
}

.gift-letter__bottom b {
  color: #f2c97d;
  font-size: 11px;
  font-weight: 400;
}

.gift__message {
  max-width: 335px;
  margin: 26px auto 0;
  color: #fff5e8;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  text-shadow: 0 2px 4px rgba(55, 23, 29, 0.62);
}

/* La carta llega ligeramente desde abajo, con suavidad */
.gift-letter.reveal {
  transform: translateY(28px) scale(0.98);
}

.gift-letter.reveal.is-visible {
  transform: translateY(0) scale(1);
}

@media (max-width: 599px) {
  .gift-letter {
    width: min(100%, 320px);
    padding: 42px 22px 22px;
  }

  .gift-letter__title {
    font-size: 30px;
  }
}
/* =========================================================
   MARIPOSAS GLOBALES — visibles en toda la invitación
   ========================================================= */

.butterflies {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: block;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
}

.butterfly {
  position: absolute;
  fill: rgba(255, 225, 165, 0.32);
  stroke: rgba(119, 55, 76, 0.8);
  stroke-width: 1.35;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 6px rgba(89, 40, 54, 0.24));
  opacity: 0;
  will-change: transform, opacity;
  animation: butterflyDrift 15s ease-in-out infinite;
}

/* Mariposas repartidas a ambos lados de la pantalla */

.butterfly--1 {
  top: 8%;
  left: 5%;
  width: 31px;
  height: 31px;
  animation-delay: 0s;
}

.butterfly--2 {
  top: 15%;
  right: 6%;
  width: 25px;
  height: 25px;
  animation-delay: 2s;
}

.butterfly--3 {
  top: 28%;
  left: 6%;
  width: 22px;
  height: 22px;
  animation-delay: 4s;
}

.butterfly--5 {
  top: 39%;
  right: 5%;
  width: 26px;
  height: 26px;
  animation-delay: 6s;
}

.butterfly--7 {
  top: 55%;
  left: 5%;
  width: 35px;
  height: 35px;
  animation-delay: 7s;
}

.butterfly--9 {
  top: 69%;
  right: 6%;
  width: 22px;
  height: 22px;
  animation-delay: 8s;
}

.butterfly--11 {
  top: 83%;
  left: 7%;
  width: 25px;
  height: 25px;
  animation-delay: 9s;
}

.butterfly__wings {
  transform-box: fill-box;
  transform-origin: center;
  animation: butterflyWings 1.6s ease-in-out infinite alternate;
}

.butterfly__body,
.butterfly__antenna {
  fill: none;
  stroke: rgba(107, 45, 67, 0.9);
  stroke-width: 1.7;
  stroke-linecap: round;
}

@keyframes butterflyDrift {
  0%,
  100% {
    opacity: 0;
    transform: translate3d(-18px, 26px, 0) rotate(-12deg) scale(0.78);
  }

  18%,
  76% {
    opacity: 0.76;
  }

  48% {
    opacity: 0.88;
    transform: translate3d(46px, -42px, 0) rotate(13deg) scale(1);
  }
}

@keyframes butterflyWings {
  from {
    transform: scaleX(0.82);
  }

  to {
    transform: scaleX(1.06);
  }
}

/* El contenido siempre queda delante de las mariposas */
#envelope-screen .eyebrow,
#envelope-screen .envelope-wrap,
#envelope-screen .footnote,
.invitation .section {
  position: relative;
  z-index: 25;
}

/* Botón de música fijo abajo a la derecha */
#music-toggle.music-toggle {
  position: fixed;
  top: auto;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: auto;
  z-index: 9999;

  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;

  margin: 0;
  transform: none;
}

@media (max-width: 599px) {
  .butterfly {
    scale: 0.9;
  }

  .butterfly--1 {
    left: 3%;
  }

  .butterfly--2 {
    right: 3%;
  }

  .butterfly--3 {
    left: 3%;
  }

  .butterfly--5 {
    right: 3%;
  }

  .butterfly--7 {
    left: 3%;
  }

  .butterfly--9 {
    right: 3%;
  }

  .butterfly--11 {
    left: 3%;
  }
}

/* =========================================================
   MENSAJE DE SARA — tarjeta como Fecha/Hora/Lugar
   ========================================================= */

.hero__message {
  position: relative;
  z-index: 30;

  width: min(100%, 400px);
  margin: 18px auto 0;
  padding: 22px 24px;

  text-align: center;

  background:
    linear-gradient(
      145deg,
      rgba(122, 73, 82, 0.94),
      rgba(83, 43, 51, 0.93)
    ) padding-box,
    linear-gradient(
      135deg,
      rgba(255, 231, 187, 0.95),
      rgba(217, 178, 106, 0.68),
      rgba(184, 101, 119, 0.65)
    ) border-box;

  border: 1px solid transparent;
  border-radius: 12px;

  box-shadow:
    0 12px 28px rgba(72, 35, 42, 0.3),
    inset 0 1px 0 rgba(255, 239, 223, 0.12);
}

.hero__message .hero__phrase {
  display: block;
  width: auto;
  max-width: 340px;
  margin: 0 auto;
  padding: 0;

  color: #f2c97d;
  background: transparent;
  border: 0;
  box-shadow: none;

  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.08rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0.01em;

  text-shadow:
    0 1px 3px rgba(55, 23, 29, 0.78);
}

.hero__message .hero__phrase + .hero__phrase {
  margin-top: 12px;
}

@media (max-width: 599px) {
  .hero__message {
    width: 88%;
    padding: 18px 16px;
  }

  .hero__message .hero__phrase {
    max-width: 100%;
    font-size: 1.03rem;
    line-height: 1.42;
  }
}
/* =========================================================
   CUENTA REGRESIVA
   ========================================================= */

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 14px;
  max-width: 360px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 74px;
  padding: 16px 8px;

  background:
    linear-gradient(145deg, rgba(122, 73, 82, 0.94), rgba(83, 43, 51, 0.93)) padding-box,
    linear-gradient(135deg, rgba(255, 231, 187, 0.95), rgba(217, 178, 106, 0.68), rgba(184, 101, 119, 0.65)) border-box;
  border: 1px solid transparent;
  border-radius: 10px;

  box-shadow:
    0 10px 24px rgba(72, 35, 42, 0.28),
    inset 0 1px 0 rgba(255, 239, 223, 0.12);
}

.countdown-number {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 30px;
  font-weight: 600;
  color: #fff5e8;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(55, 23, 29, 0.6);
}

.countdown-label {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #f2c97d;
}

.countdown-message {
  max-width: 300px;
  margin: 22px auto 0;
  color: #f1e8d9;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 15px;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 380px) {
  .countdown-item {
    width: 64px;
    padding: 12px 6px;
  }

  .countdown-number {
    font-size: 24px;
  }
}