/* ============================================================
   FRENZEO — Estilos compartidos
   Mismos tokens de marca que kit.frenzeo.com/talleres
   (Syne para títulos, DM Sans para cuerpo, paleta verde+dorado)
   ============================================================ */

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

:root {
  --g-dark:   #0d7a3a;
  --g-mid:    #13994C;
  --g-light:  #3BAA61;
  --g-pale:   #d4f0df;
  --g-ultra:  #f0faf4;
  --white:    #ffffff;
  --off:      #f8faf9;
  --ink:      #0b1f13;
  --ink2:     #1e3a27;
  --muted:    #4d7a5e;
  --muted2:   #7fa892;
  --border:   rgba(19,153,76,0.15);
  --borderS:  rgba(19,153,76,0.3);
  --gold:     #b8892e;
  --gold-pale:#faf3e3;
  --danger:   #c0392b;
  --danger-bg:#fbe9e7;
}

html { scroll-behavior: smooth; height: 100%; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--off);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { text-decoration: none; color: inherit; }

.h1, .h2, .h3 { font-family: 'Syne', sans-serif; font-weight: 800; color: var(--ink); letter-spacing: -0.5px; line-height: 1.15; }
.h1 { font-size: clamp(24px, 4vw, 30px); }
.h2 { font-size: 22px; }
.h3 { font-size: 17px; }
.muted { color: var(--muted); font-weight: 300; line-height: 1.6; }
.label { font-size: 13px; font-weight: 600; color: var(--ink); }
.label .req { color: var(--gold); }

/* ── HEADER ── */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.header-logo-img { height: 30px; width: auto; display: block; }
.header .logo-txt { font-family: 'Syne', sans-serif; font-size: 21px; font-weight: 800; color: var(--g-mid); }
.header .logo-sep { display: inline-block; width: 1px; height: 15px; background: var(--border); margin: 0 2px; vertical-align: middle; }
.header .logo-sub { font-size: 14px; font-weight: 700; color: var(--ink); }
.btn-visita {
  background: var(--g-mid); color: #fff !important; text-decoration: none;
  padding: 10px 22px; border-radius: 100px; font-family: 'DM Sans', sans-serif;
  font-weight: 700; font-size: 13.5px; transition: background 0.2s, transform 0.15s; white-space: nowrap;
}
.btn-visita:hover { background: var(--g-dark); transform: translateY(-1px); }

/* ── FOOTER discreto (oscuro, igual al de kit.frenzeo.com) ── */
.site-footer {
  background: var(--ink);
  padding: 26px 5vw;
  margin-top: 48px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
}
.footer-copy { font-size: 12px; color: rgba(255,255,255,0.5); font-family: 'DM Sans', sans-serif; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.8);
  transition: background 0.2s, color 0.2s;
}
.footer-social a:hover { background: rgba(255,255,255,0.18); color: #fff; }
.footer-social svg { width: 15px; height: 15px; fill: currentColor; }

@media (max-width: 480px) {
  .header { padding: 13px 16px; }
  .header .logo-txt { font-size: 17px; }
  .header .logo-sub { font-size: 12px; }
  .header .logo-sep { margin: 0 1px; height: 13px; }
  .btn-visita { padding: 8px 14px; font-size: 12px; }
  .site-footer { padding: 20px 16px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-copy { font-size: 11px; line-height: 1.5; }
}

/* ── INFO DEL EVENTO — hero estilo Luma (fecha, hora, lugar, mapa) ── */
.evento-hero {
  background: var(--g-ultra);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px 26px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.evento-hero::after {
  content: ''; position: absolute; right: -100px; top: -100px; width: 280px; height: 280px;
  border-radius: 50%; background: radial-gradient(circle, rgba(19,153,76,0.10) 0%, rgba(19,153,76,0) 70%);
  pointer-events: none;
}
.evento-hero-title { font-family: 'Syne', sans-serif; font-weight: 800; font-size: clamp(20px, 3.6vw, 26px); color: var(--ink); margin-bottom: 16px; position: relative; z-index: 1; letter-spacing: -0.4px; }
.evento-info-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); margin-bottom: 8px; position: relative; z-index: 1; }
.evento-info-row .ico { width: 32px; height: 32px; border-radius: 9px; background: var(--white); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.evento-descripcion { font-size: 14px; color: var(--muted); line-height: 1.65; font-weight: 300; margin-top: 12px; position: relative; z-index: 1; }
.inscritos-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted2); margin-top: 12px; position: relative; z-index: 1; }
.map-embed { width: 100%; height: 170px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); margin-top: 16px; position: relative; z-index: 1; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ── SHELL: centra y limita el ancho en tablet/desktop ── */
.shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  flex: 1 0 auto;
}
@media (min-width: 1024px) { .shell { max-width: 560px; padding-top: 40px; } }

/* ── CARD ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  border: none; border-radius: 100px; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 15px;
  padding: 15px 28px;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
}
.btn-primary { background: var(--g-mid); color: #fff; width: 100%; }
.btn-primary:hover:not(:disabled) { background: var(--g-dark); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-text { background: none; color: var(--muted); padding: 10px 6px; }
.btn-text:hover { color: var(--g-mid); }
.btn-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.btn-row .btn-primary { flex: 1; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── FORM FIELDS ── */
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="number"], .field input[type="date"], .field select {
  width: 100%; font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--ink);
  background: var(--g-ultra);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s;
}
.field input:focus, .field select:focus { border-color: var(--g-mid); }
.field-hint { font-size: 12px; color: var(--muted2); margin-top: 4px; }
.field-desc { font-size: 12.5px; color: var(--muted2); margin-top: -8px; margin-bottom: 10px; line-height: 1.5; }
.section-title { font-size: 12px; font-weight: 800; color: var(--g-mid); letter-spacing: 0.06em; text-transform: uppercase; margin: 20px 0 12px; }

/* Casilla Sí/No — reemplaza el switch, se siente más "de formulario" */
.yn-check {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px; margin-bottom: 10px;
  background: var(--g-ultra); border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.yn-check:hover { border-color: var(--borderS); }
.yn-check.checked { background: var(--g-pale); border-color: var(--borderS); }
.yn-check input { margin-top: 2px; accent-color: var(--g-mid); width: 17px; height: 17px; flex-shrink: 0; cursor: pointer; }
.yn-check .yn-text { font-size: 14px; color: var(--ink); font-weight: 500; line-height: 1.4; }
.yn-check .yn-text small { display: block; font-size: 12px; color: var(--muted2); font-weight: 400; margin-top: 2px; }

/* Chips (selección de una opción) */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 10px 16px; border-radius: 100px; border: 1px solid var(--border); background: var(--g-ultra); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.chip.active { background: var(--g-mid); border-color: var(--g-mid); color: #fff; }

/* Checkbox de consentimiento */
.consent { display: flex; gap: 10px; align-items: flex-start; padding: 12px; background: var(--g-ultra); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; cursor: pointer; }
.consent input { margin-top: 3px; accent-color: var(--g-mid); width: 16px; height: 16px; flex-shrink: 0; }
.consent span { font-size: 13px; color: var(--ink); line-height: 1.5; }

/* Slider */
.slider-label { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; display: block; }
input[type="range"] { width: 100%; accent-color: var(--g-mid); }
.slider-caps { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted2); margin-top: 2px; }

/* ── PROGRESS HEADER (registro) ── */
.progress-header {
  background: linear-gradient(135deg, var(--g-dark), var(--g-mid));
  border-radius: 20px;
  padding: 26px 24px 20px;
  color: #fff;
  margin-bottom: 20px;
}
.progress-header .tag { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: rgba(255,255,255,0.75); text-transform: uppercase; }
.progress-header .title { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; letter-spacing: -0.5px; margin: 6px 0 16px; }
.progress-track { height: 6px; background: rgba(255,255,255,0.25); border-radius: 100px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--gold); border-radius: 100px; transition: width 0.3s; }
.progress-step-label { font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 6px; }

/* ── ESTADOS (cargando/cerrado/error/éxito) ── */
.estado-info { text-align: center; padding-top: 60px; max-width: 420px; margin: 0 auto; }
.estado-icon { width: 64px; height: 64px; border-radius: 50%; background: #fff; box-shadow: 0 8px 20px rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 28px; }
.estado-icon.exito { background: var(--g-pale); }
.estado-info h2 { margin-bottom: 8px; }

/* ── LOADER centrado ── */
.loader-center { display: flex; justify-content: center; padding-top: 80px; }
.big-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--g-pale); border-top-color: var(--g-mid); animation: spin 0.8s linear infinite; }

/* ── EVENT CARDS (selector estilo Luma) ── */
.evento-card { display: flex; gap: 16px; align-items: flex-start; padding: 20px; margin-bottom: 14px; cursor: pointer; }
.evento-card:hover { border-color: var(--borderS); }
.evento-card.disabled { opacity: 0.55; cursor: not-allowed; }
.evento-icon { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, var(--g-dark), var(--g-mid)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; flex-shrink: 0; }
.evento-meta { font-size: 13px; color: var(--muted2); margin-top: 4px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 100px; margin-top: 8px; }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

/* ── CERTIFICADO ── */
.cert-hero {
  background: linear-gradient(135deg, var(--g-dark), var(--g-mid));
  border-radius: 24px;
  padding: 48px 24px;
  text-align: center;
  color: #fff;
  box-shadow: 0 16px 30px rgba(11,31,19,0.12);
}
.cert-badge { width: 72px; height: 72px; border-radius: 50%; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto 20px; }
.cert-hero .tag { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; color: rgba(255,255,255,0.7); }
.cert-hero .nombre { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; margin: 14px 0; }
.cert-divider { width: 60px; height: 1px; background: rgba(255,255,255,0.35); margin: 16px auto; }
.cert-hero .taller { font-family: 'Syne', sans-serif; font-size: 19px; font-weight: 800; color: var(--gold); margin: 6px 0; }
.cert-hero .fecha, .cert-hero .completo { font-size: 13px; color: rgba(255,255,255,0.75); }

.error-text { color: var(--danger); font-size: 13px; font-weight: 600; margin: 10px 0; }

/* ── DINAMISMO: animaciones de entrada y hover ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.step-enter { animation: fadeSlideUp 0.35s ease both; }

@keyframes popIn {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
.pop-in { animation: popIn 0.3s ease both; }

.btn-primary:not(:disabled):active { transform: scale(0.98); }
.chip { transition: all 0.15s ease; }
.chip:hover:not(.active) { border-color: var(--borderS); background: var(--g-pale); }
.evento-card { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.evento-card:hover:not(.disabled) { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(11,31,19,0.08); }
.yn-check input, .chip, .btn { transition-property: all; }
.progress-fill { transition: width 0.4s cubic-bezier(0.4,0,0.2,1); }

/* ── GASTOS (fila responsive) ── */
.gasto-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.gasto-row .cat { flex: 0 0 34%; font-size: 14px; color: var(--ink); }
.gasto-row .monto { flex: 1; }
.gasto-row .tipo { flex: 1; }
@media (max-width: 480px) {
  .gasto-row { flex-wrap: wrap; }
  .gasto-row .cat { flex: 0 0 100%; margin-bottom: 6px; font-weight: 600; }
}

/* ── REGLA 50/30/20 ── */
.regla-row { display: flex; align-items: center; padding: 10px 0; font-size: 14px; }
.regla-row .nombre { flex: 1; color: var(--ink); }
.regla-row .ideal { color: var(--muted); margin-right: 12px; font-size: 13px; }
.regla-row .real { font-weight: 800; }
.regla-row .real.ok { color: var(--g-mid); }
.regla-row .real.warn { color: var(--danger); }
