@font-face { font-family: "Grenze Gotisch"; font-weight: 700; font-display: swap; src: url("/fonts/grenze-gotisch-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Grenze Gotisch"; font-weight: 900; font-display: swap; src: url("/fonts/grenze-gotisch-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("/fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 500; font-display: swap; src: url("/fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url("/fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-display: swap; src: url("/fonts/instrument-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --noche: #1C0509;
  --vino: #3D0A12;
  --vino-hondo: #2A070D;
  --sangre: #D1122F;
  --sangre-viva: #EE2A45;
  --hueso: #F3E9DC;
  --hueso-tenue: #D9C9BD;
  --niebla: #A8959A;
  --error: #FF9AA8;
  --ok: #7FD8A4;
  --gotica: "Grenze Gotisch", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--noche);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, #3A0A12 0%, transparent 60%),
    var(--noche);
  color: var(--hueso);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--sangre-viva); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* Barra superior */
.barra {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1080px; margin: 0 auto; padding: 18px 20px 0;
}
.marca {
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.42em; padding-left: 0.42em;
}
.insta { font-size: 0.9rem; color: var(--hueso-tenue); text-decoration-color: rgba(243,233,220,.3); text-underline-offset: 4px; }

/* Escena: portada + panel */
.escena {
  max-width: 1080px; margin: 0 auto; padding: 8px 20px 40px;
  display: grid; gap: 28px;
}
@media (min-width: 880px) {
  .escena { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 64px; align-items: start; padding-top: 32px; }
  .portada { position: sticky; top: 24px; }
}

/* Portada con la ventana gótica */
.portada { display: grid; justify-items: center; text-align: center; }
.ventana { width: min(100%, 400px); margin-top: 8px; }
.ventana svg { width: 100%; height: auto; overflow: visible; }
.luna { animation: sube 2.2s cubic-bezier(.16,.8,.24,1) both; }
@keyframes sube { from { transform: translateY(120px); opacity: .2; } }

.titulo { margin-top: -30%; position: relative; width: min(100%, 400px); }
@media (min-width: 440px) { .titulo { margin-top: -132px; } }
.presenta { margin: 0 0 .2rem; font-weight: 600; color: var(--hueso-tenue); font-size: .95rem; }
h1 {
  margin: 0; font-family: var(--gotica); font-weight: 900;
  line-height: .82; letter-spacing: -0.01em;
  text-wrap: balance;
}
.js-pendiente #titulo-evento { opacity: 0; }
h1.con-logo { width: 100%; margin: 4px auto 0; line-height: 0; }
h1.con-logo svg { width: 100%; height: auto; overflow: visible; }
h1 .l1 { display: block; font-weight: 700; font-size: clamp(2.4rem, 11vw, 3.6rem); }
h1 .l2 { display: block; font-size: clamp(4.2rem, 21vw, 7rem); text-shadow: 0 2px 0 rgba(209,18,47,.55), 0 10px 40px rgba(209,18,47,.35); }

.datos {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: grid; gap: 12px; text-align: left; width: min(100%, 400px);
}
.datos li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; color: var(--hueso-tenue); }
.datos svg { width: 22px; height: 22px; margin-top: 1px; fill: none; stroke: var(--sangre-viva); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.datos a { text-decoration-color: rgba(243,233,220,.3); text-underline-offset: 4px; }
.datos li:first-child { color: var(--hueso); font-weight: 600; }
.hora { display: block; font-weight: 400; color: var(--hueso-tenue); }

/* Panel del formulario */
.panel {
  background: linear-gradient(180deg, var(--vino) 0%, #300810 100%);
  border: 1px solid rgba(243,233,220,.1);
  border-radius: 22px;
  padding: 26px 22px 24px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8);
}
h2 { margin: 0; font-family: var(--gotica); font-weight: 700; font-size: 2.3rem; line-height: 1; }
.bajada { margin: 8px 0 22px; color: var(--hueso-tenue); }

.campo { margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%; height: 52px; padding: 0 14px;
  font: 500 1.0625rem/1 var(--sans); color: var(--hueso);
  background: var(--vino-hondo);
  border: 1px solid rgba(243,233,220,.18); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: rgba(168,149,154,.75); }
input:focus { outline: none; border-color: var(--sangre-viva); box-shadow: 0 0 0 3px rgba(238,42,69,.25); }
input[aria-invalid="true"] { border-color: var(--error); }

.prefijo { display: flex; align-items: stretch; }
.prefijo span {
  display: grid; place-items: center; padding: 0 12px;
  background: #22060B; color: var(--niebla); font-weight: 600;
  border: 1px solid rgba(243,233,220,.18); border-right: 0; border-radius: 10px 0 0 10px;
}
.prefijo input { border-radius: 0 10px 10px 0; }

.error { margin: 6px 0 0; color: var(--error); font-size: .9rem; min-height: 0; }
.error:empty { display: none; }
.error.general { margin-top: 12px; }

.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.acepto { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-weight: 400; font-size: .9rem; color: var(--hueso-tenue); margin: 6px 0 0; cursor: pointer; }
.acepto input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--sangre); }

.boton {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; margin-top: 20px; padding: 0 24px;
  font: 700 1.0625rem/1 var(--sans); color: var(--hueso); text-decoration: none;
  background: var(--sangre); border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(209,18,47,.8);
  transition: background .15s, transform .1s;
}
.boton:hover { background: var(--sangre-viva); }
.boton:active { transform: translateY(1px); }
.boton[disabled] { cursor: progress; opacity: .8; }
.boton.secundario { background: transparent; border: 1px solid rgba(243,233,220,.35); box-shadow: none; }
.boton.secundario:hover { background: rgba(243,233,220,.06); }
.girando { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(243,233,220,.35); border-top-color: var(--hueso); animation: gira .8s linear infinite; }
.boton[aria-busy="true"] .girando { display: block; }
@keyframes gira { to { transform: rotate(360deg); } }

/* Resultado */
.resultado h2 { outline: none; }
.marco-ticket { display: grid; place-items: center; margin: 4px 0 0; }
.marco-ticket img {
  width: min(100%, 340px); height: auto; border-radius: 14px;
  animation: aparece .7s cubic-bezier(.16,.8,.24,1) both;
  -webkit-touch-callout: default;
}
@keyframes aparece { from { transform: translateY(24px) scale(.98); opacity: 0; } }
.acciones { display: grid; gap: 10px; margin-top: 4px; }
.acciones .boton { margin-top: 12px; }
.pista { margin: 14px 0 0; font-size: .85rem; color: var(--niebla); text-align: center; }

/* Pie y WhatsApp */
.pie { text-align: center; color: var(--niebla); font-size: .85rem; padding: 12px 20px 32px; }
.whatsapp {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: #25D366; color: #fff;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.6);
}
.whatsapp svg { width: 30px; height: 30px; fill: currentColor; }

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