/* Sweet XV · María Fernanda — tema "Playbill" */
:root {
  --bg: #FBF5EA;
  --panel: #FFFFFF;
  --accent: #8C1D2F;
  --bulb: #C9952F;
  --text: #2B1A17;
  --muted: #6B5A52;
  --line: rgba(184, 134, 47, 0.45);
  --ticket: #8C1D2F;
  --ticket-text: #FBF5EA;
  --ticket-muted: #EBCFC4;
  --on-accent: #FFFFFF;
  --curtain: #8C1D2F;
  --curtain-dark: #5A0F1D;

  --font-display: 'Limelight', Georgia, serif;
  --font-script: 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
}
body.locked { overflow: hidden; }

a { color: inherit; }
button { font: inherit; }

/* ---------- Estructura ---------- */
.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 76px 20px 56px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--light { color: #FFF8EC; }
.eyebrow--ticket { color: var(--ticket-muted); }

.label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted { color: var(--muted); margin: 0; }
.small { font-size: 15px; }
.center { text-align: center; }

/* ---------- Marquesina ---------- */
.marquee {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--accent);
  border-radius: 18px;
  background: var(--panel);
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.marquee .eyebrow { margin-top: 10px; }
.marquee-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(54px, 17vw, 72px);
  line-height: 1;
  color: var(--accent);
}
.marquee-name {
  margin: 0;
  font-family: var(--font-script);
  font-style: italic;
  font-size: clamp(34px, 11vw, 44px);
  line-height: 1.1;
}
.title-btn {
  all: unset;
  cursor: pointer;
  display: inline-block;
  -webkit-tap-highlight-color: transparent;
}
.title-btn:focus-visible { outline: 3px solid var(--bulb); outline-offset: 4px; border-radius: 6px; }

/* Brillo tipo neón */
.neon { --glow: rgba(201, 149, 47, 0.55); animation: neon 3.2s ease-in-out infinite; }
.neon--gold { --glow: var(--bulb); }

/* Reflector que barre el cartel */
.spotlight {
  position: absolute;
  top: -60px;
  left: 0;
  width: 110px;
  height: 480px;
  background: radial-gradient(ellipse at center, rgba(255, 226, 160, 0.6) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  opacity: 0;
}
.spotlight.on { animation: sweep 7s ease-in-out 0.4s infinite; }

.guest-list {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.rule { width: 72px; height: 1px; background: var(--bulb); margin: 4px 0; }
.marquee-date {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bulbs { display: flex; justify-content: space-between; width: 100%; }
.bulbs span {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bulb);
  box-shadow: 0 0 10px var(--bulb);
  animation: bulb 1.4s ease-in-out infinite;
}

/* ---------- Saludo ---------- */
.greeting { text-align: center; padding: 0 8px; display: flex; flex-direction: column; gap: 10px; }
.greeting__hello {
  margin: 0;
  font-family: var(--font-script);
  font-style: italic;
  font-size: 28px;
  line-height: 1.2;
}

/* ---------- Cuenta regresiva ---------- */
.countdown { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.countdown__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.count { padding: 16px 0 12px; text-align: center; display: flex; flex-direction: column; }
.count__num { font-family: var(--font-display); font-size: 40px; line-height: 1; color: var(--accent); }
.count__label { margin-top: 6px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

/* ---------- Programa ---------- */
.program { padding: 24px 20px; display: flex; flex-direction: column; gap: 20px; border-radius: 18px; }
.section-title {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  color: var(--accent);
}
.detail { display: flex; gap: 14px; align-items: flex-start; }
.detail svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.detail div { display: flex; flex-direction: column; gap: 2px; }
.value { font-size: 18px; }

.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }

/* ---------- Botones ---------- */
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible, .choice__btn:focus-visible, .music-btn:focus-visible, input:focus-visible {
  outline: 3px solid var(--bulb);
  outline-offset: 2px;
}
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--outline { border: 1.5px solid var(--accent); color: var(--accent); background: transparent; }
.btn--gold { background: var(--bulb); color: var(--curtain-dark); font-size: 17px; min-height: 54px; padding: 0 30px; }
.btn--glow { animation: glow 2.2s ease-in-out infinite; }
.btn--ticket { background: var(--ticket-text); color: var(--ticket); min-height: 54px; font-size: 16px; width: 100%; }
.btn--ticket:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Vestimenta / regalo ---------- */
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.info { padding: 20px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.info svg { color: var(--accent); }
.info__value { font-family: var(--font-script); font-style: italic; font-size: 22px; line-height: 1.2; }
.info__value--small { font-size: 19px; line-height: 1.25; }

/* ---------- Boleto / confirmación ---------- */
.ticket { background: var(--ticket); color: var(--ticket-text); border-radius: 18px; display: flex; flex-direction: column; }
.ticket__head { padding: 24px 22px 20px; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.ticket__title { font-family: var(--font-display); font-size: 34px; line-height: 1.1; }
.ticket__muted { color: var(--ticket-muted); font-size: 15px; margin: 0; }
.ticket__strong { font-size: 15px; font-weight: 600; }
.ticket__perforation { border-top: 2px dashed var(--ticket-muted); margin: 0 16px; }
.ticket__body { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.ticket__question { margin: 0; text-align: center; font-family: var(--font-script); font-style: italic; font-size: 24px; }
.ticket__error { margin: 0; font-size: 15px; font-weight: 600; color: #FFE4D6; }

.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice__btn {
  min-height: 52px;
  border-radius: 999px;
  border: 2px solid var(--ticket-text);
  background: transparent;
  color: var(--ticket-text);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  padding: 0 10px;
  transition: background 0.2s ease, color 0.2s ease;
}
.choice__btn[aria-pressed="true"] { background: var(--ticket-text); color: var(--ticket); }

.songs { display: flex; flex-direction: column; gap: 12px; animation: fadeUp 0.5s ease both; }
.songs__title { display: flex; gap: 10px; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 22px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field span { font-size: 13px; font-weight: 500; color: var(--ticket-muted); }
.field input {
  min-height: 46px;
  border-radius: 12px;
  border: 1.5px solid var(--ticket-muted);
  background: transparent;
  color: var(--ticket-text);
  padding: 0 14px;
  font-family: var(--font-body);
  font-size: 16px;
}
.field input::placeholder { color: var(--ticket-text); opacity: 0.55; }

.ticket__done { padding: 28px 22px 30px; display: flex; flex-direction: column; gap: 8px; text-align: center; animation: fadeUp 0.7s ease both; }
.ticket__done-title { font-family: var(--font-display); font-size: 26px; line-height: 1.2; }
.ticket__songs { margin: 8px 0 0; padding: 0; list-style: none; color: var(--ticket-muted); font-size: 15px; }

.footer { text-align: center; font-size: 13px; line-height: 1.6; color: var(--muted); padding: 0 12px; }

/* ---------- Botón de música ---------- */
.music-btn {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 10;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: var(--panel);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 14px rgba(43, 26, 23, 0.12);
}
.music-btn .icon-pause { display: none; }
.music-btn.playing .icon-play { display: none; }
.music-btn.playing .icon-pause { display: block; }

/* ---------- Telón ---------- */
.curtain { position: fixed; inset: 0; z-index: 20; }
.curtain.opening { pointer-events: none; }
.curtain__panel {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--curtain) 0px, var(--curtain) 18px, var(--curtain-dark) 26px, var(--curtain) 34px);
  transition: transform 1.6s cubic-bezier(0.7, 0, 0.3, 1);
}
.curtain__panel--left { left: 0; box-shadow: inset -12px 0 24px rgba(0, 0, 0, 0.35); }
.curtain__panel--right { right: 0; box-shadow: inset 12px 0 24px rgba(0, 0, 0, 0.35); }
.curtain.opening .curtain__panel--left { transform: translateX(-102%); }
.curtain.opening .curtain__panel--right { transform: translateX(102%); }
.curtain__valance {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 40px;
  background: var(--curtain-dark);
  border-bottom: 3px solid var(--bulb);
  transition: opacity 0.6s ease;
}
.curtain__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: min(320px, 86vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  color: #FFF8EC;
  transition: opacity 0.5s ease;
}
.curtain__title { font-family: var(--font-display); font-size: 56px; line-height: 1; color: var(--bulb); }
.curtain__name { font-family: var(--font-script); font-style: italic; font-size: 34px; line-height: 1.1; }
.curtain__content .btn { margin-top: 18px; }
.curtain__hint { display: flex; gap: 8px; align-items: center; font-size: 13px; opacity: 0.85; }
.curtain.opening .curtain__content,
.curtain.opening .curtain__valance { opacity: 0; }

/* ---------- Pantallas auxiliares ---------- */
.gate, .loading {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px;
  text-align: center;
}
.gate__text { margin: 0; max-width: 340px; color: var(--muted); }
.loading { color: var(--muted); font-size: 15px; letter-spacing: 0.2em; text-transform: uppercase; }

/* ---------- Confeti ---------- */
.confetti { position: fixed; inset: 0; z-index: 15; pointer-events: none; overflow: hidden; }
.confetti span {
  position: absolute;
  top: 0;
  animation: fall var(--dur, 3s) cubic-bezier(0.25, 0.6, 0.4, 1) var(--delay, 0s) both;
}

/* ---------- Secreto 6 7 ---------- */
.six-seven {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
  background: rgba(251, 245, 234, 0.82);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fade67 2.8s ease forwards;
}
.six-seven__digits, .six-seven__tag { animation: pop67 2.8s ease forwards; }
.six-seven__digits {
  display: flex;
  gap: 22px;
  font-family: var(--font-display);
  font-size: 150px;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 8px rgba(201, 149, 47, 0.55), 0 0 26px rgba(201, 149, 47, 0.55);
}
.six-seven__digits span { display: inline-block; }
.six-seven__digits .six { animation: juggleUp 0.6s ease-in-out infinite; }
.six-seven__digits .seven { animation: juggleDown 0.6s ease-in-out infinite; }
.six-seven__tag {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--panel);
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(43, 26, 23, 0.12);
}

/* ---------- Animaciones ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: none; }

@keyframes bulb { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes glow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes neon {
  0%, 100% { text-shadow: 0 0 4px var(--glow), 0 0 14px var(--glow); }
  45% { text-shadow: 0 0 2px var(--glow), 0 0 6px var(--glow); }
  50% { text-shadow: 0 0 6px var(--glow), 0 0 22px var(--glow), 0 0 34px var(--glow); }
}
@keyframes sweep {
  0% { transform: translateX(-160px) rotate(18deg); opacity: 0; }
  6% { opacity: 1; }
  34% { transform: translateX(560px) rotate(18deg); opacity: 1; }
  40%, 100% { transform: translateX(560px) rotate(18deg); opacity: 0; }
}
@keyframes fall {
  0% { transform: translate(0, -40px) rotate(0deg); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate(var(--dx), 105vh) rotate(var(--rot)); opacity: 0; }
}
@keyframes pop67 {
  0% { transform: scale(0.3); opacity: 0; }
  14% { transform: scale(1.15); opacity: 1; }
  24% { transform: scale(1); }
  82% { opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}
@keyframes fade67 { 0% { opacity: 0; } 10%, 82% { opacity: 1; } 100% { opacity: 0; } }
@keyframes juggleUp { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-26px); } }
@keyframes juggleDown { 0%, 100% { transform: translateY(-26px); } 50% { transform: translateY(0); } }

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