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

html {
  background: #000;
}

body {
  min-height: 100%;
  background: #000;
  color: #f5efe0;
  font-family: system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

#main-viewport {
  width: 100%;
}

/* Design canvas 5121 × 12684 — scales with viewport width */
#main-stage {
  --design-w: 5121;
  --design-h: 12684;
  --diamond-top: 19.39%;
  --diamond-split: 50.52%;
  --diamond-bottom: 81.76%;

  position: relative;
  width: 100%;
  max-width: calc(1px * var(--design-w));
  margin: 0 auto;
  aspect-ratio: var(--design-w) / var(--design-h);
  background: #000;
  isolation: isolate;
}

/* ── HEADER ── */
.main-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.15% 3.2% 0;
  pointer-events: none;
}

.main-menu {
  pointer-events: auto;
  width: 36px;
  height: 16px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 3px 4px;
}

.main-menu span {
  width: 6px;
  height: 4px;
  border-radius: 999px;
  background: #f2ebe0;
  justify-self: center;
  align-self: center;
}

.main-nav {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem 2.4rem;
  max-width: 58%;
  padding-top: 0.15%;
}

.main-nav a {
  color: #f2ebe0;
  text-decoration: none;
  font-size: clamp(0.48rem, 0.62vw, 0.72rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

.main-nav a:hover {
  opacity: 1;
}

/* ── DIAMOND VIDEOS / STILLS ── */
#main-diamond-videos {
  position: absolute;
  left: 0;
  top: var(--diamond-top);
  width: 100%;
  height: calc(var(--diamond-bottom) - var(--diamond-top));
  z-index: 1;
  pointer-events: none;
}

.diamond-half {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  overflow: hidden;
}

.diamond-half--top {
  top: 0;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.diamond-half--bottom {
  bottom: 0;
  background: #000;
  clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
}

.diamond-half video,
.diamond-half img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.diamond-half--top video {
  object-position: center 35%;
}

.diamond-half--bottom video {
  object-position: center 45%;
}

/* ── MASK ── */
#main-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

/* ── COLLAGE PIECES ── */
.main-piece {
  position: absolute;
  pointer-events: none;
  z-index: 5;
}

.main-piece img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#piece-text-hero {
  left: 4.4%;
  top: 7.55%;
  width: 90.6%;
  height: 4.15%;
  z-index: 6;
}

#piece-flormagenta {
  left: 0;
  top: 13.2%;
  width: 36%;
  height: 14.7%;
  z-index: 11;
}

#piece-hanuman {
  left: 41.2%;
  top: 14.4%;
  width: 17.6%;
  height: 11.8%;
  z-index: 12;
}

#piece-pajaros {
  left: 54.5%;
  top: 13.8%;
  width: 28%;
  height: 10.8%;
  z-index: 11;
}

#piece-florbb {
  left: 61.5%;
  top: 20.4%;
  width: 13.5%;
  height: 3.8%;
  z-index: 12;
}

#piece-text-body {
  left: 4.6%;
  top: 27.6%;
  width: 27.4%;
  height: 12.3%;
  z-index: 8;
}

#piece-text-body img {
  object-position: left top;
}

#piece-textokali {
  left: 33%;
  top: 43.6%;
  width: 34%;
  height: 13.8%;
  z-index: 9;
  transform-origin: 50% 50%;
  animation: kali-ring-spin 55s linear infinite;
}

@keyframes kali-ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#piece-kali {
  left: 39%;
  top: 46.05%;
  width: 22%;
  height: 8.9%;
  z-index: 10;
}

#piece-cactus-2 {
  left: -3%;
  top: 65.5%;
  width: 36%;
  height: 23.4%;
  z-index: 12;
}

#piece-cactus-2 img {
  object-position: left bottom;
}

#piece-florloto {
  left: 73%;
  top: 69.4%;
  width: 25%;
  height: 9.1%;
  z-index: 12;
}

#piece-florloto img {
  object-position: right center;
}

#piece-logo-hands {
  left: 50%;
  top: 80.2%;
  width: 7.4%;
  height: 3.5%;
  transform: translateX(-50%);
  z-index: 11;
}

#piece-text-manifesto {
  left: 50%;
  top: 83.6%;
  width: 56%;
  height: 10.5%;
  transform: translateX(-50%);
  z-index: 6;
}

#piece-logo-amori {
  left: 2.6%;
  top: 93.7%;
  width: 20%;
  height: 1.85%;
  z-index: 12;
}

#piece-bitacora-morir {
  left: -2%;
  top: 57.5%;
  width: 30%;
  aspect-ratio: 3268 / 4689;
  height: auto;
  z-index: 13;
}

#piece-bitacora-sub {
  left: 0.5%;
  top: 65.5%;
  width: 17%;
  aspect-ratio: 1873 / 2839;
  height: auto;
  z-index: 13;
}

.main-ofrendas {
  position: absolute;
  left: 68%;
  top: 66.5%;
  width: 26%;
  height: 10.5%;
  z-index: 13;
  pointer-events: none;
}

.main-ofrendas svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.main-ofrendas text {
  fill: #e8b4a0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.main-footer {
  position: absolute;
  left: 24%;
  right: 3%;
  bottom: 1.35%;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.4rem;
  color: #cfc6b8;
  font-size: clamp(0.38rem, 0.48vw, 0.58rem);
  letter-spacing: 0.16em;
  text-transform: lowercase;
  opacity: 0.72;
}

@media (max-width: 768px) {
  .main-nav {
    gap: 0.45rem 0.85rem;
    max-width: 68%;
  }

  .main-nav a {
    letter-spacing: 0.12em;
    font-size: 0.48rem;
  }

  .main-footer {
    left: 3%;
    bottom: 4.2%;
    justify-content: flex-start;
  }

  #piece-text-body {
    left: 2.5%;
    width: 36%;
  }

  #piece-bitacora-morir {
    width: 38%;
  }

  #piece-bitacora-sub {
    width: 22%;
  }
}
