:root {
  --pink-50: #fbfdf4;
  --pink-100: #f1f6dd;
  --pink-200: #e3edbd;
  --pink-300: #d0df92;
  --pink-400: #b9cc68;
  --pink-500: #9caf4f;
  --pink-600: #728535;

  --gold: #c49a52;
  --gold-light: #ead7ac;

  --cream: #fffef8;
  --text: #344022;
  --muted: #6f775c;
  --white: #ffffff;

  --serif: "DM Serif Display", Georgia, serif;
--script: "Great Vibes", cursive;
--sans: "Montserrat", Arial, sans-serif;

  --shadow-soft: 0 18px 50px rgba(74, 91, 37, 0.16);
  --shadow-card: 0 14px 38px rgba(83, 101, 42, 0.13);
}
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--cream);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  width: 100%;
}

[hidden] {
  display: none !important;
}


/* =========================
   BOTONES
========================= */

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 28px;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--pink-500), var(--pink-600));
  color: var(--white);
  box-shadow: 0 13px 30px rgba(114, 133, 53, 0.32);
}

.secondary-button {
  border: 1px solid rgba(114, 133, 53, 0.30);
  background: rgba(255, 255, 255, 0.82);
  color: var(--pink-600);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.primary-button:active,
.secondary-button:active {
  transform: scale(0.98);
}


/* =========================
   BIENVENIDA
========================= */

.welcome-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 24px;
}

.welcome-background {
  position: absolute;
  inset: -28px;
  background:
    url("fotos/foto_15/sarai-verde.webp")
    center 30% / cover no-repeat;
  filter: blur(8px);
  transform: scale(1.06);
}

.welcome-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(35, 48, 22, 0.28),
      rgba(86, 105, 45, 0.58)
    );
}

.welcome-content {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  text-align: center;
  color: var(--white);
  animation: welcomeIn 900ms ease both;
}

.welcome-eyebrow {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.welcome-name {
  margin: 0;
  font-family: var(--script);
  font-size: clamp(4rem, 17vw, 7rem);
  font-weight: 400;
  line-height: 0.9;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.25);
}

.welcome-event {
  margin: 14px 0 22px;
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.welcome-date {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 13px;
  margin: 0 auto 30px;
  padding: 10px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
}

.welcome-date span {
  font-family: var(--serif);
  font-size: 2.2rem;
}

.welcome-date small {
  max-width: 100px;
  text-align: left;
  font-size: 0.72rem;
  line-height: 1.45;
  text-transform: uppercase;
}

.welcome-hint {
  margin: 18px 0 0;
  font-size: 0.68rem;
  opacity: 0.82;
}


/* =========================
   SOBRE
========================= */

.envelope-screen {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 30px 20px;
  background:
    radial-gradient(circle at top, #fff9fb 0%, #f7dce6 55%, #e9b6c8 100%);
}

.envelope-intro {
  position: relative;
  z-index: 2;
  width: min(100%, 500px);
  text-align: center;
}

.envelope-caption {
  margin: 0 0 30px;
  color: var(--pink-600);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.envelope-button {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.envelope {
  position: relative;
  display: block;
  width: min(82vw, 390px);
  aspect-ratio: 1.45;
  margin: 0 auto;
  filter: drop-shadow(0 22px 28px rgba(112, 54, 76, 0.23));
  perspective: 1000px;
}

.envelope-back {
  position: absolute;
  inset: 0;
  border-radius: 13px;
  background: #cfdd93;
}

.envelope-letter {
  position: absolute;
  z-index: 2;
  top: 9%;
  left: 8%;
  display: flex;
  width: 84%;
  height: 75%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background:
    linear-gradient(145deg, #fffdf9, #fff5f8);
  box-shadow: 0 8px 20px rgba(77, 39, 53, 0.12);
  transition:
    transform 1.1s cubic-bezier(0.2, 0.78, 0.25, 1),
    opacity 700ms ease;
}

.letter-crown {
  color: var(--gold);
  font-size: 2rem;
}

.letter-name {
  color: var(--pink-600);
  font-family: var(--script);
  font-size: 3rem;
}

.envelope-left,
.envelope-right,
.envelope-bottom {
  position: absolute;
  z-index: 4;
  inset: 0;
  border-radius: 13px;
}

.envelope-left {
  background:
    linear-gradient(
      34deg,
      #aabd64 0 49%,
      transparent 50%
    );
}

.envelope-right {
  background:
    linear-gradient(
      -34deg,
      #b7ca75 0 49%,
      transparent 50%
    );
}

.envelope-bottom {
  background:
    linear-gradient(
      to top,
      #91a84c 0 49%,
      transparent 50%
    );
}

.envelope-flap {
  position: absolute;
  z-index: 6;
  inset: 0;
  border-radius: 13px;
  background:
    linear-gradient(
      to bottom,
      #c8d98a 0 49%,
      transparent 50%
    );
  transform-origin: top;
  transition:
    transform 900ms cubic-bezier(0.2, 0.75, 0.22, 1),
    z-index 0ms linear 450ms;
}

.envelope-seal {
  position: absolute;
  z-index: 7;
  top: 48%;
  left: 50%;
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 4px double rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: var(--gold);
  color: var(--white);
  font-family: var(--serif);
  font-size: 1.25rem;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 14px rgba(95, 61, 19, 0.24);
  transition:
    opacity 300ms ease,
    transform 300ms ease;
}

.envelope-button.opening .envelope-flap {
  z-index: 1;
  transform: rotateX(180deg);
}

.envelope-button.opening .envelope-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
}

.envelope-button.opening .envelope-letter {
  transform: translateY(-60%);
}

.tap-envelope {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.floating-petals span {
  position: absolute;
  top: -40px;
  width: 14px;
  height: 22px;
  border-radius: 70% 0 70% 0;
  background: rgba(150, 174, 76, 0.45);
  animation: petalFall 9s linear infinite;
}

.floating-petals span:nth-child(1) {
  left: 8%;
  animation-delay: -2s;
}

.floating-petals span:nth-child(2) {
  left: 20%;
  animation-delay: -7s;
  animation-duration: 11s;
}

.floating-petals span:nth-child(3) {
  left: 35%;
  animation-delay: -4s;
}

.floating-petals span:nth-child(4) {
  left: 49%;
  animation-delay: -8s;
  animation-duration: 12s;
}

.floating-petals span:nth-child(5) {
  left: 63%;
  animation-delay: -1s;
}

.floating-petals span:nth-child(6) {
  left: 76%;
  animation-delay: -6s;
  animation-duration: 10s;
}

.floating-petals span:nth-child(7) {
  left: 88%;
  animation-delay: -3s;
}

.floating-petals span:nth-child(8) {
  left: 95%;
  animation-delay: -9s;
  animation-duration: 13s;
}


/* =========================
   INVITACIÓN
========================= */

.invitation {
  background:
    linear-gradient(
      180deg,
      var(--cream),
      var(--pink-50)
    );
}

.section {
  position: relative;
  padding: 85px 22px;
}

.section-heading {
  max-width: 620px;
  margin: 0 auto 38px;
  text-align: center;
}

.section-kicker {
  margin: 0 0 7px;
  color: var(--pink-500);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-heading h2,
.story-copy h2,
.dress-card h2,
.rsvp-card h2 {
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(2rem, 9vw, 3.5rem);
  font-weight: 400;
  line-height: 1.05;
}


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

.hero-section {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 60px 22px;
}

.hero-image {
  position: absolute;
  inset: 0;
  background:
    url("fotos/foto_15/9.2.webp")
    center 24% / cover no-repeat;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(35, 49, 21, 0.16),
      rgba(59, 76, 31, 0.64)
    );
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, 600px);
  color: var(--white);
  text-align: center;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.28);
}

.hero-small {
  margin: 0 0 18px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-name {
  margin: 0;
  font-family: var(--script);
  font-size: clamp(4.5rem, 20vw, 8rem);
  font-weight: 400;
  line-height: 0.85;
}

.hero-title {
  margin: 24px 0 16px;
  font-family: var(--serif);
  font-size: 1.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-divider {
  display: flex;
  max-width: 260px;
  align-items: center;
  gap: 15px;
  margin: 0 auto 18px;
}

.hero-divider span {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.68);
}

.hero-divider b {
  color: var(--gold-light);
  font-size: 1.25rem;
}

.hero-date {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.28em;
}

.scroll-indicator {
  position: absolute;
  z-index: 3;
  bottom: 25px;
  left: 50%;
  display: grid;
  width: 34px;
  height: 52px;
  place-items: start center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  transform: translateX(-50%);
}

.scroll-indicator span {
  width: 5px;
  height: 5px;
  margin-top: 10px;
  border-radius: 50%;
  background: var(--white);
  animation: scrollDot 1.8s ease infinite;
}


/* =========================
   CUENTA REGRESIVA
========================= */

.countdown-section {
  overflow: hidden;
  background:
    radial-gradient(circle at top left, #fff 0%, transparent 38%),
    var(--pink-100);
}

.countdown {
  display: grid;
  max-width: 700px;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 auto;
}

.countdown-item {
  min-width: 0;
  padding: 21px 6px;
  border: 1px solid rgba(156, 175, 79, 0.18);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
}

.countdown-item strong {
  display: block;
  color: var(--pink-600);
  font-family: var(--serif);
  font-size: clamp(1.7rem, 8vw, 3.2rem);
  font-weight: 400;
}

.countdown-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: clamp(0.52rem, 2.7vw, 0.72rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}


/* =========================
   HISTORIA
========================= */

.story-section {
  display: grid;
  max-width: 1050px;
  align-items: center;
  gap: 42px;
  margin: 0 auto;
}

.story-photo {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
  padding: 13px;
  border-radius: 210px 210px 22px 22px;
  background:
    linear-gradient(
      145deg,
      var(--gold-light),
      #fff5dc,
      var(--pink-200)
    );
  box-shadow: var(--shadow-soft);
}

.story-photo::before,
.story-photo::after {
  position: absolute;
  content: "✦";
  color: var(--gold);
  font-size: 1.5rem;
}

.story-photo::before {
  top: 8%;
  left: -12px;
}

.story-photo::after {
  right: -12px;
  bottom: 12%;
}

.story-photo img {
  aspect-ratio: 3 / 4;
  border-radius: 200px 200px 15px 15px;
  object-fit: cover;
  object-position: center;
}

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

.story-copy p:not(.section-kicker):not(.story-signature) {
  margin: 20px 0 0;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.8;
}

.story-signature {
  margin: 26px 0 0;
  color: var(--pink-600);
  font-family: var(--script);
  font-size: 3.2rem;
}


/* =========================
   EVENTO
========================= */

.event-section {
  background:
    linear-gradient(
      180deg,
      var(--pink-50),
      var(--pink-100)
    );
}

.event-card {
  max-width: 650px;
  margin: 0 auto;
  padding: 38px 22px;
  border: 1px solid rgba(196, 154, 82, 0.26);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.event-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  margin: 0 auto 20px;
  border: 1px solid var(--gold-light);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.75rem;
}

.event-card h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
}

.event-date-text,
.event-time,
.event-place,
.event-address {
  margin: 8px 0;
}

.event-date-text {
  color: var(--pink-600);
  font-weight: 700;
}

.event-time {
  font-family: var(--serif);
  font-size: 2.3rem;
}

.event-place {
  font-weight: 700;
}

.event-address {
  color: var(--muted);
  line-height: 1.55;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 11px;
  margin-top: 28px;
}


/* =========================
   VESTIMENTA
========================= */

.dress-section {
  background:
    linear-gradient(
      140deg,
      #fffdfa,
      #f4f7e8
    );
}

.dress-card {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}

.dress-icon {
  display: block;
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 2.2rem;
}

.dress-card > p:not(.section-kicker) {
  max-width: 450px;
  margin: 20px auto;
  color: var(--muted);
  line-height: 1.7;
}

.reserved-color {
  display: flex;
  max-width: 470px;
  align-items: center;
  gap: 15px;
  margin: 28px auto 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--pink-100);
  text-align: left;
}

.reserved-color span {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: #b7c96f;
  box-shadow: 0 4px 12px rgba(135, 63, 88, 0.18);
}

.reserved-color p {
  margin: 0;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.55;
}


/* =========================
   ITINERARIO
========================= */

.schedule-section {
  background: var(--pink-100);
}

.schedule {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}

.schedule::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 79px;
  width: 1px;
  background: rgba(156, 175, 79, 0.35);
  content: "";
}

.schedule-item {
  position: relative;
  display: grid;
  grid-template-columns: 58px 20px 1fr;
  gap: 12px;
  align-items: start;
  padding: 18px 0;
}

.schedule-item time {
  padding-top: 2px;
  color: var(--pink-600);
  font-family: var(--serif);
  font-size: 1.05rem;
  text-align: right;
}

.schedule-dot {
  position: relative;
  z-index: 2;
  width: 13px;
  height: 13px;
  margin: 5px auto 0;
  border: 3px solid var(--pink-100);
  border-radius: 50%;
  background: var(--pink-500);
  box-shadow: 0 0 0 1px var(--pink-400);
}

.schedule-item div {
  padding: 0 0 0 7px;
}

.schedule-item h3 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
}

.schedule-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}


/* =========================
   GALERÍA
========================= */

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

.gallery {
  display: grid;
  max-width: 920px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0 auto;
}

.gallery-item {
  overflow: hidden;
  margin: 0;
  border-radius: 15px;
  background: var(--pink-100);
}

.gallery-item img {
  height: 100%;
  aspect-ratio: 1 / 1.25;
  object-fit: cover;
  transition: transform 500ms ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-large,
.gallery-wide {
  grid-column: 1 / -1;
}

.gallery-large img {
  max-height: 620px;
  aspect-ratio: 4 / 5;
  object-position: center 25%;
}

.gallery-wide img {
  max-height: 520px;
  aspect-ratio: 16 / 10;
}


/* =========================
   CONFIRMACIÓN
========================= */

.rsvp-section {
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.85), transparent 45%),
    linear-gradient(145deg, var(--pink-300), var(--pink-500));
}

.rsvp-card {
  max-width: 650px;
  margin: 0 auto;
  padding: 42px 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  text-align: center;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.rsvp-card > p:not(.section-kicker) {
  max-width: 490px;
  margin: 20px auto 27px;
  color: var(--muted);
  line-height: 1.7;
}

.whatsapp-button {
  width: min(100%, 340px);
}

.rsvp-card small {
  display: block;
  margin-top: 20px;
  color: var(--muted);
  line-height: 1.5;
}


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

.invitation-footer {
  padding: 75px 20px 90px;
  background: #354020;
  color: var(--white);
  text-align: center;
}

.invitation-footer p {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.invitation-footer h2 {
  margin: 12px 0 15px;
  color: var(--pink-200);
  font-family: var(--script);
  font-size: clamp(3.5rem, 15vw, 6rem);
  font-weight: 400;
  line-height: 1;
}

.invitation-footer span {
  font-size: 0.72rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}


/* =========================
   MÚSICA
========================= */

.music-control {
  position: fixed;
  z-index: 120;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(114, 133, 53, 0.90);
  color: var(--white);
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 9px 26px rgba(63, 78, 31, 0.30);
  backdrop-filter: blur(10px);
}


/* =========================
   REVEAL
========================= */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 850ms ease,
    transform 850ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* =========================
   ANIMACIONES
========================= */

@keyframes welcomeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes petalFall {
  from {
    transform: translateY(-80px) rotate(0deg);
  }

  to {
    transform: translateY(115vh) rotate(540deg);
  }
}

@keyframes scrollDot {
  0% {
    opacity: 0;
    transform: translateY(0);
  }

  35% {
    opacity: 1;
  }

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


/* =========================
   TABLET Y PC
========================= */

@media (min-width: 760px) {
  .section {
    padding: 110px 40px;
  }

  .story-section {
    grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
  }

  .story-copy {
    text-align: left;
  }

  .story-signature {
    text-align: right;
  }

  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
  }

  .gallery-large {
    grid-column: span 2;
    grid-row: span 2;
  }

  .gallery-large img {
    aspect-ratio: auto;
  }

  .gallery-wide {
    grid-column: span 2;
  }
}


/* =========================
   ACCESIBILIDAD
========================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* AJUSTES DE LEGIBILIDAD DEL NOMBRE */
.welcome-name,
.letter-name,
.hero-name,
.story-signature,
.invitation-footer h2 {
  font-family: var(--script);
  font-style: normal;
  font-weight: 400;
}

.hero-name {
  font-size: clamp(4rem, 17vw, 7.4rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
}

.story-signature {
  font-size: clamp(2.4rem, 7vw, 3.3rem);
  line-height: 1.15;
}

/* FOTO COMPLETA SIN RECORTAR EL CABELLO */
.story-photo img {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  border-radius: 200px 200px 15px 15px;
  object-fit: contain;
  object-position: center top;
  background: #fffef8;
}
