:root {
  --pink: #f8b4c8;
  --rose: #e85f8f;
  --deep: #5a2434;
  --cream: #fff4e9;
  --choco: #4a2418;
  --gold: #f4c76b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  color: var(--deep);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.9), transparent 28%),
    linear-gradient(135deg, #ffe3ee 0%, #fff4e9 45%, #ffd1df 100%);
  overflow-x: hidden;
}

.page {
  width: min(1120px, 94vw);
  margin: 0 auto;
  padding: 38px 0 70px;
}

.hero {
  text-align: center;
  padding: 24px 12px 30px;
}

.eyebrow {
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 600;
  color: var(--rose);
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 5.4rem);
  line-height: .95;
  text-shadow: 0 12px 35px rgba(232,95,143,.23);
}

.intro {
  max-width: 690px;
  margin: 20px auto 0;
  font-size: 1.05rem;
  line-height: 1.7;
}

.open-button {
  margin-top: 26px;
  border: 0;
  border-radius: 999px;
  padding: 15px 30px;
  background: linear-gradient(135deg, var(--rose), #c93872);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 18px 35px rgba(201,56,114,.3);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}

.open-button:hover { transform: translateY(-3px) scale(1.03); }

.gift-area {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 590px;
  perspective: 1100px;
}

.box-lid {
  position: absolute;
  z-index: 5;
  width: min(740px, 92vw);
  height: 460px;
  border-radius: 42px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.28), transparent 35%),
    linear-gradient(145deg, #ff8db0, #e23677);
  box-shadow: 0 35px 80px rgba(104, 30, 57, .3);
  display: grid;
  place-items: center;
  transform-origin: top;
  transition: transform 1s cubic-bezier(.2,.8,.2,1), opacity .6s ease;
  overflow: hidden;
}

.box-lid.open {
  transform: rotateX(76deg) translateY(-80px);
  opacity: .08;
  pointer-events: none;
}

.box-lid span {
  position: relative;
  z-index: 2;
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 6vw, 5rem);
  text-shadow: 0 10px 20px rgba(0,0,0,.15);
}

.ribbon-vertical, .ribbon-horizontal {
  position: absolute;
  background: linear-gradient(90deg, #f7d37d, #fff0b8, #dba84e);
  box-shadow: inset 0 0 15px rgba(255,255,255,.45);
}

.ribbon-vertical { width: 104px; height: 100%; }
.ribbon-horizontal { height: 104px; width: 100%; }

.chocolate-box {
  width: min(760px, 94vw);
  min-height: 510px;
  padding: 32px;
  border-radius: 46px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.45), rgba(255,245,235,.95)),
    #fff2e8;
  border: 16px solid #d85b83;
  box-shadow: 0 35px 90px rgba(104,30,57,.25), inset 0 0 0 8px #ffd4df;
  opacity: 0;
  transform: translateY(20px) scale(.96);
  transition: opacity .7s ease .25s, transform .7s ease .25s;
}

.chocolate-box.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.box-header { text-align: center; margin-bottom: 24px; }
.box-header h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
.box-header p { margin: 8px 0 0; color: #9c3a5f; }

.chocolates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.chocolate {
  position: relative;
  height: 138px;
  border: 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.35), transparent 18%),
    linear-gradient(145deg, #7a3d27, var(--choco));
  box-shadow: inset 0 -14px 28px rgba(0,0,0,.2), 0 14px 24px rgba(74,36,24,.22);
  color: #fff5d6;
  cursor: pointer;
  font-weight: 800;
  font-size: 2.1rem;
  transition: transform .25s ease, box-shadow .25s ease;
}

.chocolate:nth-child(2n) { border-radius: 50%; }
.chocolate:nth-child(3n) { border-radius: 38px 38px 22px 22px; }

.chocolate::after {
  content: attr(data-word);
  position: absolute;
  inset: auto 12px 13px;
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,245,214,.9);
}

.chocolate:hover {
  transform: translateY(-9px) rotate(-2deg) scale(1.04);
  box-shadow: inset 0 -14px 28px rgba(0,0,0,.2), 0 23px 34px rgba(74,36,24,.28);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(58, 18, 35, .58);
  backdrop-filter: blur(8px);
}

.modal.show { display: grid; animation: fadeIn .25s ease both; }

.modal-card {
  position: relative;
  width: min(920px, 96vw);
  max-height: 92vh;
  overflow: auto;
  border-radius: 34px;
  background: #fff9f4;
  box-shadow: 0 35px 90px rgba(35,10,22,.42);
  display: grid;
  grid-template-columns: 1fr 1fr;
  animation: pop .35s ease both;
}

.modal-card img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.letter {
  padding: clamp(28px, 5vw, 54px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.letter-label {
  color: var(--rose);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.letter h3 {
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1;
}

.letter p:last-child {
  font-size: 1.05rem;
  line-height: 1.78;
}

.close {
  position: absolute;
  right: 16px;
  top: 14px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: var(--deep);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.petals span {
  position: fixed;
  top: -40px;
  z-index: 0;
  font-size: 1.4rem;
  animation: fall linear infinite;
  opacity: .58;
  pointer-events: none;
}

@keyframes fall {
  to { transform: translateY(110vh) rotate(360deg); }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: translateY(20px) scale(.96); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

@media (max-width: 760px) {
  .page { padding-top: 22px; }
  .gift-area { min-height: 540px; }
  .box-lid { height: 390px; border-radius: 32px; }
  .chocolate-box { padding: 22px; border-width: 10px; min-height: 430px; }
  .chocolates { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .chocolate { height: 112px; font-size: 1.7rem; }
  .modal-card { grid-template-columns: 1fr; }
  .modal-card img { min-height: 300px; max-height: 420px; }
}


/* Ajuste móvil: centrado y sin desbordamiento horizontal */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin-left: 0;
  margin-right: 0;
}

* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
}

@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .container,
  main,
  section,
  .hero,
  .box-stage,
  .chocolate-box,
  .modal-card {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}
