:root {
  --cream: #fff7ed;
  --ink: #674a34;
  --rose: #b8666c;
  --rose-dark: #874750;
  --gold: #b68b49;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #eadbca; font-family: Georgia, 'Times New Roman', serif; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.story-hero {
  display: grid;
  grid-template-columns: minmax(340px, .9fr) minmax(0, 1fr);
  min-height: 92vh;
  align-items: center;
  gap: clamp(40px, 7vw, 100px);
  padding: clamp(55px, 8vw, 110px) clamp(22px, 8vw, 125px);
  background: linear-gradient(135deg, #fffaf2, #f6e5d8);
}
.image-panel { overflow: hidden; background: #f7eadc; }
.image-panel img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-art, .hero-copy, .story-art, .story-copy, .rsvp-intro, form { min-width: 0; }
.hero-art { width: 100%; aspect-ratio: 4 / 3; border: 1px solid rgba(182,139,73,.38); border-radius: 48% 48% 18px 18px; box-shadow: 0 28px 60px rgba(103,74,52,.22); }
.hero-copy h1 { margin: 14px 0 25px; font-size: clamp(3rem, 6vw, 6.4rem); font-weight: 400; line-height: .93; }
.hero-copy h1 span { display: block; margin-top: 14px; color: var(--rose); font-family: 'Segoe Script', 'Brush Script MT', cursive; transform: rotate(-2deg); }
.hero-copy > p:last-of-type { max-width: 660px; font-size: 1.18rem; line-height: 1.75; }
.hero-button { display: inline-flex; margin-top: 14px; padding: 17px 25px; border-radius: 999px; color: white; background: linear-gradient(135deg, #c57376, var(--rose-dark)); box-shadow: 0 13px 30px rgba(135,71,80,.3); font-weight: 800; }
.story-preview { padding: clamp(70px, 9vw, 130px) clamp(20px, 8vw, 125px); background: #fff9f0; }
.story-card { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(35px, 7vw, 100px); max-width: 1180px; margin: 0 auto 70px; }
.story-card.reverse .story-art { order: 2; }
.story-art { aspect-ratio: 3 / 2; min-height: 0; border-radius: 42px 42px 120px 42px; box-shadow: 0 20px 45px rgba(103,74,52,.16); }
.chapter { display: grid; width: 54px; height: 50px; place-items: center; margin-bottom: 13px; color: white; background: var(--rose); border-radius: 50% 50% 48% 48%; font-size: 1.35rem; font-weight: 800; }
.story-copy h2 { margin: 0 0 15px; color: var(--rose); font-size: clamp(2rem, 4vw, 3.8rem); font-weight: 400; line-height: 1.05; }
.story-copy p { max-width: 520px; font-size: 1.1rem; line-height: 1.7; }
.last-story { margin-bottom: 0; }

.event-section { padding: clamp(80px, 10vw, 145px) clamp(20px, 8vw, 125px); text-align: center; background: linear-gradient(180deg, #f3e6d7, #fff9f0); }
.event-section > h2 { margin: 13px 0 17px; font-size: clamp(2.4rem, 5vw, 4.8rem); font-weight: 400; line-height: 1; }
.event-lead { max-width: 660px; margin: 0 auto 42px; font-size: 1.08rem; line-height: 1.7; }
.event-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1160px; margin: auto; }
.event-grid article, .event-grid a { display: flex; min-height: 190px; flex-direction: column; align-items: center; justify-content: center; padding: 22px 16px; border: 1px solid rgba(182,139,73,.4); border-radius: 100px 100px 20px 20px; background: rgba(255,250,242,.88); box-shadow: 0 15px 34px rgba(103,74,52,.1); }
.event-grid span { color: var(--rose); font-size: 2.1rem; }
.event-grid small { margin: 12px 0 8px; color: var(--rose); font-size: 1.16rem; }
.event-grid strong { font-size: .98rem; }
.event-grid .location-card strong { max-width: 220px; line-height: 1.35; }
.event-grid a { color: white; border-color: transparent; background: linear-gradient(145deg, #c37678, var(--rose-dark)); }
.event-grid a span, .event-grid a small { color: white; }
.event-grid .location-link { transition: transform .2s ease, box-shadow .2s ease; }
.event-grid .location-link:hover { transform: translateY(-4px); box-shadow: 0 20px 42px rgba(103,48,58,.28); }
.event-grid .location-link em { margin-top: 10px; font-size: .78rem; font-style: normal; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

.gift-section {
  position: relative;
  display: flex;
  min-height: 600px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(78px, 11vw, 150px) 22px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.92) 0 2px, transparent 3px),
    radial-gradient(circle at 90% 70%, rgba(232,178,174,.2) 0 130px, transparent 131px),
    linear-gradient(135deg, #fffaf2, #f7e5d6);
  background-size: 75px 75px, auto, auto;
}

.gift-section::before, .gift-section::after {
  content: '❀';
  position: absolute;
  color: rgba(184,102,108,.18);
  font-size: clamp(6rem, 15vw, 13rem);
}
.gift-section::before { left: -2%; bottom: -4%; transform: rotate(-18deg); }
.gift-section::after { right: -1%; top: -4%; transform: rotate(20deg); }
.eyebrow { margin: 0 0 14px; color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.gift-icon { display: grid; width: 76px; height: 76px; place-items: center; margin-bottom: 18px; border: 1px solid rgba(182,139,73,.4); border-radius: 50%; background: rgba(255,255,255,.7); font-size: 2.2rem; box-shadow: 0 12px 30px rgba(103,74,52,.12); }
.gift-section h1, .rsvp-section h2 { margin: 0 0 20px; font-size: clamp(2.65rem, 6vw, 5rem); font-weight: 400; line-height: 1; }
.section-copy { max-width: 680px; margin-bottom: 30px; font-size: clamp(1rem, 1.8vw, 1.24rem); line-height: 1.75; }
.gift-button { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 10px; padding: 18px 30px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; color: white; background: linear-gradient(135deg, #d17e80, var(--rose-dark)); box-shadow: 0 14px 34px rgba(135,71,80,.38), inset 0 1px rgba(255,255,255,.3); font-size: 1.06rem; font-weight: 800; }
.gift-button.pending { opacity: .7; border-style: dashed; }
.gift-cta { animation: giftPulse 1.8s ease-in-out infinite; }
.gift-cta:hover { animation-play-state: paused; transform: translateY(-3px) scale(1.03); }

@keyframes giftPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 14px 34px rgba(135,71,80,.34), 0 0 0 0 rgba(184,102,108,.35); }
  50% { transform: scale(1.045); box-shadow: 0 18px 42px rgba(135,71,80,.45), 0 0 0 13px rgba(184,102,108,0); }
}

.rsvp-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(45px, 9vw, 130px);
  padding: clamp(90px, 11vw, 160px) clamp(22px, 10vw, 160px);
  color: white;
  background: #9c5d68;
}
.rsvp-section::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url('images/patron-tazas-teteras-v3.png') center / 390px auto repeat;
  opacity: .05;
}
.rsvp-section > * { position: relative; z-index: 1; }
.rsvp-intro { max-width: 630px; }
.eyebrow.light { color: #f5d8b6; }
.heart { display: block; margin: 18px 0 8px; font-size: 3.3rem; }
.rsvp-intro > p:last-child { color: rgba(255,255,255,.82); font-size: 1.1rem; line-height: 1.7; }

form { display: grid; gap: 18px; padding: clamp(24px, 4vw, 42px); border-radius: 28px; color: var(--ink); background: var(--cream); box-shadow: 0 28px 70px rgba(70,35,40,.3); }
label { display: grid; gap: 8px; font-weight: 700; }
input, select { width: 100%; padding: 14px 15px; border: 1px solid #d9bfaa; border-radius: 10px; color: var(--ink); background: white; outline: none; }
input:focus, select:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(184,102,108,.16); }
button {
  width: 100%; padding: 18px; border: 0; border-radius: 999px; color: white; cursor: pointer;
  background: linear-gradient(135deg, #c57376, var(--rose-dark));
  box-shadow: 0 13px 30px rgba(135,71,80,.32); font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease;
}
button:hover { transform: translateY(-2px); box-shadow: 0 17px 34px rgba(135,71,80,.4); }
form small { color: #8b7160; text-align: center; }
.success { margin: 0; color: #527257; text-align: center; font-weight: 700; }
[hidden] { display: none !important; }

footer { padding: 52px 22px 100px; color: var(--rose-dark); background: var(--cream); text-align: center; font-size: 1.08rem; font-style: italic; }
.floating-confirm {
  position: fixed; z-index: 20; right: 22px; bottom: 22px;
  display: flex; align-items: center; gap: 9px; padding: 15px 22px;
  border: 1px solid rgba(255,255,255,.55); border-radius: 999px;
  color: white; background: linear-gradient(135deg, #c57376, var(--rose-dark));
  box-shadow: 0 14px 34px rgba(91,45,51,.38); font-weight: 800;
}

@media (min-width: 1200px) {
  .invitation { max-width: 1200px; margin-inline: auto; box-shadow: 0 0 70px rgba(94,67,46,.25); }
}

@media (max-width: 980px) {
  .story-hero { grid-template-columns: 1fr; min-height: auto; padding-top: 30px; text-align: center; }
  .hero-art { width: min(100%, 820px); min-height: 0; margin-inline: auto; order: 2; }
  .hero-copy { max-width: 760px; margin-inline: auto; }
  .story-card { grid-template-columns: 1fr; text-align: center; }
  .story-card.reverse .story-art { order: 0; }
  .story-art { width: min(100%, 820px); min-height: 0; margin-inline: auto; }
  .story-copy { max-width: 680px; margin-inline: auto; }
  .chapter { margin-inline: auto; }
  .event-grid { grid-template-columns: repeat(2, 1fr); }
  .rsvp-section { grid-template-columns: 1fr; text-align: center; }
  .rsvp-intro { margin: auto; }
}

@media (max-width: 560px) {
  .story-preview { padding-inline: 16px; }
  .story-card { gap: 24px; margin-bottom: 75px; }
  .story-art { min-height: 0; border-radius: 30px 30px 80px 30px; }
  .event-section { padding-inline: 14px; }
  .event-grid { gap: 9px; }
  .event-grid article, .event-grid a { min-height: 155px; padding: 17px 8px; }
  .event-grid small { font-size: 1rem; }
  .event-grid strong { font-size: .83rem; }
  .gift-section { min-height: 520px; }
  .rsvp-section { padding-inline: 18px; }
  form { padding: 22px 17px; text-align: left; }
  .floating-confirm { left: 18px; right: 18px; bottom: 15px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .gift-cta { animation: none !important; }
}
