/* Clásica "Azul y cuero": papel marfil, tinta azul marino, ornamentos en café cuero y filetes dorados.
   Todo centrado como una invitación impresa; las secciones alternan marfil y un azul polvo muy claro. */
:root {
  --marfil: #F8F5EF;
  --papel: #FDFBF7;
  --marino: #1F2F4A;
  --polvo: #8FA5BF;
  --polvo-claro: #EDF1F5;
  --cuero: #8A5A3B;
  --dorado: #B8975A;
  --linea: #DCCFB4;
  --suave: #566175;
  --error: #9B2C2C;

  --f-script: "Pinyon Script", "Snell Roundhand", cursive;
  --f-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-body: "Lora", Georgia, serif;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--marfil);
  color: var(--marino);
  font: 400 17px/1.7 var(--f-body);
  overflow-x: hidden;
}
p, h1, h2, h3, ol, ul, figure { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }

.wrap {
  max-width: 960px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
section { padding-block: clamp(64px, 10vw, 112px); }
section.alt { background: var(--polvo-claro); }
.sec { display: grid; gap: clamp(32px, 5vw, 52px); }
.center { display: grid; gap: 18px; justify-items: center; text-align: center; }

/* ---------- Tipografía ---------- */
.eyebrow {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 500;
  font-size: 21px;
  color: var(--cuero);
}
h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(36px, 5.5vw, 54px);
  line-height: 1.1;
  text-wrap: balance;
}
h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 28px;
  line-height: 1.2;
  text-wrap: balance;
}
.label {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.muted { color: var(--suave); }
.small { font-size: 15px; }
.lead { max-width: 58ch; color: var(--suave); text-wrap: pretty; }

.sec-head { display: grid; gap: 10px; justify-items: center; text-align: center; }
.sec-head h2::after {
  content: "";
  display: block;
  width: 64px;
  margin: 20px auto 0;
  border-top: 1px solid var(--dorado);
}

.flourish { width: 200px; max-width: 70%; height: 14px; position: relative; }
.flourish::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid var(--dorado);
}
.flourish::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  background: var(--papel);
  border: 1px solid var(--cuero);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 24px;
  border: 1px solid var(--marino);
  background: transparent;
  color: var(--marino);
  font: 600 14px/1 var(--f-display);
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.btn:hover, .btn.solid { background: var(--marino); color: var(--marfil); }
.btn.solid:hover { background: #2C4166; }
.btn.small { min-height: 40px; padding: 10px 18px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

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

/* ---------- Portada ---------- */
.hero { padding-block: clamp(28px, 6vw, 72px); }
.hero-card {
  position: relative;
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(40px, 8vw, 72px) 24px;
  background: var(--papel);
  border: 1px solid var(--linea);
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid var(--linea);
  pointer-events: none;
}
.cameo {
  width: min(64%, 250px);
  aspect-ratio: 3 / 4;
  border-radius: 50%;
  overflow: hidden;
  outline: 1px solid var(--dorado);
  outline-offset: 6px;
  margin-bottom: 14px;
}
.names {
  font-family: var(--f-script);
  font-weight: 400;
  font-size: clamp(64px, 13vw, 124px);
  line-height: 1.05;
}
.amp { color: var(--cuero); }
.date-long { font-family: var(--f-display); font-size: clamp(23px, 3.2vw, 29px); font-weight: 500; }
.place {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--suave);
}
.guest-pass {
  font-size: 15px;
  color: var(--suave);
  border-block: 1px solid var(--linea);
  padding-block: 10px;
  margin-block: 6px;
}
.guest-pass strong { color: var(--marino); font-weight: 600; }

/* ---------- Fotos y espacios vacíos ---------- */
.photo { position: relative; background: var(--polvo-claro); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.is-missing img { display: none; }
.photo.is-missing {
  background: linear-gradient(160deg, var(--polvo-claro), #D5DEE8);
  display: grid;
  place-items: center;
}
.photo.is-missing::after {
  content: attr(data-file);
  font: 500 13px/1.3 var(--f-body);
  color: var(--suave);
  padding: 8px;
  text-align: center;
}

/* ---------- Frase ---------- */
.quote-sec { padding-block: clamp(48px, 8vw, 88px); }
.quote {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(25px, 3.6vw, 34px);
  line-height: 1.45;
  max-width: 30ch;
  margin-inline: auto;
  text-align: center;
  text-wrap: balance;
}

/* ---------- Cuenta regresiva ---------- */
.count {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 640px;
  width: 100%;
  margin-inline: auto;
  text-align: center;
}
.count div { display: grid; gap: 6px; padding-inline: 4px; }
.count div + div { border-left: 1px solid var(--linea); }
.count b {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(38px, 8vw, 66px);
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}
.count span {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--suave);
}

/* ---------- Lugar ---------- */
.venue {
  max-width: 640px;
  width: 100%;
  margin-inline: auto;
  padding: clamp(32px, 6vw, 48px) 24px;
  background: var(--papel);
  border: 1px solid var(--linea);
  display: grid;
  gap: 26px;
  text-align: center;
}
.venue-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.venue-times div { display: grid; gap: 4px; padding-inline: 8px; }
.venue-times div + div { border-left: 1px solid var(--linea); }
.venue-times .time {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1;
  color: var(--cuero);
  font-variant-numeric: lining-nums;
}
.venue-times .label { font-size: 12px; color: var(--suave); }
.venue-place { display: grid; gap: 4px; }

/* ---------- Itinerario ---------- */
.timeline { list-style: none; padding: 0; max-width: 600px; width: 100%; margin-inline: auto; }
.timeline li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding-block: 12px;
}
.timeline li + li { border-top: 1px solid var(--linea); }
.timeline time {
  text-align: right;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--cuero);
  font-variant-numeric: lining-nums tabular-nums;
}
.timeline .dot {
  width: 9px;
  height: 9px;
  justify-self: center;
  border: 1px solid var(--dorado);
  transform: rotate(45deg);
}

/* ---------- Vestimenta ---------- */
.dress {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  text-align: center;
}
.dress-group { display: grid; gap: 18px; justify-items: center; align-content: start; }
.swatches { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 16px 18px; justify-content: center; }
.swatches li { display: grid; justify-items: center; gap: 8px; font-size: 14px; color: var(--suave); width: 72px; text-align: center; line-height: 1.3; }
.swatches i {
  display: block;
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(31, 47, 74, .18);
}
.sw-carbon { --c: #3A3B3F; }
.sw-negro { --c: #151515; }
.sw-vino { --c: #6B1F2A; }
.sw-olivo { --c: #5A6236; }
.sw-azul { --c: #2B4C7E; }
.sw-blanco { --c: #FFFFFF; }
.sw-marfil { --c: #EFE6D2; }
.sw-beige { --c: #D9C7A7; }
.sw-champagne { --c: #E6D3AE; }
.swatches.avoid i { overflow: hidden; }
.swatches.avoid i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  bottom: -4px;
  border-left: 2px solid var(--error);
  transform: rotate(45deg);
}

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gallery .photo {
  appearance: none;
  border: 0;
  padding: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  cursor: zoom-in;
}
.gallery .photo:first-child { grid-column: span 2; aspect-ratio: 4 / 3; }
.gallery .photo.is-missing { cursor: default; }
.gallery .photo img { transition: transform .5s; }
.gallery .photo:hover img { transform: scale(1.03); }
@media (min-width: 700px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .gallery .photo:first-child { grid-column: auto; aspect-ratio: 4 / 5; }
}

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
}
.lightbox::backdrop { background: rgba(16, 24, 38, .92); }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
.lb-btn {
  position: fixed;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(248, 245, 239, .14);
  color: var(--marfil);
  font: 400 30px/1 var(--f-display);
  cursor: pointer;
}
.lb-btn:hover { background: rgba(248, 245, 239, .28); }
.lb-close { top: calc(16px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
.lb-prev { left: max(12px, env(safe-area-inset-left, 0px)); top: 50%; transform: translateY(-50%); }
.lb-next { right: max(12px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); }

/* ---------- Regalos ---------- */
.cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  max-width: 760px;
  width: 100%;
  margin-inline: auto;
}
.card {
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: center;
  text-align: center;
  padding: 32px 24px;
  background: var(--papel);
  border: 1px solid var(--linea);
  min-width: 0;
}
.card h3 { margin-bottom: 6px; }
.code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 19px;
  letter-spacing: .06em;
  margin-block: 8px;
  overflow-wrap: anywhere;
  user-select: all;
}

/* ---------- Confirmación ---------- */
.rsvp { max-width: 600px; width: 100%; margin-inline: auto; display: grid; gap: 24px; }
.field { display: grid; gap: 8px; min-width: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.field > label, .field legend { font-weight: 600; font-size: 15px; padding: 0; }
.field input:not([type="radio"]), .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--marino);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--polvo);
  border-radius: 0;
  padding: 10px 2px;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--marino); }
.field ::placeholder { color: var(--polvo); opacity: 1; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choices label {
  flex: 1 1 200px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  background: var(--papel);
  border: 1px solid var(--linea);
  cursor: pointer;
}
.choices label:has(input:checked) { border-color: var(--marino); box-shadow: inset 0 0 0 1px var(--marino); }
.choices input { accent-color: var(--marino); width: 18px; height: 18px; margin: 0; }
.hint { font-size: 14px; color: var(--suave); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.error { font-size: 14px; color: var(--error); }
.ok {
  padding: 40px 24px;
  text-align: center;
  background: var(--papel);
  border: 1px solid var(--linea);
  gap: 12px;
}
.ok h3 { color: var(--cuero); }

/* ---------- Preguntas ---------- */
.faq { max-width: 700px; width: 100%; margin-inline: auto; }
.faq details { border-top: 1px solid var(--linea); }
.faq details:last-child { border-bottom: 1px solid var(--linea); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 22px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cuero); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 20px; color: var(--suave); max-width: 62ch; }

/* ---------- Hashtag y cierre ---------- */
.hashtag {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(34px, 6.5vw, 62px);
  line-height: 1.1;
  color: var(--cuero);
  overflow-wrap: anywhere;
}
.foot {
  background: var(--marino);
  color: var(--marfil);
  padding-block: 56px calc(56px + env(safe-area-inset-bottom, 0px));
}
.foot .place { color: var(--polvo); }
.monogram { font-family: var(--f-script); font-size: 56px; line-height: 1; color: var(--dorado); }
