/* Film Routes — marca UPRAISE (magenta #E6007E sobre navy #1A1A2E).
   Lenguaje de rodaje: titulares condensados (Anton), rótulos monoespaciados (Space Mono, como el lema
   de UPRAISE), cortes rectos y diagonales del logo. Fuentes servidas desde la app (RGPD/CSP). */
@font-face { font-family: 'Anton'; src: url(/fonts/anton-latin.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Space Mono'; src: url(/fonts/spacemono-400-latin.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Space Mono'; src: url(/fonts/spacemono-700-latin.woff2) format('woff2'); font-weight: 700; font-display: swap; }
:root {
  --magenta: #E6007E; --magenta-dark: #b80065; --magenta-soft: #fde6f2;
  --navy: #1A1A2E; --navy-2: #16162a; --navy-line: #2a2a44;
  --teal: #00A99D;
  --bg: #f6f6f8; --surface: #ffffff; --text: #1A1A2E; --muted: #5d6275; --border: #e2e2ea;
  --ok: #1b7f4a; --ok-soft: #e6f4ec; --warn: #8a5a00; --warn-soft: #fff4d6; --err: #b3261e; --err-soft: #fbeaea;
  --radius: 3px;
  --display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e1a; --surface: #16162a; --text: #f1f1f6; --muted: #a3a8bd; --border: #2a2a44;
    --magenta-soft: #3a0f27; --ok: #5cc28a; --ok-soft: #173325; --warn: #e3b341; --warn-soft: #3a2f10; --err: #ff8a80; --err-soft: #3a1618;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 16px; line-height: 1.5; background: var(--bg); color: var(--text); }
a { color: var(--magenta); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.01em; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; text-transform: uppercase; line-height: 1; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); margin: 0 0 .6rem; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 2.2rem 0 .9rem; }
h3 { font-size: 1.05rem; margin: 0 0 .3rem; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--mono); font-size: .85em; }
.hidden { display: none !important; }
.kicker { font-family: var(--mono); color: var(--magenta); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .75rem; margin: 0 0 .5rem; }

/* ── Cabecera ── */
header.site { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 1000; }
header.site .inner { max-width: 1160px; margin: 0 auto; padding: .55rem 16px; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .02em; }
.brand img { height: 30px; width: auto; }
.brand span em { color: var(--magenta); font-style: normal; }
nav.main { display: flex; gap: .15rem; flex-wrap: wrap; }
nav.main a { color: #c9cbe0; text-decoration: none; padding: .4rem .65rem; border-radius: 0; font-size: .93rem; font-weight: 600; }
nav.main a:hover, nav.main a.active { color: #fff; background: rgba(255,255,255,.08); }
nav.main a.active { box-shadow: inset 0 -2px 0 var(--magenta); }
.spacer { flex: 1; }
.langbtn { background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 0; padding: .3rem .7rem; font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; cursor: pointer; }
.langbtn:hover { border-color: #fff; }
.accent-line { height: 3px; background: var(--magenta); }

main { max-width: 1160px; margin: 0 auto; padding: 1.5rem 16px 4rem; min-height: 60vh; }

/* ── Hero simple (páginas sin edición) ── */
.hero { background: var(--navy); color: #fff; padding: clamp(1.6rem, 5vw, 3.2rem); margin-bottom: 1.5rem; }
.hero p.lead { color: #d2d4e6; max-width: 62ch; font-size: 1.08rem; }
.hero .actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; }

.btn { font: inherit; font-size: .95rem; font-weight: 700; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: .6rem 1.1rem; border-radius: var(--radius); cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.btn.primary:hover { background: var(--magenta-dark); border-color: var(--magenta-dark); }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn.small { font-size: .82rem; padding: .35rem .7rem; }
.btn:disabled { opacity: .55; cursor: default; }

/* ── Tarjetas y rejillas ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.grid { display: grid; gap: 1rem; }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); align-items: start; }
.steps .num { width: 34px; height: 34px; background: var(--magenta); color: #fff; font-family: var(--mono); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: .5rem; }

.routecard { display: flex; flex-direction: column; gap: .4rem; text-decoration: none; color: inherit; border-top: 4px solid var(--rc, var(--magenta)); }
.routecard:hover { box-shadow: 0 6px 22px rgba(26,26,46,.12); }
.routecard .code { font-weight: 800; color: var(--rc, var(--magenta)); letter-spacing: .08em; font-size: .8rem; text-transform: uppercase; }
.routecard .film { font-size: 1.2rem; font-weight: 800; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .12rem .5rem; border-radius: var(--radius); background: var(--magenta-soft); color: var(--magenta); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.neutral { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }

.stoplist { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.stoplist li { counter-increment: s; display: flex; gap: .8rem; padding: .7rem 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.stoplist li::before { content: counter(s); flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--rc, var(--magenta)); color: #fff;
  font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .9rem; }
.stoplist a { color: inherit; text-decoration: none; font-weight: 700; }
.stoplist a:hover { color: var(--magenta); }

/* ── Comparador entonces/ahora ── */
.compare { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--navy); user-select: none; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .then { clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.compare .divider { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: #fff; box-shadow: 0 0 10px rgba(0,0,0,.5); transform: translateX(-1px); }
.compare .knob { position: absolute; top: 50%; left: var(--pos, 50%); transform: translate(-50%, -50%); width: 42px; height: 42px; border-radius: 50%;
  background: #fff; color: var(--navy); display: flex; align-items: center; justify-content: center; font-weight: 800; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.compare .tag { position: absolute; top: 12px; font-size: .75rem; font-weight: 800; padding: .2rem .6rem; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; }
.compare .tag.then-tag { left: 12px; } .compare .tag.now-tag { right: 12px; }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare .placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #a3a8bd; font-size: .9rem; text-align: center; padding: 1rem; }
.compare-single { aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--navy); position: relative; }
.compare-single img { width: 100%; height: 100%; object-fit: cover; }
.credit { font-size: .78rem; color: var(--muted); margin-top: .35rem; }

/* ── Prototipos / galería ── */
.proto { display: flex; gap: 1rem; align-items: flex-start; }
.proto .qr { flex: 0 0 104px; width: 104px; height: 104px; background: #fff; border-radius: 8px; padding: 4px; border: 1px solid var(--border); }
.proto .qr img { width: 100%; height: 100%; display: block; }
.proto .meta { font-size: .85rem; color: var(--muted); }
.proto .actions { margin-top: .5rem; display: flex; gap: .4rem; flex-wrap: wrap; }

/* ── Mapa ── */
#map, .minimap { height: 520px; border-radius: var(--radius); border: 1px solid var(--border); z-index: 1; }
.minimap { height: 260px; }
@media (max-width: 640px) { #map { height: 420px; } }
.pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; }
.pin span { transform: rotate(45deg); color: #fff; font-weight: 800; font-size: .75rem; }
.pin.approx { border-style: dashed; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .88rem; margin: .6rem 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: .35rem; vertical-align: -1px; }

/* ── Formularios ── */
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; }
.field > span { font-size: .85rem; font-weight: 600; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], select, textarea {
  font: inherit; font-size: .95rem; padding: .5rem .65rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); width: 100%; }
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--magenta); outline-offset: -1px; }
.row { display: flex; gap: .8rem; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }
.notice { padding: .65rem .85rem; border-radius: 8px; font-size: .92rem; margin: .5rem 0; }
.notice.err { background: var(--err-soft); color: var(--err); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }

/* ── Login / entrega ── */
body.narrow main { max-width: 760px; }
.loginbox { max-width: 380px; margin: 3rem auto; }

/* ── Pie ── */
footer.site { background: var(--navy); color: #a3a8bd; font-size: .85rem; }
footer.site .inner { max-width: 1160px; margin: 0 auto; padding: 1.4rem 16px; display: flex; gap: 1rem 2rem; flex-wrap: wrap; align-items: center; }
footer.site a { color: #fff; }
footer.site .eu { display: flex; align-items: center; gap: .6rem; }
footer.site .eu img { width: 42px; height: 28px; flex: 0 0 auto; }

.crumbs { font-size: .88rem; margin-bottom: .6rem; }
.crumbs a { text-decoration: none; }
.loading { color: var(--muted); padding: 2rem 0; }

/* Móvil: la cabecera ocupa demasiado para ir fija */
@media (max-width: 640px) {
  header.site { position: static; }
  header.site .inner { gap: .5rem; }
  nav.main a { padding: .35rem .5rem; font-size: .9rem; }
}

/* ── Portada «Cinemascope»: foto a sangre, bandas negras, timecode y visor ── */
main.wide { max-width: none; padding: 0 0 4rem; }
main.wide > .container { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.cine { position: relative; background: #000; padding: clamp(10px, 2.2vw, 26px) 0; margin-bottom: 2.5rem; }
.cine .frame { position: relative; min-height: clamp(440px, 72vh, 720px); background-color: var(--navy);
  background-image: url(/img/hero-night.svg); background-size: cover; background-position: center; overflow: hidden; }
.cine .frame::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,10,20,.82) 0%, rgba(10,10,20,.45) 45%, rgba(10,10,20,.05) 75%),
              linear-gradient(0deg, rgba(10,10,20,.7) 0%, transparent 35%); }
.cine .inner { position: relative; z-index: 2; max-width: 1160px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) 16px;
  min-height: inherit; display: flex; flex-direction: column; justify-content: flex-end; }
.cine .rec { position: absolute; top: clamp(1rem, 3vw, 2rem); right: 16px; font-family: var(--mono); font-size: .8rem; color: #fff; letter-spacing: .08em; }
.cine .rec i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ff2a2a; margin-right: .45rem; vertical-align: 0; animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .cine .rec i { animation: none; } }
.cine .meta { position: absolute; top: clamp(1rem, 3vw, 2rem); left: 16px; font-family: var(--mono); font-size: .72rem; color: rgba(255,255,255,.7); letter-spacing: .08em; text-transform: uppercase; }
.cine .corners { position: absolute; inset: clamp(.8rem, 2.5vw, 1.6rem); z-index: 1; pointer-events: none;
  background:
    linear-gradient(#fff, #fff) left top / 34px 2px, linear-gradient(#fff, #fff) left top / 2px 34px,
    linear-gradient(#fff, #fff) right top / 34px 2px, linear-gradient(#fff, #fff) right top / 2px 34px,
    linear-gradient(#fff, #fff) left bottom / 34px 2px, linear-gradient(#fff, #fff) left bottom / 2px 34px,
    linear-gradient(#fff, #fff) right bottom / 34px 2px, linear-gradient(#fff, #fff) right bottom / 2px 34px;
  background-repeat: no-repeat; opacity: .75; }
.cine h1 { color: #fff; font-size: clamp(2.8rem, 8.5vw, 6.2rem); line-height: .92; margin: .4rem 0 1rem; max-width: 12ch; }
.cine .kicker { color: var(--magenta); }
.cine .lead { color: #e2e3ef; max-width: 52ch; font-size: clamp(1rem, 1.6vw, 1.15rem); margin: 0 0 1.4rem; }
.cine .actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.cine .credit { position: absolute; right: 16px; bottom: .6rem; z-index: 2; font-size: .7rem; color: rgba(255,255,255,.6); }

/* ── Ficha técnica de la edición ── */
.slate { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); border: 2px solid var(--text); margin: 0 0 2rem; }
.slate > div { padding: .9rem 1.1rem; border-right: 2px solid var(--text); }
.slate > div:last-child { border-right: none; }
@media (max-width: 700px) { .slate > div { border-right: none; border-bottom: 2px solid var(--text); } .slate > div:last-child { border-bottom: none; } }
.slate .k { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.slate .v { font-family: var(--display); font-size: 1.35rem; text-transform: uppercase; line-height: 1.1; margin-top: .2rem; }

/* ── Tira de película ── */
.filmstrip { height: 16px; background: var(--text); margin: 2.5rem 0;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 16px, transparent 16px 26px); mask: repeating-linear-gradient(90deg, #000 0 16px, transparent 16px 26px); }

/* ── Pósters de las rutas ── */
.posters { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.poster { position: relative; aspect-ratio: 2 / 3; overflow: hidden; display: flex; flex-direction: column; padding: 1.1rem 1.1rem 1.2rem;
  background: var(--pc, var(--navy)); color: var(--pt, #fff); text-decoration: none; transition: transform .2s ease; }
.poster:hover { transform: translateY(-4px); }
.poster:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; }
.poster .slash { position: absolute; right: -40px; top: 22%; width: 200px; height: 22px; background: var(--ps, var(--magenta)); transform: rotate(-38deg); }
.poster .slash.two { top: calc(22% + 34px); right: -70px; width: 140px; }
.poster .code { font-family: var(--mono); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; position: relative; }
.poster .year { font-family: var(--display); font-size: clamp(4rem, 9vw, 5.6rem); line-height: .9; margin-top: auto; position: relative; }
.poster .film { font-family: var(--display); text-transform: uppercase; font-size: 1.45rem; line-height: 1.05; margin: .35rem 0 .3rem; position: relative; }
.poster .dir { font-size: .85rem; opacity: .85; position: relative; }
.poster .stops { font-family: var(--mono); font-size: .72rem; letter-spacing: .03em; margin-top: .7rem; padding-top: .6rem; border-top: 1px solid currentColor; opacity: .9; position: relative; }
@media (prefers-reduced-motion: reduce) { .poster { transition: none; } .poster:hover { transform: none; } }
@media (max-width: 640px) { .cine .meta { display: none; } }

/* ── Colaboradores ── */
.partners { margin: 0 0 1rem; }
.partners-grid { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); border: 2px solid var(--text); }
.partner { display: flex; flex-direction: column; gap: .35rem; padding: 1.2rem 1.3rem; color: var(--text); text-decoration: none; border-right: 2px solid var(--text); }
.partner:last-child { border-right: none; }
@media (max-width: 700px) { .partner { border-right: none; border-bottom: 2px solid var(--text); } .partner:last-child { border-bottom: none; } }
a.partner:hover { background: var(--text); color: var(--bg); }
a.partner:hover .plink { color: var(--magenta); }
.partner .pname { font-family: var(--display); font-size: 1.6rem; text-transform: uppercase; line-height: 1.05; }
.partner .prole { font-size: .92rem; color: inherit; opacity: .8; }
.partner .plink { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--magenta); margin-top: .3rem; }
footer.site #footPartners:empty { display: none; }

/* Selector de idioma ES · EN · IT */
.langswitch { display: inline-flex; }
.langswitch .langbtn + .langbtn { border-left: none; }
.langswitch .langbtn[aria-pressed="true"] { background: var(--magenta); border-color: var(--magenta); color: #fff; }
