/* =====================================================================
   SISTEMA DE DISEÑO · ver DESIGN.md
   1. Tokens   2. Base   3. Componentes   4. Secciones públicas   5. Responsive
   ===================================================================== */

/* 1. TOKENS ----------------------------------------------------------- */
:root {
  /* Neutros */
  --bg: #0b0c0f;
  --surface: #131519;
  --surface-2: #1a1d22;
  --surface-3: #23272d;
  --border: #262a31;
  --border-strong: #363b44;
  --text: #f2f1ee;
  --text-2: #a5a9b1;
  --text-3: #6f747d;

  /* Marca: un solo acento */
  --accent: #d08a4a;
  --accent-hover: #e39d5e;
  --accent-ink: #1a0d03;
  --accent-soft: rgba(208, 138, 74, .12);
  --live: #e5383b;

  /* Semánticos */
  --success: #2bb673;
  --success-soft: rgba(43, 182, 115, .12);
  --warning: #e8a33d;
  --warning-soft: rgba(232, 163, 61, .13);
  --danger: #e5484d;
  --danger-soft: rgba(229, 72, 77, .12);

  /* Papel (boletos) */
  --paper: #f6f1e4;
  --paper-2: #ede5d1;
  --paper-ink: #1c1a16;
  --paper-ink-2: #6b6455;
  --paper-line: #d6ccb4;

  /* Tipografía */
  --font-display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-xs: .75rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.125rem;
  --fs-xl: 1.5rem; --fs-2xl: 2rem; --fs-3xl: clamp(2.25rem, 5vw, 3rem); --fs-hero: clamp(2.75rem, 7vw, 4.75rem);

  /* Espaciado (base 4) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* Radios, sombras, movimiento */
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 999px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-2: 0 12px 32px -8px rgba(0, 0, 0, .55);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: .18s;

  /* Alias heredados (usados por estilos en línea en JS) */
  --bg2: var(--surface); --card: var(--surface); --card2: var(--surface-2);
  --line: var(--border); --line2: var(--border-strong);
  --muted: var(--text-2); --dim: var(--text-3);
  --gold: var(--accent); --hot: var(--live);
  --ok: var(--success); --warn: var(--warning); --err: var(--danger);
  --display: var(--font-display); --body: var(--font-body);
  color-scheme: dark;
}

/* 2. BASE ------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--font-body); font-size: var(--fs-md); line-height: 1.55; color: var(--text); background: var(--bg); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-stretch: 85%; font-weight: 800; line-height: 1.05; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.wrap { width: min(1200px, 100%); margin: 0 auto; padding: 0 var(--s-4); }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.small { font-size: var(--fs-sm); }
.center { text-align: center; }
.hidden { display: none !important; }
.row { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.row-end { display: flex; gap: var(--s-2); justify-content: flex-end; flex-wrap: wrap; margin-top: var(--s-5); }
.grow { flex: 1; }
.mono, .tnum { font-variant-numeric: tabular-nums; }
.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.i-sm { width: 15px; height: 15px; }
.i-lg { width: 22px; height: 22px; }
.i-fill { fill: currentColor; stroke: none; }
.overline { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }

/* 3. COMPONENTES ------------------------------------------------------ */
/* Botón: variantes primary | secondary | ghost | success | danger ; tamaños sm | md | lg */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-5); border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font-weight: 600; font-size: .95rem; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { background: var(--surface-3); border-color: #444a54; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary, .btn-gold, .btn-hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover, .btn-gold:hover, .btn-hot:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: transparent; }
.btn-outline { background: transparent; }
.btn-ok { background: var(--success-soft); border-color: rgba(43, 182, 115, .4); color: var(--success); }
.btn-ok:hover { background: rgba(43, 182, 115, .2); border-color: var(--success); }
.btn-danger { background: var(--danger-soft); border-color: rgba(229, 72, 77, .4); color: #ff8a8d; }
.btn-danger:hover { background: rgba(229, 72, 77, .2); border-color: var(--danger); }
.btn-wa { background: #25d366; border-color: #25d366; color: #052e16; }
.btn-wa:hover { background: #3ee07a; border-color: #3ee07a; }
.btn-sm { min-height: 34px; padding: 0 var(--s-3); font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn-lg { min-height: 52px; padding: 0 var(--s-6); font-size: 1rem; }
.btn-block { width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface-2); cursor: pointer; display: inline-grid; place-items: center; color: var(--text-2); }
.icon-btn:hover { color: var(--text); background: var(--surface-3); }

/* Formularios */
.field { display: grid; gap: 6px; margin-bottom: var(--s-4); }
.field > span { font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--bg); outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: #444a54; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.bad { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
textarea.input { resize: vertical; min-height: 96px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a5a9b1' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
select.input option { background: var(--surface); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-4); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 var(--s-4); }
.check { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; line-height: 1.45; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin-top: 1px; }
.hint { font-size: var(--fs-sm); color: var(--text-3); }
.err-msg { color: #ff8a8d; font-size: var(--fs-sm); min-height: 1.3em; margin: var(--s-2) 0; }

/* Badge de estado */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-pendiente { background: var(--warning-soft); color: var(--warning); }
.badge-aprobada, .badge-activa { background: var(--success-soft); color: var(--success); }
.badge-rechazada { background: var(--danger-soft); color: #ff8a8d; }
.badge-pausada { background: var(--warning-soft); color: var(--warning); }
.badge-finalizada { background: var(--surface-3); color: var(--text-2); }
.badge-live { background: var(--live); color: #fff; }
.badge-live::before { background: #fff; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* Barra de progreso */
.progress { height: 6px; background: var(--surface-3); border-radius: var(--r-full); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .8s var(--ease); }
.progress-label { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--text-2); margin-bottom: var(--s-2); }
.progress-label b { color: var(--text); font-variant-numeric: tabular-nums; }

/* Tarjeta base */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }

/* Boleto (papel) */
.ticket { display: grid; grid-template-columns: 1fr 120px; background: var(--paper); color: var(--paper-ink); border-radius: var(--r-lg); position: relative; overflow: hidden; box-shadow: var(--shadow-2); }
.ticket-main { padding: var(--s-5); min-width: 0; }
.ticket-stub { border-left: 2px dashed var(--paper-line); padding: var(--s-5) var(--s-3); display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; background: var(--paper-2); position: relative; }
.ticket-stub::before, .ticket-stub::after { content: ''; position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); }
.ticket-stub::before { top: -10px; } .ticket-stub::after { bottom: -10px; }
.modal .ticket-stub::before, .modal .ticket-stub::after { background: var(--surface); }
.ticket-brand { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--paper-ink-2); }
.ticket-title { font-family: var(--font-display); font-stretch: 80%; font-weight: 800; font-size: 1.6rem; line-height: 1.05; margin: var(--s-2) 0 2px; }
.ticket-sub { color: var(--paper-ink-2); font-size: var(--fs-sm); }
.ticket-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin: var(--s-3) 0 var(--s-4); font-size: var(--fs-sm); color: var(--paper-ink-2); }
.ticket-meta b { color: var(--paper-ink); }
.ticket-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; max-height: 300px; overflow: auto; }
.ticket-nums small { display: block; font-family: var(--font-body); font-stretch: 100%; font-size: .62rem; font-weight: 600; letter-spacing: .02em; color: var(--paper-ink-2); margin-bottom: 1px; }
.ticket-help { margin-top: var(--s-3); font-size: var(--fs-xs); color: var(--paper-ink-2); }
.ig-link { display: inline-flex; align-items: center; gap: 4px; }
#footTag .i, .terms-list .i { vertical-align: -2px; }
.ticket-nums span { border: 1.5px solid var(--paper-ink); border-radius: var(--r-sm); text-align: center; padding: 5px 2px; font-family: var(--font-display); font-stretch: 80%; font-weight: 800; font-size: 1.2rem; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.ticket-code { font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: 1.35rem; letter-spacing: .04em; writing-mode: vertical-rl; transform: rotate(180deg); }
.ticket-stub small { font-size: .65rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--paper-ink-2); }
.ticket .badge-pendiente { background: #f3dfb4; color: #8a5a00; }
.ticket .badge-aprobada { background: #cdebd9; color: #11683f; }
.ticket .badge-rechazada { background: #f4cfcf; color: #a01d22; }
.ticket-rechazada { opacity: .75; }
.ticket-note { color: #a01d22; font-size: var(--fs-sm); margin-top: var(--s-3); }
.barcode { width: 54px; height: 54px; }

/* Modal */
.modal-wrap { position: fixed; inset: 0; z-index: 100; background: rgba(5, 5, 7, .78); display: grid; place-items: center; padding: var(--s-4); opacity: 0; transition: opacity var(--dur); overflow-y: auto; }
.modal-wrap.show { opacity: 1; }
.modal { width: min(560px, 100%); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-xl); position: relative; max-height: calc(100dvh - 32px); overflow-y: auto; box-shadow: var(--shadow-2); transform: translateY(8px); transition: transform .22s var(--ease); }
.modal-wrap.show .modal { transform: none; }
.modal-wide { width: min(920px, 100%); }
.modal-body { padding: var(--s-6); }
.modal-x { position: absolute; right: var(--s-4); top: var(--s-4); width: 36px; height: 36px; border-radius: var(--r-md); border: 0; background: transparent; color: var(--text-2); cursor: pointer; z-index: 2; display: grid; place-items: center; }
.modal-x:hover { background: var(--surface-2); color: var(--text); }
.m-title { font-size: var(--fs-2xl); margin-bottom: var(--s-1); padding-right: 44px; }
.m-sub { color: var(--text-2); font-size: var(--fs-sm); }

/* Toasts */
#toasts { position: fixed; bottom: var(--s-5); left: 50%; transform: translateX(-50%); display: grid; gap: var(--s-2); z-index: 200; width: min(420px, calc(100% - 32px)); }
.toast { display: flex; gap: var(--s-2); align-items: center; background: var(--surface-3); border: 1px solid var(--border-strong); padding: 12px var(--s-4); border-radius: var(--r-md); box-shadow: var(--shadow-2); transform: translateY(12px); opacity: 0; transition: all .25s var(--ease); font-size: var(--fs-sm); font-weight: 500; }
.toast.show { transform: none; opacity: 1; }
.toast-ok .i { color: var(--success); }
.toast-err { border-color: rgba(229, 72, 77, .5); }
.toast-err .i { color: var(--danger); }

/* Vacío */
.empty { text-align: center; color: var(--text-3); padding: var(--s-7) var(--s-4); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); font-size: var(--fs-sm); }

/* Marca */
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-stretch: 85%; font-weight: 800; font-size: 1.25rem; letter-spacing: -.01em; color: var(--text); }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: .95rem; font-weight: 800; font-stretch: 75%; letter-spacing: 0; flex: none; }
.logo-mark.has-img { width: 42px; height: 42px; border-radius: 50%; background: #fff; overflow: hidden; }
.logo-mark.has-img img { width: 100%; height: 100%; object-fit: cover; }

/* 4. SECCIONES PÚBLICAS ---------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(11, 12, 15, .88); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--border); }
.topbar .wrap { display: flex; align-items: center; gap: var(--s-5); height: 64px; }
.nav { display: flex; gap: 2px; margin-left: var(--s-4); }
.nav a { color: var(--text-2); padding: 8px 12px; border-radius: var(--r-sm); font-size: .93rem; font-weight: 500; white-space: nowrap; }
.topbar .logo { white-space: nowrap; }
.nav a:hover { color: var(--text); }
.top-actions { margin-left: auto; display: flex; gap: var(--s-2); align-items: center; }
.burger { display: none; }

.announce { background: var(--accent); color: var(--accent-ink); font-size: var(--fs-sm); font-weight: 600; }
.announce .wrap { display: flex; gap: var(--s-3); align-items: center; justify-content: center; min-height: 38px; text-align: center; }
.announce a { text-decoration: underline; text-underline-offset: 3px; }

/* Hero = rifa destacada */
.hero { padding: var(--s-7) 0 var(--s-8); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: var(--s-7); align-items: center; }
.hero-kicker { display: flex; gap: var(--s-3); align-items: center; margin-bottom: var(--s-4); }
.hero h1 { font-size: var(--fs-hero); font-stretch: 78%; letter-spacing: -.02em; line-height: .98; }
.hero .lead { color: var(--text-2); font-size: var(--fs-lg); max-width: 520px; margin: var(--s-4) 0 var(--s-5); }
.facts { display: grid; grid-template-columns: repeat(3, auto); gap: var(--s-5); justify-content: start; padding: var(--s-4) 0; border-block: 1px solid var(--border); margin-bottom: var(--s-5); }
.facts div { display: grid; gap: 2px; }
.facts small { font-size: var(--fs-xs); color: var(--text-3); font-weight: 500; }
.facts b { font-family: var(--font-display); font-stretch: 85%; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.facts .price b { color: var(--accent); }
.hero-cta { display: flex; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-5); }
.hero-media { position: relative; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4/3.4; background: var(--surface); border: 1px solid var(--border); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
/* Póster de marca cuando la rifa no tiene foto */
.media-ph { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-start; padding: var(--s-6); background: var(--accent); color: var(--accent-ink); overflow: hidden; }
.media-ph::after { content: ''; position: absolute; right: -8%; bottom: -14%; width: 70%; aspect-ratio: 1; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a0d03' stroke-width='1.2' stroke-linejoin='round' opacity='.14'%3E%3Cpath d='M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z'/%3E%3Cpath d='M13 5v2M13 11v2M13 17v2'/%3E%3C/svg%3E") center/contain no-repeat; transform: rotate(-14deg); }
.media-ph small { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.media-ph span { font-family: var(--font-display); font-stretch: 70%; font-weight: 800; font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: .9; letter-spacing: -.02em; text-transform: uppercase; margin-top: var(--s-2); max-width: 90%; position: relative; z-index: 1; }
.countdown-bar { position: absolute; left: var(--s-4); right: var(--s-4); bottom: var(--s-4); background: rgba(11, 12, 15, .9); backdrop-filter: blur(8px); border: 1px solid var(--border-strong); border-radius: var(--r-lg); padding: var(--s-3) var(--s-4); display: flex; align-items: center; gap: var(--s-4); }
.countdown-bar .lbl { font-size: var(--fs-xs); color: var(--text-2); line-height: 1.3; }
.countdown { display: flex; gap: var(--s-2); margin-left: auto; }
.countdown div { min-width: 56px; text-align: center; background: var(--surface-2); border-radius: var(--r-sm); padding: 6px 4px; }
.countdown b { display: block; font-family: var(--font-display); font-stretch: 80%; font-weight: 800; font-size: 1.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown small { font-size: .62rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }

/* Meta para anunciar la fecha (rifas sin fecha fija) */
.goal-bar { flex-wrap: wrap; }
.goal-bar .lbl { flex: 1; min-width: 160px; font-size: var(--fs-sm); color: var(--text-2); }
.goal { text-align: right; line-height: 1; }
.goal b { font-family: var(--font-display); font-stretch: 80%; font-weight: 800; font-size: 1.9rem; color: var(--accent); }
.goal small { display: block; font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; }
.goal-progress { flex-basis: 100%; }

/* Premios */
.prizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-4); }
.prize-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.prize-media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 4.4; border: 0; padding: 0; background: var(--surface-2); cursor: zoom-in; overflow: hidden; }
.prize-media[disabled] { cursor: default; }
.prize-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.prize-media:hover img { transform: scale(1.04); }
.photo-count { position: absolute; right: var(--s-3); bottom: var(--s-3); display: inline-flex; gap: 6px; align-items: center; background: rgba(11, 12, 15, .82); color: var(--text); font-size: var(--fs-xs); font-weight: 600; padding: 5px 10px; border-radius: var(--r-full); }
.prize-info { padding: var(--s-4) var(--s-5) var(--s-5); display: grid; gap: 6px; }
.prize-info h3 { font-size: var(--fs-xl); font-stretch: 85%; }
.gallery img { width: 100%; max-height: 72vh; object-fit: contain; background: #000; border-radius: var(--r-md); }
.gallery-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin-top: var(--s-3); }

/* Franja de confianza */
.trust { border-bottom: 1px solid var(--border); }
.trust .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust div { display: grid; grid-template-columns: auto 1fr; column-gap: var(--s-3); align-items: center; padding: var(--s-5) var(--s-4); border-left: 1px solid var(--border); }
.trust div:first-child { border-left: 0; padding-left: 0; }
.trust .i { color: var(--accent); width: 22px; height: 22px; grid-row: span 2; }
.trust b { display: block; font-size: var(--fs-sm); }
.trust span { font-size: var(--fs-xs); color: var(--text-3); }

/* Ticker de ganadores */
.ticker { border-bottom: 1px solid var(--border); overflow: hidden; white-space: nowrap; font-size: var(--fs-sm); }
.ticker-track { display: inline-flex; gap: var(--s-7); padding: 12px 0; animation: marq 60s linear infinite; }
.ticker-track span { color: var(--text-2); display: inline-flex; gap: var(--s-2); align-items: center; }
.ticker-track b { color: var(--text); font-weight: 600; }
.ticker-track .i { color: var(--accent); }
@keyframes marq { to { transform: translateX(-50%); } }

/* Secciones */
section.block { padding: var(--s-9) 0 0; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-4); margin-bottom: var(--s-6); flex-wrap: wrap; }
.sec-head h2 { font-size: var(--fs-3xl); font-stretch: 80%; margin-top: var(--s-2); }
.sec-head p { color: var(--text-2); max-width: 460px; }

/* Tarjeta de rifa */
.raffles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s-5); }
.raffle { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: border-color var(--dur) var(--ease); }
.raffle:hover { border-color: var(--border-strong); }
.raffle-img { aspect-ratio: 16/10; position: relative; background: var(--surface-2); overflow: hidden; }
.raffle-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.raffle:hover .raffle-img img { transform: scale(1.03); }
.raffle-img .media-ph { padding: var(--s-5); justify-content: flex-end; }
.raffle-img .media-ph span { font-size: 2.4rem; }
.raffle-img .tag { position: absolute; top: var(--s-3); left: var(--s-3); }
.raffle-body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-4); flex: 1; }
.raffle-body h3 { font-size: var(--fs-xl); font-stretch: 85%; }
.raffle-body p { color: var(--text-2); font-size: var(--fs-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.raffle-facts { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-3); }
.raffle-facts .price { font-family: var(--font-display); font-stretch: 85%; font-weight: 800; font-size: 1.75rem; line-height: 1; }
.raffle-facts small { display: block; font-size: var(--fs-xs); color: var(--text-3); margin-bottom: 4px; }
.prize-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--fs-sm); }
.prize-list li { display: flex; gap: var(--s-3); align-items: baseline; color: var(--text-2); }
.prize-list li b { font-family: var(--font-display); font-stretch: 85%; color: var(--text-3); font-size: var(--fs-xs); min-width: 34px; }
.prize-list li:first-child { color: var(--text); }
.prize-list li:first-child b { color: var(--accent); }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.step { padding: var(--s-5); border-left: 1px solid var(--border); background: var(--surface); }
.step:first-child { border-left: 0; }
.step .n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); font-family: var(--font-display); font-weight: 800; font-size: var(--fs-sm); }
.step h4 { font-size: var(--fs-lg); font-stretch: 90%; margin: var(--s-4) 0 var(--s-2); }
.step p { color: var(--text-2); font-size: var(--fs-sm); }

/* Cuentas bancarias */
.banks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-4); }
.bank { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); display: grid; gap: var(--s-3); }
.bank-head { display: flex; gap: var(--s-3); align-items: center; }
.bank-logo { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--bk, #444); color: #fff; font-weight: 700; font-size: var(--fs-sm); flex: none; }
.bank h4 { font-family: var(--font-body); font-stretch: 100%; font-weight: 600; font-size: 1rem; letter-spacing: 0; }
.bank-head span { font-size: var(--fs-xs); color: var(--text-3); }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px var(--s-3); }
.acct-row b { font-family: var(--font-display); font-stretch: 85%; font-size: 1.15rem; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bank .meta { font-size: var(--fs-sm); color: var(--text-2); display: flex; justify-content: space-between; gap: var(--s-2); }
.bank .meta b { color: var(--text); font-weight: 500; text-align: right; }
.copy-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); border-radius: var(--r-sm); padding: 4px 9px; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; font-family: var(--font-body); }
.copy-btn:hover { color: var(--text); border-color: #4a505a; }
.note-box { display: flex; gap: var(--s-3); align-items: flex-start; margin-top: var(--s-4); padding: var(--s-4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-2); }
.note-box .i { color: var(--accent); margin-top: 1px; }

/* Ganadores */
.winners { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--s-4); }
.winner { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); display: grid; gap: var(--s-2); align-content: start; }
.winner-top { display: flex; justify-content: space-between; align-items: center; }
.place { font-size: var(--fs-xs); font-weight: 600; color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }
.winner .wnum { font-family: var(--font-display); font-stretch: 80%; font-weight: 800; color: var(--text-3); font-size: var(--fs-sm); }
.winner h4 { font-size: 1.35rem; font-stretch: 85%; }
.winner .prize { font-weight: 600; font-size: var(--fs-sm); }
.winner .when { font-size: var(--fs-xs); color: var(--text-3); }
.winner .note { font-size: var(--fs-sm); color: var(--text-2); border-top: 1px solid var(--border); padding-top: var(--s-3); margin-top: var(--s-2); }

/* Verificar */
.verify { display: grid; grid-template-columns: .9fr 1.1fr; gap: var(--s-7); align-items: start; }
.verify-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); }
.verify form { display: flex; gap: var(--s-2); }
.verify form .input { flex: 1; }
.results { display: grid; gap: var(--s-4); margin-top: var(--s-5); }
.check-list { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: grid; gap: var(--s-3); }
.check-list li { display: flex; gap: var(--s-3); color: var(--text-2); font-size: var(--fs-sm); }
.check-list .i { color: var(--success); }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: var(--s-7); }
details.faq { border-bottom: 1px solid var(--border); padding: var(--s-4) 0; }
details.faq:first-child { border-top: 1px solid var(--border); }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--s-4); }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; color: var(--text-3); font-size: 1.3rem; line-height: 1; font-weight: 400; }
details.faq[open] summary::after { content: '−'; }
details.faq p, details.faq ul { color: var(--text-2); margin: var(--s-3) 0 0; font-size: .95rem; }
.terms-list { padding-left: 18px; }
.terms-list li { margin-bottom: 6px; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: var(--s-7) 0 var(--s-8); margin-top: var(--s-9); color: var(--text-2); font-size: var(--fs-sm); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: var(--s-6); }
footer h5 { color: var(--text); font-size: var(--fs-sm); margin: 0 0 var(--s-3); font-weight: 600; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
footer ul a, footer ul li { display: inline-flex; gap: var(--s-2); align-items: center; }
footer a:hover { color: var(--text); }
.legal { border-top: 1px solid var(--border); margin-top: var(--s-6); padding-top: var(--s-5); display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; color: var(--text-3); font-size: var(--fs-xs); }
.wa-float { position: fixed; right: 20px; bottom: 20px; width: 54px; height: 54px; border-radius: 50%; background: #25d366; display: grid; place-items: center; z-index: 50; box-shadow: var(--shadow-2); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* Compra: asistente */
.wizard-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin: var(--s-4) 0 var(--s-5); font-size: var(--fs-xs); color: var(--text-3); }
.wizard-steps { display: flex; gap: 4px; flex: 1; max-width: 220px; }
.wizard-steps i { flex: 1; height: 3px; border-radius: 3px; background: var(--surface-3); }
.wizard-steps i.on { background: var(--accent); }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--s-2); margin-bottom: var(--s-4); }
.pack { border: 1px solid var(--border-strong); background: var(--bg); border-radius: var(--r-md); padding: var(--s-3) var(--s-2); text-align: center; cursor: pointer; position: relative; transition: border-color var(--dur); }
.pack:hover { border-color: #4a505a; }
.pack .tier { display: block; font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.pack .unit { display: block; font-size: .66rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.pack b { display: block; font-family: var(--font-display); font-stretch: 80%; font-weight: 800; font-size: 1.75rem; line-height: 1.1; }
.pack small { color: var(--text-2); font-size: var(--fs-xs); }
.pack.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pack .pop { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink); font-size: .62rem; font-weight: 700; padding: 1px 8px; border-radius: var(--r-full); white-space: nowrap; letter-spacing: .04em; text-transform: uppercase; }
.stepper { display: flex; align-items: center; gap: var(--s-2); border: 1px solid var(--border-strong); background: var(--bg); border-radius: var(--r-md); padding: 6px; }
.stepper button { width: 42px; height: 42px; border-radius: var(--r-sm); border: 0; background: var(--surface-2); cursor: pointer; display: grid; place-items: center; color: var(--text); }
.stepper button:hover { background: var(--surface-3); }
.stepper input { flex: 1; text-align: center; font-family: var(--font-display); font-stretch: 85%; font-weight: 800; font-size: 1.6rem; background: transparent; border: 0; outline: none; min-width: 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.total-bar { display: flex; justify-content: space-between; align-items: center; margin: var(--s-4) 0; padding: var(--s-4) 0; border-block: 1px solid var(--border); }
.total-bar span { color: var(--text-2); font-size: var(--fs-sm); }
.total-bar b { font-family: var(--font-display); font-stretch: 85%; font-weight: 800; font-size: 2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.bank-pick { display: grid; gap: var(--s-2); margin-bottom: var(--s-4); }
.bank-opt { display: flex; gap: var(--s-3); align-items: center; padding: 10px var(--s-3); border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--bg); cursor: pointer; }
.bank-opt:hover { border-color: #4a505a; }
.bank-opt.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.bank-opt .bank-logo { width: 34px; height: 34px; font-size: var(--fs-xs); }
.radio { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; display: grid; place-items: center; }
.on .radio { border-color: var(--accent); }
.on .radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.bank-detail { border: 1px solid var(--accent); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md); padding: var(--s-3); display: grid; gap: var(--s-2); font-size: var(--fs-sm); background: var(--surface-2); }
.bank-detail div { display: flex; justify-content: space-between; gap: var(--s-2); align-items: center; }
.bank-detail b { font-variant-numeric: tabular-nums; font-weight: 600; }
.drop { border: 1.5px dashed var(--border-strong); border-radius: var(--r-md); padding: var(--s-5); text-align: center; cursor: pointer; display: grid; gap: 4px; justify-items: center; color: var(--text-2); font-size: var(--fs-sm); transition: border-color var(--dur), background var(--dur); }
.drop .i { color: var(--text-3); width: 26px; height: 26px; margin-bottom: 4px; }
.drop b { color: var(--text); }
.drop:hover, .drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.drop.has { border-style: solid; border-color: rgba(43, 182, 115, .5); }
.drop.has .i { color: var(--success); }
.drop img { max-height: 140px; margin-top: var(--s-2); border-radius: var(--r-sm); }
.done-head { display: flex; gap: var(--s-3); align-items: center; margin-bottom: var(--s-5); }
.done-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; flex: none; }
.done-icon .i { width: 24px; height: 24px; stroke-width: 2.5; }

/* 5. RESPONSIVE ------------------------------------------------------- */
@media (max-width: 960px) {
  .hero-grid, .verify, .faq-grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .hero-media { order: -1; aspect-ratio: 16/10; max-height: 460px; width: 100%; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { border-left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--border); }
  .trust .wrap { grid-template-columns: 1fr 1fr; }
  .trust div:nth-child(3) { border-left: 0; padding-left: 0; }
  .trust div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); padding: var(--s-2) var(--s-4) var(--s-4); margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .burger { display: inline-grid; }
}
@media (max-width: 600px) {
  .top-actions .btn-outline { display: none; }
}
@media (max-width: 560px) {
  .hero { padding: var(--s-5) 0 var(--s-7); }
  .facts { grid-template-columns: 1fr 1fr; gap: var(--s-3) var(--s-4); }
  .facts div:last-child { grid-column: 1 / -1; }
  .hero-media { aspect-ratio: auto; max-height: none; display: flex; flex-direction: column; }
  .hero-media > img, .hero-media > .media-ph { position: relative; aspect-ratio: 16 / 10; width: 100%; }
  .hero-media .media-ph { padding: var(--s-5); }
  .countdown-bar { position: static; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: var(--surface); flex-direction: column; align-items: stretch; gap: var(--s-2); padding: var(--s-3); }
  .countdown-bar .lbl br { display: none; }
  .countdown { margin: 0; justify-content: space-between; }
  .countdown div { flex: 1; min-width: 0; }
  .countdown b { font-size: 1.3rem; }
  .raffles { grid-template-columns: 1fr; }
  .steps, .trust .wrap { grid-template-columns: 1fr; }
  .step { border-left: 0 !important; }
  .step:nth-child(n+2) { border-top: 1px solid var(--border); }
  .trust div { border-left: 0 !important; padding: var(--s-3) 0 !important; }
  .trust div:nth-child(n+2) { border-top: 1px solid var(--border); }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .verify form { flex-direction: column; }
  .modal-body { padding: var(--s-5) var(--s-4); }
  section.block { padding-top: var(--s-8); }
  .ticket { grid-template-columns: 1fr 64px; }
  .ticket-main { padding: var(--s-4); }
  .ticket-stub { padding: var(--s-4) 4px; }
  .barcode { width: 40px; }
  .foot-grid { grid-template-columns: 1fr; }
  .top-actions .btn-primary { padding: 0 var(--s-3); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
