/* Tipografías: antes de aceptar cookies, solo fuentes del sistema (ninguna petición a terceros).
   Tras "Aceptar", app.js carga Google Fonts y añade .gf a <html>. */
:root {
  --ink: #f7f4ef; --red: #e22637; --red-deep: #b91525; --muted: #b8ada9; --line: #513538; --bg: #0a0a0a; --panel: #1b1616;
  --display: 'Avenir Next Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif-condensed, Impact, sans-serif;
  --display-w: 800;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
}
html.gf { --display: 'Anton', sans-serif; --display-w: 400; --body: 'Space Grotesk', sans-serif; --serif: 'Libre Baskerville', serif; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); overflow-x: clip; }
::selection { background: var(--red); color: #fff; }
a { color: #e33b48; }
button { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.page { min-height: 100dvh; padding: 0 48px 70px; display: flex; justify-content: center; }
.frame { width: 100%; max-width: 1120px; border-left: 1px solid #342729; border-right: 1px solid #342729; }

/* Cabecera: logo PNG transparente y recortado, sin caja */
.top { height: 100px; margin: 0 30px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.brand { display: block; line-height: 0; }
.brand img { display: block; width: min(240px, 46vw); height: auto; }
.scan-note { display: flex; align-items: center; gap: 12px; font-size: 10px; font-weight: 600; line-height: 1.4; letter-spacing: 1.2px; color: #bdb2af; text-align: right; }
.scan-note svg { color: var(--red); flex-shrink: 0; }

/* Promo */
.headline { padding: 28px 30px 16px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 12px; letter-spacing: 2px; font-weight: 600; color: #e7525d; }
.eyebrow svg { color: var(--red); }
h1, h2, .state-title { font-family: var(--display); font-weight: var(--display-w); margin: 0; }
h1 { font-size: clamp(70px, 8.5vw, 118px); line-height: 1.02; letter-spacing: -2px; color: var(--red); text-shadow: 0 0 24px rgba(226, 38, 55, .35); }
h1 span { white-space: nowrap; }
.photo { height: clamp(260px, 34vh, 390px); margin: 0 30px; position: relative; overflow: hidden; border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 63%; display: block; }
.sticker { position: absolute; top: 30px; right: 35px; width: 173px; padding: 22px 10px; transform: rotate(8deg); background: var(--panel); border: 2px solid var(--red); box-shadow: 5px 5px 0 var(--red-deep); text-align: center; }
.sticker span { display: block; font-size: 10px; letter-spacing: 1.5px; font-weight: 600; color: var(--muted); }
.sticker strong { display: block; font-family: var(--display); font-weight: var(--display-w); font-size: 42px; line-height: 1.4; color: var(--red); }

/* Canje */
.redeem { margin: 0 30px; padding: 44px 0 40px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; text-align: center; }
.redeem h2 { font-size: clamp(40px, 5vw, 60px); line-height: 1; letter-spacing: -1px; margin-bottom: 12px; }
.redeem .eyebrow { justify-content: center; }
.lede { margin: 0 auto 28px; max-width: 34rem; font-family: var(--serif); font-size: 16px; line-height: 1.7; color: #d8cfcb; }
.redeem-btn { margin-top: 26px; width: min(100%, 420px); min-height: 76px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px 20px; font-weight: 700; font-size: clamp(17px, 2.2vw, 22px); letter-spacing: 1px; color: #fff; background: #c81122; border: 1px solid #ef4651; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.redeem-btn:hover:not(:disabled) { background: #e01b2d; transform: translateY(-2px); box-shadow: 0 6px 0 #681019; }
.redeem-btn:active:not(:disabled) { transform: none; box-shadow: none; }
.redeem-btn:disabled { opacity: .6; cursor: progress; }
.redeem-status { min-height: 1.5em; margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.redeem-status.ok { color: #f05a64; font-weight: 600; }
.state-msg { margin-top: 26px; max-width: 34rem; padding: 18px 20px; background: var(--panel); border: 1px solid #633136; border-top: 3px solid var(--red); text-align: left; }
.state-title { font-size: clamp(26px, 4vw, 36px); line-height: 1.05; color: #fff; margin-bottom: 8px; }
.state-body { margin: 0; font-family: var(--serif); font-size: 15px; line-height: 1.7; color: #d8cfcb; }

/* Carta 3D */
.flip-card { width: 250px; height: 350px; perspective: 1200px; }
.flip-inner { position: relative; width: 100%; height: 100%; transition: transform .9s cubic-bezier(.2, .75, .2, 1); transform-style: preserve-3d; }
.flip-inner.is-flipped { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; border: 2px solid #d81325; box-shadow: 0 12px 34px rgba(0, 0, 0, .65); padding: 18px; }
.face-front { background: repeating-linear-gradient(45deg, transparent 0 10px, rgba(216, 19, 37, .08) 10px 20px), radial-gradient(circle at 50% 30%, #2a0d10, #0e0708); color: #d81325; }
.face-front .pattern { font-size: 22px; letter-spacing: 8px; opacity: .5; }
.face-front .brand-mark { font-family: var(--display); font-weight: var(--display-w); font-size: 30px; line-height: 1.05; margin-top: 16px; }
.face-front .seal { margin-top: 12px; font-size: 10px; letter-spacing: 2px; color: var(--muted); }
.face-back { background: #f7f4ef; color: #101010; transform: rotateY(180deg); }
.suit { font-size: 88px; color: #d81325; line-height: 1; }
.corner { position: absolute; font-size: 18px; font-weight: 700; color: #d81325; line-height: 1; text-align: center; }
.corner.tl { top: 12px; left: 14px; }
.corner.br { bottom: 12px; right: 14px; transform: rotate(180deg); }
.code-label { margin-top: 12px; font-size: 11px; letter-spacing: 2px; color: #6b5d5a; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 27px; font-weight: 700; letter-spacing: 1px; margin-top: 4px; }
.code-note { margin-top: 10px; font-size: 11px; color: #6b5d5a; }
.code-used { margin-top: 8px; font-size: 11px; font-weight: 700; letter-spacing: 1px; color: #fff; background: #101010; padding: 4px 8px; }

.caption { margin: 0 30px; min-height: 84px; padding: 18px 0; display: flex; gap: 16px; align-items: center; border-bottom: 1px solid var(--line); }
.caption p { margin: 0; flex: 1; font-family: var(--serif); font-size: 17px; line-height: 1.7; color: var(--ink); }
.caption svg { color: var(--red); flex-shrink: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--red); box-shadow: 0 0 10px rgba(226, 38, 55, .6); }
.legal { max-width: 620px; margin: 17px 30px 0 auto; color: #938786; text-align: right; font-size: 10px; line-height: 1.6; letter-spacing: .15px; }

.foot { margin: 30px 30px 0; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12px; color: var(--muted); }
.foot a, .link-btn { color: #e33b48; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-size: 12px; }
.foot a:hover, .link-btn:hover { text-decoration: underline; }

/* Aviso de cookies */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #0a0a0a; border-top: 2px solid #d81325; padding: 14px 16px; box-shadow: 0 -6px 24px rgba(0, 0, 0, .5); }
.cookie-inner { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.cookie-text { margin: 0; font-size: 12.5px; line-height: 1.6; color: #d8cfcb; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-btn { font-weight: 700; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; padding: 10px 18px; border: 1px solid #d81325; background: transparent; color: var(--ink); cursor: pointer; }
.cookie-btn.accept { background: #d81325; color: #fff; }
.cookie-btn:hover { background: #b91525; color: #fff; }
@media (min-width: 640px) { .cookie-inner { flex-direction: row; align-items: center; } .cookie-text { flex: 1; } }

/* Páginas legales */
.legal-page { margin: 0 30px; padding: 40px 0; max-width: 760px; }
.legal-page h1 { font-size: clamp(40px, 6vw, 64px); color: var(--ink); text-shadow: none; letter-spacing: -1px; margin-bottom: 8px; }
.legal-page h2 { font-size: 21px; letter-spacing: .3px; margin: 30px 0 8px; color: var(--ink); }
.legal-page p, .legal-page li { font-size: 15px; line-height: 1.75; color: #d8cfcb; }
.legal-page p { margin: 0 0 12px; }
.legal-page ul { padding-left: 20px; }
.legal-page code { background: var(--panel); padding: 2px 6px; font-size: 13px; }
.updated { font-size: 12px; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); margin: 10px 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #2a1d1f; vertical-align: top; }
th { background: var(--panel); color: var(--muted); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
td { color: #d8cfcb; }

/* Panel de personal */
.staff { max-width: 980px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.staff-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.staff-input { flex: 1; min-width: 200px; padding: 11px 14px; font: inherit; font-size: 15px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); }
.mono, .staff-input.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 1px; }
.staff-error { color: #f05a64; font-size: 14px; min-height: 1.4em; }
.staff-stats { font-size: 14px; color: var(--ink); }
.check-result { margin: 12px 0 6px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid #6ed089; }
.check-result.bad { border-left-color: #e33b48; }
.check-title { margin: 0 0 4px !important; font-weight: 700; font-size: 17px !important; color: #fff !important; }
.check-body { margin: 0 0 10px !important; }
.row-issued td:nth-child(3) { color: #f0c060; }
.row-redeemed td:nth-child(3) { color: #6ed089; }
.diag { margin-top: 30px; font-size: 13px; color: var(--muted); }
.diag summary { cursor: pointer; color: var(--ink); }
.diag pre { white-space: pre-wrap; word-break: break-all; background: var(--panel); padding: 12px; border: 1px solid var(--line); color: var(--ink); }
.print-only { display: none; }
@media print {
  body, .page, .frame { background: #fff !important; color: #000 !important; padding: 0; border: 0; }
  .top, form, .staff-row, .check-result, .diag, .eyebrow, .no-print, .staff-error { display: none !important; }
  .print-only { display: table-cell; }
  .legal-page h1, .legal-page h2, .staff-stats, td, th { color: #000 !important; background: #fff !important; text-shadow: none; }
  td, th { border-bottom: 1px solid #999; padding: 5px 8px; }
  .table-wrap { border: 0; overflow: visible; }
}

@media (max-width: 767px) {
  .page { padding: 0 12px 40px; }
  .top { height: 84px; margin: 0 14px; }
  .brand img { width: min(190px, 50vw); }
  .scan-note { font-size: 9px; gap: 8px; letter-spacing: .8px; }
  .scan-note svg { width: 18px; }
  .headline { padding: 26px 14px 18px; }
  .eyebrow { font-size: 10px; letter-spacing: 1.4px; }
  h1 { font-size: clamp(44px, 12vw, 82px); line-height: 1.06; letter-spacing: -.8px; }
  .photo { margin: 0 14px; height: clamp(210px, 32dvh, 360px); }
  .sticker { width: 124px; top: 18px; right: 16px; padding: 12px 8px; box-shadow: 4px 4px 0 var(--red-deep); }
  .sticker strong { font-size: 30px; }
  .sticker span { font-size: 8px; letter-spacing: 1px; }
  .redeem { margin: 0 14px; padding: 34px 0 32px; }
  .lede { font-size: 14px; margin-bottom: 22px; }
  .flip-card { width: 230px; height: 322px; }
  .suit { font-size: 78px; }
  .code { font-size: 24px; }
  .caption { margin: 0 14px; gap: 12px; }
  .caption p { font-size: 13px; line-height: 1.75; }
  .dot { width: 7px; height: 7px; }
  .legal { margin: 14px 14px 0; font-size: 9px; }
  .foot { margin: 24px 14px 0; }
  .legal-page { margin: 0 14px; padding: 30px 0; }
}
@media (prefers-reduced-motion: reduce) { .flip-inner, .redeem-btn { transition: none; } }
