/* EPC FILM FEST · estilos compartidos. Paleta Manual de Marca UCB + dorado de gala decorativo. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/fonts/playfair-latin.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 400 900; font-display: swap; src: url(/fonts/playfair-italic-latin.woff2) format('woff2'); }

:root {
  --ucb-azul: #005289;        /* Pantone 541 */
  --ucb-amarillo: #FFCD00;    /* Pantone 116 */
  --ucb-cian: #00A3D9;        /* Pantone 312 */
  --ucb-gris: #4C4C4C;        /* Cool Gray 11 */
  --noche: #061427;           /* azul noche derivado de 541 */
  --noche-2: #0B1F3A;
  --noche-3: #12305A;
  --tinta: #F3F6FB;           /* texto sobre noche: 17.6:1 */
  --tinta-suave: #C3CFE0;     /* 11.3:1 sobre noche */
  --tinta-mute: #93A4BF;      /* 6.6:1 sobre noche, para notas */
  --oro: #F5C84B;             /* texto dorado: 12.2:1 sobre noche */
  --oro-2: #D9A520;
  --oro-3: #8A6A14;
  --cian-txt: #4CC3EF;        /* cian aclarado para texto: 9.5:1 */
  --rojo: #FF8A80;
  --verde: #7FE0A7;
  --foco: #FFCD00;
  --radio: 14px;
  --sombra: 0 10px 30px rgba(0, 0, 0, .35);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-bottom: 120px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
body {
  margin: 0; font-family: var(--sans); color: var(--tinta); line-height: 1.5; font-size: 1rem;
  background: var(--noche);
  background-image:
    radial-gradient(ellipse 60% 40% at 15% -10%, rgba(0, 163, 217, .22), transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% -5%, rgba(245, 200, 75, .14), transparent 60%),
    radial-gradient(ellipse 80% 50% at 50% 110%, rgba(0, 82, 137, .45), transparent 70%);
  background-attachment: fixed;
  min-height: 100dvh;
}
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 .5rem; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
a { color: var(--cian-txt); }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ucb-amarillo); color: var(--noche); padding: .6rem 1rem; border-radius: 8px; font-weight: 700; z-index: 100; }
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2rem, 1100px); margin-inline: auto; }
.wrap-wide { width: min(100% - 2rem, 1400px); margin-inline: auto; }

/* Dorado decorativo: solo en adornos, nunca como único medio para texto esencial */
.gold-text { background: linear-gradient(100deg, #FFE59A 0%, #F5C84B 35%, #B8860B 55%, #FFE59A 80%, #D9A520 100%); -webkit-background-clip: text; background-clip: text; color: var(--oro); -webkit-text-fill-color: transparent; }
@supports not (background-clip: text) { .gold-text { color: var(--oro); } }
.gold-line { height: 2px; border: 0; background: linear-gradient(90deg, transparent, var(--oro-2), var(--oro), var(--oro-2), transparent); margin: 1.5rem auto; width: min(100%, 420px); }
.filmstrip { height: 18px; background: repeating-linear-gradient(90deg, var(--oro-3) 0 10px, transparent 10px 22px); -webkit-mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); opacity: .55; }

/* Cabecera */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--tinta); }
.brand img { height: 42px; width: auto; }
.brand .b1 { font-family: var(--serif); font-weight: 800; font-size: 1.15rem; letter-spacing: .06em; line-height: 1; }
.brand .b2 { font-size: .72rem; color: var(--tinta-suave); letter-spacing: .04em; }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a { color: var(--tinta-suave); text-decoration: none; padding: .6rem .8rem; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--tinta); background: rgba(255, 255, 255, .07); }
@media (max-width: 560px) { .brand .b2 { display: none; } .brand .b1 { font-size: 1rem; } .nav a { padding: .6rem .55rem; font-size: .92rem; } .top { gap: .4rem; } }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.4rem; border-radius: 999px; border: 2px solid transparent; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ucb-amarillo); color: var(--noche); box-shadow: 0 6px 24px rgba(255, 205, 0, .25); }
.btn-primary:hover { background: #FFD83D; }
.btn-secondary { background: var(--ucb-azul); color: #fff; }
.btn-secondary:hover { background: #0A66A8; }
.btn-ghost { background: transparent; color: var(--tinta); border-color: rgba(255, 255, 255, .25); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-danger { background: #B3261E; color: #fff; }
.btn-sm { min-height: 40px; padding: .4rem 1rem; font-size: .92rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* Tarjetas */
.card { background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radio); padding: 1.1rem; box-shadow: var(--sombra); }
.card-gold { border-color: rgba(245, 200, 75, .45); }
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: rgba(0, 163, 217, .18); color: var(--cian-txt); border: 1px solid rgba(0, 163, 217, .35); }
.badge-gold { background: rgba(245, 200, 75, .14); color: var(--oro); border-color: rgba(245, 200, 75, .4); }
.badge-live { background: rgba(255, 138, 128, .14); color: var(--rojo); border-color: rgba(255, 138, 128, .4); }
.badge-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.muted { color: var(--tinta-suave); }
.note { color: var(--tinta-mute); font-size: .9rem; }

/* Póster generado (degradado + título) */
.poster { aspect-ratio: 2 / 3; border-radius: 10px; position: relative; overflow: hidden; display: grid; place-items: end start; padding: .8rem; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); isolation: isolate; }
.poster::before { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, var(--c1, #005289), var(--c2, #00A3D9)); z-index: -2; }
.poster::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, .25), transparent 45%), linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .55)); z-index: -1; }
.poster .pt { font-family: var(--serif); font-weight: 800; font-size: clamp(.95rem, 2.4vw, 1.25rem); line-height: 1.1; }
.poster .pd { font-size: .72rem; opacity: .9; letter-spacing: .08em; text-transform: uppercase; }
.poster-wide { aspect-ratio: 16 / 9; }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }

/* Pestañas de categoría */
.tabs { display: flex; gap: .4rem; overflow-x: auto; padding: .25rem; margin: 0 0 1rem; scrollbar-width: thin; }
.tab { flex: 0 0 auto; min-height: 44px; padding: .5rem 1rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: var(--tinta-suave); cursor: pointer; font-weight: 600; }
.tab[aria-selected="true"] { background: var(--ucb-azul); color: #fff; border-color: var(--ucb-azul); }

/* Lista de obras */
.works { display: grid; gap: .9rem; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 0; }
@media (min-width: 720px) { .works { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .works { grid-template-columns: repeat(3, 1fr); } }
.work { display: grid; grid-template-columns: 96px 1fr; gap: .9rem; align-content: start; }
.work.is-now { border-color: var(--oro); box-shadow: 0 0 0 1px var(--oro), 0 10px 40px rgba(245, 200, 75, .2); }
.work h3 { margin: 0; }
.work .team { color: var(--cian-txt); font-size: .9rem; font-weight: 600; }
.work .syn { color: var(--tinta-suave); font-size: .92rem; margin: .35rem 0 .5rem; }
.work .meta { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .8rem; color: var(--tinta-mute); }
.work .control { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: .75rem; }
.video { grid-column: 1 / -1; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; }

/* Estrellas (radiogroup real) */
.stars { display: flex; gap: .15rem; align-items: center; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; border-radius: 8px; color: var(--tinta-mute); }
.stars label svg { width: 30px; height: 30px; fill: currentColor; }
.stars input:focus-visible + label { outline: 3px solid var(--foco); outline-offset: 1px; }
.stars.has-value label { color: var(--oro); }
.stars label.off { color: rgba(255, 255, 255, .25); }
.stars label:hover, .stars label:hover ~ label { color: rgba(255, 255, 255, .25); }
.stars:hover label { color: var(--oro); }
.stars:hover label:hover ~ label { color: rgba(255, 255, 255, .25); }
.stars .val { margin-left: .5rem; font-weight: 700; min-width: 3.5ch; color: var(--tinta-suave); }

/* Opción tipo radio grande (favorito / podio) */
.choice { display: flex; align-items: center; gap: .75rem; min-height: 48px; padding: .5rem .8rem; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .18); cursor: pointer; font-weight: 600; width: 100%; background: transparent; color: var(--tinta); text-align: left; }
.choice input { width: 22px; height: 22px; accent-color: var(--ucb-amarillo); margin: 0; flex: 0 0 auto; }
.choice:has(input:checked) { background: rgba(255, 205, 0, .12); border-color: var(--ucb-amarillo); }
.podio-sel { display: grid; gap: .5rem; }
.podio-sel select { min-height: 48px; width: 100%; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25); background: var(--noche-2); color: var(--tinta); padding: .5rem .75rem; }
.podio-sel label { font-weight: 700; display: grid; gap: .25rem; }
.podio-sel label span { display: flex; gap: .4rem; align-items: center; }
.medal { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .78rem; font-weight: 800; color: var(--noche); background: var(--oro); }
.medal.m2 { background: #D7DCE5; } .medal.m3 { background: #D9955B; }
.podio-pick { display: flex; gap: .4rem; flex-wrap: wrap; }
.podio-pick button { min-height: 44px; min-width: 44px; padding: .4rem .7rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: var(--tinta); font-weight: 700; cursor: pointer; }
.podio-pick button[aria-pressed="true"] { background: var(--ucb-amarillo); color: var(--noche); border-color: var(--ucb-amarillo); }

/* Barra fija de envío */
.sendbar { position: sticky; bottom: 0; margin-top: 1rem; z-index: 20; background: rgba(6, 20, 39, .92); backdrop-filter: blur(10px); border-top: 1px solid rgba(255, 255, 255, .12); padding: .7rem 0 max(.7rem, env(safe-area-inset-bottom)); }
.sendbar .wrap { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.progress { flex: 1; min-width: 0; }
.progress .bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; margin-top: .3rem; }
.progress .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ucb-cian), var(--ucb-amarillo)); width: 0; transition: width .3s; }
.progress .txt { font-size: .85rem; color: var(--tinta-suave); }

/* Ahora en pantalla */
.now { display: grid; grid-template-columns: 64px 1fr; gap: .9rem; align-items: center; background: linear-gradient(135deg, rgba(245, 200, 75, .18), rgba(0, 82, 137, .35)); border: 1px solid rgba(245, 200, 75, .5); border-radius: var(--radio); padding: .8rem; margin: 1rem 0; }
.now .poster { aspect-ratio: 1; width: 64px; padding: .3rem; border-radius: 8px; }
.now .k { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--oro); font-weight: 700; }
.now h3 { margin: 0; }
.now a { color: var(--tinta); }

/* Resultados */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.bars li { display: grid; grid-template-columns: 2.2rem 1fr auto; gap: .6rem; align-items: center; }
.bars .rk { font-family: var(--serif); font-weight: 800; color: var(--tinta-suave); text-align: right; }
.bars li[data-rank="1"] .rk { color: var(--oro); }
.bars .lbl { font-weight: 600; display: flex; justify-content: space-between; gap: .5rem; }
.bars .lbl small { color: var(--tinta-mute); font-weight: 500; }
.bars .track { grid-column: 2; height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bars .track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ucb-azul), var(--ucb-cian)); transition: width .8s cubic-bezier(.2, .8, .2, 1); border-radius: 999px; }
.bars li[data-rank="1"] .track i { background: linear-gradient(90deg, var(--oro-2), var(--oro)); }
.bars .val { grid-column: 3; grid-row: 1 / span 2; font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.bars li { grid-template-rows: auto auto; }
.bars .lbl { grid-column: 2; grid-row: 1; }
.bars .rk { grid-row: 1 / span 2; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; align-items: end; margin: 1.5rem 0; }
.podium .step { text-align: center; display: grid; gap: .4rem; justify-items: center; }
.podium .step .name { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.podium .step .name small { display: block; color: var(--tinta-mute); font-weight: 500; }
.podium .block { width: 100%; border-radius: 10px 10px 0 0; display: grid; place-items: center; font-family: var(--serif); font-weight: 800; font-size: 1.6rem; color: var(--noche); background: linear-gradient(180deg, #E6EBF2, #AEB8C8); }
.podium .p1 .block { height: 110px; background: linear-gradient(180deg, #FFE59A, #D9A520); }
.podium .p2 .block { height: 80px; }
.podium .p3 .block { height: 60px; background: linear-gradient(180deg, #E8B98A, #B9733E); }
.podium .p1 { order: 2; } .podium .p2 { order: 1; } .podium .p3 { order: 3; }
.statue { width: 56px; height: 90px; }
.podium .p1 .statue { width: 72px; height: 116px; }
.stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.stat { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: .6rem 1rem; min-width: 120px; }
.stat b { display: block; font-size: 1.6rem; font-family: var(--serif); color: var(--oro); font-variant-numeric: tabular-nums; }
.stat span { font-size: .8rem; color: var(--tinta-suave); }
table.datos { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.datos th, table.datos td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid rgba(255, 255, 255, .1); }
table.datos th { color: var(--tinta-suave); font-weight: 600; }
table.datos td.num, table.datos th.num { text-align: right; font-variant-numeric: tabular-nums; }
details.alt summary { cursor: pointer; color: var(--cian-txt); font-weight: 600; min-height: 44px; display: flex; align-items: center; }

/* Sobre / ganador */
.envelope { text-align: center; padding: 2rem 1rem; }
.envelope .and { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 4vw, 2.2rem); color: var(--tinta-suave); }
.envelope .winner { font-family: var(--serif); font-size: clamp(2rem, 7vw, 4.5rem); font-weight: 900; margin: .5rem 0; animation: reveal 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.envelope .team { color: var(--cian-txt); font-size: 1.2rem; }
@keyframes reveal { from { opacity: 0; transform: translateY(30px) scale(.9); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.spot { position: fixed; inset: 0; pointer-events: none; z-index: -1; background: conic-gradient(from 200deg at 20% 0%, rgba(255, 255, 255, .06), transparent 12%), conic-gradient(from 140deg at 80% 0%, rgba(255, 255, 255, .06), transparent 12%); }

/* Formularios / admin */
.field { display: grid; gap: .3rem; margin-bottom: .8rem; }
.field label, .field .lbl { font-weight: 600; font-size: .92rem; }
.field input, .field select, .field textarea { min-height: 44px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25); background: var(--noche-2); color: var(--tinta); padding: .5rem .75rem; width: 100%; }
.field textarea { min-height: 80px; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.seg { display: inline-flex; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; overflow: hidden; }
.seg button { min-height: 44px; padding: .4rem .9rem; border: 0; background: transparent; color: var(--tinta-suave); font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ucb-azul); color: #fff; }
.toast { position: fixed; left: 50%; bottom: 5.5rem; transform: translateX(-50%); background: var(--ucb-azul); color: #fff; padding: .7rem 1.1rem; border-radius: 10px; box-shadow: var(--sombra); z-index: 50; max-width: min(92vw, 480px); }
.toast.err { background: #B3261E; }
.alert { padding: .8rem 1rem; border-radius: 10px; background: rgba(255, 138, 128, .12); border: 1px solid rgba(255, 138, 128, .4); color: var(--tinta); }
.alert.ok { background: rgba(127, 224, 167, .12); border-color: rgba(127, 224, 167, .4); }
.admin-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.admin-list li { display: flex; gap: .5rem; align-items: center; justify-content: space-between; padding: .5rem .7rem; border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; flex-wrap: wrap; }
.admin-list li .t { flex: 1; min-width: 0; }
.admin-list li.is-now { border-color: var(--oro); }
footer.foot { padding: 2rem 0 3rem; color: var(--tinta-mute); font-size: .85rem; text-align: center; }
.sr-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media print { body { background: #fff; color: #000; } .no-print { display: none !important; } }
