/* La pared: showroom a pantalla completa. Muro de yeso gris oscuro con luz cálida, estantes de acrílico
   y una tira de luz naranja que se enciende bajo el par que miras. Weblis solo aparece como logo. */

@font-face { font-family: 'Inter'; src: url('../assets/fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --muro: #3a3534;
  --texto: #f2efec;
  --suave: rgba(242, 239, 236, .62);
  --led: #ff6a1f;
  --led-luz: rgba(255, 106, 31, .55);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pad: clamp(16px, 2.4vw, 36px);
  --camara: cubic-bezier(.65, 0, .35, 1);     /* travelling de cámara: arranca y frena suave */
  --ease: cubic-bezier(.23, 1, .32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; background: #1c1a1b; color: var(--texto);
  font-family: var(--font); font-size: 14px; line-height: 1.45; letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--texto); outline-offset: 4px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- la cámara y el muro ---------- */
.camara { position: fixed; inset: 0; transform-origin: 0 0; transition: transform 1.05s var(--camara); }
.paso { position: absolute; inset: 0; transform-origin: 50% 55%; }
.riel { position: absolute; inset: 0; transition: transform 1.25s var(--camara); }
.seccion:not(.visible) { visibility: hidden; }   /* las paredes que no se ven no se pintan */
.seccion { position: absolute; top: 0; height: 100%; width: 100vw; left: calc(var(--s) * 100vw); }
/* cada sección tiene su propia luz: rosada, fría y ámbar */
.seccion[data-s="0"] { --luz: 255, 222, 214; --luz2: 255, 196, 160; --muro: #3a3534; }
.seccion[data-s="1"] { --luz: 214, 230, 255; --luz2: 180, 210, 255; --muro: #33363a; }
.seccion[data-s="2"] { --luz: 255, 214, 160; --luz2: 255, 170, 110; --muro: #3b3530; }
/* la columna del local que separa una pared de la otra */
.columna {
  position: absolute; z-index: 1; left: -4vw; width: 8vw; top: -70%; bottom: -70%;
  background: linear-gradient(90deg, #141212 0%, #262222 18%, #2e2a29 50%, #1f1c1c 82%, #121010 100%);
  box-shadow: 0 0 60px 20px rgba(0, 0, 0, .55);
}
.muro {
  position: absolute; inset: -70% 0;
  background-color: var(--muro);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(40% 22% at 40% 38%, rgba(var(--luz), .36), rgba(var(--luz), 0) 100%),
    radial-gradient(30% 18% at 64% 44%, rgba(var(--luz2), .12), rgba(var(--luz2), 0) 100%),
    radial-gradient(70% 42% at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .55) 100%);
  background-size: 300px 300px, auto, auto, auto;
}
.plano { position: absolute; inset: 0; }

/* ---------- cada par sobre su estante de acrílico ---------- */
.par {
  position: absolute; left: var(--x); top: var(--y); width: var(--w);
  transform: translate(-50%, -100%); padding: 0; border: 0; background: none; cursor: pointer;
  opacity: 0; transition: opacity .9s var(--ease);
}
.listo .par { opacity: 1; transition-delay: calc(var(--i) * 60ms); }
.par__img {
  /* la imagen ya trae su color y su sombra (hornear.py): sin filtros en vivo */
  width: 86%; height: auto; margin: 0 auto -7.2%; position: relative; z-index: 0; transform-origin: 50% 88%;
  transition: transform .55s var(--ease);
}
.acrilico {
  position: relative; display: block; height: calc(var(--w) * .045); min-height: 5px; margin-top: -2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .10) 45%, rgba(255, 255, 255, .22));
  border-radius: 1px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 14px rgba(0, 0, 0, .35);
}
/* la tira LED dentro del acrílico y la luz que proyecta en el muro */
.acrilico::before {
  content: ''; position: absolute; left: 3%; right: 3%; top: 40%; height: 26%; border-radius: 2px;
  background: #ffd0a8; box-shadow: 0 0 6px 1px var(--led), 0 0 22px 6px var(--led-luz);
  opacity: 0; transition: opacity .45s var(--ease);
}
.acrilico::after {
  content: ''; position: absolute; left: -10%; right: -10%; top: 60%; height: calc(var(--w) * .55);
  background: radial-gradient(50% 50% at 50% 0, rgba(255, 106, 31, .42), rgba(255, 106, 31, 0) 100%);
  opacity: 0; transition: opacity .45s var(--ease); pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .par:hover .par__img { transform: translateY(-4%) rotate(-1.5deg); }
  .par:hover .acrilico::before { opacity: .55; }
  .par:hover .acrilico::after { opacity: .5; }
}
.par:focus-visible { outline-offset: 10px; }
.par.activo .acrilico::before, .par.activo .acrilico::after { opacity: 1; }
.enfoque .par:not(.activo) { opacity: .38; }

/* ---------- interfaz: letra pequeña, mucho aire ---------- */
.ui-top, .ui-bot { position: fixed; left: var(--pad); right: var(--pad); z-index: 10; display: flex; align-items: center; gap: 24px; }
.ui-top { top: var(--pad); align-items: flex-start; }
.logo img { height: 20px; width: auto; }
.lema { position: absolute; left: 0; top: 30px; margin: 0; color: var(--suave); font-size: 13px; transition: opacity .4s var(--ease); }
.enfoque .lema, .enfoque .rotulo, .enfoque .indice { opacity: 0; pointer-events: none; }
/* rótulo de la sección: número pequeño y nombre */
.rotulo { position: absolute; left: 0; top: 64px; margin: 0; display: flex; align-items: baseline; gap: 12px; transition: opacity .4s var(--ease); }
.rotulo span { font-size: 12px; color: var(--suave); font-variant-numeric: tabular-nums; }
.rotulo b { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.rotulo.entra { animation: rotulo .9s var(--ease) .35s both; }
@keyframes rotulo { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
/* índice de secciones */
.indice { position: fixed; z-index: 10; right: var(--pad); top: calc(var(--pad) + 52px); display: grid; gap: 6px; transition: opacity .4s var(--ease); }
.indice button { display: flex; align-items: center; justify-content: flex-end; gap: 10px; border: 0; background: none; padding: 6px 0; cursor: pointer; color: var(--suave); font-size: 12px; }
.indice span { font-variant-numeric: tabular-nums; }
.indice em { font-style: normal; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .4s var(--ease), opacity .3s var(--ease); }
.indice button::after { content: ''; width: 18px; height: 2px; border-radius: 2px; background: currentColor; opacity: .5; transition: width .35s var(--ease), opacity .35s var(--ease); }
.indice button:hover em, .indice button[aria-current="true"] em { max-width: 160px; opacity: 1; }
.indice button[aria-current="true"] { color: var(--texto); }
.indice button[aria-current="true"]::after { width: 34px; opacity: 1; background: var(--led); }
.flechita { display: inline-block; font-style: normal; animation: flechita 1.8s var(--ease) infinite; }
@keyframes flechita { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.menu { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 13px; }
.menu > a:not(.pastilla) { text-decoration: none; color: var(--suave); transition: color .2s var(--ease); }
.menu > a:not(.pastilla):hover { color: var(--texto); }
.pastilla {
  display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(40, 37, 37, .78); color: var(--texto); text-decoration: none; font-size: 13px; font-weight: 500;
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.pastilla:hover { background: var(--texto); color: #1c1a1b; }
.pastilla:active { transform: scale(.97); }
.ui-bot { bottom: var(--pad); justify-content: space-between; font-size: 12px; color: var(--suave); transition: opacity .4s var(--ease); }
.enfoque .ui-bot { opacity: 0; pointer-events: none; }

/* ---------- detalle ---------- */
.detalle { position: fixed; inset: 0; z-index: 9; pointer-events: none; }
.detalle > * { pointer-events: auto; }
.detalle > * { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.detalle.visible > * { opacity: 1; transform: none; }
.detalle.visible > :nth-child(2) { transition-delay: .08s; }
.detalle.visible > :nth-child(3) { transition-delay: .16s; }

.d-titulo { position: absolute; left: var(--pad); top: calc(var(--pad) + 44px); }
.d-titulo h2 { margin: 0; font-size: clamp(26px, 2.6vw, 40px); font-weight: 600; letter-spacing: -.035em; line-height: 1; text-transform: uppercase; }
.d-titulo p { margin: 8px 0 0; color: var(--suave); font-size: 13px; }

.d-panel { position: absolute; right: var(--pad); top: 50%; translate: 0 -50%; width: min(280px, 26vw); display: grid; gap: 22px; }
.d-datos { margin: 0; display: grid; gap: 14px; }
.d-datos dt { font-size: 11px; color: var(--suave); }
.d-datos dd { margin: 2px 0 0; font-size: 15px; font-weight: 500; }
#dPrecio { font-size: 26px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
#dPrecio small { font-size: 12px; font-weight: 500; color: var(--suave); margin-left: 6px; letter-spacing: 0; }
.d-tallas { border: 0; margin: 0; padding: 0; min-width: 0; }
.d-tallas legend { padding: 0; margin-bottom: 8px; font-size: 11px; color: var(--suave); }
#dTallas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.talla {
  height: 38px; border: 0; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums;
  background: rgba(242, 239, 236, .1); transition: background-color .18s var(--ease), color .18s var(--ease), transform .12s var(--ease);
}
.talla:hover { background: rgba(242, 239, 236, .2); }
.talla:active { transform: scale(.94); }
.talla[aria-pressed="true"] { background: var(--texto); color: #1c1a1b; }
.talla:disabled { cursor: not-allowed; opacity: .32; text-decoration: line-through; }
.comprar {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; border-radius: 999px; text-decoration: none;
  background: var(--texto); color: #1c1a1b; font-weight: 600; font-size: 14px;
  transition: background-color .2s var(--ease), transform .15s var(--ease), opacity .2s var(--ease);
}
.comprar svg { width: 18px; height: 18px; fill: currentColor; }
.comprar:hover { background: #fff; }
.comprar:active { transform: scale(.97); }
.comprar[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.comprar[aria-disabled="true"]:active { transform: none; }
.d-nota { margin: -8px 0 0; font-size: 11px; color: var(--suave); }

.d-nav { position: absolute; left: var(--pad); right: var(--pad); bottom: var(--pad); display: flex; align-items: center; gap: 10px; font-size: 13px; }
.volver { border: 0; background: none; padding: 8px 0; cursor: pointer; color: var(--suave); transition: color .2s var(--ease); }
.volver:hover { color: var(--texto); }
.contador { margin-left: auto; margin-right: 8px; color: var(--suave); font-variant-numeric: tabular-nums; }
.redondo {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(40, 37, 37, .78);
  transition: background-color .2s var(--ease), color .2s var(--ease), transform .12s var(--ease);
}
.redondo:hover { background: var(--texto); color: #1c1a1b; }
.redondo:active { transform: scale(.92); }

/* ---------- envíos ---------- */
.envios { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: var(--pad); background: rgba(20, 18, 19, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.envios__caja { width: min(440px, 100%); padding: 28px; border-radius: 18px; background: rgba(40, 37, 37, .92); display: grid; gap: 12px; font-size: 14px; }
.envios h2 { margin: 0 0 6px; font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.envios p { margin: 0; color: var(--suave); }
.envios b { color: var(--texto); font-weight: 600; }
.envios .pastilla { justify-self: start; margin-top: 8px; }
.sinjs { position: fixed; inset: auto var(--pad) 80px; z-index: 20; }

/* ---------- celular ---------- */
@media (max-width: 760px) {
  .indice em { display: none; }
  .indice { top: calc(var(--pad) + 50px); gap: 2px; }
  .rotulo { top: 58px; }
  .ui-bot { flex-direction: column; align-items: flex-start; gap: 4px; }
  .menu > a:not(.pastilla) { display: none; }
  .d-titulo { top: calc(var(--pad) + 40px); }
  .d-panel { top: auto; bottom: 76px; translate: none; left: var(--pad); right: var(--pad); width: auto; gap: 14px; }
  .d-datos { grid-template-columns: auto 1fr; gap: 20px; align-items: end; }
  .d-datos dd { font-size: 14px; }
  #dPrecio { font-size: 24px; }
  #dTallas { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
  .d-nota { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .camara { transition-duration: .01ms; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* =====================================================================
   Profundidad del local: nombre en vinilo, piso brillante, lámparas colgantes,
   parallax con el mouse, foco de luz que sigue el cursor y entrada de cine.
   ===================================================================== */
:root { --suelo: 89%; }

/* el nombre de la sección pintado en la pared, detrás de los estantes */
.vinilo {
  position: absolute; left: 0; right: 0; top: 58%; translate: 0 -50%; text-align: center; white-space: nowrap; pointer-events: none;
  font-size: min(25vw, calc(140vw / var(--n, 5)), 46vh); font-weight: 900; letter-spacing: -.07em; line-height: .8;
  color: rgba(255, 255, 255, .055);
  color: rgba(var(--luz), .085);
}

/* piso de concreto pulido: refleja la luz de la pared y el LED encendido */
.piso {
  position: absolute; left: 0; right: 0; top: var(--suelo); bottom: -70%;
  background:
    radial-gradient(40% 30% at 42% 0, rgba(var(--luz), .16), rgba(var(--luz), 0) 100%),
    linear-gradient(180deg, #1d1a1a 0%, #141212 40%, #0e0c0c 100%);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, .08), 0 -18px 30px rgba(0, 0, 0, .35);
}
.piso::before {          /* zócalo donde la pared se encuentra con el piso */
  content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; background: #262222;
}
.piso::after {           /* reflejo del brillo naranja cuando hay un par encendido */
  content: ''; position: absolute; left: 20%; right: 20%; top: 0; height: 40%;
  background: radial-gradient(50% 60% at 50% 0, rgba(255, 106, 31, .22), rgba(255, 106, 31, 0)); opacity: 0; transition: opacity .6s var(--ease);
}
.enfoque .piso::after { opacity: 1; }

/* lámparas colgantes: cable, pantalla de metal, bombillo y el cono de luz sobre la pared */
.lamparas { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.lampara { position: absolute; left: var(--lx); top: -70%; height: calc(70% + 11%); width: 0; transform-origin: 50% 0; animation: vaiven 7s ease-in-out calc(var(--k) * -2.3s) infinite; }
@keyframes vaiven { 0%, 100% { transform: rotate(.12deg); } 50% { transform: rotate(-.12deg); } }
.cable { position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: #0c0b0b; }
.pantalla {
  position: absolute; left: calc(var(--lw) * -.5); bottom: calc(var(--lw) * -.42); width: var(--lw); height: calc(var(--lw) * .46);
  background: linear-gradient(180deg, #3a3634, #161414 70%); border-radius: 50% 50% 8% 8% / 100% 100% 8% 8%;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .5);
}
.pantalla::after {     /* el bombillo: apagado hasta que se encienden las luces */
  content: ''; position: absolute; left: 22%; right: 22%; bottom: -5px; height: 10px; border-radius: 50%;
  background: #5a5450; transition: background-color .2s, box-shadow .2s;
}
.cono {
  position: absolute; left: calc(var(--lw) * -2.4); top: calc(100% + var(--lw) * .42); width: calc(var(--lw) * 4.8); height: 70vh;
  background: url('../assets/img/cono.webp') center top / 100% 100% no-repeat;   /* ya difuminado: sin blur en vivo */
  opacity: 0; transition: opacity .3s;
}
:root { --lw: clamp(64px, 6vw, 110px); }
.encendida .pantalla::after, .luces .pantalla::after { background: #fff4e4; box-shadow: 0 0 16px 6px rgba(255, 214, 170, .85), 0 0 70px 26px rgba(255, 190, 140, .3); }
.encendida .cono, .luces .cono { opacity: .62; }
.encendida { animation: vaiven 7s ease-in-out calc(var(--k) * -2.3s) infinite, parpadeo .5s steps(1) 1; }
@keyframes parpadeo { 0% { opacity: .3; } 20% { opacity: 1; } 35% { opacity: .4; } 55%, 100% { opacity: 1; } }

/* oscuridad de la entrada: se va cuando prenden las luces */
.apagon { position: absolute; inset: -70% 0; background: #060505; opacity: 0; pointer-events: none; z-index: 2; transition: opacity 1.4s var(--ease); }
.intro .apagon { opacity: .9; }
.intro.luces .apagon { opacity: 0; }
.intro .ui-top, .intro .ui-bot, .intro .indice { opacity: 0; }
.ui-top { transition: opacity .8s var(--ease); }
/* el barrido de LED de la entrada, estante por estante */
.par.barrido .acrilico::before { opacity: 1; transition-duration: .12s; }
.par.barrido .acrilico::after { opacity: .7; transition-duration: .12s; }

/* foco de luz que sigue el cursor: un círculo fijo que solo se traslada (lo mueve el compositor) */
.linterna {
  position: fixed; left: 0; top: 0; z-index: 8; width: 640px; height: 640px; margin: -320px 0 0 -320px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 240, 226, .10), rgba(255, 240, 226, 0));
  opacity: 0; transition: opacity .5s var(--ease); will-change: transform;
}
.con-foco:not(.enfoque):not(.intro) .linterna { opacity: 1; }

@media (max-width: 760px) {
  :root { --suelo: 96%; --lw: 54px; }
  .vinilo { top: 50%; font-size: min(30vw, calc(150vw / var(--n, 5))); }
  .indice { display: none; }
  .lampara:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lampara, .encendida { animation: none; }
}

/* demo publicada: aviso "Así puede verse tu marca" (mismo tono de la tienda, sin colores de Weblis) */
.demo-marca { color: var(--suave); text-decoration: none; padding: 7px 12px; border: 1px solid currentColor; border-radius: 999px; transition: color .3s var(--ease); }
.demo-marca b { color: #fff; font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .demo-marca:hover { color: #fff; } }
@media (max-width: 600px) { .demo-marca { white-space: nowrap; font-size: 11px; padding: 6px 10px; } }
