/* Espacio escénico. Patrones de profundidad inspirados en Componentry,
   implementados desde cero con CSS y JavaScript nativos. */
:root {
  --bg: #000;
  --line: #242427;
}
.site-header {
  height: 80px;
  background: #000;
  border-bottom: 0;
}
.site-header:before {
  background: #000;
}
.main-nav a {
  color: #aaa9b0;
}
.hero {
  display: block;
  height: calc(100svh - 80px);
  min-height: 740px;
  max-height: 1100px;
  max-width: none;
  padding: 0 var(--page);
  overflow: hidden;
  background: #000;
}
body:not(.js-ready) .hero {
  padding-top: 0;
}
.hero-content {
  position: static;
  width: 100%;
}
.brand-lockup {
  position: absolute;
  top: 20px;
  left: var(--page);
  z-index: 2;
  margin: 0;
  font-size: 11px;
  line-height: 1.8;
}
.hero-coordinate {
  position: absolute;
  top: 25px;
  right: var(--page);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #96929e;
}
.hero-stage {
  position: absolute;
  top: -1%;
  left: 0;
  width: 100%;
  height: 76%;
  pointer-events: none;
}
.hero-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.scene-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
}
.scene-ready .scene-fallback {
  visibility: hidden;
}
.hero-wordmark {
  position: absolute;
  z-index: 1;
  bottom: 155px;
  left: 0;
  width: 100%;
  color: #f5f5f1;
  text-align: center;
  font-size: clamp(92px, 16.8vw, 280px);
  font-weight: 600;
  letter-spacing: -0.075em;
  padding-right: 0.075em;
  line-height: 0.76;
  pointer-events: none;
}
.hero h1 {
  position: absolute;
  bottom: 102px;
  left: var(--page);
  right: var(--page);
  text-align: center;
  font-size: 20px;
  letter-spacing: -0.45px;
  line-height: 1.25;
  font-weight: 400;
  z-index: 2;
}
.hero h1 em {
  font: inherit;
}
.hero-actions {
  position: absolute;
  z-index: 4;
  bottom: 29px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}
.hero-actions .button {
  border-radius: 100px;
  min-height: 48px;
  padding: 12px 22px;
  gap: 30px;
  font-size: 12px;
  white-space: nowrap;
  transform: none;
  transition:
    transform 0.25s ease-out,
    background 0.2s;
}
.hero-bottom {
  bottom: 29px;
  z-index: 3;
  gap: 20px;
}
.explore-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 48px;
  min-width: 80px;
  font-size: 11px;
}
.explore-link span {
  font-size: 20px;
}
.scene-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}
.scene-controls button {
  min-height: 44px;
  padding: 9px 0;
  border: 0;
  color: #aaa6b0;
  font-size: 10px;
  background: transparent;
}
.scene-controls button:hover,
.scene-controls button[aria-pressed="true"] {
  color: #fff;
}
.intro {
  background: #000;
  overflow: hidden;
}
#intro-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.intro.has-scene #intro-symbol {
  visibility: hidden;
}
#skip-intro {
  color: #b6b0bf;
  font-size: 11px;
}

/* Un portal de planos sucesivos, sensible al desplazamiento de la página. */
.vr-section {
  min-height: 720px;
  padding-block: 100px;
}
.vr-art {
  min-height: 520px;
  background: transparent;
  overflow: visible;
  perspective: 950px;
  transform: translateY(var(--scroll-lift, 0px));
}
.portal-tunnel {
  position: relative;
  width: min(90%, 440px);
  height: 470px;
  transform-style: preserve-3d;
  transform: rotateX(calc(-8deg + var(--scroll-tilt, 0deg))) rotateY(-27deg)
    rotateZ(9deg);
}
.portal-tunnel i {
  position: absolute;
  inset: 0;
  border: 1px solid
    color-mix(in srgb, var(--portal-color, #188ad9) 75%, transparent);
  border-radius: 48% 48% 43% 43%;
  transform: translateZ(calc(var(--ring) * -48px));
  box-shadow:
    1px 0 0 #ffffff2b,
    inset -1px 0 0 #ffffff17;
  background: radial-gradient(
    ellipse,
    transparent 58%,
    color-mix(in srgb, var(--portal-color, #188ad9) 5%, transparent)
  );
}
.portal-tunnel span {
  position: absolute;
  top: 43%;
  left: 9%;
  font-size: clamp(32px, 3.5vw, 50px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.055em;
  transform: translateZ(40px);
}

/* Abanico de invitaciones: portadas reales con enlaces accesibles. */
.invitation-section {
  overflow: clip;
  padding-bottom: 80px;
}
.invitation-examples {
  --spread: clamp(172px, 21vw, 295px);
  --card-width: clamp(220px, 24vw, 280px);
  position: relative;
  display: block;
  height: 750px;
  max-width: 1200px;
  margin: 30px auto 0;
  perspective: 1400px;
  transform-style: preserve-3d;
  transform: translateY(var(--scroll-lift, 0px))
    rotateX(var(--scroll-tilt, 0deg));
}
.invitation-example {
  scroll-margin: 100px 28px 32px;
  --side: -1;
  position: absolute;
  top: 40px;
  left: calc(50% - var(--card-width) / 2);
  width: var(--card-width);
  z-index: 1;
  transform-style: preserve-3d;
  transform: translateX(calc(var(--side) * var(--spread)))
    rotateY(calc(var(--side) * -19deg + var(--pointer-x, 0deg)))
    rotateX(var(--pointer-y, 0deg)) rotateZ(calc(var(--side) * 8deg));
  transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.invitation-example:nth-child(2) {
  --side: 0;
  top: 0;
  z-index: 2;
}
.invitation-example:nth-child(3) {
  --side: 1;
  top: 76px;
}
.gallery-hint {
  display: none;
}
.example-stage {
  position: relative;
  min-height: 0;
  display: block;
  padding: 0;
  background: transparent;
  overflow: visible;
  transform-style: preserve-3d;
}
.example-stage:before,
.example-stage:after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid #544a5d;
  border-radius: 22px;
  background: #111014;
  transform: translateZ(-12px) translate(7px, 5px);
}
.example-stage:after {
  border-color: #302832;
  transform: translateZ(-24px) translate(14px, 10px);
}
.example-phone {
  position: relative;
  width: 100%;
  padding: 5px;
  border: 1px solid #69646d;
  border-radius: 24px;
  background: #080809;
  box-shadow: 18px 24px 28px #0006;
  transform: translateZ(1px);
}
.example-phone img {
  border-radius: 18px;
}
.invitation-example:hover .example-phone,
.invitation-example:focus-visible .example-phone {
  transform: translateZ(1px);
}
.example-caption {
  display: block;
  margin-top: 22px;
  color: #efecf3;
  transform: translateZ(10px);
}
.example-caption h3 {
  font-size: 18px;
  margin-bottom: 4px;
}
.example-caption > span {
  min-height: 30px;
  font-size: 10px;
  color: #aaa5b0;
}
.service-note {
  text-align: center;
  margin-top: 18px;
}
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .invitation-examples:hover .invitation-example,
  .invitation-examples:focus-within .invitation-example {
    transform: translateX(calc(var(--side) * var(--spread) * 1.08))
      rotateY(calc(var(--side) * -13deg + var(--pointer-x, 0deg)))
      rotateX(var(--pointer-y, 0deg)) rotateZ(calc(var(--side) * 6deg));
  }
  .invitation-examples .invitation-example.is-active,
  .invitation-examples .invitation-example:focus-visible {
    z-index: 3;
    transform: translateX(calc(var(--side) * var(--spread) * 1.08))
      translateY(-26px) translateZ(60px)
      rotateY(calc(var(--side) * -9deg + var(--pointer-x, 0deg)))
      rotateZ(calc(var(--side) * 5deg));
  }
}
.experiences {
  padding-top: 120px;
}
.experience-item summary {
  min-height: 120px;
}
.experience-item h3 {
  font-size: clamp(25px, 4vw, 60px);
  letter-spacing: -0.04em;
}
.experience-item:hover h3 {
  transform: translateX(10px);
}
.experience-item .item-number {
  align-self: start;
  margin-top: 8px;
}
.case-section {
  background: linear-gradient(110deg, #080609, #000);
}
.case-symbol {
  color: #b4a7c8;
}

@media (min-width: 1600px) {
  .hero-wordmark {
    font-size: min(16.8vw, 330px);
  }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .hero {
    height: calc(100svh - 80px);
    min-height: 730px;
  }
  .hero-coordinate {
    display: none;
  }
  .hero-wordmark {
    bottom: 174px;
  }
  .hero h1 {
    bottom: 122px;
  }
  .hero-stage {
    height: 76%;
  }
  .scene-controls {
    gap: 14px;
  }
  .scene-controls button {
    font-size: 9px;
  }
  .vr-section {
    min-height: 630px;
    overflow: clip;
  }
  .portal-tunnel {
    height: 360px;
    width: 290px;
  }
  .vr-art {
    min-height: 420px;
  }
}
@media (max-width: 767px) {
  .site-header {
    height: 73px;
  }
  .hero {
    height: calc(100svh - 73px);
    min-height: 690px;
    max-height: 900px;
    padding: 0;
  }
  .brand-lockup {
    top: 12px;
    left: var(--page);
    font-size: 10px;
    margin: 0;
  }
  .hero-coordinate {
    display: none;
  }
  .hero-stage {
    top: 55px;
    left: -5%;
    width: 110%;
    height: calc(100% - 315px);
  }
  .hero-wordmark {
    bottom: 213px;
    font-size: 16.6vw;
  }
  .hero h1 {
    bottom: 149px;
    font-size: 23px;
    max-width: 310px;
    margin-inline: auto;
    line-height: 1.13;
  }
  .hero-actions {
    bottom: 71px;
  }
  .hero-actions .button {
    min-height: 46px;
    padding: 11px 22px;
    font-size: 12px;
  }
  .hero-bottom {
    bottom: 11px;
    gap: 15px;
    flex-wrap: nowrap;
  }
  .explore-link {
    font-size: 10px;
    min-width: 65px;
    gap: 12px;
  }
  .scene-controls {
    gap: 16px;
  }
  .scene-controls button {
    font-size: 9px;
  }
  .experiences {
    padding-top: 75px;
  }
  .experience-item summary {
    min-height: 100px;
  }
  .experience-item h3 {
    font-size: 28px;
  }
  .vr-section {
    display: flex;
    flex-direction: column;
    gap: 48px;
    overflow: clip;
    padding-block: 65px;
  }
  .vr-copy {
    width: 100%;
  }
  .vr-art {
    width: 100%;
    min-height: 400px;
  }
  .portal-tunnel {
    width: 270px;
    height: 350px;
    margin-left: 30px;
  }
  .portal-tunnel span {
    font-size: 37px;
  }
  .invitation-section {
    padding-bottom: 55px;
  }
  .invitation-examples {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    height: auto;
    min-height: 630px;
    max-width: none;
    margin: 20px calc(-1 * var(--page)) 0;
    padding: 24px var(--page) 46px;
    overflow-x: auto;
    overflow-y: hidden;
    perspective: 1100px;
    transform: none;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--page);
    scrollbar-width: thin;
    scrollbar-color: #5b505f transparent;
  }
  .invitation-example,
  .invitation-example:nth-child(2),
  .invitation-example:nth-child(3) {
    position: relative;
    flex: 0 0 250px;
    width: 250px;
    left: auto;
    top: auto;
    scroll-snap-align: start;
    transform: rotateY(-7deg) rotateZ(-2deg);
  }
  .invitation-example:nth-child(2) {
    transform: rotateY(-7deg) rotateZ(2deg);
  }
  .gallery-hint {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    margin-top: 12px;
    font-size: 11px;
    color: #b4acbe;
  }
  .gallery-hint span {
    font-size: 20px;
  }
  .example-phone {
    width: 100%;
    padding: 3px;
    border-radius: 17px;
  }
  .example-phone img {
    border-radius: 12px;
    width: 100%;
  }
  .example-stage:before,
  .example-stage:after {
    border-radius: 15px;
  }
  .example-caption {
    margin-top: 17px;
  }
  .example-caption h3 {
    font-size: 15px;
  }
  .example-caption h3 > span {
    font-size: 9px;
    margin-left: 3px;
  }
  .example-caption > span {
    font-size: 10px;
    gap: 10px;
  }
  .service-note {
    max-width: 280px;
    margin-inline: auto;
    font-size: 10px;
  }
}
@media (max-width: 390px) {
  .hero h1 {
    font-size: 21px;
    max-width: 285px;
  }
  .scene-controls {
    gap: 12px;
  }
  .scene-controls button {
    font-size: 9px;
  }
  .example-caption h3 {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-actions .button,
  .invitation-examples,
  .vr-art {
    transform: none;
  }
  .invitation-example,
  .hero-actions .button {
    transition: none;
  }
  .portal-tunnel {
    transform: rotateY(-18deg) rotateZ(6deg);
  }
  .experience-item:hover h3 {
    transform: none;
  }
}
@media print {
  .hero-stage,
  .hero-wordmark,
  .hero-coordinate,
  .hero-bottom {
    display: none;
  }
  .hero {
    height: auto;
    min-height: 120px;
  }
  .hero h1,
  .brand-lockup {
    position: static;
    color: #000;
  }
  .invitation-examples {
    display: flex;
    height: auto;
    gap: 40px;
  }
  .invitation-example {
    position: static;
    transform: none;
  }
}

/* La capa no recibe eventos ni altera el layout de la página. */
#ambient-particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.85;
}
.intro-running #ambient-particles {
  visibility: hidden;
}
.intro.is-leaving #intro-scene {
  transform: scale(0.86);
  transition: transform var(--intro-fade) ease-in;
}
@media (prefers-reduced-motion: no-preference) {
  .intro-complete .hero-wordmark {
    animation: signal-arrival 0.65s cubic-bezier(0.18, 0.7, 0.22, 1) both;
  }
  @keyframes signal-arrival {
    from {
      opacity: 0.4;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .intro.is-leaving #intro-scene {
    transform: none;
    transition: none;
  }
}
@media print {
  #ambient-particles {
    display: none;
  }
}
