/* Farolitos · rock chabón: fanzine / fotocopia / mesa de madera / cinta de enmascarar */
:root {
  --black: #14100d;
  --ink: #17120e;
  --wood: #3a2415;
  --yellow: #ffcb1d;
  --celeste: #5db4e0;
  --red: #d63a1f;
  --paper: #efe4cc;
  --paper-2: #f8f0dd;
  --line: #17120e;
  --valid: #145d3b;
  --display: Anton, Impact, 'Arial Narrow', sans-serif;
  --marker: 'Permanent Marker', 'Comic Sans MS', cursive;
  --type: 'Special Elite', 'Courier New', monospace;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  font-family: var(--type);
  color: var(--ink);
  background: var(--black);
}
body { background: var(--black); font-family: var(--type); }
button, input { font-family: var(--type); }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--celeste); outline-offset: 3px; }

/* ---------- barra de aviso + header ---------- */
.demo-strip {
  background: var(--black);
  color: var(--yellow);
  font-family: var(--type);
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 2px dashed var(--yellow);
}
.site-header { background: var(--black); border-bottom: 0; position: relative; }
.site-header::after { /* tira de "cinta de peligro" */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px;
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, var(--black) 14px 28px);
}
.brand, .public-footer > span {
  font-family: var(--marker);
  font-style: normal;
  font-weight: 400;
  text-transform: none;
  color: var(--yellow);
  transform: rotate(-3deg);
  -webkit-text-stroke: 6px #000;
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 #000;
  letter-spacing: .01em;
}
.brand { font-size: 36px; }
.brand-dot { color: var(--celeste); }
.view-switch { background: transparent; padding: 0; gap: 8px; border-radius: 0; }
.view-tab {
  border: 2px solid var(--paper); border-radius: 0; background: transparent; color: var(--paper);
  font-family: var(--type); text-transform: uppercase; letter-spacing: .05em; font-size: 13px;
}
.view-tab:hover { border-color: var(--yellow); color: var(--yellow); }
.view-tab.is-active { background: var(--yellow); border-color: var(--yellow); color: var(--ink); transform: rotate(-1.5deg); }

/* ---------- hero: la mesa de madera del flyer ---------- */
.public-shell {
  position: relative;
  background:
    var(--grain),
    repeating-linear-gradient(90deg, #0000 0 90px, #0000002e 91px 93px, #0000 94px 210px),
    repeating-linear-gradient(0deg, #ffffff06 0 2px, #00000014 3px 5px),
    radial-gradient(ellipse at 60% 30%, #7a4a2a 0%, #4a2b18 55%, #2a170d 100%);
  color: var(--paper-2);
  grid-template-columns: minmax(0, 1.1fr) minmax(310px, .8fr);
  gap: 48px;
  padding-top: 70px;
  padding-bottom: 100px;
}
.public-shell::after { /* borde roto abajo */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 26px; background: var(--yellow);
  clip-path: polygon(0 100%, 0 40%, 4% 70%, 9% 30%, 14% 65%, 20% 25%, 26% 60%, 33% 20%, 39% 65%, 46% 30%, 52% 70%, 59% 25%, 66% 60%, 72% 20%, 79% 65%, 85% 30%, 91% 70%, 96% 35%, 100% 60%, 100% 100%);
}
.intro-line {
  display: inline-flex; background: var(--paper-2); color: var(--ink); padding: 6px 12px;
  font-family: var(--type); font-weight: 400; text-transform: uppercase; letter-spacing: .08em; font-size: 13px;
  transform: rotate(-1.5deg); box-shadow: 3px 3px 0 #000;
}
.intro-rule { display: none; }
.hero-copy h1 { font-family: var(--display); text-transform: uppercase; font-weight: 400; line-height: .92; margin: 0 0 8px; letter-spacing: .005em; text-shadow: none; }
.hero-copy h1 span { display: block; width: fit-content; padding: 2px 14px 4px; box-shadow: 5px 5px 0 #000; }
.h1-a { background: var(--yellow); color: var(--ink); font-size: clamp(54px, 7vw, 100px); transform: rotate(-2deg); }
.h1-b { background: var(--paper-2); color: var(--ink); font-size: clamp(40px, 5.2vw, 76px); transform: rotate(1.2deg); margin: 10px 0 0 22px; }
.h1-c { background: var(--celeste); color: var(--ink); font-size: clamp(40px, 5.2vw, 76px); transform: rotate(-1deg); margin: 10px 0 0 6px; }
.scrawl { font-family: var(--marker); color: var(--yellow); font-size: 28px; margin: 18px 0 18px 10px; transform: rotate(-3deg); width: fit-content; text-shadow: 2px 2px 0 #000; }
.hero-lead { color: #fbefe0; font-size: 17px; line-height: 1.55; max-width: 500px; }
.event-facts { border: 2px dashed var(--paper); max-width: 640px; background: #0000004d; }
.event-facts > div { padding: 14px 14px 16px; }
.event-facts > div + div { border-left: 2px dashed var(--paper); padding-left: 14px; }
.event-facts span { color: var(--yellow); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.event-facts strong { color: #fff8e9; font-family: var(--type); font-weight: 400; font-size: 15px; }
.hero-note { color: #e7d7c4; font-size: 13px; }

.primary-button {
  background: var(--yellow); color: var(--ink); border: 3px solid #000; border-radius: 0;
  font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .04em; font-size: 22px;
  box-shadow: 6px 6px 0 #000; transform: rotate(-1deg); transition: transform .08s, box-shadow .08s;
}
.primary-button:hover { background: #ffe066; transform: rotate(-1deg) translate(-2px, -2px); box-shadow: 8px 8px 0 #000; }
.primary-button:active { transform: rotate(-1deg) translate(4px, 4px); box-shadow: 2px 2px 0 #000; }
.hero-button span, .full-button span { font-family: var(--type); }

/* flyer pegado con cinta */
.poster-wrap { width: min(100%, 440px); transform: rotate(3deg); }
.poster {
  position: relative; height: auto; display: block; overflow: visible; margin: 0;
  border: 0; background: none; padding: 0;
  box-shadow: 10px 14px 0 #00000080, 18px 24px 34px #000;
}
.poster::before { content: none; }
.poster img { display: block; width: 100%; height: auto; }
.poster figcaption {
  position: absolute; bottom: -40px; left: 0; color: var(--paper); font-family: var(--marker);
  font-size: 15px; transform: rotate(-2deg);
}
.tape {
  position: absolute; z-index: 3; width: 120px; height: 34px;
  background: #e8dca8cc; border-left: 2px dashed #0002; border-right: 2px dashed #0002;
  box-shadow: 0 2px 4px #0005;
}
.tape-l { top: -14px; left: -34px; transform: rotate(-38deg); }
.tape-r { top: -14px; right: -34px; transform: rotate(35deg); }

/* ---------- manifiesto ---------- */
.manifesto {
  position: relative; display: grid; align-items: center; gap: 50px; background-color: var(--yellow); color: var(--ink);
  border: 0; padding: 44px max(30px, calc((100vw - 1120px) / 2)) 48px;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr);
  background-image: var(--grain); background-blend-mode: multiply;
}
.manifesto p { font-family: var(--display); text-transform: uppercase; font-weight: 400; font-size: clamp(34px, 4.4vw, 58px); line-height: 1; transform: rotate(-1deg); }
.manifesto span { border: 0; border-left: 4px solid var(--ink); font-family: var(--marker); font-weight: 400; font-size: 22px; line-height: 1.25; padding-left: 20px; transform: rotate(1deg); }
.manifesto span b { display: block; font-size: 16px; margin-top: 10px; color: var(--red); font-weight: 400; }

/* ---------- aporte: hoja fotocopiada ---------- */
.flow-section {
  position: relative;
  background: var(--grain), repeating-linear-gradient(0deg, #0000 0 27px, #1b4a7a1a 28px 29px), var(--paper);
  background-blend-mode: multiply, normal, normal;
  padding-top: 80px;
}
.flow-section::before { /* margen rojo de cuaderno escolar */
  content: ""; position: absolute; top: 0; bottom: 0; left: max(14px, calc((100vw - 1180px) / 2)); width: 2px; background: #d63a1f66;
}
.section-kicker { font-family: var(--marker); color: var(--red); font-size: 22px; font-weight: 400; transform: rotate(-2deg); display: inline-block; }
.flow-heading h2 { font-family: var(--display); font-weight: 400; color: var(--ink); text-shadow: 3px 3px 0 var(--yellow); letter-spacing: .005em; }
.flow-heading > p { color: #2c2118; font-size: 15px; }
.steps li { border: 0; border-bottom: 3px solid #17120e55; font-family: var(--type); color: #6a5a48; text-transform: uppercase; letter-spacing: .05em; }
.steps li.is-current { color: var(--ink); border-color: var(--ink); background: var(--yellow); padding-left: 10px; }
.steps li.is-done { color: var(--valid); border-color: var(--valid); }
.flow-panel {
  position: relative;
  background: var(--paper-2); border: 3px solid var(--ink); border-radius: 0;
  box-shadow: 8px 8px 0 var(--ink);
}
.flow-panel::before { /* cinta arriba del panel */
  content: ""; position: absolute; top: -16px; left: 40px; width: 100px; height: 30px; background: #e8dca8cc; transform: rotate(-4deg); box-shadow: 0 2px 4px #0004;
}
.flow-screen h3, .side-explainer h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; }
.screen-help { color: #4a3d30; }
.flow-screen label { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 400; }
.amount-choice {
  border: 3px solid var(--ink); border-radius: 0; background: #fff; color: var(--ink);
  font-family: var(--display); font-weight: 400; font-size: 26px; box-shadow: 4px 4px 0 var(--ink);
}
.amount-choice:hover { background: #ffe066; }
.amount-choice.is-selected { background: var(--ink); color: var(--yellow); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.flow-screen input, .money-field { border: 3px solid var(--ink); border-radius: 0; background: #fff; color: var(--ink); }
.money-field input { border: 0; font-family: var(--type); }
.money-field span:last-child, .field-hint { color: #5a4c3e; }
.single-entry-note { background: #fff4b8; border-left: 6px solid var(--red); color: var(--ink); padding: 12px 14px; margin: 21px 0; font-size: 14px; line-height: 1.4; transform: rotate(-.6deg); }
.side-explainer {
  background: var(--celeste); border: 3px solid var(--ink); border-radius: 0; box-shadow: 8px 8px 0 var(--ink);
  background-image: var(--grain); background-blend-mode: multiply;
}
.side-light {
  width: 104px; height: 104px; display: grid; place-items: center;
  background: var(--red); color: var(--paper-2); border: 4px solid var(--ink); border-radius: 50%;
  font: 52px var(--display); transform: rotate(12deg); margin: 0 0 30px; box-shadow: 4px 4px 0 var(--ink);
}
.side-explainer h3 { color: var(--ink); }
.side-separator { background: var(--ink); height: 2px; }
.side-explainer .small-note { color: #10303f; }
.status-pill { background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); border-radius: 0; text-transform: uppercase; letter-spacing: .05em; }
.pulse-dot { background: var(--red); }
.bank-details { border: 3px dashed var(--ink); background: #fff; }
.bank-details span, .payment-meta span { color: #5a4c3e; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.text-button { background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); border-radius: 0; font-family: var(--type); }
.transfer-warning, .ticket-disclaimer { color: var(--red); }
.payment-meta { border-color: var(--ink); border-style: dashed; }
.quiet-button { color: #8b2c14; font-family: var(--type); }
.success-line { color: var(--valid); }
.ticket { border: 3px solid var(--ink); background: #fff; border-radius: 0; box-shadow: 5px 5px 0 var(--ink); }
.ticket-main strong { font-family: var(--marker); font-weight: 400; color: var(--ink); }
.ticket-main code { color: #3b2e22; font-family: var(--type); }
.fake-qr { background: var(--yellow); border-left: 3px dashed var(--ink); color: var(--ink); }
.qr-pattern { background: repeating-conic-gradient(#17120e 0 25%, transparent 0 50%) 0 0 / 12px 12px; opacity: 1; mix-blend-mode: normal; }

.public-footer { background: var(--black); border-top: 0; position: relative; padding-top: 38px; }
.public-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px; background: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, var(--black) 14px 28px); }
.public-footer > span { font-size: 32px; }
.public-footer p { color: var(--paper); }
.public-footer small { color: #bda98f; }

/* ---------- app de acceso: oscura, legible de noche en la puerta ---------- */
.gate-view { background: var(--grain), #1b1511; background-blend-mode: soft-light, normal; color: var(--paper-2); }
.gate-eyebrow { color: var(--yellow); font-family: var(--marker); font-weight: 400; font-size: 18px; }
.gate-header h1 { font-family: var(--display); font-weight: 400; color: var(--paper-2); text-shadow: 3px 3px 0 var(--red); }
.gate-header p:last-child { color: #d8c8af; }
.demo-status { background: var(--yellow); border: 2px solid #000; color: var(--ink); border-radius: 0; text-transform: uppercase; letter-spacing: .05em; }
.demo-status span { background: var(--red); }
.scanner-card, .gate-actions { border: 3px solid var(--paper); background: #241a14; border-radius: 0; color: var(--paper-2); }
.scanner-top span:last-child { color: var(--yellow); }
.scan-window {
  background: repeating-linear-gradient(28deg, transparent 0 35px, #ffffff0a 36px 37px), linear-gradient(145deg, #4c3022, #0d0907 75%);
  border: 2px dashed #ffffff55;
}
.scan-window::before { content: none; }
.scan-corners i { border-color: var(--yellow); }
.scan-window small { color: #c9b79d; }
.scanner-hint, .gate-note p, .manual-example { color: #cdbca3; }
.manual-entry { border-color: #ffffff40; }
.manual-entry input { background: #fff; color: var(--ink); border: 3px solid var(--paper); border-radius: 0; }
.manual-entry button { background: var(--yellow); color: var(--ink); border: 2px solid #000; border-radius: 0; text-transform: uppercase; }
.idle-result { background: #2f231b; color: var(--paper-2); }
.gate-result { border-radius: 0; }
.gate-result.is-valid { background: #d9f1e1; color: #0f4a31; }
.gate-result.is-used { background: #ffe9a8; color: #6b4300; }
.gate-result.is-invalid { background: #ffd1c4; color: #8c1f1f; }
.gate-result.is-offline { background: #d3e3ea; color: #243f4b; }
.gate-result h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 34px; }
.demo-controls { background: #2f231b; border-radius: 0; }
.demo-buttons button { background: #fff; border: 2px solid #000; color: var(--ink); border-radius: 0; text-transform: uppercase; letter-spacing: .04em; }
.demo-buttons button:hover { background: var(--yellow); }
.gate-note { border-color: #ffffff40; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .public-shell { gap: 28px; }
}
@media (max-width: 760px) {
  .brand { font-size: 30px; }
  .public-shell { display: flex; flex-direction: column; gap: 56px; padding-top: 48px; }
  .h1-a { font-size: clamp(50px, 15vw, 84px); }
  .h1-b, .h1-c { font-size: clamp(36px, 10.5vw, 60px); }
  .poster-wrap { width: min(88%, 380px); }
  .tape-l { left: -22px; } .tape-r { right: -22px; }
  .manifesto { grid-template-columns: 1fr; gap: 20px; padding-top: 40px; padding-bottom: 40px; }
  .manifesto span { border-left: 0; border-top: 3px solid var(--ink); padding: 14px 0 0; }
  .flow-section::before { left: 8px; }
  .side-explainer { min-height: 240px; }
  .side-light { width: 80px; height: 80px; font-size: 40px; margin-bottom: 18px; }
}
@media (max-width: 520px) {
  .view-switch { width: 100%; }
  .view-tab { flex: 1; }
  .event-facts > div:last-child, .event-facts > div:nth-child(2) { border-color: var(--paper); }
  .poster-wrap { width: 86%; }
  .primary-button { font-size: 20px; }
  .flow-panel { padding: 26px 17px; }
  .public-footer { display: block; }
  .public-footer p, .public-footer small { display: block; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { .primary-button { transition: none; } }

/* logo oficial */
.brand, .public-footer > span { transform: none; -webkit-text-stroke: 0; text-shadow: none; display: inline-flex; align-items: center; }
.logo { display: block; height: 68px; width: auto; transform: rotate(-3deg); }
.public-footer .logo { height: 60px; }
.ticket-main strong { display: inline-block; background: var(--black); padding: 4px 12px; }
.ticket-main strong .logo, .ticket-main strong img { height: 38px; width: auto; display: block; transform: none; }
@media (max-width: 520px) { .logo { height: 44px; } }

/* ---------- versión funcional: QR real, escáner, clave, pendientes ---------- */
.ticket { grid-template-columns: 1fr 150px; }
.ticket .fake-qr { background: #fff; padding: 8px; border-left: 3px dashed var(--ink); }
.ticket .fake-qr svg { width: 100%; height: auto; display: block; }
.ticket-main code { word-break: break-all; }
.scan-window video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-window p { position: absolute; bottom: 14px; z-index: 2; background: #000a; padding: 4px 10px; }
.scan-corners { z-index: 2; }
.manual-start { width: 100%; margin: 14px 0 0; min-height: 52px; background: var(--yellow); color: var(--ink); border: 3px solid #000; border-radius: 0; font-family: var(--display); font-size: 20px; text-transform: uppercase; letter-spacing: .04em; box-shadow: 4px 4px 0 #000; }
.scanner-hint.form-error, #scan-error { color: #ffb4a3; font-weight: 700; }
.gate-lock { max-width: 460px; }
.gate-lock label { display: block; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.pending-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px dashed #ffffff40; font-size: 13px; overflow-wrap: anywhere; }
.pending-row button { flex: none; background: var(--yellow); color: var(--ink); border: 2px solid #000; border-radius: 0; padding: 8px 12px; text-transform: uppercase; font-weight: 400; }
.gate-lock .form-error, .gate-view .form-error { color: #ffb4a3; }


/* ---------- medios de pago y modo prueba ---------- */
.method-choices { border: 0; padding: 0; margin: 21px 0 0; min-width: 0; }
.method-choices legend { padding: 0; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.method-choice { text-transform: none; letter-spacing: 0; font-size: 13px; display: flex; align-items: flex-start; gap: 12px; border: 3px solid var(--ink); background: #fff; padding: 12px 14px; margin: 0 0 10px; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); }
.method-choice:has(input:checked) { background: var(--yellow); }
.method-choice input { width: 20px; min-height: 0; margin: 3px 0 0; accent-color: var(--ink); flex: none; }
.method-choice span { display: block; }
.method-choice strong { display: block; font-family: var(--display); font-weight: 400; font-size: 21px; text-transform: uppercase; letter-spacing: .02em; }
.method-choice small { display: block; font-size: 13px; line-height: 1.35; margin-top: 2px; }
.dummy-banner { background: var(--red); color: #fff; border: 3px solid var(--ink); padding: 12px 14px; margin: 21px 0 0; font-size: 14px; line-height: 1.4; transform: rotate(-.5deg); }
a.primary-button { text-decoration: none; margin: 14px 0; box-sizing: border-box; }
