:root {
  color-scheme: light;
  --wine: #581630;
  --deep: #2c0b1d;
  --ink: #2e2428;
  --paper: #fbfafb;
  --silver: #dce0e6;
  --muted: #62575b;
  --serif: "Cormorant Garamond", Georgia, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1rem/1.65 "DM Sans", sans-serif; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .3em; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
p { margin: 0; }
.hero { display: grid; place-items: center; padding: clamp(1.1rem, 4vw, 2.5rem); min-height: min(760px, 88svh); color: var(--paper); }
.cover { text-align: center; padding: 4.2rem .8rem 3.6rem; }
.label { font-size: .68rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.hero .label, .countdown .label, .rsvp .label { color: var(--silver); }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: .98; }
h1 { margin: .3rem 0; font-size: clamp(4rem, 17vw, 8rem); font-style: italic; overflow-wrap: anywhere; }
h2 { margin: .7rem 0 1.25rem; font-size: clamp(2.8rem, 10vw, 4.8rem); }
h3 { margin: .4rem 0 .65rem; font-size: 2.25rem; }
.ornament { color: #7b7980; display: flex; align-items: center; justify-content: center; gap: .6rem; margin: .75rem auto; }
.ornament::before, .ornament::after { content: ""; width: 2.25rem; height: 1px; background: currentColor; opacity: .55; }
.hero .ornament { color: var(--silver); }
.date { margin-bottom: 1.75rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; min-height: 48px; padding: .65rem 1.35rem; border-radius: 999px; text-decoration: none; font-size: .78rem; font-weight: 600; }
.light { color: var(--deep); background: var(--paper); }
.light:hover { background: var(--silver); }
.section { padding: clamp(3.4rem, 10vw, 6rem) 1.15rem; text-align: center; }
.section > p:not(.label) { max-width: 31ch; margin: 0 auto 1.2rem; }
.welcome > .label, .itinerary > .label, .attire .label { color: #6b2240; }
.countdown, .rsvp { background: var(--wine); color: var(--paper); }
.clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; max-width: 23rem; margin: 1.9rem auto 0; }
.clock div { padding: .7rem .15rem; border: 1px solid #dce0e666; }
.clock strong { display: block; font: 500 clamp(1.6rem, 7vw, 2.8rem)/1 var(--serif); font-variant-numeric: tabular-nums; }
.clock span { color: var(--silver); font-size: .64rem; text-transform: uppercase; letter-spacing: .11em; }
.itinerary { background: #f0eef1; }
.events { display: grid; gap: .8rem; max-width: 40rem; margin: auto; }
.events article { padding: 1.55rem 1rem; border: 1px solid #ccc8ce; border-radius: 12rem 12rem .2rem .2rem / 3rem 3rem .2rem .2rem; background: var(--paper); }
.events article p { color: var(--muted); }
.events article a { display: inline-flex; align-items: center; min-height: 44px; }
.attire { margin-top: 1.8rem; }
.attire p + p { font: 500 2rem var(--serif); }
footer { padding: 1.2rem; text-align: center; color: var(--wine); }
footer em { font: italic 1.6rem var(--serif); }
@media (min-width: 40rem) { .events { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }


.color-filters { position: absolute; }
.sealed { overflow: hidden; }
.entry {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  color: var(--paper);
  background: var(--paper) url("fondo-marco.webp?v=abigail") center / cover no-repeat;
}
.entry::backdrop { background: transparent; }
.envelope {
  position: relative;
  width: min(calc(100% - 2.75rem), calc((100dvh - 2rem) * .563));
  aspect-ratio: 941 / 1672;
  margin: auto;
  top: 50%;
  transform: translateY(-50%);
}
.entry-video, .hero::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.entry-video { display: block; object-fit: cover; }
.envelope-name {
  position: absolute;
  top: 19%;
  inset-inline: 1rem;
  text-align: center;
  color: var(--wine);
  text-shadow: 0 1px 8px #fff;
  transition: opacity .35s ease;
}
.envelope-name em { display: block; font: italic clamp(2.8rem, 12vw, 4.7rem)/1 var(--serif); }
.envelope-button {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .15em;
  text-transform: uppercase;
  transition: opacity .3s ease;
}
.playing :is(.envelope-name, .envelope-button) { opacity: 0; }
.entry::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 45%, #fff 0%, #faf9ffeb 24%, #e7e4f2a6 62%, #e7e4f200 100%);
}
.entry.dissolving { animation: dissolve-envelope .8s ease both; }
.entry.dissolving::after { animation: opening-glow .7s ease-in-out both; }
@keyframes opening-glow {
  0% { opacity: 0; transform: scale(.85); }
  32% { opacity: .85; }
  100% { opacity: 0; transform: scale(1.2); }
}
@keyframes dissolve-envelope { to { opacity: 0; } }
.hero {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
  z-index: 1;
  background: linear-gradient(#270a1dc4, #270a1de0), url("fondo-marco.webp?v=abigail") center / cover, var(--deep);
}
.hero::after {
  content: "";
  width: min(100%, 35rem);
  margin-inline: auto;
  background: url("salon.jpg") center / cover no-repeat;
  z-index: -2;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  width: min(100%, 35rem);
  margin-inline: auto;
  z-index: -1;
  background: radial-gradient(ellipse at center, #210911aa, #21091128 85%);
}
.hero .cover { text-shadow: 0 2px 5px #0009, 0 3px 18px #0006; }
.hero .button { text-shadow: none; }
#title:focus { outline: none; }
.family { background: var(--paper); }
.family-names { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.8rem 4rem; }
.family-names h3 { color: var(--wine); }
.welcome .full-name { color: var(--wine); font: 600 clamp(1.6rem, 6vw, 2.2rem) var(--serif); }
.sample-photo, .sample-gallery { text-align: center; margin: 0; padding: 2.6rem 1.2rem .5rem; }
.sample-photo img, .sample-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.sample-photo img { width: min(100%, 19rem); margin: auto; border-radius: 50% 50% 0 0 / 30% 30% 0 0; }
.sample-gallery { padding-bottom: 2.6rem; }
.sample-gallery > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; width: min(100%, 30rem); margin: auto; }
:is(.sample-photo, .sample-gallery) figcaption { margin-top: .65rem; font-size: .7rem; color: var(--muted); letter-spacing: .1em; }
@media (prefers-reduced-motion: no-preference) {
  .sealed .hero .cover { visibility: hidden; }
  .revealed .hero .cover { animation: reveal-cover .8s ease-out both; }
}
@keyframes reveal-cover {
  from { opacity: 0; transform: translateY(.8rem); }
  to { opacity: 1; transform: translateY(0); }
}

.section.soft { background: #eeeaee; }
.pending { color: var(--muted); }
.countdown .button { margin-top: 1.5rem; }
button.button { border: 0; cursor: pointer; font-family: inherit; }
button.button:disabled { opacity: .65; cursor: default; }
.scene {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: clamp(13rem, 43vw, 27rem);
  padding: 2rem 1rem;
  text-align: center;
  color: white;
  background: var(--deep);
}
.scene::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(#2609195c, #26091997), var(--scene) center / cover;
  filter: url("#wine-silver");
}
.scene p { font: italic clamp(2.6rem, 9vw, 5rem)/1 var(--serif); }
.goodbye strong { display: block; margin-top: .6rem; font: italic 2.2rem var(--serif); }
.timeline { max-width: 23rem; margin: 1.7rem auto 0; padding: 0; list-style: none; text-align: left; }
.timeline li { position: relative; display: grid; grid-template-columns: 6.2rem 1fr; align-items: center; gap: .5rem; padding: .75rem 0 .75rem 1.15rem; border-left: 1px solid #8a6476; }
.timeline li::before { position: absolute; left: -.25rem; width: .45rem; height: .45rem; content: ""; background: var(--wine); border-radius: 50%; }
.timeline .label { color: var(--wine); letter-spacing: .1em; }
.timeline li span { font: 600 1.65rem var(--serif); }
section.attire { margin-top: 0; }
.attire-photo { display: block; width: min(100%, 22rem); height: auto; margin: 0 auto 1.25rem; border-radius: .4rem; }
.rsvp-form { display: grid; gap: .8rem; max-width: 23rem; margin: 1.6rem auto 0; text-align: left; }
.rsvp-form label { display: grid; gap: .25rem; }
.rsvp-form :is(input, select, textarea) { width: 100%; padding: .65rem; border: 1px solid #cbbdc5; border-radius: .35rem; font: inherit; }
.rsvp-form button { justify-self: center; margin-top: .4rem; }
.photo-button { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.sample-photo > .photo-button { width: min(100%, 19rem); margin: auto; border-radius: 50% 50% 0 0 / 30% 30% 0 0; }
.sample-photo .photo-button img { width: 100%; }
.lightbox { padding: 0; border: 0; background: var(--deep); color: white; }
.lightbox::backdrop { background: #1c0814e6; }
.lightbox img { display: block; max-width: min(90vw, 50rem); max-height: 80svh; object-fit: contain; }
.lightbox button, .music-button { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border: 1px solid #d3cbd3; border-radius: 50%; background: var(--deep); color: white; font-size: 1.3rem; cursor: pointer; }
.lightbox button { position: absolute; right: .35rem; top: .35rem; }
.music-button { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 3; }
.music-button[aria-pressed="true"] { background: var(--silver); color: var(--deep); }
.sample-list { display: grid; gap: .45rem; max-width: 25rem; margin: 1rem auto 0; padding: 0; list-style: none; }
.sample-list li { padding: .55rem .75rem; border: 1px solid #d5c9d0; border-radius: .35rem; }
.timeline + .pending, .rsvp .demo-result { margin-top: 1.2rem; }

:root {
  --script: "Pinyon Script", var(--serif);
  --panel-border: #c0b7c4;
}
.hero {
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  padding: 2rem 1rem clamp(6rem, 13svh, 8rem);
}
.hero::after {
  width: 100%;
  background: url("escena.webp?v=abigail") center center / cover no-repeat;
  filter: none;
}
.hero::before {
  width: 100%;
  background: linear-gradient(to bottom, transparent 88%, #f6f2f6 100%), linear-gradient(rgb(88 22 48 / 15%), rgb(88 22 48 / 15%));
}
.hero .cover { padding: 0; }
.hero .cover > .label { color: white; letter-spacing: .42em; }
.hero h1 { font: 400 clamp(4.7rem, 17vw, 7rem)/1 var(--script); padding: .15em .17em .08em; }
.hero-rule { width: 4.5rem; height: 1px; background: #e8e1eb; margin: .85rem auto 1rem; }
.hero-date { display: grid; gap: .25rem; font: 600 1.75rem/1.15 var(--serif); }
.hero-date > :first-child, .hero-date > :last-child { font-size: 1rem; letter-spacing: .28em; text-transform: uppercase; }
.scroll-hint { position: absolute; bottom: 1.3rem; color: #2c1022; text-align: center; text-decoration: none; text-transform: uppercase; font-size: .72rem; font-weight: 600; letter-spacing: .24em; padding: .4rem 1rem; }
.scroll-hint span { display: block; margin-top: .3rem; font-size: 1.45rem; }
.opening-pages {
  isolation: isolate;
  position: relative;
  padding-bottom: 2rem;
  background: #f6f2f6;
}
.opening-pages::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #f4f0f520, #fcf9fbbf 30%, #fcf9fbbf 70%, #f4f0f520), url("fondo-marco.webp?v=abigail") center / cover;
}
.opening-pages .section:not(.framed-panel) { background: transparent; color: var(--ink); }
.opening-pages .section h2 { color: var(--wine); }
.opening-pages .section > .label { color: var(--wine); }
.opening-pages .section h2 em { font-style: normal; }
.welcome { padding-top: .75rem; padding-bottom: 3rem; }
.welcome .sample-photo { padding: 0; }
.welcome h2, .countdown h2 { margin-top: 2.75rem; font: 400 clamp(3.2rem, 11vw, 5rem)/1.15 var(--script); }
.welcome-diamond { color: #827387; margin: .6rem 0 1rem; font-size: .65rem; }
.opening-pages .welcome-message { max-width: 31ch; font: italic 600 clamp(1.3rem, 4vw, 1.7rem)/1.65 var(--serif); }
.countdown { padding-top: .5rem; padding-bottom: 2rem; }
.countdown h2 { margin-top: 0; }
.countdown-date { display: grid; gap: .15rem; text-transform: uppercase; letter-spacing: .14em; font: 600 1.15rem var(--serif); }
.countdown .clock div { background: #fffafde0; border: 1px solid var(--panel-border); padding: .9rem .1rem; }
.countdown .clock strong { color: var(--wine); }
.countdown .clock span { color: var(--muted); }
.calendar-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; max-width: 28rem; margin: 1.15rem auto 0; }
.calendar-links .button, .calendar-links button.button { margin: 0; border: 1px solid var(--panel-border); border-radius: 0; background: #fffafde0; color: var(--wine); padding-inline: .35rem; }
.sample-photo > .photo-button, .sample-gallery .photo-button, .chambelan-photos .photo-button {
  background: #fff;
  padding: .35rem;
  border: 1px solid var(--panel-border);
  box-shadow: 0 .65rem 1.2rem #36263821;
}
.sample-photo > .photo-button { width: min(100%, 16rem); }
.sample-photo img { aspect-ratio: 3 / 5; }
.sample-gallery .photo-button:first-child, .chambelan-photos figure:nth-child(odd) .photo-button { transform: rotate(-2deg); }
.sample-gallery .photo-button:last-child, .chambelan-photos figure:nth-child(even) .photo-button { transform: rotate(2deg); }
.sample-gallery .photo-button:last-child { margin-top: 1.1rem; }
.framed-panel, .locations .events article {
  width: min(calc(100% - 2rem), 29rem);
  margin: 1.75rem auto;
  padding: clamp(1.4rem, 5vw, 2.5rem);
  color: var(--ink);
  background: #fdfafcf0;
  border: 1px solid var(--panel-border);
  outline: 1px solid #d4cbd8;
  outline-offset: -8px;
  border-radius: 0;
  box-shadow: 0 .8rem 1.5rem #36263814;
}
.family h2.label { font-family: "DM Sans", sans-serif; font-weight: 600; font-size: .72rem; }
.family-names { display: grid; gap: 1.7rem; }
.family-names p { font: 600 1.3rem/1.5 var(--serif); }
.chambelan-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem .8rem; max-width: 27rem; margin: 1.5rem auto 0; }
.chambelan-photos figure { margin: 0; }
.chambelan-photos img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.chambelan-photos figcaption { margin-top: .5rem; color: var(--wine); font: 400 clamp(1.65rem, 6vw, 2.4rem) var(--script); }
.opening-pages .scene {
  max-width: 35rem;
  margin-inline: auto;
  min-height: clamp(22rem, 80vw, 41rem);
  place-items: end center;
  padding-bottom: clamp(3.5rem, 12vw, 7rem);
  background: transparent;
}
.opening-pages .scene::before {
  background: linear-gradient(transparent 35%, #260c204a 75%), var(--scene) center / cover;
  filter: saturate(.86);
  mask-image: linear-gradient(transparent, black 10%, black 83%, transparent);
}
.opening-pages .scene p, .farewell strong { font: 400 clamp(3.3rem, 11vw, 5rem)/1 var(--script); text-shadow: 0 2px 12px #321925aa; }
.opening-pages .goodbye { min-height: clamp(16rem, 65vw, 28rem); }
.timeline { position: relative; max-width: 29rem; margin-bottom: 1.5rem; }
.timeline::before { position: absolute; inset: 1.5rem 50%; width: 1px; background: var(--panel-border); content: ""; }
.timeline li { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: clamp(.45rem, 2vw, .85rem); padding: .5rem 0; border: 0; }
.timeline li::before { content: none; }
.round-symbol, .timeline li .round-symbol { display: grid; place-items: center; width: clamp(2.65rem, 11vw, 3.75rem); aspect-ratio: 1; border: 1px solid var(--panel-border); border-radius: 50%; background: #fffafd; color: var(--wine); font: 1.4rem var(--serif); }
.timeline li .round-symbol { grid-column: 2; grid-row: 1; }
.timeline li div { grid-column: 3; grid-row: 1; }
.timeline li:nth-child(even) div { grid-column: 1; text-align: right; }
.timeline li div > span { display: block; font-size: clamp(1rem, 4vw, 1.45rem); line-height: 1.12; }
.locations .events { grid-template-columns: 1fr; }
.locations .events article { width: min(100%, 29rem); margin: 0 auto .75rem; }
.locations h3 { color: var(--wine); font: 400 2.8rem/1.1 var(--script); }
.locations h3 + p { font: 600 1.5rem/1.2 var(--serif); }
.locations .label { margin: .65rem 0; }
.locations .venue-example { font-size: .67rem; margin: .75rem 0 .45rem; }
.venue-photos { display: flex; gap: .25rem; }
.venue-photos img { display: block; flex: 1; width: 0; aspect-ratio: 4 / 3; object-fit: cover; }
.locations iframe { display: block; border: 1px solid var(--panel-border); width: 100%; height: 14rem; margin: .5rem 0; }
.map-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
.wine-button, .map-links .wine-button, .rsvp-form button.button { color: white; background: var(--wine); border-radius: 0; text-align: center; padding-inline: .25rem; }
.hotel-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.hotel-list li { border-top: 1px solid var(--panel-border); padding: 1rem 0; }
.hotel-list h3 { font-size: 1.5rem; }
.hotel-list .button { margin-top: .7rem; padding-inline: .9rem; }
#hospedaje .round-symbol { margin: 1rem auto; }
.attire-photo { filter: grayscale(1) contrast(1.06); }
.rsvp .pass-chip { width: fit-content; margin: 1rem auto; padding: .55rem .85rem; border: 1px solid var(--panel-border); }
.rsvp #rsvp-message { padding: .75rem; border: 1px dashed var(--panel-border); color: var(--muted); }
.rsvp-form { max-width: none; }
.choice-group { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .5rem; border: 0; margin: 0; padding: 0; }
.choice-group legend { margin-bottom: .35rem; }
.choice-group label { position: relative; display: block; }
.choice-group input { position: absolute; inset: 0; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice-group span { display: grid; place-items: center; min-height: 3rem; height: 100%; text-align: center; padding: .25rem; border: 1px solid var(--panel-border); font-size: .85rem; }
.choice-group :checked + span { color: white; background: var(--wine); }
.choice-group :focus-visible + span { outline: 2px solid var(--wine); outline-offset: 2px; }
.rsvp-form button.button { width: 100%; }
.farewell { color: var(--wine); padding: 0 1rem 2.8rem; }
.farewell > p:first-of-type { margin: 1rem auto; max-width: 28ch; font: italic 600 1.5rem/1.4 var(--serif); }
.farewell strong { display: block; margin: 1rem auto; text-shadow: none; }
.petal-layer { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.petal-layer i {
  position: absolute;
  top: -1rem;
  left: var(--left);
  width: .5rem;
  height: .84rem;
  border-radius: 90% 12% 90% 14%;
  background: linear-gradient(150deg, #c98d9c, #681934);
  opacity: .56;
  animation: rose-drift var(--duration) var(--delay) linear infinite;
}
.petal-layer i:nth-child(3n) { width: .35rem; height: .65rem; opacity: .36; }
@keyframes rose-drift {
  0% { transform: translate(0, -3vh) rotate(0deg); }
  25% { transform: translate(30px, 26vh) rotate(75deg); }
  50% { transform: translate(-16px, 53vh) rotate(160deg); }
  75% { transform: translate(24px, 79vh) rotate(245deg); }
  100% { transform: translate(-15px, 107vh) rotate(330deg); }
}
@media (prefers-reduced-motion: reduce) { .petal-layer { display: none; } }
