/* ============================================================
   XV Catalina — demo invitation (standalone HTML)
   Un stylesheet, dos temas (data-theme en <html>):
     · tierra  → editorial cálido (terracota)
     · blush   → romántico (rosa suave)
   Portado de los mockups validados (opciones-layout.html) +
   el design system del proyecto (design.md).
   ============================================================ */

:root {
  --font-display: "Fraunces", serif;
  --font-script: "Pinyon Script", cursive;
  --font-body: "Jost", sans-serif;

  /* default = blush */
  --bg: #fdf4f0;
  --bg2: #f6ddd5;
  --surface: #fffaf7;
  --accent: #d2807c;
  --accent-deep: #b9655f;
  --accent2: #ecc3bc;
  --gold: #cfa06f;
  --ink: #5b3b38;
  --ink-soft: #9c7a76;
  --line: #ecd6cf;
  --stage: #e7e1da;
  /* tono del bokeh (luz cálida flotante) */
  --glow: #ffd9a0;
}

[data-theme="blush"] {
  --bg: #fdf4f0;
  --bg2: #f6ddd5;
  --surface: #fffaf7;
  --accent: #d2807c;
  --accent-deep: #b9655f;
  --accent2: #ecc3bc;
  --gold: #cfa06f;
  --ink: #5b3b38;
  --ink-soft: #9c7a76;
  --line: #ecd6cf;
  --stage: #e7e1da;
  --glow: #ffd2c4;
  /* corazones del splash (romántico) */
  --heart: #d76b66;
}

[data-theme="tierra"] {
  --bg: #faf2ea;
  --bg2: #edd6c3;
  --surface: #fffaf4;
  --accent: #bf7049;
  --accent-deep: #a85d39;
  --accent2: #e2bb9f;
  --gold: #c79264;
  --ink: #574536;
  --ink-soft: #9a8270;
  --line: #ecdac9;
  --stage: #e6ddd0;
  --glow: #ffd9a0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--stage);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== marco tipo tarjeta: columna centrada (encuadre celular en desktop) ===== */
main {
  display: block;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
@media (min-width: 500px) {
  main {
    margin-block: 28px;
    border-radius: 30px;
    box-shadow: 0 40px 90px -40px color-mix(in srgb, var(--ink) 55%, transparent);
  }
}

/* ===== reveal on scroll ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s cubic-bezier(0.2, 0.7, 0.3, 1),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.3, 1);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* ===== bokeh: luces cálidas flotantes sobre la tarjeta ===== */
.bokeh {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 460px;
  height: 100vh;
  height: 100dvh;
  z-index: 40;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ===== primitivos ===== */
.eyebrow {
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12.5px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent-deep);
  padding: 15px 32px;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--accent-deep) 92%, transparent);
}
.pill:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 34px -12px color-mix(in srgb, var(--accent-deep) 92%, transparent);
}
.pill.ghost {
  background: transparent;
  color: var(--accent-deep);
  border: 1.4px solid var(--accent2);
  box-shadow: none;
}
.pill.ghost:hover {
  background: color-mix(in srgb, var(--accent2) 35%, transparent);
  transform: translateY(-2px);
}
.pill:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ===== SPLASH ===== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg);
  padding: 40px 30px;
  overflow: hidden;
  transition:
    opacity 1.1s ease,
    transform 1.1s cubic-bezier(0.6, 0, 0.2, 1),
    visibility 1.1s;
}
.splash::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 60% at 50% 8%, var(--bg2), transparent 55%),
    radial-gradient(80% 50% at 50% 100%, var(--bg2), transparent 60%);
  opacity: 0.9;
}
.splash--hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.06) translateY(-24px);
  pointer-events: none;
}
.splash__inner { position: relative; z-index: 2; max-width: 360px; }
.splash__inner .who {
  font-family: var(--font-script);
  color: var(--accent);
  line-height: 0.78;
  font-size: 120px;
  margin: 6px 0 2px;
}
.splash__inner .xv {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 11px;
  text-transform: uppercase;
  color: var(--ink);
}
.splash__inner .dt {
  margin-top: 22px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--ink-soft);
}
.splash__inner .dt b { color: var(--accent); font-weight: 500; }
.pdiv {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin: 26px 0;
}
.pdiv .ln { height: 1px; width: 54px; background: linear-gradient(90deg, transparent, var(--accent2)); }
.pdiv .ln.r { background: linear-gradient(90deg, var(--accent2), transparent); }
.pdiv .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.loc {
  margin-top: 24px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.petal {
  position: absolute;
  border-radius: 60% 0 60% 0;
  background: var(--accent2);
  opacity: 0.55;
  z-index: 1;
  animation: drift linear infinite;
}
/* variante corazón (tema romántico) */
.petal--heart {
  border-radius: 0;
  background: var(--heart);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M12%2021.35l-1.45-1.32C5.4%2015.36%202%2012.28%202%208.5%202%205.42%204.42%203%207.5%203c1.74%200%203.41.81%204.5%202.09C13.09%203.81%2014.76%203%2016.5%203%2019.58%203%2022%205.42%2022%208.5c0%203.78-3.4%206.86-8.55%2011.54L12%2021.35z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20d='M12%2021.35l-1.45-1.32C5.4%2015.36%202%2012.28%202%208.5%202%205.42%204.42%203%207.5%203c1.74%200%203.41.81%204.5%202.09C13.09%203.81%2014.76%203%2016.5%203%2019.58%203%2022%205.42%2022%208.5c0%203.78-3.4%206.86-8.55%2011.54L12%2021.35z'/%3E%3C/svg%3E") center / contain no-repeat;
}
@keyframes drift {
  0% { transform: translateY(-10px) rotate(0); opacity: 0; }
  10% { opacity: 0.5; }
  100% { transform: translateY(110vh) rotate(220deg); opacity: 0; }
}
.ri {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ===== HERO (compartido) ===== */
.hero { position: relative; z-index: 2; }
.cover__img,
.cover__ph { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, var(--accent2), var(--accent));
}
.cover__ph span {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 300;
}
.cover__tint {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  mix-blend-mode: soft-light;
}
.hero__txt { position: relative; z-index: 3; text-align: center; }
.hero .who { font-family: var(--font-script); line-height: 0.8; }
.hero .xv {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 9px;
  text-transform: uppercase;
  font-size: 17px;
  margin-top: -2px;
}
.hero .dt { margin-top: 12px; font-size: 12.5px; letter-spacing: 3px; text-transform: uppercase; }
.hero .dt b { font-weight: 500; }

/* CLASSIC — full-bleed, texto sobre la foto */
.hero--classic { height: 88vh; max-height: 720px; min-height: 520px; overflow: hidden; }
.hero--classic .cover__img,
.hero--classic .cover__ph { position: absolute; inset: 0; }
.hero--classic .cover__img { animation: kenburns 14s ease-out forwards; }
.hero--classic .cover__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(50, 30, 28, 0.22) 0%,
    transparent 30%,
    transparent 46%,
    rgba(50, 30, 28, 0.5) 82%,
    var(--bg) 100%
  );
}
.hero__txt--over { position: absolute; left: 0; right: 0; bottom: 7%; }
.hero__txt--over .eyebrow {
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.hero--classic .who {
  font-size: clamp(86px, 26vw, 120px);
  color: #fff;
  text-shadow: 0 4px 26px rgba(60, 30, 28, 0.5);
}
.hero--classic .xv { color: #fff; }
.hero--classic .dt { color: rgba(255, 255, 255, 0.92); }
.hero--classic .dt b { color: #fff; }

/* ARCH — base en arco, texto sobre fondo limpio */
.hero--arch .cover {
  position: relative;
  height: 64vh;
  max-height: 560px;
  min-height: 420px;
  overflow: hidden;
  border-radius: 0 0 46% 46% / 0 0 22% 22%;
}
.hero--arch .cover__img { animation: kenburns 14s ease-out forwards; }
.hero--arch .cover__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(50, 30, 28, 0.12), transparent 45%);
}
.hero__txt--below { padding: 0 24px 10px; margin-top: -40px; }
.hero--arch .who {
  font-size: clamp(82px, 24vw, 110px);
  color: var(--accent);
  text-shadow: 0 2px 16px var(--bg), 0 0 26px var(--bg);
}
.hero--arch .xv { color: var(--ink); }
.hero--arch .dt { color: var(--ink-soft); }
.hero--arch .dt b { color: var(--accent); }

@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }

/* ===== NAME BAND / tagline ===== */
.tagline { background-color: var(--bg); text-align: center; padding: 30px 44px 10px; }
.tagline p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink);
}

/* ===== COUNTDOWN ===== */
.count { padding: 14px 26px 8px; background: var(--bg); }
.count__title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.cells { display: flex; gap: 10px; justify-content: center; }
.cell {
  flex: 1;
  background: var(--surface);
  border-radius: 20px;
  padding: 16px 4px;
  text-align: center;
  box-shadow: 0 10px 24px -16px color-mix(in srgb, var(--accent) 60%, transparent);
}
.cell .n {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cell .l {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 7px;
}

/* ===== DIVIDER ===== */
.divider {
  background-color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px 40px;
}
.divider .ln { height: 1px; flex: 1; max-width: 70px; background: linear-gradient(90deg, transparent, var(--accent2)); }
.divider .ln.r { background: linear-gradient(90deg, var(--accent2), transparent); }
.divider__text {
  font-size: 10.5px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ===== GALERÍA ===== */
.gallery { background-color: var(--bg); padding: 30px 22px 14px; }
.gallery__title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.gph {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--accent2);
  box-shadow: 0 14px 26px -18px color-mix(in srgb, var(--accent) 60%, transparent);
  margin: 0;
}
.gph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.gph:hover img { transform: scale(1.04); }
.gph::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  mix-blend-mode: soft-light;
  pointer-events: none;
}
/* bento de 3 fotos: 1 alta a la izquierda + 2 apiladas a la derecha */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bento .b1 { grid-column: 1; grid-row: 1 / 3; }
.bento .b2 { grid-column: 2; grid-row: 1; aspect-ratio: 1 / 1; }
.bento .b3 { grid-column: 2; grid-row: 2; aspect-ratio: 1 / 1; }
.bento .b1 img { height: 100%; }
.carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}
.carousel::-webkit-scrollbar { height: 0; }
.carousel .gph { flex: 0 0 72%; aspect-ratio: 3 / 4; scroll-snap-align: center; }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent2); transition: all 0.3s ease; }
.dots i.on { background: var(--accent-deep); width: 18px; border-radius: 3px; }

/* ===== CARD (cuándo / dónde / dress) ===== */
.card {
  position: relative;
  z-index: 2;
  margin: 18px 24px;
  background: var(--surface);
  border-radius: 26px;
  padding: 30px 26px;
  text-align: center;
  box-shadow: 0 20px 40px -26px color-mix(in srgb, var(--accent) 70%, transparent);
}
.card .ic {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
}
.card .ic svg { width: 23px; height: 23px; stroke: var(--accent-deep); fill: none; stroke-width: 1.4; }
.card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}
.card .big {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  color: var(--ink);
  margin-top: 9px;
  line-height: 1.25;
}
.card .sub { font-size: 13px; letter-spacing: 0.3px; color: var(--ink-soft); margin-top: 8px; line-height: 1.5; }
.card .punt {
  display: inline-block;
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 500;
}
.card .cta { margin-top: 18px; }
.uline { position: relative; display: inline-block; }
.uline::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -8px;
  height: 1px;
  background: var(--gold);
}

/* ===== FRASE OFICIAL ===== */
.frase { position: relative; z-index: 2; background-color: var(--bg); padding: 54px 38px; text-align: center; }
.frase__q { font-family: var(--font-script); font-size: 46px; color: var(--accent2); line-height: 0.5; }
.frase__text {
  max-width: 520px;
  margin: 18px auto 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 23px;
  line-height: 1.6;
  color: var(--ink);
}

/* ===== RSVP ===== */
.rsvp {
  position: relative;
  z-index: 2;
  margin: 18px 24px;
  background: var(--surface);
  border-radius: 26px;
  padding: 32px 26px;
  box-shadow: 0 20px 40px -26px color-mix(in srgb, var(--accent) 70%, transparent);
}
.rsvp h3 {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}
.rsvp .dl { text-align: center; font-size: 12.5px; color: var(--ink-soft); margin: 8px 0 22px; }
.rsvp .dl b { color: var(--accent-deep); }
.rsvp.closed .dl { color: var(--accent-deep); font-weight: 500; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent2) 45%, transparent);
}
.field input::placeholder { color: color-mix(in srgb, var(--ink-soft) 70%, transparent); }
.submit { text-align: center; margin-top: 8px; }
.thanks { display: none; text-align: center; padding: 8px 0 4px; }
.thanks .te { font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--ink); }
.thanks .sm { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }

/* ===== CIERRE ===== */
.closing { position: relative; z-index: 2; background-color: var(--bg); text-align: center; padding: 50px 30px 36px; }
.spark { color: var(--gold); font-size: 24px; letter-spacing: 6px; }
.closing .te {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 40px;
  color: var(--ink);
  margin-top: 6px;
}
.closing .fl { font-family: var(--font-script); font-size: 34px; color: var(--accent); margin-top: 4px; }
.share { display: flex; gap: 14px; justify-content: center; margin-top: 26px; }
.share button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s, border-color 0.25s;
}
.share button:hover { transform: translateY(-3px); border-color: var(--accent); }
.share svg { width: 21px; height: 21px; stroke: var(--accent-deep); fill: none; stroke-width: 1.5; }
.closing__footer { margin-top: 36px; }
.closing__footer .nm {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.closing__footer .sm {
  font-size: 10.5px;
  letter-spacing: 1px;
  color: color-mix(in srgb, var(--ink-soft) 75%, transparent);
  margin-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .petal { animation: none; }
  .ri { opacity: 1; transform: none; animation: none; }
  .splash { transition: none; }
  .cover__img { animation: none; }
}
