/* ============================================================
   ClipClap TRC — Invitación (plantilla)
   ============================================================ */
:root {
  --c-main:  #8a5fc7;
  --c-accent:#ff6e9c;
  --c-light: #f4effb;
  --c-ink:   #3e2a63;
  --c-muted: #6e6488;
  --serif: "Fredoka", "Poppins", sans-serif;
  --script: "Great Vibes", cursive;
  --sans: "Nunito", -apple-system, sans-serif;
  --shadow: 0 18px 50px rgba(36,23,38,.16);
  --shadow-sm: 0 8px 22px rgba(36,23,38,.10);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans); color: var(--c-ink); background: var(--c-light);
  line-height: 1.7; overflow-x: hidden; font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.section { padding: 74px 20px; max-width: 620px; margin-inline: auto; text-align: center; }
.eyebrow { font-family: var(--sans); text-transform: uppercase; letter-spacing: .3em; font-size: .68rem; font-weight: 600; color: var(--c-accent); }
.title { font-family: var(--serif); font-weight: 600; font-size: 2.3rem; color: var(--c-main); margin: 10px 0 8px; }
.divider { width: 60px; height: 1px; background: var(--c-accent); margin: 18px auto; position: relative; }
.divider::before { content: "❦"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); color: var(--c-accent); background: var(--c-light); padding: 0 10px; font-size: 1rem; }
.reveal { opacity: 0; transform: translateY(28px); transition: .8s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Portada ---- */
.cover {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 40px 20px; color: #fff; position: relative; overflow: hidden;
  background: var(--c-main);
}
.cover::after {
  content:""; position:absolute; inset:0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 24px 24px; opacity:.5;
}
.cover.has-photo { background-size: cover; background-position: center; }
.cover.has-photo::before { content:""; position:absolute; inset:0; background: var(--c-ink); opacity:.60; z-index:1; }
.cover-inner { position: relative; z-index: 2; }
.cover .eyebrow { color: var(--c-accent); }
.cover .names { font-family: var(--script); font-size: clamp(3.4rem, 14vw, 6rem); color: #fff; line-height: 1; margin: 18px 0; }
.cover .sub { font-family: var(--serif); font-size: 1.3rem; letter-spacing: .05em; opacity: .9; }
.cover .date { margin-top: 22px; font-size: .85rem; letter-spacing: .25em; text-transform: uppercase; color: var(--c-accent); }
.cover .scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2; color: rgba(255,255,255,.6); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; }
.cover .scroll-hint::after { content:"⌄"; display:block; font-size:1.6rem; animation: bob 1.6s infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(6px);} }

/* ---- Cuenta regresiva ---- */
.count { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.count div { background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); padding: 18px 8px; width: 84px; }
.count b { font-family: var(--serif); font-size: 2.2rem; color: var(--c-main); display: block; line-height: 1; }
.count span { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--c-muted); }

/* ---- Mensaje ---- */
.mensaje p { font-family: var(--serif); font-size: 1.4rem; font-style: italic; color: var(--c-main); line-height: 1.6; }

/* ---- Itinerario ---- */
.itin { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.itin-item { display: flex; gap: 18px; align-items: flex-start; padding: 18px 0; border-bottom: 1px dashed rgba(61,37,66,.18); }
.itin-item:last-child { border: 0; }
.itin-ic { font-size: 1.6rem; width: 46px; height: 46px; display: grid; place-items: center; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); flex-shrink: 0; }
.itin-time { font-family: var(--serif); font-size: 1.25rem; color: var(--c-accent); font-weight: 600; min-width: 60px; }
.itin-item h4 { font-family: var(--sans); font-size: 1.02rem; color: var(--c-main); }
.itin-item p { font-size: .88rem; color: var(--c-muted); }

/* ---- Ubicación ---- */
.loc-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow-sm); padding: 26px; margin-bottom: 16px; text-align: center; }
.loc-card h4 { font-family: var(--serif); font-size: 1.5rem; color: var(--c-main); }
.loc-card p { color: var(--c-muted); font-size: .92rem; margin: 6px 0 16px; }
.loc-btns { display: flex; gap: 10px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 600;
  font-size: .9rem; padding: 12px 24px; border-radius: 999px; cursor: pointer; border: 1.5px solid transparent;
  transition: .3s; background: var(--c-accent); color: var(--c-ink);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-outline { background: transparent; border-color: var(--c-main); color: var(--c-main); }
.btn-main { background: var(--c-main); color: #fff; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Vestimenta ---- */
.dress { background: var(--c-ink); color: #fff; border-radius: 22px; padding: 44px 30px; }
.dress .eyebrow { color: var(--c-accent); }
.dress .code { font-family: var(--serif); font-size: 2rem; margin: 12px 0 6px; }
.dress p { opacity: .85; font-size: .95rem; }
.dress .swatches { display: flex; gap: 12px; justify-content: center; margin-top: 22px; }
.dress .swatches span { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); }

/* ---- RSVP ---- */
.rsvp { background: #fff; }
.rsvp-card { background: #fff; border: 1px solid rgba(61,37,66,.12); border-radius: 22px; box-shadow: var(--shadow); padding: 36px 28px; text-align: left; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--c-main); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid rgba(61,37,66,.18); border-radius: 12px;
  font-family: var(--sans); font-size: .95rem; color: var(--c-ink); background: var(--c-light); transition: .25s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--c-accent); background: #fff; }
.radio-row { display: flex; gap: 10px; }
.radio-row label {
  flex: 1; text-align: center; padding: 13px; border: 1.5px solid rgba(61,37,66,.18); border-radius: 12px;
  cursor: pointer; font-weight: 600; font-size: .9rem; transition: .25s; margin: 0;
}
.radio-row input { display: none; }
.radio-row input:checked + label { border-color: var(--c-accent); background: var(--c-accent); color: var(--c-ink); }
.rsvp-msg { margin-top: 14px; padding: 14px; border-radius: 12px; font-size: .9rem; text-align: center; display: none; }
.rsvp-msg.ok { display: block; background: #e7f6ec; color: #1c7a3e; }
.rsvp-msg.err { display: block; background: #fdeaea; color: #b3261e; }

/* ---- Regalos ---- */
.gift-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gift { background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); padding: 22px 16px; transition: .3s; }
.gift:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gift h4 { font-family: var(--serif); font-size: 1.4rem; color: var(--c-main); }
.gift p { font-size: .76rem; color: var(--c-muted); margin: 4px 0 12px; min-height: 18px; }

/* ---- Sobre digital ---- */
.envelope { background: var(--c-accent); color: #fff; border-radius: 22px; padding: 36px 28px; text-align: left; }
.envelope h3 { font-family: var(--serif); font-size: 1.8rem; text-align: center; }
.envelope > p { text-align: center; font-size: .9rem; margin: 6px 0 20px; }
.env-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(36,23,38,.15); font-size: .92rem; }
.env-row:last-child { border: 0; }
.env-row b { font-weight: 600; }
.env-copy { background: var(--c-main); color: #fff; border: none; border-radius: 8px; padding: 6px 12px; font-size: .75rem; cursor: pointer; font-family: var(--sans); font-weight: 600; }

/* ---- Galería ---- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery .ph {
  aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--c-main);
  display: grid; place-items: center; color: rgba(255,255,255,.5); font-size: 1.6rem; box-shadow: var(--shadow-sm);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Pase QR ---- */
.pase-card { background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 32px 26px; border: 2px dashed var(--c-accent); }
.pase-card h4 { font-family: var(--serif); font-size: 1.6rem; color: var(--c-main); }
.pase-card p { color: var(--c-muted); font-size: .88rem; margin-bottom: 18px; }
#qrcode { display: flex; justify-content: center; margin: 10px 0; }
#qrcode canvas, #qrcode img { border-radius: 12px; }
.pase-name { font-family: var(--serif); font-size: 1.3rem; color: var(--c-main); margin-top: 14px; }
.pase-hint { font-size: .78rem; color: var(--c-muted); margin-top: 4px; }

/* ---- Botón de música ---- */
.music-btn {
  position: fixed; top: 16px; right: 16px; z-index: 50; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.15); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.4);
  color: #fff; cursor: pointer; display: grid; place-items: center; font-size: 1.1rem; transition: .3s;
}
.music-btn.playing { animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Footer ---- */
.inv-foot { text-align: center; padding: 40px 20px; color: var(--c-muted); font-size: .8rem; background: var(--c-light); }
.inv-foot .names { font-family: var(--script); font-size: 2rem; color: var(--c-main); }
.inv-foot .brand { margin-top: 16px; font-size: .72rem; letter-spacing: .1em; }
.inv-foot .brand a { color: var(--c-accent); font-weight: 600; }

@media (max-width: 480px) {
  .gift-grid { grid-template-columns: 1fr; }
  .count div { width: 70px; }
}
