.eye { aspect-ratio: 1024 / 958; }
.eye img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.eye-pupil { will-change: transform; }

.js [data-drift] .ln { will-change: transform; }

.travel[data-window] .frame > video,
.travel[data-window] .frame > iframe,
.travel[data-window] .frame > .placeholder {
  transform: scale(var(--win, 1));
  transform-origin: 50% 50%;
}

.mosaic-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  padding: 14px 8px;
  border: 0;
  background: none;
  color: var(--white);
  font: inherit;
  font-size: clamp(1rem, 1.5vw, 1.4rem);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1.2);
  transition: opacity 0.4s ease, transform 0.9s var(--ease-expo), color 0.3s ease;
}

.hero-stage.is-full.has-video .mosaic-play {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.mosaic-play:hover,
.mosaic-play:focus-visible { color: var(--lime); }

main { position: relative; z-index: 1; background: var(--onyx); }

@media (min-width: 900px) {
  .hero ~ .section { position: relative; z-index: 3; }
  .hero ~ .section:not(.section--light) { background-color: var(--onyx); }

  .section--curtain {
    display: flex;
    align-items: center;
    min-height: 100vh;
    margin-top: -100vh;
    box-shadow: 0 -60px 120px rgba(0, 0, 0, 0.5);
  }

  .section--curtain .section-inner { width: 100%; }
}

.stage-abbr {
  position: absolute;
  left: 2vw;
  bottom: -4vh;
  z-index: 0;
  font-size: clamp(10rem, 30vw, 34rem);
  font-weight: 300;
  line-height: 0.8;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(184, 166, 217, 0.26);
  pointer-events: none;
  user-select: none;
  will-change: transform;
}

.reel-rail {
  position: fixed;
  right: 18px;
  top: var(--rail-y, 50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55em;
  font-size: clamp(0.6rem, 0.4rem + 0.3vw, 0.72rem);
  opacity: 0;
  pointer-events: none;
  transform: translate(14px, -50%) scale(var(--rail-s, 1));
  transform-origin: 100% 50%;
  transition: opacity 0.5s ease, transform 0.7s var(--ease-expo);
}

.reel-rail.is-on { opacity: 1; pointer-events: auto; transform: translate(0, -50%) scale(var(--rail-s, 1)); }
.show-menu .reel-rail { opacity: 0; pointer-events: none; }

.reel-rail button {
  display: flex;
  align-items: center;
  gap: 0.9em;
  padding: 0.64em 0 0.64em 1.3em;
  border: 0;
  background: none;
  color: var(--mute);
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.reel-rail button::after {
  content: "";
  width: 1.3em;
  height: 1px;
  background: currentColor;
  transition: width 0.6s var(--ease-expo);
}

.reel-rail button[aria-current="true"] { color: var(--lime); }
.reel-rail button[aria-current="true"]::after { width: 3.3em; }

.reel-rail .rr-name {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 0.6s var(--ease-expo), opacity 0.3s ease;
}

.reel-rail button:hover .rr-name,
.reel-rail button:focus-visible .rr-name { max-width: 240px; opacity: 1; }

@media (max-width: 899px) {
  .stage-abbr, .reel-rail { display: none; }
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-areas: "text eye" "facts eye" "stats stats";
    align-items: start;
  }
  .about-text { grid-area: text; }
  .about-eye { grid-area: eye; align-self: center; }
  .facts { grid-area: facts; }
  .stats { grid-area: stats; }
}

.about-eye {
  position: relative;
  margin: 0;
  aspect-ratio: 1024 / 958;
}

.about-eye__mask {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask-image: url("../assets/brand/isotipo-lima.png");
  mask-image: url("../assets/brand/isotipo-lima.png");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 49.8% 66.4%;
  mask-position: 49.8% 66.4%;
  -webkit-mask-size: var(--ms, 100%) var(--ms, 100%);
  mask-size: var(--ms, 100%) var(--ms, 100%);
}

.about-eye__mask .still,
.slot-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slot-video { opacity: 0; transition: opacity 0.6s ease; }
.slot-video.is-ready { opacity: 1; }

.facts dt { position: relative; padding-top: 18px; }

.facts dt::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background: rgba(55, 38, 90, 0.25);
  transform-origin: 0 50%;
}

.js .facts dt::before { transform: scaleX(0); transition: transform 2s var(--ease-expo) calc(0.2s + var(--i, 0) * 60ms); }
.js .facts dt.is-in::before { transform: scaleX(1); }

.work { position: relative; overflow: hidden; padding: 120px 0 96px; }
.work > .section-inner { padding: 0 var(--gutter); }
.work-stage { position: relative; margin: 24px 0 56px; }
.creations-foot .sec-intro { margin: 0; }

@media (min-width: 900px) {
  .creations-foot { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .creations-foot .sec-intro { grid-column: 7 / span 5; }
}

.work-row {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-item {
  position: relative;
  flex: var(--grow, 1) 1 0;
  min-width: 0;
  will-change: transform;
}

.work-item:nth-child(even) { z-index: -1; }
.work-item .frame { aspect-ratio: 4 / 3; border: 0; }

.work-item .frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(10, 10, 11, 0.32);
  pointer-events: none;
}

.js .work-item[data-curtain]::after,
.js .work-item[data-curtain].is-in::after {
  transform-origin: 50% 0;
  transition-delay: calc(var(--i, 0) * 90ms);
}

.js .work-item--down[data-curtain]::after,
.js .work-item--down[data-curtain].is-in::after { transform-origin: 50% 100%; }

.work-title {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 100%;
  margin: 0;
  text-align: center;
  font-size: clamp(2.6rem, 11vw, 11.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@media (max-width: 899px) {
  .work { padding: 88px 0; }
  .work-stage { display: flex; flex-direction: column-reverse; }
  .work-row { display: grid; grid-template-columns: 1fr 1fr; }
  .work-item:last-child:nth-child(odd) { grid-column: span 2; }
  .work-item:nth-child(even) { z-index: auto; }
  .work-title { position: static; padding: 0 var(--gutter) 28px; text-align: left; transform: none; }
}

#contact { position: relative; overflow: hidden; }

#contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(640px circle at var(--mx, 70%) var(--my, 30%), rgba(55, 38, 90, 0.6), transparent 62%);
  opacity: var(--glow, 0);
  transition: opacity 0.6s ease;
  pointer-events: none;
}

#contact .section-inner { position: relative; }
[data-magnet] { will-change: transform; }

.site-footer {
  position: sticky;
  bottom: 0;
  z-index: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 9vh;
  padding: 12vh var(--gutter) 40px;
  background: var(--onyx);
}

.site-footer .footer-logo {
  align-self: center;
  width: clamp(200px, 34vw, 440px);
  height: auto;
}

.site-footer .footer-quote {
  align-self: center;
  max-width: 46ch;
  margin: -6vh 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
  color: var(--mute);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .mosaic-play, .reel-rail, .ri-bg, .ri-bg img { transition: none; }
  .js .facts dt::before { transition: none; }
}
