/* McFilms Gallery — mismos tokens que mcfilmsecuador.com (assets/styles.css) */
:root {
  --bg: #ffffff;
  --bg2: #f5f5f2;
  --ink: #0b0b0c;
  --ink2: #5b5c61;
  --ink3: #a3a4a8;
  --line: #e7e7e3;
  --y: #F5C518;
  --yDeep: #E0B000;
  --f-d: "Barlow Condensed", "Futura Condensed", "Arial Narrow", sans-serif;
  --f-t: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1280px;
  --gut: clamp(16px, 4vw, 56px);
  --gap: clamp(6px, 1vw, 12px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--f-t); font-size: 17px; line-height: 1.6; letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--y); color: var(--ink); }
:focus-visible { outline: 2px solid var(--yDeep); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.d { font-family: var(--f-d); font-weight: 500; text-transform: uppercase; letter-spacing: .015em; line-height: .95; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink2); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barra superior */
.top { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 var(--gut); transition: background .4s var(--ease), color .4s var(--ease); color: #fff; }
.top .lk { display: none; }
.top.solid { background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); color: var(--ink); border-bottom: 1px solid var(--line); }
.top.solid .lw { display: none; }
.top.solid .lk, .top.ink .lk { display: block; }
.top.ink { color: var(--ink); }
.top.ink .lw { display: none; }
.top img { height: 24px; width: auto; }
.top .link { font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }

/* Botones y campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 28px; border-radius: 999px; background: var(--y); color: var(--ink); font-weight: 600; font-size: 15px; transition: background .25s; }
.btn:hover { background: var(--yDeep); }
.btn[disabled] { opacity: .6; cursor: wait; }
.field { width: 100%; height: 56px; border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.field:focus { outline: 2px solid var(--yDeep); outline-offset: 0; border-color: transparent; }
.msg { min-height: 1.6em; font-size: 14px; color: #b42318; margin-top: 10px; }

/* Portal */
.portal { min-height: 100svh; display: grid; place-items: center; padding: 96px var(--gut) 48px; background: var(--bg2); }
.portal-card { width: 100%; max-width: 520px; text-align: center; }
.portal-card .d { font-size: clamp(48px, 9vw, 96px); margin: 18px 0 14px; }
.portal-card p { color: var(--ink2); margin-bottom: 32px; }
.portal-form { display: grid; gap: 12px; text-align: left; }
.portal-foot { margin-top: 40px; font-size: 13px; color: var(--ink3); }

/* Portada de galería */
.hero { position: relative; height: 100svh; min-height: 520px; background: #0b0b0c; color: #fff; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,.55) 100%); }
.hero-txt { position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(40px, 9vh, 96px); text-align: center; padding: 0 var(--gut); }
.hero-txt .d { font-size: clamp(54px, 10vw, 150px); }
.hero-txt .meta { margin-top: 14px; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; opacity: .9; }
.hero.no-img { display: grid; place-items: center; height: 70svh; }
.hero.no-img::after { display: none; }

.intro { max-width: 720px; margin: 0 auto; padding: clamp(56px, 9vw, 120px) var(--gut) 0; text-align: center; color: var(--ink2); font-size: clamp(17px, 1.6vw, 20px); }

/* Índice de capítulos (fijo bajo la barra superior) */
.chap-nav { position: sticky; top: 64px; z-index: 40; background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%); border-bottom: 1px solid var(--line); }
.chap-nav-in { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px var(--gut); max-width: var(--wrap); margin: 0 auto; justify-content: safe center; }
.chap-nav-in::-webkit-scrollbar { display: none; }
.chap-nav a { flex: none; font-size: 13px; font-weight: 500; letter-spacing: .04em; padding: 8px 16px; border-radius: 999px; color: var(--ink2); transition: background .3s, color .3s; white-space: nowrap; }
.chap-nav a:hover { color: var(--ink); background: var(--bg2); }
.chap-nav a.on { background: var(--ink); color: #fff; }

/* Capítulos */
.chapter { padding: clamp(48px, 7vw, 96px) 0 0; scroll-margin-top: 110px; }
.chapter-head { text-align: center; margin: 0 auto clamp(20px, 3vw, 36px); padding: 0 var(--gut); }
.chapter-num { font-size: clamp(56px, 8vw, 120px); line-height: .8; color: transparent; -webkit-text-stroke: 1.5px var(--y); }
.chapter-head .d { font-size: clamp(32px, 4.4vw, 64px); }

/* Collage uniforme: misma separación en todo, fotos grandes y pequeñas sin huecos */
.collage { --cg: clamp(4px, .6vw, 8px); display: grid; gap: var(--cg); max-width: 1600px; margin: 0 auto; padding: 0 clamp(8px, 2vw, 32px); }
.cg { display: grid; gap: var(--cg); width: 100%; }
.cg figure { position: relative; overflow: hidden; background: var(--bg2); cursor: zoom-in; min-height: 0; }
.cg figure img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s var(--ease), transform 1.4s var(--ease); }
.cg figure img.ok { opacity: 1; }
@media (hover: hover) { .cg figure:hover img.ok { transform: scale(1.03); } }

/* Selección para el álbum */
.pick { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); display: none; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.pick::after { content: ""; position: absolute; inset: 0; margin: auto; width: 12px; height: 7px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-2px) rotate(-45deg); opacity: 0; }
.sel-mode .pick, .pick.on { display: block; }
.pick.on { background: var(--y); border-color: var(--y); }
.pick.on::after { opacity: 1; border-color: var(--ink); }
.sel-bar { position: fixed; z-index: 60; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(720px, calc(100% - 24px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 22px; border-radius: 20px; background: rgba(11,11,12,.9); color: #fff; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 20px 60px -20px rgba(0,0,0,.5); }
.sel-bar strong { display: block; font-size: 15px; }
.sel-bar .who { font-size: 12px; color: rgba(255,255,255,.65); }
.sel-bar .acts { display: flex; align-items: center; gap: 6px; }
.sel-bar .btn { height: 44px; padding: 0 20px; font-size: 14px; }
.linkbtn { color: inherit; opacity: .75; font-size: 14px; padding: 10px 12px; }
.linkbtn:hover { opacity: 1; }
.modal { border: 0; border-radius: 24px; padding: 32px; width: min(460px, calc(100% - 32px)); box-shadow: 0 40px 100px -30px rgba(0,0,0,.5); }
.modal::backdrop { background: rgba(6,6,7,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal form { display: grid; gap: 12px; }
.modal .d { font-size: 40px; }
.modal p { color: var(--ink2); font-size: 15px; margin-bottom: 6px; }
/* Acciones de cabecera */
.top-acts { display: flex; align-items: center; gap: 8px; margin-left: auto; margin-right: 18px; }
.sel-btn { height: 32px; padding: 0 14px; border-radius: 999px; background: var(--y); color: var(--ink); font-size: 12px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.dl-menu { position: relative; }
.dl-menu summary { list-style: none; }
.dl-menu summary::-webkit-details-marker { display: none; }
.dl-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid currentColor; opacity: .9; }
.dl-pop { position: absolute; right: 0; top: 42px; min-width: 240px; max-height: 70vh; overflow: auto; background: #fff; color: var(--ink); border-radius: 16px; padding: 10px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.45); display: grid; }
.dl-pop .eyebrow { padding: 6px 10px 8px; font-size: 10px; }
.dl-pop a, .dl-pop button { text-align: left; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.dl-pop a:hover, .dl-pop button:hover { background: var(--bg2); }
/* Iconos dibujados con CSS (sin imágenes) */
.dl-ico, .sh-ico { position: relative; width: 14px; height: 14px; flex: none; }
.dl-ico::before { content: ""; position: absolute; left: 6px; top: 0; width: 2px; height: 9px; background: currentColor; }
.dl-ico::after { content: ""; position: absolute; left: 3px; top: 4px; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sh-ico::before { content: ""; position: absolute; left: 1px; right: 1px; bottom: 0; height: 7px; border: 2px solid currentColor; border-top: 0; border-radius: 0 0 3px 3px; }
.sh-ico::after { content: ""; position: absolute; left: 4px; top: 0; width: 6px; height: 6px; border: solid currentColor; border-width: 2px 0 0 2px; transform: rotate(45deg); box-shadow: -2px -2px 0 -1px transparent; }

/* Barra de acciones del visor */
.lb-bar { position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(20,20,22,.72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.lb .lb-act { position: static; transform: none; width: auto; height: 44px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; font-size: 13px; font-weight: 600; opacity: 1; color: #fff; }
.lb .lb-act:hover { background: rgba(255,255,255,.12); }
.lb-pick .ring { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; }
.lb-pick.on .ring { background: var(--y); border-color: var(--y); }
.lb-pick.on { color: var(--y); }

/* Portada con movimiento lento */
.hero img { animation: kb 16s var(--ease) both; }
@keyframes kb { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-cue { position: absolute; z-index: 2; left: 50%; bottom: 18px; transform: translateX(-50%); width: 1px; height: 40px; background: linear-gradient(rgba(255,255,255,0), #fff); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%, 100% { opacity: .2; transform: translate(-50%, -6px); } 50% { opacity: 1; transform: translate(-50%, 4px); } }

/* Bloqueo: continuar la historia */
.lock { margin: clamp(56px, 9vw, 120px) auto 0; max-width: 560px; padding: 0 var(--gut); text-align: center; }
.lock .d { font-size: clamp(40px, 6vw, 72px); margin: 10px 0 12px; }
.lock p { color: var(--ink2); margin-bottom: 28px; }
.lock form { display: grid; gap: 12px; }

.end { padding: clamp(80px, 12vw, 160px) var(--gut) 56px; text-align: center; }
.end img { height: 28px; width: auto; margin: 0 auto 14px; }
.end p { font-size: 13px; color: var(--ink3); letter-spacing: .12em; text-transform: uppercase; }

.state { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: var(--gut); color: var(--ink2); }
.state .d { font-size: clamp(40px, 7vw, 80px); color: var(--ink); margin-bottom: 12px; }

/* Visor a pantalla completa */
.lb { position: fixed; inset: 0; z-index: 100; background: #060607; display: none; align-items: center; justify-content: center; }
.lb.open { display: flex; }
.lb img { max-width: 100vw; max-height: 100svh; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb button { position: absolute; color: #fff; width: 56px; height: 56px; display: grid; place-items: center; font-size: 28px; opacity: .8; }
.lb button:hover { opacity: 1; }
.lb .x { top: 8px; right: 8px; }
.lb .prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb .next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb .count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.7); font-size: 12px; letter-spacing: .18em; }

@media (max-width: 719px) {
  .lb .prev, .lb .next { display: none; }
  .top .link { display: none; }
  .top-acts { margin-right: 0; gap: 6px; }
  .dl-txt { display: none; }
  .dl-btn { width: 32px; padding: 0; justify-content: center; }
  .lb .lb-act { padding: 0 12px; font-size: 12px; }
  .pick { width: 30px; height: 30px; top: 6px; right: 6px; }
  .sel-bar { padding-left: 16px; }
  .sel-bar .btn { padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Pestañas Fotos / Film */
.chap-nav .tab { flex: none; font-family: var(--f-d); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; font-size: 17px; padding: 6px 14px; border-radius: 999px; color: var(--ink2); }
.chap-nav .tab.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--y); border-radius: 0; }
.chap-nav .tab-sep { flex: none; width: 1px; height: 22px; background: var(--line); margin: 0 6px; align-self: center; }

/* Film */
.films { max-width: 1400px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) clamp(8px, 2vw, 32px) 0; display: grid; gap: clamp(40px, 6vw, 88px); }
.film-box { position: relative; background: #0b0b0c; overflow: hidden; border-radius: 4px; }
.film-poster, .film-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film-video { object-fit: contain; background: #000; }
.film-play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.35)); transition: background .3s; }
.film-play:hover { background: rgba(0,0,0,.25); }
.film-play::before { content: ""; width: clamp(64px, 8vw, 96px); height: clamp(64px, 8vw, 96px); border-radius: 50%; background: rgba(255,255,255,.18); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1.5px solid rgba(255,255,255,.7); transition: transform .4s var(--ease); }
.film-play:hover::before { transform: scale(1.06); }
.film-play .tri { position: absolute; width: 0; height: 0; border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #fff; margin-left: 6px; }
.film-meta { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding: 18px 4px 0; }
.film-meta .d { font-size: clamp(30px, 3.6vw, 52px); }
.film-meta .st { color: var(--ink2); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.film-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.film-q { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.film-q select { height: 38px; border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; font: inherit; font-size: 13px; background: #fff; color: var(--ink); }
.film-dl { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ink); font-size: 13px; font-weight: 600; }
.film-dl:hover { background: var(--ink); color: #fff; }

.studio-note { max-width: 760px; margin: 18px auto 0; padding: 12px 18px; border-radius: 12px; background: #fff6d6; color: #7a5b00; font-size: 14px; text-align: center; }
