/* Visual storytelling layer */
.hero { isolation: isolate; }
.hero-media {
  inset: 84px 0 0;
  width: 100%;
  height: calc(100% - 84px);
  object-position: center center;
  transform: none;
  animation: none;
}
.hero-shade {
  background:
    linear-gradient(90deg, rgba(5,17,35,.88) 0%, rgba(5,17,35,.7) 34%, rgba(5,17,35,.16) 66%, rgba(5,17,35,.03) 100%),
    linear-gradient(0deg, rgba(5,17,35,.7), transparent 52%);
}
.hero::before {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  opacity: .15;
  background-image: radial-gradient(rgba(255,255,255,.32) .45px, transparent .45px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
}
.hero-cinema-tag {
  position: absolute;
  z-index: 3;
  top: 128px;
  right: clamp(24px,5vw,74px);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 99px;
  background: rgba(5,17,35,.26);
  color: rgba(255,255,255,.78);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .14em;
  backdrop-filter: blur(12px);
}
.hero-cinema-tag i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink-bright);
  box-shadow: 0 0 0 0 rgba(255,60,166,.55);
  animation: cinema-pulse 2s infinite;
}

.visual-atlas {
  overflow: hidden;
  padding: clamp(80px,10vw,145px) 0;
  background: #06162a;
  color: #fff;
}
.visual-atlas-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  padding: 0 clamp(23px,5vw,74px);
  margin-bottom: 44px;
}
.visual-atlas-head > div:first-child { max-width: 820px; }
.visual-atlas h2 {
  margin: 18px 0 0;
  font: 500 clamp(54px,7vw,96px)/.86 var(--serif);
  letter-spacing: -.05em;
}
.visual-atlas h2 em { color: var(--pink); font-weight: 500; }
.atlas-controls { display: flex; align-items: center; gap: 10px; }
.atlas-controls button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 19px;
  transition: background .25s, color .25s, transform .25s;
}
.atlas-controls button:hover { background: #fff; color: var(--navy); transform: translateY(-2px); }
.atlas-progress { min-width: 56px; color: rgba(255,255,255,.58); font-size: 9px; letter-spacing: .13em; text-align: center; }
.visual-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 0 clamp(23px,5vw,74px) 24px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: grab;
}
.visual-rail::-webkit-scrollbar { display: none; }
.visual-rail:active { cursor: grabbing; }
.atlas-card {
  position: relative;
  flex: 0 0 min(58vw, 760px);
  aspect-ratio: 1.52;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #102743;
  color: #fff;
  cursor: pointer;
  text-align: left;
  scroll-snap-align: center;
}
.atlas-card:nth-child(even) { flex-basis: min(43vw, 580px); }
.atlas-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s cubic-bezier(.2,.75,.2,1), filter .6s;
}
.atlas-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4,15,29,.02) 35%, rgba(4,15,29,.74) 100%);
  transition: background .5s;
}
.atlas-card:hover img { transform: scale(1.055); }
.atlas-card:hover::after { background: linear-gradient(180deg, rgba(4,15,29,0) 28%, rgba(4,15,29,.68) 100%); }
.atlas-index {
  position: absolute;
  z-index: 2;
  top: 22px;
  left: 24px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 50%;
  font-size: 8px;
  letter-spacing: .1em;
  backdrop-filter: blur(10px);
}
.atlas-copy {
  position: absolute;
  z-index: 2;
  left: 26px;
  right: 26px;
  bottom: 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 20px;
}
.atlas-copy small { color: rgba(255,255,255,.67); font-size: 8px; font-weight: 700; letter-spacing: .14em; }
.atlas-copy strong { display: block; margin-top: 7px; font: 500 clamp(34px,4vw,58px)/.9 var(--serif); letter-spacing: -.035em; }
.atlas-copy b {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  font-size: 18px;
  transition: transform .3s;
}
.atlas-card:hover .atlas-copy b { transform: rotate(12deg) scale(1.08); }

@media (min-width: 981px) {
  .project-grid { grid-auto-flow: dense; }
  .project-card:nth-child(1),
  .project-card:nth-child(6),
  .project-card:nth-child(11) {
    grid-column: span 2;
    min-height: 520px;
  }
  .project-card:nth-child(1) h3,
  .project-card:nth-child(6) h3,
  .project-card:nth-child(11) h3 { max-width: 560px; font-size: clamp(56px,6vw,82px); }
}
.project-card { min-height: 455px; }
.project-card::before { transition: opacity .5s, background .5s; }
.project-card::before { background: linear-gradient(180deg,rgba(7,24,45,.04) 0%,rgba(7,24,45,.2) 48%,rgba(7,24,45,.86) 100%),radial-gradient(circle at 85% 13%,var(--card-accent,rgba(241,116,173,.22)),transparent 34%); }
.project-card:hover::before { background: linear-gradient(180deg,rgba(7,24,45,.02),rgba(7,24,45,.14) 48%,rgba(7,24,45,.8)); }
.project-card:hover .project-context { color: #fff; }

@keyframes hero-cinema {
  from { transform: scale(1.025) translate3d(0,0,0); }
  to { transform: scale(1.075) translate3d(-.8%,.5%,0); }
}
@keyframes cinema-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,60,166,.55); }
  70% { box-shadow: 0 0 0 8px rgba(255,60,166,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,60,166,0); }
}

@media (min-width: 681px) and (max-width: 980px) and (orientation: portrait) {
  .hero-media { object-position: 76% center; }
  .hero-shade {
    background:
      linear-gradient(90deg, rgba(5,17,35,.82) 0%, rgba(5,17,35,.58) 42%, rgba(5,17,35,.1) 78%, rgba(5,17,35,.02) 100%),
      linear-gradient(0deg, rgba(5,17,35,.64), transparent 52%);
  }
}

@media (max-width: 680px) {
  .site-header { gap: 12px; }
  .menu-button { flex: 0 0 46px; margin-left: auto; }
  .hero { min-height: 1020px; }
  .hero-media {
    inset: 72px 0 0;
    width: 100%;
    height: 54%;
    object-position: 82% center;
    opacity: 1;
    transform: none;
    animation: none;
  }
  .hero-shade {
    background:
      linear-gradient(90deg, rgba(5,17,35,.5), rgba(5,17,35,.08)),
      linear-gradient(0deg, rgba(5,17,35,.94) 0%, rgba(5,17,35,.34) 56%, rgba(5,17,35,.03) 100%);
  }
  .hero-cinema-tag { top: 86px; right: 18px; font-size: 6px; }
  .hero h1 { max-width:100%; font-size:clamp(52px,16vw,64px); line-height:.86; }
  .hero h1 em { display:block; }
  .hero-copy > p { max-width:100%; }
  .visual-atlas-head { align-items: flex-start; flex-direction: column; }
  .visual-atlas h2 { font-size: clamp(52px,16vw,72px); }
  .atlas-controls { align-self: flex-end; }
  .atlas-card,
  .atlas-card:nth-child(even) { flex-basis: 84vw; aspect-ratio: .82; }
  .atlas-copy { left: 20px; right: 20px; bottom: 20px; }
  .atlas-copy strong { font-size: 40px; }
  .project-card { min-height: 480px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media, .hero-cinema-tag i { animation: none; }
  .visual-rail { scroll-behavior: auto; }
}

/* Video dentro de la ficha de Campas Beach Prime */
.modal-project-video {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #02070d;
}
.modal-project-video[hidden], .modal-video-toggle[hidden] { display: none !important; }
.modal-video-toggle {
  position: absolute;
  z-index: 5;
  right: 18px;
  bottom: 66px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 99px;
  background: rgba(7,24,45,.76);
  color: #fff;
  cursor: pointer;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}
.modal-visual.video-active #modal-image,
.modal-visual.video-active .visual-note,
.modal-visual.video-active .gallery-controls { display: none; }
.modal-visual.video-active .modal-video-toggle { bottom: 18px; }