:root {
  /* sacados del video: sombra del acero, luz de sol, cielo; el turquesa de la marca
     es el complemento del óxido (el contraste clásico de cine: cálido y azul verdoso) */
  --sombra: #24170f;
  --oxido: #8a5a3c;
  --cielo: #6483a8;
  --turquesa: #16b4d3;
  --luz: #6fe6f8;
  --blanco: #f6ecdd;
  --gris: #cbbba8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}
body {
  background: var(--sombra);
  color: var(--blanco);
  font-family: Jost, system-ui, sans-serif;
  overflow-x: hidden;
}

/* --- la escena fija --- */
#escena {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--sombra) center 40% / cover no-repeat;
}
@media (min-aspect-ratio: 4/5) {
  #escena { background-image: url("subida/g/0000.webp"); }
}
@media (max-aspect-ratio: 4/5) {
  #escena { background-image: url("subida/c/0000.webp"); }
}
#subida {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* sombra fija abajo y a la izquierda: los textos se leen sobre el acero iluminado */
#escena::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(36, 23, 15, 0.8) 0%, rgba(36, 23, 15, 0.3) 38%, transparent 62%),
    linear-gradient(to right, rgba(36, 23, 15, 0.42), transparent 55%);
  pointer-events: none;
}
/* el anochecer del final: solo cambia su opacidad */
#anochecer {
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 32%, rgba(111, 230, 248, 0.16), transparent 70%),
    linear-gradient(to bottom, rgba(14, 24, 44, 0.97) 0%, rgba(30, 50, 82, 0.93) 42%, rgba(92, 78, 92, 0.9) 74%, rgba(176, 108, 70, 0.88) 100%);
}
#encendido {
  position: absolute;
  left: 50%;
  top: 31%;
  width: min(440px, 70vw);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}
#encendido svg {
  width: 100%;
  height: auto;
}
/* se enciende como un tubo de luz: parpadea una vez y queda prendido */
#encendido.prendido {
  animation: prender 1.4s steps(1, end) forwards;
}
@keyframes prender {
  0% { opacity: 0; }
  12% { opacity: 0.75; }
  18% { opacity: 0.1; }
  30% { opacity: 0.9; }
  36% { opacity: 0.3; }
  48% { opacity: 1; }
  100% { opacity: 1; }
}

/* grano de película, quieto */
.grano {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.grano::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(36, 18, 8, 0.45));
}

/* --- encabezado con el logo en blanco --- */
.cabeza {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(rgba(36, 23, 15, 0.5), transparent);
}
.marca {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--blanco);
  text-decoration: none;
}
#simbolo svg {
  height: 38px;
  width: auto;
  display: block;
}
.marca-texto {
  font-weight: 500;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-left: 12px;
  border-left: 1px solid rgba(246, 236, 221, 0.35);
}

.boton {
  display: inline-block;
  font-family: Jost, sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--sombra);
  background: var(--luz);
  padding: 15px 28px;
  transition: transform 160ms ease-out, background-color 160ms ease-out;
}
.boton:active {
  transform: scale(0.97);
}
.boton-linea {
  background: rgba(36, 23, 15, 0.45);
  color: var(--blanco);
  border: 1px solid rgba(246, 236, 221, 0.5);
  padding: 10px 18px;
  font-size: 13px;
}
@media (hover: hover) {
  .boton:hover { background: #a3f0fb; }
  .boton-linea:hover { background: var(--blanco); color: var(--sombra); }
}

/* tablero del ascensor */
.tablero {
  position: fixed;
  z-index: 10;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  width: 140px;
  color: rgba(246, 236, 221, 0.8);
  text-align: center;
}
.dial {
  width: 100%;
  display: block;
}
#marcas text {
  font: 600 9px Jost, sans-serif;
  fill: currentColor;
}
#aguja {
  transform-origin: 100px 100px;
}
.piso {
  margin-top: -14px;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  color: var(--blanco);
}
.piso small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gris);
  margin-top: 2px;
}

/* --- tramos de texto --- */
main {
  position: relative;
  z-index: 5;
}
.tramo {
  min-height: 160vh;
  display: flex;
  align-items: center;
  padding: 120px 20px;
}
.tramo-lobby {
  min-height: 130vh;
  align-items: flex-end;
  padding-bottom: 22vh;
}
.tramo-cielo {
  min-height: 120vh;
}
.tramo-azotea {
  min-height: 150vh;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8vh;
}
.caja {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.panel {
  max-width: 470px;
  margin-left: 0;
  background: linear-gradient(160deg, rgba(48, 31, 21, 0.86), rgba(30, 19, 12, 0.9));
  border-left: 3px solid var(--turquesa);
  padding: 28px 26px;
}
.panel.derecha {
  margin-left: auto;
  margin-right: 0;
}
.centro {
  text-align: center;
  max-width: 560px;
}

.sobre {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--luz);
}
h1,
h2 {
  font-weight: 600;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: 0.01em;
}
h1 {
  font-size: clamp(42px, 8.4vw, 132px);
  margin-top: 12px;
  text-shadow: 0 6px 40px rgba(36, 18, 8, 0.55);
}
h2 {
  font-size: clamp(36px, 4.8vw, 62px);
  margin-top: 10px;
}
h1 em,
h2 em {
  font-style: normal;
  color: var(--luz);
}
.panel p,
.centro p {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(246, 236, 221, 0.88);
}
.bajada {
  margin-top: 18px;
  max-width: 540px;
  font-size: 19px;
  line-height: 1.55;
  color: rgba(246, 236, 221, 0.94);
  text-shadow: 0 2px 20px rgba(36, 18, 8, 0.75);
}
.centro .bajada {
  margin-inline: auto;
}
.pista {
  margin-top: 34px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--gris);
}
.pista span {
  display: inline-block;
  animation: baja 1.6s ease-in-out infinite;
  color: var(--luz);
}
@keyframes baja {
  50% { transform: translateY(6px); }
}

.servicios {
  list-style: none;
  margin-top: 18px;
}
.servicios li {
  padding: 12px 0;
  border-top: 1px solid rgba(246, 236, 221, 0.16);
}
.servicios b {
  display: block;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.servicios span {
  font-size: 15px;
  color: var(--gris);
}

.proyectos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.proyectos .foto {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px dashed rgba(246, 236, 221, 0.32);
  font-size: 12px;
  color: var(--gris);
  margin-bottom: 8px;
}
.proyectos b {
  display: block;
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
}
.proyectos small {
  color: var(--gris);
}

.centro .boton {
  margin-top: 26px;
}
.nota {
  font-size: 12px !important;
  color: var(--gris) !important;
  margin-top: 26px !important;
}

/* texto que aparece al llegar a su piso */
.caja {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1), transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}
.caja.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 640px) {
  .tablero {
    width: 84px;
    top: 74px;
  }
  .piso { font-size: 22px; }
  #simbolo svg { height: 32px; }
  .marca-texto { display: none; }
  .panel { padding: 22px 20px; }
  #encendido { top: 29%; width: 74vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caja { transition: none; opacity: 1; transform: none; }
  .pista span { animation: none; }
  #encendido.prendido { animation: none; opacity: 1; }
}
