/* Invita-Digital — paleta EXACTA de Muse (modo claro, fija, sin selector) */
:root {
  color-scheme: light;
  --burgundy: #7A2E3A; --burgundy-dark: #5A222B; --gold: #C0A062; --gold-light: #F6ECDB;
  --cream: #FFFBF4; --ink: #2B2320; --muted: #7A6A5E; --white: #FFFFFF; --line: #E7DCC8;
  --sage: #5F7350; --sage-soft: #E4EAD8;
  --classic-bg: #FBF6EC; --classic-ink: #3A2320; --classic-soft: #EFE3CE;
  --garden-bg: #F7F8F1; --garden-ink: #2F3A2A;
}
html { color-scheme: light; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Georgia", "Times New Roman", serif; color: var(--ink); background: var(--cream); line-height: 1.6; }
h1, h2, h3, .serif { font-family: "Playfair Display", Georgia, serif; }
a { color: var(--burgundy); }
header { background: rgba(255,251,244,.95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--burgundy); padding: 14px 20px; position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); }
header .wrap { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.logo { font-size: 1.6rem; font-weight: bold; letter-spacing: .5px; color: var(--burgundy); }
.logo span { color: var(--gold); }
nav a { color: var(--ink); text-decoration: none; margin-left: 18px; font-size: .95rem; }
nav a:hover { color: var(--burgundy); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
section { padding: 56px 0; }
#como-funciona { background: #F6ECDB; }
.hero { background: var(--cream); color: var(--ink); text-align: center; padding: 80px 20px; }
.hero h1 { font-size: 2.6rem; margin-bottom: 12px; color: var(--ink); }
.hero h1 span { color: var(--burgundy); }
.hero p { font-size: 1.15rem; max-width: 640px; margin: 0 auto 24px; color: var(--muted); }
.hero-img { display: block; width: 100%; max-width: 860px; height: 420px; object-fit: cover; border-radius: 16px; margin: 32px auto 0; border: 3px solid var(--line); }
.card-img { width: 100%; height: 170px; object-fit: cover; display: block; }
.example-photo { width: 100%; max-width: 640px; height: 360px; object-fit: cover; border-radius: 14px; margin: 8px auto 4px; border: 2px solid var(--line); }
.gallery figure img { width: 100%; height: 130px; object-fit: cover; display: block; }
.gallery figcaption { color: var(--burgundy); font-weight: bold; padding: 8px 10px; text-align: center; font-size: .9rem; }
.btn { display: inline-block; background: var(--burgundy); color: #FFFFFF; font-weight: bold; padding: 12px 26px; border: none; border-radius: 30px; cursor: pointer; text-decoration: none; font-size: 1rem; }
.btn:hover { filter: brightness(1.08); }
.btn-outline { background: transparent; color: var(--burgundy); border: 2px solid var(--burgundy); }
.btn-small { padding: 8px 16px; font-size: .9rem; }
h2 { color: var(--burgundy); font-size: 1.9rem; text-align: center; margin-bottom: 8px; }
.subtitle { text-align: center; color: var(--muted); margin-bottom: 32px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.card .swatch { height: 110px; display: flex; align-items: flex-end; padding: 12px; color: #fff; font-weight: bold; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.card .body { padding: 16px; }
.card .tag { display: inline-block; background: var(--gold-light); color: var(--burgundy); font-size: .8rem; padding: 3px 10px; border-radius: 20px; margin-bottom: 8px; }
.card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.card p { color: var(--muted); font-size: .92rem; }
.filters { text-align: center; margin-bottom: 24px; }
.filters button { background: #FFFFFF; border: 1px solid var(--burgundy); color: var(--burgundy); padding: 7px 16px; border-radius: 20px; margin: 3px; cursor: pointer; }
.filters button.active, .filters button:hover { background: var(--burgundy); color: #fff; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; max-width: 760px; margin: 0 auto; }
.price-card { background: #FFFFFF; border: 2px solid var(--line); border-radius: 16px; padding: 28px; text-align: center; }
.price-card.featured { border-color: var(--burgundy); box-shadow: 0 6px 24px rgba(122,46,58,.15); }
.price-card h3 { font-size: 1.4rem; }
.price { font-size: 2.4rem; color: var(--burgundy); font-weight: bold; margin: 10px 0; }
.price small { font-size: 1rem; color: var(--muted); }
.price-card ul { list-style: none; text-align: left; margin: 16px 0 22px; }
.price-card li { padding: 6px 0; border-bottom: 1px solid #f0e8d8; }
.price-card li:before { content: "✦ "; color: var(--gold); font-weight: bold; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; text-align: center; }
.step-num { width: 52px; height: 52px; background: var(--burgundy); color: #FFFFFF; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin: 0 auto 12px; font-weight: bold; }
.example { background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px; padding: 32px; margin-bottom: 32px; text-align: center; }
.example h3 { font-size: 2rem; color: var(--burgundy); }
.example h4 { color: var(--burgundy); }
.example .date { color: var(--muted); margin-bottom: 16px; }
.example .tag { display: inline-block; background: var(--gold-light); color: var(--burgundy); font-size: .8rem; padding: 3px 10px; border-radius: 20px; margin-bottom: 8px; }
/* Tarjeta de invitación viva — Mariana & Carlos, plantilla "Boda Clásica" */
.example-classic { background: var(--classic-bg); color: var(--classic-ink); border-color: var(--classic-soft); }
.example-classic h3 { color: var(--burgundy); }
.example-classic .date { color: var(--classic-ink); opacity: .75; }
.example-classic .countdown div { background: var(--classic-soft); color: var(--classic-ink); }
.example-classic .countdown b { color: var(--burgundy); }
.example-classic .itinerary b { color: var(--burgundy); }
/* Tarjeta de invitación viva — Valeria & Diego, plantilla "Boda Jardín" (salvia, no burdeos) */
.example-garden { background: var(--garden-bg); color: var(--garden-ink); border-color: var(--sage-soft); }
.example-garden h3 { color: var(--sage); }
.example-garden h4 { color: var(--sage); }
.example-garden .date { color: var(--garden-ink); opacity: .75; }
.example-garden .countdown div { background: var(--sage-soft); color: var(--garden-ink); }
.example-garden .countdown b { color: var(--sage); }
.example-garden .itinerary b { color: var(--sage); }
.example-garden .gallery figure { background: var(--sage-soft); }
.example-garden .gallery figcaption { color: var(--sage); }
.example-garden .btn { background: var(--sage); }
.example-garden .btn-outline { background: transparent; color: var(--sage); border-color: var(--sage); }
/* Botones de fecha/ubicación y tarjetas de detalles (orden: calendario, luego ubicación) */
.example-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 4px 0 20px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 20px 0; text-align: left; }
.detail-card { background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.detail-card h5 { color: var(--burgundy); font-size: 1.05rem; margin-bottom: 6px; }
.detail-card p { color: var(--ink); font-size: .95rem; }
.dress-colors { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.dress-colors span { background: var(--gold-light); color: var(--burgundy); font-size: .82rem; font-weight: bold; padding: 3px 12px; border-radius: 20px; }
.padrinos { margin: 20px 0; }
.padrinos h4 { margin-bottom: 4px; }
.padrinos p { color: var(--ink); }
.example-garden .detail-card h5 { color: var(--sage); }
.example-garden .dress-colors span { background: var(--sage-soft); color: var(--sage); }
.example-garden .padrinos h4 { color: var(--sage); }
.countdown { display: flex; justify-content: center; gap: 14px; margin: 20px 0; flex-wrap: wrap; }
.countdown div { background: var(--classic-soft); color: var(--classic-ink); border-radius: 10px; padding: 12px 16px; min-width: 76px; }
.countdown b { display: block; font-size: 1.6rem; color: var(--burgundy); }
.countdown span { font-size: .8rem; }
.itinerary { text-align: left; max-width: 560px; margin: 20px auto; }
.itinerary li { list-style: none; padding: 10px 0; border-bottom: 1px solid #f0e8d8; }
.itinerary b { color: var(--burgundy); margin-right: 8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; }
.gallery figure { background: var(--gold-light); border-radius: 10px; overflow: hidden; padding: 0; }
form { max-width: 640px; margin: 0 auto; background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
label { display: block; font-weight: bold; margin: 14px 0 5px; color: var(--burgundy); }
input, select, textarea { width: 100%; padding: 11px; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--burgundy); border-color: var(--burgundy); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.font-pills, .color-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.font-pills button, .color-pills button { padding: 8px 14px; border: 1px solid var(--burgundy); background: #FFFFFF; border-radius: 20px; cursor: pointer; }
.font-pills button.active, .color-pills button.active { background: var(--burgundy); color: #fff; }
.color-pills button { width: 40px; height: 40px; border-radius: 50%; padding: 0; border: 3px solid #fff; box-shadow: 0 0 0 1px #ccc; }
.color-pills button.active { box-shadow: 0 0 0 2px var(--burgundy); }
.preview { border: 2px dashed var(--line); border-radius: 16px; padding: 32px 20px; text-align: center; background: #FFFFFF; margin-top: 24px; min-height: 260px; }
.preview .photo { max-width: 100%; max-height: 260px; border-radius: 10px; margin-bottom: 14px; }
.preview h3 { font-size: 2rem; }
.preview .meta { color: var(--muted); }
.notice { background: #e8f5e9; border: 1px solid #a5d6a7; padding: 14px; border-radius: 10px; margin: 16px 0; }
.error { background: #fdecea; border: 1px solid #f5c6cb; padding: 14px; border-radius: 10px; margin: 16px 0; }
.code-box { font-size: 1.8rem; letter-spacing: 4px; font-weight: bold; color: var(--burgundy); background: var(--gold-light); padding: 12px; border-radius: 10px; text-align: center; margin: 12px 0; }
table { width: 100%; border-collapse: collapse; background: #FFFFFF; }
th, td { padding: 10px; border-bottom: 1px solid #eee; text-align: left; font-size: .92rem; }
th { background: var(--burgundy); color: #fff; }
.status { padding: 3px 10px; border-radius: 20px; font-size: .82rem; background: var(--gold-light); color: var(--burgundy); }
footer { background: var(--burgundy-dark); color: #fff; text-align: center; padding: 32px 20px; }
footer a { color: #FFFFFF; }
.hidden { display: none; }
@media (max-width: 640px) { .hero h1 { font-size: 1.9rem; } .form-row { grid-template-columns: 1fr; } nav a { margin-left: 10px; } .hero-img { height: 240px; } .example-photo { height: 220px; } }

/* ---------- Animaciones (suaves, sin librerías) ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes tickPulse { 0% { transform: scale(1); } 40% { transform: scale(1.18); color: #fff; } 100% { transform: scale(1); } }
@keyframes previewFlash { 0% { opacity: .55; transform: scale(.995); } 100% { opacity: 1; transform: scale(1); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* Entrada del hero al cargar: completa en ~0.6 s, sin escalonamientos largos */
.hero h1 { animation: fadeUp .55s ease both; }
.hero p { animation: fadeUp .55s .05s ease both; }
.hero .btn { animation: fadeUp .55s .08s ease both; }
.hero-img { animation: fadeUp .55s .1s ease both; }

/* Aparición gradual al hacer scroll (rápida: 0.35 s) */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .35s ease, transform .35s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-card { opacity: 0; animation: cardIn .35s ease both; }

/* Seguro: si el observador no dispara, nada queda invisible (lo activa JS a los 1.2 s) */
.reveal-all .reveal, .reveal-all .reveal-card { opacity: 1 !important; transform: none !important; animation: none !important; }

/* Hover en tarjetas y botones */
.card { transition: transform .3s ease, box-shadow .3s ease; }
.card:hover { transform: translateY(-6px); box-shadow: 0 14px 28px rgba(122,46,58,.18); }
.card-img { transition: transform .45s ease; }
.card:hover .card-img { transform: scale(1.05); }
.price-card { transition: transform .3s ease, box-shadow .3s ease; }
.price-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(122,46,58,.14); }
.btn { transition: transform .25s ease, box-shadow .25s ease, filter .25s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(122,46,58,.28); }
.btn:active { transform: scale(.97); }
.filters button { transition: background .25s ease, color .25s ease, transform .25s ease; }
.filters button:hover { transform: translateY(-1px); }
.example { transition: box-shadow .3s ease; }
.example:hover { box-shadow: 0 10px 26px rgba(122,46,58,.12); }
.gallery figure img { transition: transform .45s ease; }
.gallery figure:hover img { transform: scale(1.06); }

/* Cuenta regresiva: pulso al cambiar los segundos */
.countdown b { display: block; transition: transform .2s ease; }
.countdown b.tick { animation: tickPulse .45s ease; }

/* Transición al cambiar de filtro y al abrir los ejemplos */
#catalog.catalog-fade { animation: fadeIn .45s ease; }
#examples.examples-fade { animation: fadeIn .5s ease; }

/* Vista previa del creador: cambio sutil al editar */
.preview { transition: opacity .3s ease; }
.preview.preview-flash { animation: previewFlash .45s ease; }

/* Respeto a prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .reveal-card { opacity: 1 !important; transform: none !important; }
}
