:root {
  color-scheme: light;
  --gold: #c79a31;
  --gold-soft: #f3dd9b;
  --violet-deep: #1a0d21;
  --violet: #38153f;
  --violet-soft: #5d2d71;
  --paper: rgba(244, 223, 191, 0.92);
  --paper-edge: rgba(166, 112, 38, 0.24);
  --ink: #291624;
  --text: #321c2a;
  --shadow: 0 30px 82px rgba(11, 3, 16, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Alegreya", serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(26, 13, 33, 0.78), rgba(43, 17, 47, 0.58)),
    url("imagen-principal.png") center center / cover no-repeat,
    radial-gradient(circle at 50% 8%, rgba(255, 224, 137, 0.1), transparent 20%),
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.03), transparent 16%),
    linear-gradient(180deg, #160b18 0%, #29102d 34%, #45214f 68%, #6a3b78 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 255, 255, 0.035), transparent 13%),
    radial-gradient(circle at 82% 24%, rgba(255, 218, 140, 0.05), transparent 10%),
    radial-gradient(circle at 24% 74%, rgba(255, 255, 255, 0.02), transparent 12%),
    radial-gradient(circle at 70% 68%, rgba(255, 228, 170, 0.03), transparent 14%);
}

body::after {
  background: radial-gradient(circle at 50% 0%, rgba(255, 220, 140, 0.06), transparent 22%);
  animation: shimmer 10s ease-in-out infinite alternate;
}

.page-shell {
  width: min(700px, calc(100% - 18px));
  margin: 16px auto 30px;
}

.invite-card {
  position: relative;
  padding: 18px 0 28px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(17, 8, 22, 0.42), rgba(17, 8, 22, 0.58));
  border: 1px solid rgba(255, 224, 140, 0.14);
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: #f6e7c4;
}

.invite-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 10, 28, 0.1), rgba(38, 16, 42, 0.24));
  pointer-events: none;
}

.invite-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 224, 137, 0.04), transparent 20%),
    linear-gradient(180deg, rgba(22, 10, 25, 0.04), rgba(31, 13, 35, 0.12) 36%, rgba(34, 14, 40, 0.04));
  pointer-events: none;
}

.invite-header,
.invite-content {
  position: relative;
  z-index: 1;
}

.invite-header {
  padding: 10px 8% 22px;
  text-align: center;
}

.invite-header h1,
.section-heading h3,
.cta-link,
.map-button,
.primary-btn,
.secondary-btn,
.feedback {
  font-family: "Cinzel Decorative", serif;
}

.invite-header,
.invite-content {
  backdrop-filter: blur(1px);
}

.invite-header h1 {
  margin: 6px 0 0;
  font-size: clamp(1.45rem, 2vw, 2.05rem);
  color: #fff3cf;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 0 rgba(18, 8, 20, 0.24);
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #f4dc9c;
  font: 600 0.74rem/1 "IM Fell English SC", serif;
  text-shadow: 0 1px 0 rgba(32, 13, 23, 0.22);
}

.invite-content {
  display: grid;
  gap: 8px;
  padding: 0 8.5% 0;
}

.js .hero,
.js .section-block,
.js .divider,
.js .invite-header,
.js .rsvp-card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.js .hero.reveal,
.js .section-block.reveal,
.js .divider.reveal,
.js .invite-header.reveal,
.js .rsvp-card.reveal {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  text-align: center;
  padding: 0 2% 12px;
  background: transparent;
  box-shadow: none;
}

.hero-kicker {
  margin-bottom: 10px;
  color: #fff4d0;
  text-shadow: 0 1px 0 rgba(35, 14, 23, 0.22), 0 0 12px rgba(255, 228, 160, 0.14);
}

.hero-name {
  margin: 0;
  font-size: clamp(3.25rem, 8vw, 6.9rem);
  line-height: 0.92;
  color: #f6d47c;
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  text-shadow:
    0 1px 0 rgba(255, 249, 222, 0.78),
    0 8px 18px rgba(22, 8, 20, 0.18),
    0 0 18px rgba(255, 208, 92, 0.12);
  animation: riseIn 900ms ease both;
}

.hero-copy {
  max-width: 92%;
  margin: 16px auto 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  color: #fff8ec;
  text-shadow: 0 1px 0 rgba(34, 14, 23, 0.24), 0 0 10px rgba(255, 225, 149, 0.06);
}

.details-stack {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.detail-row {
  padding: 11px 12px 9px;
  border-bottom: 1px solid rgba(206, 165, 82, 0.22);
  background: linear-gradient(90deg, rgba(255, 246, 222, 0.18), rgba(255, 246, 222, 0.03));
}

.detail-row span,
.section-block > p,
.section-heading p,
.list-card li,
.stack-form label,
.choice-group legend,
.choice-group label,
.bank-card p,
.feedback,
.rsvp-card .section-block > p,
.rsvp-card .stack-form label,
.rsvp-card .choice-group legend,
.rsvp-card .choice-group label,
.rsvp-card .feedback {
  font-size: 1.05rem;
  font-family: "Alegreya", serif;
}

.detail-row span {
  display: block;
  margin-bottom: 5px;
  color: #ffe6a9;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.detail-row strong {
  color: #fffdf1;
  font-size: 1.38rem;
  line-height: 1.04;
  text-shadow: 0 1px 0 rgba(32, 13, 23, 0.28);
}

.divider {
  position: relative;
  height: 34px;
  margin: 4px 0 2px;
}

.divider::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(260px, 100%);
  height: 1px;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, transparent, rgba(183, 128, 46, 0.72), transparent);
}

.divider::after {
  content: "✦";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  color: rgba(212, 169, 70, 0.94);
  text-shadow: 0 0 10px rgba(255, 233, 160, 0.34);
}

.section-block {
  padding: 0 0 2px;
  color: #f3e7df;
}

.section-heading {
  margin-bottom: 12px;
}

.section-toggle {
  display: none;
}

.section-heading h3 {
  margin: 7px 0 0;
  color: #fff2c9;
  font-size: clamp(1.6rem, 2.3vw, 2.2rem);
  text-shadow: 0 1px 0 rgba(25, 9, 20, 0.24);
}

.section-block > p {
  margin: 0;
  color: #fff2e8;
  text-shadow: 0 1px 0 rgba(26, 10, 21, 0.18);
}

.section-block + .divider {
  margin-top: 2px;
}

.section-content {
  display: grid;
  gap: 0;
}

.map-button,
.cta-link,
.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.map-button,
.cta-link,
.primary-btn,
.secondary-btn {
  margin-top: 14px;
  padding: 13px 18px;
  border-radius: 999px;
  color: #fff8e5;
  background: linear-gradient(135deg, #7f3a1b, #a64f17 56%, #d5942b);
  box-shadow: 0 14px 28px rgba(96, 44, 20, 0.24);
}

.secondary-btn {
  border: 1px solid rgba(224, 180, 81, 0.22);
}

.map-button:hover,
.cta-link:hover,
.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.list-card,
.suggestion-list {
  margin: 14px 0 0;
  padding-left: 20px;
}

.list-card li,
.suggestion-list li {
  margin-bottom: 10px;
}

.stack-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.stack-form label,
.choice-group {
  display: grid;
  gap: 8px;
  color: #f8f0e6;
}

.stack-form input,
.stack-form textarea,
.stack-form select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid rgba(115, 72, 25, 0.22);
  background: rgba(255, 251, 240, 0.9);
  color: #24131d;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.stack-form textarea {
  min-height: 120px;
  resize: none;
}

.stack-form input:focus,
.stack-form textarea:focus,
.stack-form select:focus {
  outline: 2px solid rgba(223, 150, 47, 0.54);
  border-color: rgba(184, 111, 35, 0.42);
}

.choice-group {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-group legend {
  padding: 0;
  width: 100%;
}

.choice-group label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(146, 92, 29, 0.22);
  background: linear-gradient(135deg, rgba(255, 252, 246, 0.96), rgba(242, 220, 178, 0.9));
  color: #3b231f;
  box-shadow:
    0 10px 18px rgba(96, 44, 20, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, background 160ms ease;
}

.choice-group input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-group label:has(input:checked) {
  color: #fff9ea;
  background: linear-gradient(135deg, #7f3a1b, #a64f17 56%, #d5942b);
  box-shadow: 0 14px 28px rgba(96, 44, 20, 0.24);
  transform: translateY(-1px);
}

.choice-group label:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.bank-card {
  margin-top: 14px;
  padding: 15px 17px;
  background: linear-gradient(180deg, rgba(255, 244, 216, 0.9), rgba(233, 196, 126, 0.82));
  border: 1px solid rgba(146, 92, 29, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
  color: #2b1720;
}

.rsvp-card {
  margin-top: 14px;
  padding: 24px 18px 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 247, 229, 0.44), transparent 24%),
    radial-gradient(circle at 14% 12%, rgba(255, 255, 255, 0.36), transparent 16%),
    radial-gradient(circle at 86% 24%, rgba(255, 219, 158, 0.24), transparent 12%),
    linear-gradient(180deg, rgba(245, 229, 204, 0.99), rgba(226, 196, 142, 0.96));
  border: 1px solid rgba(176, 119, 40, 0.16);
  border-radius: 24px 18px 28px 20px;
  box-shadow:
    0 22px 48px rgba(14, 5, 12, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 18px 24px rgba(255, 255, 255, 0.1),
    inset 0 -18px 24px rgba(109, 67, 18, 0.08),
    0 0 0 1px rgba(124, 76, 22, 0.08);
  color: #2a1620;
  position: relative;
  overflow: hidden;
  clip-path: none;
}

.rsvp-card > .section-heading {
  position: relative;
  padding-top: 14px;
  margin-bottom: 16px;
}

.rsvp-card > .section-heading::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(220px, 70%);
  height: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(123, 76, 20, 0.52), transparent);
}

.rsvp-card > .section-heading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  width: min(240px, 72%);
  height: 8px;
  transform: translateX(-50%);
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(140, 90, 28, 0.55), rgba(232, 196, 112, 0.88), rgba(140, 90, 28, 0.55), transparent);
  box-shadow: 0 0 14px rgba(255, 229, 170, 0.18);
}

.rsvp-card > .section-heading .eyebrow {
  position: relative;
  z-index: 1;
}

.rsvp-card::before {
  content: "";
  display: block;
  height: 1px;
  margin: 0 9% 16px;
  background: linear-gradient(90deg, transparent, rgba(123, 76, 20, 0.42), transparent);
}

.rsvp-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 30px 20px 28px 16px;
  border: 1px solid rgba(120, 73, 20, 0.12);
  background:
    linear-gradient(180deg, transparent 0 54%, rgba(255, 255, 255, 0.05) 100%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.14), transparent 24%);
  pointer-events: none;
}

.rsvp-card .section-heading h3 {
  color: #5e3314;
  text-shadow: 0 1px 0 rgba(255, 247, 229, 0.42), 0 6px 16px rgba(95, 46, 18, 0.12);
}

.rsvp-card .section-block > p,
.rsvp-card .stack-form label,
.rsvp-card .choice-group legend,
.rsvp-card .choice-group label,
.rsvp-card .feedback {
  color: #3a221f;
}

.rsvp-card .section-heading p {
  color: #9a6421;
}

.rsvp-card .stack-form input,
.rsvp-card .stack-form textarea,
.rsvp-card .stack-form select {
  background: rgba(255, 252, 244, 0.96);
  border-color: rgba(150, 94, 28, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 8px 18px rgba(96, 44, 20, 0.06);
}

.rsvp-card .primary-btn {
  box-shadow: 0 16px 30px rgba(96, 44, 20, 0.24);
}

.hidden {
  display: none;
}

.feedback {
  margin-top: 12px;
  color: #f4ddaf;
  min-height: 1.5em;
}

@keyframes shimmer {
  from { opacity: 0.26; }
  to { opacity: 0.54; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(700px, calc(100% - 12px));
    margin-top: 10px;
  }

  .invite-card {
    border-radius: 14px;
  }

  .invite-content {
    padding: 0 6.5% 0;
  }

  .invite-header {
    padding: 8px 5% 18px;
  }

  .hero-name {
    font-size: clamp(2.9rem, 18vw, 5rem);
  }

  .hero-copy,
  .section-block > p,
  .detail-row span,
  .detail-row strong,
  .stack-form label,
  .choice-group legend,
  .choice-group label,
  .feedback,
  .list-card li,
  .suggestion-list li,
  .bank-card p {
    font-size: 0.98rem;
  }

  .map-button,
  .cta-link,
  .primary-btn,
  .secondary-btn {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
  }

  .choice-group label {
    min-height: 46px;
  }

  .stack-form input,
  .stack-form textarea,
  .stack-form select {
    font-size: 16px;
  }
}

@media (max-width: 560px) {
  body {
    background:
      linear-gradient(180deg, rgba(26, 13, 33, 0.66), rgba(43, 17, 47, 0.44)),
      url("imagen-principal.png") 58% 14% / 140% auto no-repeat,
      radial-gradient(circle at 50% 8%, rgba(255, 224, 137, 0.12), transparent 20%),
      radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.04), transparent 16%),
      linear-gradient(180deg, #160b18 0%, #29102d 34%, #45214f 68%, #6a3b78 100%);
  }

  body::before {
    background:
      radial-gradient(circle at 14% 12%, rgba(255, 255, 255, 0.045), transparent 13%),
      radial-gradient(circle at 82% 24%, rgba(255, 218, 140, 0.065), transparent 10%),
      radial-gradient(circle at 24% 74%, rgba(255, 255, 255, 0.025), transparent 12%),
      radial-gradient(circle at 70% 68%, rgba(255, 228, 170, 0.04), transparent 14%);
  }

  .page-shell {
    width: calc(100% - 18px);
    margin: 6px auto 18px;
  }

  .invite-card {
    border-radius: 12px;
    padding: 14px 0 18px;
    background: linear-gradient(180deg, rgba(17, 8, 22, 0.36), rgba(17, 8, 22, 0.5));
  }

  .invite-header {
    padding: 8px 5.5% 14px;
  }

  .invite-header h1 {
    font-size: clamp(1.18rem, 5.1vw, 1.45rem);
  }

  .eyebrow {
    letter-spacing: 0.2em;
    font-size: 0.66rem;
  }

  .invite-content {
    padding: 0 5.5% 0;
    gap: 6px;
  }

  .section-block.is-collapsible {
    border: 1px solid rgba(224, 180, 81, 0.12);
    border-radius: 12px;
    padding: 8px 10px 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  }

  .section-block.is-collapsible .section-heading {
    margin-bottom: 0;
  }

  .section-block.is-collapsible .section-heading h3 {
    display: none;
  }

  .section-block.is-collapsible .section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(214, 162, 65, 0.18);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 247, 227, 0.14), rgba(248, 214, 143, 0.08));
    color: #ffefcb;
    font-family: "Cinzel Decorative", serif;
    font-size: 0.97rem;
    text-align: left;
  }

  .section-block.is-collapsible .section-toggle::after {
    content: "▾";
    font-size: 0.95rem;
    opacity: 0.9;
    transition: transform 180ms ease;
  }

  .section-block.is-collapsible.is-collapsed .section-toggle::after {
    transform: rotate(-90deg);
  }

  .section-block.is-collapsible .section-content {
    max-height: 900px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 220ms ease, opacity 200ms ease, margin-top 200ms ease;
    margin-top: 10px;
  }

  .section-block.is-collapsible.is-collapsed .section-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
  }

  .hero {
    padding-bottom: 8px;
  }

  .hero-name {
    font-size: clamp(2.45rem, 16vw, 3.8rem);
    line-height: 0.95;
  }

  .hero-copy {
    max-width: 100%;
    margin-top: 12px;
    font-size: 1rem;
  }

  .details-stack {
    gap: 8px;
    margin-top: 14px;
  }

  .detail-row {
    padding: 10px 10px 8px;
  }

  .detail-row strong {
    font-size: 1.12rem;
    line-height: 1.14;
  }

  .section-heading {
    margin-bottom: 9px;
  }

  .section-heading h3 {
    font-size: clamp(1.22rem, 6.2vw, 1.58rem);
  }

  .divider {
    height: 24px;
    margin: 2px 0;
  }

  .section-block.is-collapsible + .divider {
    display: none;
  }

  .stack-form {
    gap: 11px;
    margin-top: 12px;
  }

  .stack-form input,
  .stack-form textarea,
  .stack-form select {
    padding: 12px 13px;
  }

  .choice-group {
    gap: 8px;
  }

  .choice-group label {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    min-width: 0;
    padding: 11px 12px;
  }

  .rsvp-card {
    margin-top: 10px;
    padding: 16px 12px 12px;
    border-radius: 16px;
  }

  .rsvp-card::after {
    inset: 7px;
    border-radius: 14px;
  }
}

@media (max-width: 400px) {
  .page-shell {
    width: calc(100% - 14px);
  }

  .hero-name {
    font-size: clamp(2.1rem, 15vw, 3.2rem);
  }

  .detail-row strong {
    font-size: 1.02rem;
  }

  .choice-group label {
    flex: 1 1 100%;
  }
}
