/* WhatsApp Ruleta · estilos comunes (ruleta, página intermedia y regalo). Los colores llegan de config.js. */
:root { --fondo: #140f22; --texto: #fff7e6; --acento: #f5c542; --acento2: #e2553f; --acento3: #3f8f8a;
  --titulos: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  --oro: linear-gradient(100deg, color-mix(in srgb, var(--acento) 70%, #7a5a1a) 0%, var(--acento) 30%, color-mix(in srgb, var(--acento) 45%, #fff) 50%, var(--acento) 70%, color-mix(in srgb, var(--acento) 70%, #7a5a1a) 100%); }
body.serif { --titulos: "Didot", "Bodoni 72", "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif; }
* { box-sizing: border-box; margin: 0; }
html, body { min-height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Degradado: más claro y cálido arriba, profundo abajo */
  background:
    radial-gradient(90% 55% at 50% 0%, color-mix(in srgb, var(--acento) 26%, transparent) 0%, transparent 70%),
    radial-gradient(60% 40% at 50% 52%, color-mix(in srgb, var(--acento) 10%, transparent) 0%, transparent 70%),
    radial-gradient(70% 50% at 100% 100%, color-mix(in srgb, var(--acento2) 35%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--fondo) 72%, var(--acento2)) 0%, var(--fondo) 45%, color-mix(in srgb, var(--fondo) 70%, #000) 100%);
  background-attachment: fixed; background-color: var(--fondo);
  color: var(--texto); min-height: 100dvh; overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
/* Textura: grano fino tipo papel/madera + viñeta */
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5; mix-blend-mode: soft-light;
  background-image: 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='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 .9  0 0 0 0 .75  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* Encima: dibujo fino dorado (rombos con punto, tipo papel pintado de café clásico), luz dorada de arriba y viñeta */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 50%, rgba(0,0,0,.5) 100%),
    conic-gradient(from 180deg at 50% -10%, transparent 160deg, color-mix(in srgb, var(--acento) 10%, transparent) 172deg, transparent 180deg, color-mix(in srgb, var(--acento) 8%, transparent) 188deg, transparent 200deg),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23d9b36a' stroke-opacity='.10' stroke-width='.7'%3E%3Cpath d='M28 2 L54 28 L28 54 L2 28 Z'/%3E%3Cpath d='M28 14 C33 22 33 34 28 42 C23 34 23 22 28 14 Z'/%3E%3C/g%3E%3Ccircle cx='28' cy='28' r='1.3' fill='%23d9b36a' fill-opacity='.18'/%3E%3Ccircle cx='0' cy='0' r='1' fill='%23d9b36a' fill-opacity='.14'/%3E%3Ccircle cx='56' cy='56' r='1' fill='%23d9b36a' fill-opacity='.14'/%3E%3C/svg%3E");
  -webkit-mask: linear-gradient(180deg, #000 0%, rgba(0,0,0,.65) 60%, #000 100%); mask: linear-gradient(180deg, #000 0%, rgba(0,0,0,.65) 60%, #000 100%); }
main, #escena, #confeti, .idiomas { position: relative; z-index: 1; }
#confeti { position: fixed; z-index: 10; }
#escena { position: fixed; z-index: 5; }
.idiomas { position: fixed; top: max(10px, env(safe-area-inset-top)); right: 10px; z-index: 6; display: flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: color-mix(in srgb, var(--fondo) 70%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acento) 35%, transparent); backdrop-filter: blur(6px); }
.idiomas button { appearance: none; border: 0; background: none; color: var(--texto); opacity: .65; font: 700 11px/1 system-ui, sans-serif; letter-spacing: .08em; padding: 6px 8px; border-radius: 999px; cursor: pointer; }
.idiomas button[aria-pressed="true"] { opacity: 1; background: var(--acento); color: var(--fondo); }
main { max-width: 460px; width: 100%; margin: 0 auto; padding: max(50px, calc(env(safe-area-inset-top) + 40px)) 22px 40px; min-height: 100dvh; display: flex; flex-direction: column; }
.pantalla { display: none; flex: 1; flex-direction: column; align-items: center; text-align: center; gap: 16px; animation: entra .5s ease both; }
.pantalla.activa { display: flex; }
@keyframes entra { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
h1, h2, .premio-nombre { font-family: var(--titulos); }
h1 { font-size: clamp(28px, 8.5vw, 38px); line-height: 1.05; font-weight: 800; letter-spacing: -.01em; }
body.serif h1 { font-weight: 600; letter-spacing: 0; }
p.sub { font-size: 17px; line-height: 1.45; opacity: .85; max-width: 32ch; }
.nota { font-size: 13px; opacity: .6; line-height: 1.4; }

/* Marca: logotipo (máscara dorada) o letrero de texto o nombre */
.marca { display: grid; justify-items: center; gap: 6px; width: 100%; }
.logo { width: min(100%, 360px); aspect-ratio: var(--logo-ratio, 2.6); background: var(--oro); background-size: 220% 100%;
  background-position: 30% 0; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.marca .logo { margin-top: 18px; }
.marca.peq .logo { width: min(72%, 260px); }
@keyframes brillo { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.letrero { display: inline-grid; justify-items: center; gap: 2px; padding: 12px 26px 10px; background: #0b0a09; color: #f6efe2;
  border: 1px solid rgba(246,239,226,.85); outline: 1px solid rgba(246,239,226,.85); outline-offset: 4px; margin: 6px 0 4px; font-family: var(--titulos); }
.letrero .nombre { font-size: 26px; letter-spacing: .14em; line-height: 1; white-space: nowrap; }
.letrero .sub { font-size: 11px; letter-spacing: .4em; padding-left: .4em; }
.local { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; opacity: .75; font-weight: 600; }
.lema { font-family: var(--titulos); font-style: italic; font-size: 15px; opacity: .75; }

.boton { appearance: none; border: 0; cursor: pointer; width: 100%; padding: 18px 20px; border-radius: 16px; font: inherit; font-size: 18px; font-weight: 800;
  color: var(--fondo); background: var(--oro); background-size: 200% 100%; text-decoration: none; display: block; text-align: center;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--acento) 45%, #000), 0 14px 30px -12px color-mix(in srgb, var(--acento) 70%, transparent);
  transition: transform .08s, box-shadow .08s, opacity .3s; }
.boton:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--acento) 45%, #000); }
.boton[disabled] { opacity: .35; pointer-events: none; }
.boton.secundario { background: transparent; color: var(--texto); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--texto) 35%, transparent); }
.acciones { width: 100%; display: grid; gap: 12px; margin-top: auto; padding-top: 8px; }

.qr { background: #fff; padding: 12px; border-radius: 16px; width: 190px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 70%, transparent), 0 20px 40px -18px #000; }
.qr svg { display: block; width: 100%; height: auto; }
.codigo { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 32px; font-weight: 800; letter-spacing: .22em; padding: 8px 12px 8px 20px; border-radius: 12px; background: var(--texto); color: var(--fondo); }

.experiencia { width: 100%; margin-top: 6px; border-radius: 22px; padding: 22px 20px; text-align: left; display: grid; gap: 10px;
  background: linear-gradient(145deg, #1b1630, #07060c); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 20px 40px -20px #000; position: relative; overflow: hidden; }
.experiencia::after { content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(245,197,66,.35), transparent 65%); pointer-events: none; }
.experiencia .eti { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #f5c542; font-weight: 700; }
.experiencia h2 { font-family: system-ui, -apple-system, sans-serif; font-size: 22px; line-height: 1.15; font-weight: 800; }
.experiencia p { font-size: 15px; opacity: .8; line-height: 1.4; }
.experiencia .boton { background: #f5c542; color: #140f22; box-shadow: 0 5px 0 #a07b1a; margin-top: 4px; }
#confeti { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.error { color: #ffb4a6; font-size: 15px; }
[hidden] { display: none !important; }
