:root {
  --tinta: #f4efe6;
  --tenue: rgba(244, 239, 230, .62);
  --fondo: rgba(12, 11, 10, .58);
  --acento: #ff4d2e;
  --serif: 'Bodoni Moda', 'Didot', Georgia, serif;
  --mono: 'DM Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; }
html { background: #050506; }
body { color: var(--tinta); font-family: var(--mono); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* alto fijo (el más grande del celular): al esconderse las barras del navegador nada se estira ni salta */
#escena { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; display: block; }
#lvh { position: fixed; left: 0; top: 0; width: 0; height: 100vh; height: 100lvh; visibility: hidden; pointer-events: none; }
#largo { width: 1px; }
/* viñeta y grano de película sobre la escena */
#vineta { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, rgba(0,0,0,0) 62%, rgba(0,0,0,.3) 100%); }
#vineta::after { content: ''; position: absolute; inset: 0; opacity: .035; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* barra */
#barra {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) 20px 14px;
  mix-blend-mode: difference;
}
.firma { font-family: var(--serif); font-style: italic; font-size: 26px; color: #fff; text-decoration: none; line-height: 1; }
.firma span { font-family: var(--mono); font-style: normal; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; margin-left: 10px; opacity: .7; }
.sala { margin-left: auto; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: #fff; opacity: .85; white-space: nowrap; }
.chip { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #fff; border: 1px solid rgba(255,255,255,.6); padding: 9px 14px; border-radius: 99px; white-space: nowrap; }
.chip:hover { background: #fff; color: #000; }

/* portada */
#portada {
  position: fixed; left: 0; right: 0; top: 0; height: 100vh; height: 100svh; z-index: 4; pointer-events: none;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 clamp(20px, 6vw, 90px) clamp(40px, 9vh, 110px);
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0) 62%);
}
#portada .sobre { font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--tenue); }
#portada h1 { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(64px, 9vw, 150px); line-height: .86; letter-spacing: -.03em; margin: 10px 0 18px -.04em; }
#portada .bajada { font-family: var(--serif); font-size: clamp(18px, 2.3vw, 30px); max-width: 22em; color: var(--tinta); }
#entrar { pointer-events: auto; align-self: flex-start; flex: none; margin-top: 26px; font-size: 13px; padding: 16px 24px; }

/* dedito que enseña a deslizar */
#dedo { position: fixed; z-index: 6; right: clamp(18px, 7vw, 90px); bottom: clamp(120px, 24vh, 260px); display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; opacity: 0; transition: opacity .5s; }
#dedo.ver { opacity: 1; }
#dedo .riel { width: 58px; height: 150px; border-radius: 99px; border: 1.5px solid rgba(255,255,255,.5); background: rgba(10,10,10,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); position: relative; overflow: hidden; }
#dedo svg { position: absolute; left: 9px; bottom: 6px; width: 40px; fill: #fff; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); animation: deslizar 1.8s cubic-bezier(.5,0,.2,1) infinite; }
#dedo p { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.9); text-align: center; max-width: 9em; line-height: 1.5; }
#dedo.chico { bottom: auto; top: 96px; }
#dedo.chico .riel { width: 46px; height: 104px; }
#dedo.chico svg { width: 30px; left: 8px; }
@keyframes deslizar { 0% { transform: translateY(8px); opacity: 0; } 18% { opacity: 1; } 75% { transform: translateY(-88px); opacity: 1; } 100% { transform: translateY(-100px); opacity: 0; } }
#dedo.chico svg { animation-name: deslizarChico; }
@keyframes deslizarChico { 0% { transform: translateY(6px); opacity: 0; } 18% { opacity: 1; } 75% { transform: translateY(-52px); opacity: 1; } 100% { transform: translateY(-60px); opacity: 0; } }
.ig { display: inline-block; margin-top: 14px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--tenue); text-decoration: underline; text-underline-offset: 4px; }

/* cartel de la obra */
#cartel {
  position: fixed; z-index: 5; left: clamp(16px, 4vw, 56px); bottom: clamp(18px, 5vh, 54px);
  width: min(360px, calc(100vw - 32px));
  padding: 20px 22px 22px;
  background: var(--fondo); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.14); border-radius: 4px;
  opacity: 0; transform: translateY(14px); transition: opacity .45s, transform .45s cubic-bezier(.2,.7,.2,1);
}
#cartel.ver { opacity: 1; transform: none; }
#cartel:not(.ver) { pointer-events: none; }
#cartel .num { font-size: 11px; letter-spacing: .26em; color: var(--tenue); }
#cartel .num.vendido { color: #ff5a45; }
#cartel h2 { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 31px; line-height: 1.05; margin: 8px 0 6px; }
#cartel .det { font-size: 12px; line-height: 1.55; color: var(--tenue); min-height: 1em; }
.botones { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.boton { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none; color: var(--tinta); padding: 12px 16px; border: 1px solid rgba(255,255,255,.4); border-radius: 99px; transition: background .2s, color .2s, border-color .2s; }
.boton:hover { background: var(--tinta); color: #111; border-color: var(--tinta); }
.boton.lleno { background: var(--acento); border-color: var(--acento); color: #fff; }
.boton.lleno:hover { background: #fff; color: #111; border-color: #fff; }

/* avance */
#avance { position: fixed; z-index: 5; right: 0; top: 0; bottom: 0; width: 3px; background: rgba(255,255,255,.08); }
#avance i { display: block; width: 100%; height: 0; background: var(--acento); }

/* capas */
#cerca, #todas { position: fixed; inset: 0; z-index: 20; background: rgba(6,6,7,.97); }
[hidden] { display: none !important; }
.cerrar { position: fixed; z-index: 22; top: max(12px, env(safe-area-inset-top)); right: 16px; width: 46px; height: 46px; border-radius: 50%; font-size: 28px; line-height: 1; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.5); }
.cerrar:hover { background: #fff; color: #000; }
.lienzo { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.lienzo img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: 100vw; max-height: calc(100dvh - 150px); display: block; -webkit-user-drag: none; -webkit-touch-callout: none; will-change: transform; }
.lienzo img.anim { transition: transform .32s cubic-bezier(.2,.7,.2,1); }
#cerca .arriba { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: max(12px, env(safe-area-inset-top)) 14px 22px; background: linear-gradient(rgba(6,6,7,.92), rgba(6,6,7,0)); pointer-events: none; }
#cerca .arriba span { font-family: var(--serif); font-style: italic; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.volver { pointer-events: auto; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; padding: 14px 20px; min-height: 48px; border-radius: 99px; background: var(--tinta); color: #111; white-space: nowrap; }
#cerca .ayuda { position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--tenue); pointer-events: none; padding: 0 12px; }

#todas { overflow: auto; padding: 84px clamp(16px, 4vw, 60px) 60px; }
#todas h2 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(40px, 7vw, 84px); margin-bottom: 28px; }
.grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 210px), 1fr)); gap: clamp(12px, 2vw, 26px); }
.grilla button { text-align: left; }
.grilla img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #151515; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.grilla button:hover img { transform: scale(1.03); }
.grilla b { display: block; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 18px; margin-top: 10px; }
.grilla small { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--tenue); }

@media (max-width: 640px) {
  #portada { background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.75) 30%, rgba(0,0,0,0) 46%); padding-bottom: 34px; }
  #portada h1 { font-size: 17vw; margin: 6px 0 10px; }
  #entrar { margin-top: 18px; }
  #dedo { right: 14px; bottom: auto; top: calc(100vh - 292px); top: calc(100svh - 292px); gap: 8px; } /* al costado del título, sin tapar la fachada ni los pendones */
  #dedo .riel { width: 50px; height: 104px; }
  #dedo svg { width: 34px; left: 8px; animation-name: deslizarChico; }
  #dedo p { font-size: 10px; max-width: 8em; }

  .firma span, .sala { display: none; }
  #abrirTodas { margin-left: auto; }
  #cartel { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: auto; padding: 16px 18px 18px; }
  #cartel .num.vendido { color: #ff5a45; }
#cartel h2 { font-size: 26px; }
  .boton { padding: 12px 14px; flex: 1; text-align: center; }
}

#todas .volver { position: fixed; z-index: 22; top: max(12px, env(safe-area-inset-top)); left: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.6); }
