/* 1. Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

img,
video {
  display: block;
  max-width: 100%;
}

a,
button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* 2. Variables generales */
:root {
  --bg: #f8f3ef;
  --bg-secondary: #f2e9e1;
  --bg-glow-a: rgba(198, 131, 128, 0.25);
  --bg-glow-b: rgba(180, 145, 108, 0.2);
  --ink: #251a17;
  --ink-soft: #685754;
  --surface: rgba(255, 251, 247, 0.9);
  --surface-strong: #fffdfa;
  --surface-muted: #f5ede7;
  --line: rgba(97, 67, 62, 0.24);
  --line-strong: rgba(97, 67, 62, 0.44);
  --accent: #9e4f67;
  --accent-hover: #843f53;
  --accent-soft: rgba(158, 79, 103, 0.14);
  --hero-bg: #312221;
  --hero-overlay: linear-gradient(180deg, rgba(19, 10, 8, 0.2), rgba(19, 10, 8, 0.76));
  --hero-ink: #fff8f3;
  --hero-soft: rgba(255, 242, 235, 0.88);
  --paper-bg: linear-gradient(180deg, #fffdf9, #f8efe7);
  --paper-line: rgba(115, 87, 72, 0.18);
  --timeline-line: rgba(121, 90, 85, 0.25);
  --timeline-marker: #b16a58;
  --gallery-bg: #fefbf8;
  --modal-bg: #fffaf5;
  --modal-backdrop: rgba(26, 16, 16, 0.72);
  --button-bg: #7d3f57;
  --button-hover: #663347;
  --button-ink: #fff8f3;
  --shadow-sm: 0 6px 14px rgba(29, 20, 18, 0.08);
  --shadow-md: 0 18px 32px rgba(29, 20, 18, 0.14);
  --shadow-lg: 0 28px 56px rgba(29, 20, 18, 0.22);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Nunito", "Inter", system-ui, sans-serif;
  --radius-sm: 0.4rem;
  --radius-md: 0.8rem;
  --radius-lg: 1.4rem;
  --radius-xl: 2rem;
}

body {
  background:
    radial-gradient(circle at 8% 10%, var(--bg-glow-a), transparent 34%),
    radial-gradient(circle at 92% 6%, var(--bg-glow-b), transparent 30%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
}

.layout,
.hero__inner,
.progress-nav,
.footer,
.section {
  width: min(1280px, calc(100% - 1rem));
  margin-inline: auto;
}

.section {
  margin-top: 1.2rem;
  padding: clamp(1.1rem, 2.8vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.section__head {
  margin-bottom: 1rem;
}

.section__head--center {
  text-align: center;
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.12;
}

p {
  margin: 0;
}

.is-hidden {
  display: none !important;
}

/* 3. Temas */
body.theme-romantico-editorial {
  --bg: #f8f3ef;
  --bg-secondary: #f2e9e1;
  --bg-glow-a: rgba(198, 131, 128, 0.25);
  --bg-glow-b: rgba(180, 145, 108, 0.2);
  --ink: #251a17;
  --ink-soft: #685754;
  --surface: rgba(255, 251, 247, 0.9);
  --surface-strong: #fffdfa;
  --surface-muted: #f5ede7;
  --line: rgba(97, 67, 62, 0.24);
  --line-strong: rgba(97, 67, 62, 0.44);
  --accent: #9e4f67;
  --accent-hover: #843f53;
  --accent-soft: rgba(158, 79, 103, 0.14);
  --hero-bg: #312221;
  --hero-overlay: linear-gradient(180deg, rgba(19, 10, 8, 0.2), rgba(19, 10, 8, 0.76));
  --hero-ink: #fff8f3;
  --hero-soft: rgba(255, 242, 235, 0.88);
  --paper-bg: linear-gradient(180deg, #fffdf9, #f8efe7);
  --paper-line: rgba(115, 87, 72, 0.18);
  --timeline-line: rgba(121, 90, 85, 0.25);
  --timeline-marker: #b16a58;
  --gallery-bg: #fefbf8;
  --modal-bg: #fffaf5;
  --modal-backdrop: rgba(26, 16, 16, 0.72);
  --button-bg: #7d3f57;
  --button-hover: #663347;
  --button-ink: #fff8f3;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Nunito", "Inter", system-ui, sans-serif;
}

body.theme-elegante-nocturno {
  --bg: #11141d;
  --bg-secondary: #171b25;
  --bg-glow-a: rgba(223, 180, 100, 0.2);
  --bg-glow-b: rgba(70, 89, 143, 0.3);
  --ink: #f7f0e4;
  --ink-soft: #cfc0a4;
  --surface: rgba(27, 32, 45, 0.86);
  --surface-strong: #1c2230;
  --surface-muted: #151a24;
  --line: rgba(213, 183, 126, 0.28);
  --line-strong: rgba(213, 183, 126, 0.48);
  --accent: #d7b77e;
  --accent-hover: #c7a66a;
  --accent-soft: rgba(215, 183, 126, 0.16);
  --hero-bg: #0b0d12;
  --hero-overlay: linear-gradient(180deg, rgba(5, 7, 11, 0.22), rgba(5, 7, 11, 0.84));
  --hero-ink: #fbf5e8;
  --hero-soft: rgba(242, 227, 198, 0.88);
  --paper-bg: linear-gradient(180deg, #1d2432, #181d2a);
  --paper-line: rgba(213, 183, 126, 0.2);
  --timeline-line: rgba(172, 137, 68, 0.36);
  --timeline-marker: #d7b77e;
  --gallery-bg: #171c27;
  --modal-bg: #1c2230;
  --modal-backdrop: rgba(2, 3, 7, 0.8);
  --button-bg: #d7b77e;
  --button-hover: #c59f5b;
  --button-ink: #10131b;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Montserrat", "Inter", system-ui, sans-serif;
}

body.theme-botanico-natural {
  --bg: #eef3ea;
  --bg-secondary: #e4ecdc;
  --bg-glow-a: rgba(104, 142, 104, 0.24);
  --bg-glow-b: rgba(185, 121, 85, 0.22);
  --ink: #233029;
  --ink-soft: #59695e;
  --surface: rgba(252, 255, 249, 0.9);
  --surface-strong: #f8fcf4;
  --surface-muted: #edf3e7;
  --line: rgba(74, 97, 79, 0.22);
  --line-strong: rgba(74, 97, 79, 0.42);
  --accent: #728f52;
  --accent-hover: #5e7744;
  --accent-soft: rgba(114, 143, 82, 0.16);
  --hero-bg: #2f3f31;
  --hero-overlay: linear-gradient(180deg, rgba(31, 46, 35, 0.24), rgba(31, 46, 35, 0.76));
  --hero-ink: #f7fff1;
  --hero-soft: rgba(231, 240, 220, 0.88);
  --paper-bg: linear-gradient(180deg, #f7fbf1, #edf4e4);
  --paper-line: rgba(97, 118, 92, 0.2);
  --timeline-line: rgba(109, 137, 88, 0.34);
  --timeline-marker: #7f9f5d;
  --gallery-bg: #f8fcf4;
  --modal-bg: #f4f9ef;
  --modal-backdrop: rgba(14, 23, 14, 0.74);
  --button-bg: #6f8d4f;
  --button-hover: #5b7541;
  --button-ink: #f8fff1;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito", "Inter", system-ui, sans-serif;
}

body.theme-minimal-luminoso {
  --bg: #fbf7f1;
  --bg-secondary: #f4eee6;
  --bg-glow-a: rgba(220, 204, 176, 0.24);
  --bg-glow-b: rgba(149, 137, 121, 0.14);
  --ink: #2a2722;
  --ink-soft: #65605a;
  --surface: rgba(255, 254, 251, 0.94);
  --surface-strong: #ffffff;
  --surface-muted: #f4efe7;
  --line: rgba(117, 108, 95, 0.2);
  --line-strong: rgba(117, 108, 95, 0.34);
  --accent: #5f6770;
  --accent-hover: #4e545b;
  --accent-soft: rgba(95, 103, 112, 0.12);
  --hero-bg: #d8d0c6;
  --hero-overlay: linear-gradient(180deg, rgba(57, 52, 47, 0.2), rgba(57, 52, 47, 0.54));
  --hero-ink: #fffefc;
  --hero-soft: rgba(252, 249, 243, 0.9);
  --paper-bg: linear-gradient(180deg, #fffefb, #f8f3eb);
  --paper-line: rgba(134, 124, 111, 0.16);
  --timeline-line: rgba(132, 124, 113, 0.24);
  --timeline-marker: #707882;
  --gallery-bg: #fffdf8;
  --modal-bg: #fffefb;
  --modal-backdrop: rgba(34, 31, 29, 0.6);
  --button-bg: #59626d;
  --button-hover: #454d56;
  --button-ink: #fdfcf8;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", "Nunito", system-ui, sans-serif;
}

body.theme-festivo-contemporaneo {
  --bg: #f8eef9;
  --bg-secondary: #f3e7f6;
  --bg-glow-a: rgba(160, 78, 153, 0.28);
  --bg-glow-b: rgba(226, 106, 96, 0.25);
  --ink: #2f1730;
  --ink-soft: #6e4e75;
  --surface: rgba(255, 250, 255, 0.9);
  --surface-strong: #fff8ff;
  --surface-muted: #f7ecf8;
  --line: rgba(128, 70, 133, 0.24);
  --line-strong: rgba(128, 70, 133, 0.42);
  --accent: #cf4f77;
  --accent-hover: #b84266;
  --accent-soft: rgba(207, 79, 119, 0.16);
  --hero-bg: #3f1f4b;
  --hero-overlay: linear-gradient(180deg, rgba(26, 7, 32, 0.22), rgba(26, 7, 32, 0.72));
  --hero-ink: #fff5ff;
  --hero-soft: rgba(245, 220, 246, 0.9);
  --paper-bg: linear-gradient(180deg, #fff9ff, #f4e9f7);
  --paper-line: rgba(145, 85, 138, 0.18);
  --timeline-line: rgba(179, 84, 137, 0.32);
  --timeline-marker: #d75f8f;
  --gallery-bg: #fff8ff;
  --modal-bg: #fff6ff;
  --modal-backdrop: rgba(33, 9, 41, 0.74);
  --button-bg: #c74b73;
  --button-hover: #ad3c62;
  --button-ink: #fff5fb;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Montserrat", "Inter", system-ui, sans-serif;
}

body.theme-nostalgico-clasico {
  --bg: #efe4d3;
  --bg-secondary: #e6d9c5;
  --bg-glow-a: rgba(148, 111, 71, 0.24);
  --bg-glow-b: rgba(103, 77, 49, 0.2);
  --ink: #31261d;
  --ink-soft: #685543;
  --surface: rgba(252, 246, 236, 0.9);
  --surface-strong: #f8f0e6;
  --surface-muted: #ede2d2;
  --line: rgba(106, 79, 52, 0.24);
  --line-strong: rgba(106, 79, 52, 0.4);
  --accent: #8a5a35;
  --accent-hover: #72482c;
  --accent-soft: rgba(138, 90, 53, 0.16);
  --hero-bg: #3c2a1d;
  --hero-overlay: linear-gradient(180deg, rgba(30, 20, 13, 0.2), rgba(30, 20, 13, 0.76));
  --hero-ink: #fff4df;
  --hero-soft: rgba(240, 220, 189, 0.88);
  --paper-bg: linear-gradient(180deg, #f9efdf, #efe1cc);
  --paper-line: rgba(124, 95, 66, 0.22);
  --timeline-line: rgba(122, 90, 57, 0.32);
  --timeline-marker: #9c6f45;
  --gallery-bg: #f9efdf;
  --modal-bg: #f3e5d2;
  --modal-backdrop: rgba(25, 17, 11, 0.72);
  --button-bg: #835533;
  --button-hover: #6e472a;
  --button-ink: #fff5e4;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Nunito", "Inter", system-ui, sans-serif;
}

/* 4. Tipografias */
.hero__event,
.kicker,
.progress-nav a,
button,
.btn,
.invitation-sheet__label,
.reminder-card dt,
.timeline-item__hour,
.timeline-item__mark,
.stats-grid span {
  font-family: "Montserrat", "Inter", system-ui, sans-serif;
}

/* 5. Accesibilidad */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -999px;
  background: var(--button-bg);
  color: var(--button-ink);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
}

.skip-link:focus-visible {
  top: 0.5rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(50%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* 6. Herramienta interna de temas */
.theme-preview {
  position: fixed;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 80;
  width: min(280px, calc(100% - 1.5rem));
  padding: 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  box-shadow: var(--shadow-md);
}

.theme-preview label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.theme-preview select {
  width: 100%;
  min-height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--ink);
  padding: 0.2rem 0.55rem;
}

/* 7. Hero */
.hero {
  position: relative;
  min-height: clamp(420px, 80svh, 760px);
  margin-bottom: 1rem;
  overflow: hidden;
  color: var(--hero-ink);
  background: var(--hero-bg);
  box-shadow: var(--shadow-lg);
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-overlay);
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(2rem, 9vw, 4rem);
  display: grid;
  gap: 0.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 11vw, 4.6rem);
}

.hero__event {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--hero-soft);
}

.hero__date {
  margin: 0;
  display: inline-flex;
  width: fit-content;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--hero-soft) 45%, transparent);
  background: color-mix(in srgb, var(--hero-bg) 40%, transparent);
  color: var(--hero-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

.hero__headline {
  margin: 0;
  font-size: clamp(1.2rem, 4.4vw, 1.8rem);
  color: var(--hero-soft);
}

.hero__message {
  margin: 0;
  width: min(62ch, 100%);
}

.hero__actions {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* 8. Navegacion progresiva */
.progress-nav {
  position: sticky;
  top: 0.2rem;
  z-index: 40;
  margin-top: -1.6rem;
  padding: 0.35rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.progress-nav::-webkit-scrollbar {
  height: 0.45rem;
}

.progress-nav::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--line-strong) 65%, transparent);
  border-radius: 999px;
}

.progress-nav {
  display: flex;
  gap: 0.45rem;
  scroll-behavior: smooth;
}

.progress-nav a {
  flex: 0 0 auto;
  min-height: 2.1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease;
}

.progress-nav a[aria-current="true"],
.progress-nav a:hover,
.progress-nav a:focus-visible {
  color: var(--button-ink);
  border-color: var(--button-bg);
  background: var(--button-bg);
}

/* 9. Secciones generales */
.signature {
  font-family: var(--font-display);
  font-size: 1.24rem;
  color: var(--ink-soft);
}

/* 10. Invitacion */
.invitation-sheet {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
}

.invitation-sheet__kicker {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.invitation-sheet h3 {
  margin-top: 0.35rem;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
}

.invitation-sheet__line,
.invitation-sheet__message {
  margin-top: 0.55rem;
}

.invitation-grid {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.65rem;
}

.invitation-grid article {
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.invitation-grid h4 {
  font-size: 1.05rem;
}

/* 11. Modal invitacion */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
}

.modal.is-open {
  display: block;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-backdrop);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 1.2rem));
  margin: 2.8rem auto;
  padding: 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--modal-bg);
  box-shadow: var(--shadow-lg);
}

.modal__close {
  position: absolute;
  right: 0.7rem;
  top: 0.6rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
}

.modal__iframe-wrap {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-strong);
}

.modal__iframe-wrap iframe {
  width: 100%;
  min-height: 56svh;
  border: 0;
}

/* 12. Momento previo */
.section--prelude {
  background: color-mix(in srgb, var(--surface) 85%, var(--bg-secondary));
}

.section--prelude .timeline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* 13. Cuenta regresiva */
.countdown {
  margin-top: 0.8rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.countdown__title {
  margin: 0;
  font-weight: 700;
  color: var(--ink-soft);
}

.countdown__grid {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}

.countdown__grid div {
  text-align: center;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.countdown__grid strong {
  display: block;
  font-size: clamp(1.2rem, 5vw, 1.9rem);
}

.countdown__grid span {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.countdown__caption {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* 14. Bitacora */
.story-paper,
.ledger,
.extension-paper,
.reminder-card {
  margin-top: 0.8rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-bg);
}

.ledger-list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.ledger-list li {
  padding: 0.6rem;
  border: 1px dashed var(--paper-line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-strong) 76%, transparent);
}

.ledger-list strong {
  display: block;
  font-family: var(--font-display);
}

/* 15. Timelines */
.timeline {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.75rem;
}

.timeline-item {
  position: relative;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  overflow: hidden;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.9rem;
  bottom: 0.9rem;
  width: 2px;
  background: var(--timeline-line);
}

.timeline-item__mark,
.timeline-item__hour {
  display: inline-flex;
  min-width: 2.3rem;
  justify-content: center;
  margin-bottom: 0.45rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid color-mix(in srgb, var(--timeline-marker) 75%, transparent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: color-mix(in srgb, var(--timeline-marker) 88%, black 5%);
  font-size: 0.74rem;
  font-weight: 700;
}

.timeline-item img {
  margin-top: 0.7rem;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  aspect-ratio: unset;
  height: 132px;
  object-fit: cover;
}

/* 16. Carta */
.letter-paper {
  margin-top: 0.6rem;
  padding: clamp(1rem, 3vw, 1.45rem);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-lg);
  background: var(--paper-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--surface-strong) 45%, transparent);
}

.letter-paper__saludo {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.22rem;
}

.letter-paper__body {
  margin-top: 0.8rem;
}

.letter-paper__firma {
  margin-top: 0.9rem;
  text-align: right;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.quotes {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.55rem;
}

.quotes blockquote {
  margin: 0;
  padding: 0.7rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: color-mix(in srgb, var(--accent-soft) 62%, transparent);
  font-family: var(--font-display);
  font-size: 1.12rem;
}

/* 17. Recordatorio */
.reminder-card dl {
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.reminder-card dt {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.reminder-card dd {
  margin: 0.2rem 0 0;
}

/* 18. Gran dia */
.section--day {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 75%, transparent), transparent),
    var(--surface);
}

#gran-dia .timeline-item img {
  height: clamp(200px, 42vw, 360px);
  object-fit: contain;
  object-position: center;
  background: color-mix(in srgb, var(--surface-muted) 72%, transparent);
}

/* 19. Estadisticas */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.stats-grid article {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  text-align: center;
}

.stats-grid strong {
  display: block;
  font-size: clamp(1.4rem, 7vw, 2.2rem);
  font-family: var(--font-display);
}

.stats-grid span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* 20. Galerias */
.section--gallery {
  background: var(--gallery-bg);
}

.gallery-grid {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.gallery-item {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-strong);
  box-shadow: var(--shadow-sm);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: unset;
  height: 132px;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: 0.55rem 0.6rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

/* 21. Filtros */
.gallery-filters {
  margin-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.gallery-filters button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink-soft);
  padding: 0.28rem 0.66rem;
  min-height: 2rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.gallery-filters button[aria-pressed="true"] {
  border-color: var(--button-bg);
  color: var(--button-ink);
  background: var(--button-bg);
}

/* 22. Lightbox */
.modal__panel--lightbox {
  width: min(860px, calc(100% - 1rem));
}

#lightbox-image {
  width: 100%;
  max-height: 65svh;
  object-fit: contain;
  margin-top: 0.8rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface-muted) 75%, transparent);
}

#lightbox-caption,
#lightbox-category {
  margin-top: 0.45rem;
}

#lightbox-category {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

/* 23. Video */
.media-grid {
  display: grid;
  gap: 0.6rem;
}

.media-grid article,
.audio-card {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.embed-wrap {
  margin-top: 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0f0f11;
  aspect-ratio: 16 / 9;
}

.embed-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* 24. Musica y audio */
.audio-card audio {
  width: 100%;
  margin-top: 0.6rem;
}

/* 25. Dedicatorias */
.notes-grid {
  display: grid;
  gap: 0.6rem;
}

.notes-grid article {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}

.notes-grid blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
}

.notes-grid p {
  margin-top: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* 26. Formulario */
.message-form {
  display: grid;
  gap: 0.6rem;
}

.message-form label {
  display: grid;
  gap: 0.3rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.message-form input,
.message-form textarea,
.theme-preview select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--ink);
  padding: 0.58rem;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.2rem;
}

/* 27. Actividades */
.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.activity-list li {
  padding: 0.7rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}

.activity-list time {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

/* 28. Creditos */
.credits-grid {
  display: grid;
  gap: 0.55rem;
}

.credits-grid article {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}

.credits-grid a {
  display: inline-flex;
  margin-top: 0.35rem;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* 29. Extension posterior */
.section--extension {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 42%, transparent), transparent),
    var(--surface);
}

/* 30. Compartir */
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

.share-feedback {
  margin: 0.55rem auto 0;
  width: fit-content;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 0.84rem;
}

/* 31. Cierre */
.section--closing {
  text-align: center;
}

/* 32. Footer */
.footer {
  margin: 1rem auto 1.4rem;
  padding: 0.85rem 0.6rem 1.2rem;
  text-align: center;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

/* 33. Responsive */
@media (min-width: 680px) {
  .invitation-grid,
  .reminder-card dl,
  .notes-grid,
  .credits-grid,
  .activity-list,
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-item {
    padding-left: 1rem;
  }

  .cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

@media (min-width: 920px) {
  .layout,
  .hero__inner,
  .progress-nav,
  .footer,
  .section {
    width: min(1280px, calc(100% - 1.2rem));
  }

  .progress-nav a {
    font-size: 0.82rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .notes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .credits-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .activity-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__actions {
    gap: 0.65rem;
  }

  .timeline-item img,
  .gallery-item img {
    height: 140px;
  }
}

/* 34. Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* 35. Estados ocultos */
[data-optional-block][hidden],
[data-optional][hidden],
[data-stage][hidden],
[data-preview-only][hidden],
[data-share-block][hidden],
[data-hide-when-event-ended][hidden] {
  display: none !important;
}

.btn {
  min-height: 2.55rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn--primary {
  border-color: var(--button-bg);
  background: var(--button-bg);
  color: var(--button-ink);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  border-color: var(--button-hover);
  background: var(--button-hover);
}

.btn--secondary {
  border-color: var(--line-strong);
  background: var(--surface-strong);
  color: var(--ink);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--ghost {
  border-style: dashed;
  background: transparent;
  color: var(--ink-soft);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.cta-row,
.modal__actions {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
/* 1. Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

img,
iframe,
video,
audio {
  display: block;
  max-width: 100%;
}

figure,
blockquote,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

button,
a,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* 2. Variables generales */
:root {
  --bg: #f7f2ed;
  --bg-secondary: #fdfaf7;
  --bg-glow-a: rgba(213, 156, 134, 0.2);
  --bg-glow-b: rgba(166, 114, 134, 0.18);
  --ink: #312722;
  --ink-soft: #65534a;
  --surface: rgba(255, 252, 249, 0.84);
  --surface-strong: #fffaf5;
  --surface-muted: #f4ece4;
  --line: rgba(105, 78, 66, 0.2);
  --line-strong: rgba(105, 78, 66, 0.4);
  --accent: #8f4f5f;
  --accent-hover: #733e4d;
  --accent-soft: rgba(143, 79, 95, 0.14);
  --hero-bg: #2b1f2a;
  --hero-overlay: linear-gradient(
    130deg,
    rgba(16, 11, 17, 0.74),
    rgba(63, 33, 44, 0.56)
  );
  --hero-ink: #fff8f2;
  --hero-soft: rgba(255, 242, 231, 0.9);
  --paper-bg: linear-gradient(165deg, #fffdfa, #f6eee7);
  --paper-line: rgba(129, 93, 72, 0.14);
  --timeline-line: rgba(143, 79, 95, 0.35);
  --timeline-marker: #8f4f5f;
  --gallery-bg: #f9f2eb;
  --modal-bg: #fff9f4;
  --modal-backdrop: rgba(24, 16, 21, 0.72);
  --button-bg: #8f4f5f;
  --button-hover: #733e4d;
  --button-ink: #fffaf7;
  --shadow-sm: 0 6px 14px rgba(30, 21, 18, 0.08);
  --shadow-md: 0 14px 30px rgba(30, 21, 18, 0.12);
  --shadow-lg: 0 28px 58px rgba(30, 21, 18, 0.18);
  --font-display: "Cormorant Garamond", "Fraunces", serif;
  --font-body: "Nunito", "Inter", sans-serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 34px;
}



/* Feedback de acciones demostrativas locales */
.demo-toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 180;
  width: min(620px, calc(100% - 2rem));
  transform: translateX(-50%);
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  text-align: center;
  font-size: 0.9rem;
}

.demo-toast[hidden] {
  display: none;
}


/* Medios locales AEP */
.embed-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0f0f11;
}
.audio-local-wrap {
  margin-top: 0.45rem;
}
.audio-local-wrap audio {
  width: 100%;
}
