@import url("https://fonts.googleapis.com/css2?family=Archivo:ital,wght@1,800;1,900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

/* ---------- Tokens (colores del logo: rojo, negro, cromo) ---------- */
:root {
  --bg: #0a0a0b;
  --bg-glow: rgba(227, 16, 28, 0.16);
  --surface: #131315;
  --surface-2: #1b1b1e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f6;
  --muted: #a3a3ab;
  --red: #e3101c;
  --red-hover: #ff1f2b;
  --red-soft: rgba(227, 16, 28, 0.14);
  --chrome: linear-gradient(180deg, #ffffff 0%, #d9dadd 45%, #9ea1a7 55%, #ecedef 100%);
  --green: #25d366;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --nav-bg: rgba(19, 19, 21, 0.78);
}

:root[data-theme="light"] {
  --bg: #f4f4f5;
  --bg-glow: rgba(227, 16, 28, 0.08);
  --surface: #ffffff;
  --surface-2: #f0f0f2;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --text: #111113;
  --muted: #5d5d66;
  --red: #d20a16;
  --red-hover: #b30812;
  --red-soft: rgba(210, 10, 22, 0.09);
  --chrome: linear-gradient(180deg, #2a2a2e 0%, #111113 100%);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
  --nav-bg: rgba(255, 255, 255, 0.82);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 50% at 50% -10%, var(--bg-glow), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.container { width: min(1140px, 100% - 32px); margin-inline: auto; }

/* ---------- Navbar ---------- */
.nav-wrap {
  position: sticky; top: 0; z-index: 50;
  padding: 16px 0;
  transition: padding .25s;
}
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.nav-wrap.scrolled .nav {
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.01em; }
.brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--red); }
.brand span { font-size: 1rem; text-transform: uppercase; }
.brand em { color: var(--red); font-style: normal; }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  padding: 5px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
}
.nav-links a {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  font-size: .9rem; font-weight: 600; color: var(--muted);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links svg { width: 16px; height: 16px; }
.theme-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--text);
}
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: block; }
:root[data-theme="light"] .theme-btn .moon { display: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 26px; border-radius: 14px;
  font-weight: 800; font-size: .95rem; text-transform: uppercase; letter-spacing: .02em;
  transition: transform .15s, background .2s, box-shadow .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 10px 30px rgba(227, 16, 28, .35); }
.btn-primary:hover { background: var(--red-hover); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--red); }
.btn-wa { background: var(--green); color: #06270f; box-shadow: 0 10px 30px rgba(37, 211, 102, .28); width: 100%; }
.btn-wa:hover { filter: brightness(1.06); }
.btn-wa:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 70px 0 80px; }
.hero-logo {
  width: 150px; height: 150px; margin: 0 auto 28px; border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(227, 16, 28, .25), 0 0 60px rgba(227, 16, 28, .35);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red);
}
.hero h1, .display {
  font-family: "Archivo", sans-serif; font-style: italic; font-weight: 900;
  text-transform: uppercase; letter-spacing: -.02em; line-height: .98;
}
.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  margin: 14px auto 22px; max-width: 900px;
  background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 .red { background: none; -webkit-text-fill-color: var(--red); color: var(--red); }
.hero-text {
  max-width: 620px; margin: 0 auto 32px;
  padding: 16px 20px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-weight: 500;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.about {
  text-align: center; padding: 48px 0; border-top: 1px solid var(--border);
}
.about p { color: var(--muted); max-width: 680px; margin: 12px auto 0; font-weight: 500; }

/* ---------- Secciones ---------- */
.section { padding: 64px 0; border-top: 1px solid var(--border); }
.section-head { margin-bottom: 30px; padding-left: 14px; border-left: 4px solid var(--red); }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.section-head p { color: var(--muted); font-size: .92rem; font-weight: 600; margin-top: 6px; }
.section-head p b { color: var(--red); }

/* ---------- Card de sorteo ---------- */
.grid-rifas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.rifa-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px; transition: transform .2s, border-color .2s, box-shadow .2s;
  max-width: 320px;
}
.rifa-card:hover { transform: translateY(-4px); border-color: var(--red); box-shadow: var(--shadow); }
.rifa-card .media { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--surface-2); }
.rifa-card .media img { width: 100%; height: 100%; object-fit: cover; }
.rifa-card .body { padding: 14px 6px 6px; }
.rifa-card h3 { font-size: 1.05rem; font-weight: 800; text-transform: uppercase; }
.price { color: var(--red); font-weight: 800; }
.price small { color: var(--muted); font-weight: 600; }
.meta-row { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--muted); font-weight: 600; margin-top: 10px; }
.meta-row svg { width: 15px; height: 15px; color: var(--red); flex-shrink: 0; }

.badge {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 8px;
  background: rgba(10, 10, 11, .78); backdrop-filter: blur(6px);
  color: #fff; font-size: .74rem; font-weight: 700;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(227, 16, 28, .3); }

.progress { margin-top: 12px; }
.progress-top { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; }
.progress-top b { color: var(--red); }
.bar { height: 7px; border-radius: 999px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--red); border-radius: inherit; }

/* ---------- Ganadores ---------- */
.empty { text-align: center; color: var(--muted); padding: 30px 0; font-weight: 500; }
.empty svg { width: 34px; height: 34px; margin: 0 auto 10px; opacity: .6; }
.grid-ganadores { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.ganador { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ganador img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.ganador div { padding: 12px 14px; }
.ganador b { display: block; }
.ganador small { color: var(--muted); }

/* ---------- Cómo funciona ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; counter-reset: paso; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.step::before {
  counter-increment: paso; content: counter(paso);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--red-soft); color: var(--red); font-weight: 800; margin-bottom: 12px;
}
.step h4 { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.step p { color: var(--muted); font-size: .9rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0 34px; text-align: center; }
.socials { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.socials a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: .88rem; font-weight: 600; color: var(--muted);
  transition: color .2s, border-color .2s;
}
.socials a:hover { color: var(--text); border-color: var(--red); }
.socials svg { width: 17px; height: 17px; }
.footer small { color: var(--muted); font-size: .82rem; }
.credit { margin-top: 8px; font-size: .8rem; color: var(--muted); }
.credit a { color: var(--text); font-weight: 700; }
.credit a:hover { color: var(--red); }

/* ---------- Página de la rifa ---------- */
.rifa-top { display: grid; grid-template-columns: 1fr 1.1fr; gap: 34px; padding: 26px 0 40px; align-items: start; }
.rifa-img {
  position: relative; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--border); padding: 8px; background: var(--surface);
}
.rifa-img img { border-radius: 16px; width: 100%; }
.rifa-img .badge { top: 18px; left: 18px; }

.chip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: .78rem; font-weight: 700; color: var(--muted);
}
.chip-btn:hover { color: var(--text); }
.chip-btn svg { width: 14px; height: 14px; }

.rifa-info .kicker { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 16px; }
.rifa-info h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 4px 0 6px; }
.rifa-info .sub { color: var(--red); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.price-pill {
  display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 18px;
  padding: 8px 14px; border-radius: 10px;
  background: var(--red-soft); border: 1px solid rgba(227, 16, 28, .35);
  font-weight: 700; font-size: .92rem;
}
.price-pill svg { width: 16px; height: 16px; color: var(--red); }
.price-pill s { color: var(--muted); font-weight: 500; }

.aviso {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; border-radius: 12px; margin-bottom: 16px;
  background: rgba(245, 180, 0, .12); border: 1px solid rgba(245, 180, 0, .45);
  font-size: .88rem; font-weight: 500;
}
.aviso svg { width: 18px; height: 18px; flex-shrink: 0; color: #f5b400; margin-top: 1px; }
.aviso b { color: #f5b400; }
:root[data-theme="light"] .aviso b, :root[data-theme="light"] .aviso svg { color: #a86f00; }
.rifa-card .aviso { margin: 10px 0 0; font-size: .78rem; padding: 8px 10px; }

.countdown {display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 8px; }
.countdown div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 6px; text-align: center; }
.countdown b { display: block; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown small { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.event-note { font-size: .82rem; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }

.desc { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; font-size: .9rem; color: var(--muted); }
.desc p + p { margin-top: 8px; }
.desc.clamped p:nth-child(n+2) { display: none; }
.more-btn { color: var(--red); font-weight: 800; font-size: .82rem; text-transform: uppercase; margin-top: 8px; }

.premios-title { display: flex; align-items: center; gap: 7px; margin: 20px 0 10px; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.premios-title svg { width: 15px; height: 15px; }
.premios { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.premio { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.premio:first-child { border-color: var(--red); background: linear-gradient(135deg, var(--red-soft), transparent 70%), var(--surface); }
.premio small { display: block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.premio b { font-size: .95rem; }

/* ---------- Formulario ---------- */
.form-card {
  max-width: 560px; margin: 0 auto 70px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 14px; box-shadow: var(--shadow);
}
.qty-box {
  text-align: center; color: #fff; border-radius: 16px; padding: 18px 16px 20px;
  background: radial-gradient(circle at 50% 0%, #ff3b45 0%, var(--red) 45%, #8a0009 100%);
}
.qty-box h3 { font-weight: 800; text-transform: uppercase; font-size: 1rem; }
.qty-box p { font-size: .8rem; opacity: .85; font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; }
.stepper button { width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .18); color: #fff; font-size: 1.3rem; font-weight: 700; }
.stepper button:hover { background: rgba(255, 255, 255, .28); }
.stepper input {
  width: 84px; height: 46px; text-align: center; border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .22);
  color: #fff; font: inherit; font-size: 1.3rem; font-weight: 800;
  -moz-appearance: textfield;
}
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }
.quick { display: flex; justify-content: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.quick button { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #fff; font-size: .8rem; font-weight: 700; }
.quick button:hover { background: rgba(255, 255, 255, .26); }

.total { text-align: center; font-weight: 700; margin: 14px 0 4px; }
.total b { color: var(--red); font-size: 1.15rem; }

.fs { padding: 16px 8px 4px; border-top: 1px dashed var(--border-strong); margin-top: 12px; }
.fs-title { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--red); padding-bottom: 8px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.fs-title svg { width: 16px; height: 16px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text);
  font: inherit; font-size: .93rem; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.field .hint { font-size: .74rem; color: var(--muted); }
.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.field .err { display: none; font-size: .75rem; color: var(--red); font-weight: 700; }
.field.invalid .err { display: block; }

.pay-opts { display: flex; justify-content: center; gap: 10px; margin-bottom: 14px; }
.pay-opt {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 14px; min-width: 110px;
  background: var(--surface-2); border: 2px solid var(--border);
  font-size: .78rem; font-weight: 700; color: var(--muted);
  transition: border-color .2s, color .2s;
}
.pay-opt .logo { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #fff; }
.pay-opt[data-id="banreservas"] .logo { padding: 4px; }
.pay-opt.active { border-color: var(--red); color: var(--text); }

.acct { text-align: center; }
.acct h4 { font-weight: 800; text-transform: uppercase; font-size: .95rem; }
.acct .lbl { font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; margin-top: 8px; }
.acct .val { display: inline-flex; align-items: center; gap: 8px; font-size: 1.3rem; font-weight: 800; letter-spacing: .02em; }
.acct .name { font-weight: 700; }
.copy {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--red-soft); color: var(--red);
}
.copy svg { width: 15px; height: 15px; }
.acct-total { display: inline-block; margin-top: 12px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: .85rem; font-weight: 700; }

.proof-note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: 14px; border: 1px dashed var(--border-strong);
  background: var(--surface-2); font-size: .88rem; color: var(--muted);
}
.proof-note svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--green); margin-top: 2px; }
.proof-note b { color: var(--text); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--muted); margin: 16px 4px; cursor: pointer; }
.check input { accent-color: var(--red); width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }

.secure { text-align: center; font-size: .76rem; color: var(--muted); margin: 12px 0 4px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px);
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-size: .88rem; font-weight: 700; opacity: 0; pointer-events: none; transition: .25s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .rifa-top { grid-template-columns: 1fr; }
  .rifa-img { max-width: 460px; margin-inline: auto; width: 100%; }
}
@media (max-width: 640px) {
  .nav-links a span { display: none; }
  .nav-links a { padding: 9px; }
  .brand span { font-size: .85rem; }
  .brand img { width: 36px; height: 36px; }
  .hero { padding: 40px 0 56px; }
  .hero-logo { width: 120px; height: 120px; }
  .fields, .premios { grid-template-columns: 1fr; }
  .rifa-card { max-width: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .countdown b { font-size: 1.25rem; }
}
