/* The real AVORA alpha silhouette becomes an aperture into the site. */
.opening-gate,
.portal-gate {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(#000, #000), url("assets/logo-avora-transparente.png");
  mask-image: linear-gradient(#000, #000), url("assets/logo-avora-transparente.png");
  -webkit-mask-size:
    100% 100%,
    var(--gate-size, 0px) var(--gate-size, 0px);
  mask-size:
    100% 100%,
    var(--gate-size, 0px) var(--gate-size, 0px);
  -webkit-mask-position:
    0 0,
    var(--gate-left, 50%) var(--gate-top, 50%);
  mask-position:
    0 0,
    var(--gate-left, 50%) var(--gate-top, 50%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.brand-intro {
  color: #07100d;
}
.opening-gate {
  background: #e5ece1;
}
.opening-label {
  position: absolute;
  top: 42px;
  left: 5.2%;
  right: 5.2%;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  letter-spacing: 0.08em;
}
.opening-message {
  position: absolute;
  left: 5.2%;
  top: 28%;
  font: 500 clamp(50px, 6.5vw, 96px) / 1.06 var(--display);
  max-width: 58%;
  letter-spacing: -0.06em;
  margin: 0;
}
.opening-message em {
  color: #4f7d58;
  font-style: normal;
}
.opening-counter {
  position: absolute;
  left: 5.2%;
  bottom: 42px;
  font-size: 12px;
  letter-spacing: 1.5px;
}
.opening-label,
.opening-message,
.opening-counter {
  opacity: var(--opening-copy, 1);
  translate: 0 var(--opening-y, 0px);
}

/* A short scroll-controlled threshold, in the same service section. */
.portal-track {
  height: 210svh;
  position: relative;
  margin: 35px -5.8% 45px;
  isolation: isolate;
}
.portal-track .connection-stage {
  position: sticky;
  top: 100px;
  height: calc(100svh - 100px);
  min-height: 450px;
  margin: 0;
  border-top: 0;
  border-bottom: 0;
  overflow: hidden;
}
.portal-track .connection-backword {
  font-size: 20vw;
  opacity: 0.13;
}
.portal-track .connection-canvas {
  scale: var(--portal-art-scale, 1);
  rotate: var(--portal-art-rotate, 0deg);
  transition: none;
}
.portal-track .connection-caption {
  top: 32px;
  left: 5.2%;
  right: 5.2%;
}
.portal-track .connection-controls {
  left: 5.2%;
  right: 5.2%;
  bottom: 30px;
}
.portal-track .connection-caption,
.portal-track .connection-controls {
  opacity: var(--portal-controls, 0);
  visibility: var(--portal-controls-visibility, hidden);
}
.portal-cover {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: var(--portal-cover-opacity, 1);
}
.portal-gate {
  background: #e5ece1;
}
.portal-cover-copy {
  position: absolute;
  inset: 0;
  opacity: var(--portal-copy, 1);
  transform: translateY(var(--portal-copy-y, 0px));
}
.portal-kicker {
  position: absolute;
  top: 32px;
  left: 5.2%;
  color: #34543e;
  letter-spacing: 1.5px;
  font-size: 12px;
}
.portal-statement {
  position: absolute;
  left: 5.2%;
  top: 19%;
  margin: 0;
  font: 500 clamp(50px, 7vw, 105px) / 1.04 var(--display);
  letter-spacing: -0.065em;
  color: #07100d;
  max-width: 55%;
}
.portal-statement em {
  color: #4f7d58;
  font-style: normal;
}
.portal-seal {
  position: absolute;
  left: var(--gate-left);
  top: var(--gate-top);
  width: var(--gate-size);
  height: var(--gate-size);
  background: linear-gradient(130deg, #8fb996, #4f7d58, #173d24);
  mask: url("assets/logo-avora-transparente.png") center/contain no-repeat;
  -webkit-mask: url("assets/logo-avora-transparente.png") center/contain no-repeat;
  opacity: var(--portal-seal, 0.92);
  pointer-events: none;
}
.portal-scroll-note {
  position: absolute;
  left: 5.2%;
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #34543e;
  font-size: 14px;
}
.portal-scroll-note::before {
  content: "";
  width: 1px;
  height: 38px;
  background: linear-gradient(transparent, #4f7d58, transparent);
  animation: portal-scroll-signal 2.6s ease-in-out infinite;
}
.portal-enter {
  position: absolute;
  z-index: 7;
  right: 5.2%;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 28px;
  border: 1px solid #4f7d58;
  border-radius: 50px;
  padding: 14px 24px;
  background: #e5ece1;
  color: #07100d;
  font-size: 14px;
  pointer-events: auto;
}
.portal-enter:hover {
  background: #07100d;
  color: #e5ece1;
}
.portal-enter span {
  font-size: 22px;
}
.portal-coordinate {
  position: absolute;
  right: 5.2%;
  top: 32px;
  color: #4f7d58;
  font-size: 12px;
  letter-spacing: 1px;
}
.portal-track.portal-static {
  height: auto;
}
.portal-static .connection-stage {
  position: relative;
  top: 0;
  height: clamp(390px, 47vw, 670px);
  min-height: 0;
}
.portal-static .portal-cover {
  display: none;
}
.portal-static .connection-controls,
.portal-static .connection-caption {
  opacity: 1;
  visibility: visible;
}

/* The lighting follows the active scene rather than adding another overlay. */
.hero-atmosphere {
  opacity: 0.9;
}
.hero-atmosphere span {
  background: radial-gradient(ellipse, #70a27d55, transparent 64%);
}
.portal-ready .ticker {
  position: relative;
  transform: rotate(-1.5deg) scale(1.02);
  margin: 20px 0;
}
.portal-ready #soluciones {
  padding-top: 95px;
}
.portal-ready .diagnostic {
  background: radial-gradient(
    ellipse at var(--chapter-glow-x, 60%) var(--chapter-glow-y, 40%),
    #244532,
    #10271c 65%
  );
}
.portal-ready .ideas {
  background: radial-gradient(ellipse at var(--chapter-glow-x, 70%) 40%, #17332455, #07100d 72%);
}
.portal-ready .contact {
  background: radial-gradient(
    ellipse at var(--chapter-glow-x, 60%) var(--chapter-glow-y, 50%),
    #bbd5b6,
    #8fb996 65%
  );
}
.portal-ready .contact form {
  backdrop-filter: blur(18px);
}
@keyframes portal-scroll-signal {
  50% {
    transform: translateY(7px);
    opacity: 0.35;
  }
}
@media (max-width: 760px) {
  .opening-label {
    top: 27px;
    font-size: 12px;
  }
  .opening-message {
    top: 25%;
    font-size: clamp(44px, 11.5vw, 80px);
    max-width: 90%;
  }
  .opening-counter {
    bottom: 30px;
    font-size: 11px;
  }
  .portal-track {
    height: 170svh;
    margin-top: 25px;
    margin-bottom: 30px;
  }
  .portal-track .connection-stage {
    top: 82px;
    height: calc(100svh - 82px);
    min-height: 420px;
  }
  .portal-kicker {
    top: 25px;
    font-size: 11px;
  }
  .portal-coordinate {
    top: 25px;
    font-size: 11px;
  }
  .portal-statement {
    top: 13%;
    max-width: 90%;
    font-size: clamp(42px, 11.5vw, 72px);
  }
  .portal-scroll-note {
    bottom: 27px;
    font-size: 12px;
    gap: 12px;
  }
  .portal-scroll-note::before {
    height: 30px;
  }
  .portal-enter {
    bottom: 23px;
    padding: 11px 16px;
    gap: 12px;
    font-size: 13px;
  }
  .portal-track .connection-controls {
    bottom: 27px;
  }
  .portal-track .connection-caption {
    top: 25px;
  }
  .portal-track .connection-backword {
    font-size: 22vw;
  }
  .portal-ready #soluciones {
    padding-top: 62px;
  }
  .portal-static .connection-stage {
    position: relative;
    top: 0;
    height: 390px;
    min-height: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .portal-ready .ticker {
    transform: none;
  }
  .portal-scroll-note::before {
    animation-duration: 6s;
  }
}
@media (max-width: 380px) {
  .portal-scroll-note {
    max-width: 100px;
    font-size: 11px;
    line-height: 1.5;
    gap: 8px;
  }
  .portal-scroll-note::before {
    flex-shrink: 0;
  }
  .portal-enter {
    font-size: 12px;
    gap: 10px;
    padding: 11px 14px;
  }
}
