/* ==========================================================================
   NEXORA DIGITAL — hero.css
   A lit "gallery room": four real portfolio projects float at different
   depths. The scene tilts with the pointer; one orchestrated entrance.
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid; align-items: center;
  padding: calc(var(--nav-h) + 3rem) 0 6rem;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(70% 60% at 72% 40%, rgba(198, 161, 91, .09), transparent 70%),
    radial-gradient(50% 50% at 10% 100%, rgba(111, 157, 255, .05), transparent 70%),
    var(--obsidian);
}
/* pointer-following key light */
.hero__light {
  position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(520px circle at var(--lx, 70%) var(--ly, 35%), rgba(227, 198, 142, .10), transparent 65%);
  transition: background .2s linear;
}
/* architectural lines of the room */
.hero__room {
  position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to bottom, transparent 0 calc(100% - 22%), rgba(244, 240, 232, .06) calc(100% - 22%), transparent calc(100% - 22% + 1px)),
    linear-gradient(90deg, transparent 0 calc(50% - .5px), rgba(244, 240, 232, .035) calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px));
}

.hero__grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center; gap: 2rem;
}
.hero__copy { max-width: 620px; }
.hero__title { font-size: var(--fs-hero); margin-bottom: 1.8rem; max-width: none; }
.hero__title .ln { display: block; overflow: hidden; padding-bottom: .04em; }
.hero__title .ln > span { display: block; text-wrap: balance; }
.hero__text { font-size: var(--fs-lead); color: var(--ivory-2); max-width: 46ch; margin-bottom: 2.4rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Stage ---------- */
.hero__stage {
  position: relative;
  height: min(78vh, 720px);
  perspective: 1900px;
  perspective-origin: 40% 40%;
  margin-right: calc(var(--gutter) * -1 - 4vw);
}
.stage {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 7deg)) rotateY(var(--ry, -16deg));
  will-change: transform;
  pointer-events: none; /* the stage plane sits in front of the far panels */
}
.float {
  pointer-events: auto;
  position: absolute;
  transform-style: preserve-3d;
  transform: translate3d(0, 0, var(--z, 0px));
  cursor: pointer;
}
.float__inner { animation: drift 9s ease-in-out infinite; animation-delay: var(--delay, 0s); transition: transform .6s var(--ease); }
.float:hover .float__inner, .float:focus-visible .float__inner { transform: translateZ(40px); }
.float:focus-visible { outline: none; }
.float:focus-visible .frame, .float:focus-visible .phone { box-shadow: var(--shadow-float), 0 0 0 2px var(--gold-hi); }
@keyframes drift {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}
.float--elora  { --z: -220px; left: 2%;  top: 2%;  width: 58%; --delay: -2s; }
.float--forge  { --z: -330px; left: 46%; top: -3%; width: 56%; --delay: -5s; }
.float--aurelle{ --z: 40px;   left: 12%; top: 31%; width: 66%; --delay: -1s; }
.float--mobile { --z: 170px;  left: 72%; top: 36%; width: 17%; --delay: -6s; }

.float__tag {
  position: absolute; left: 0; top: calc(100% + 12px);
  display: flex; gap: .6rem; align-items: baseline;
  font-size: .75rem; color: var(--ivory-3); white-space: nowrap;
  opacity: 0; transform: translateY(-4px); transition: opacity .4s, transform .4s var(--ease);
}
.float__tag b { font-family: var(--display); font-weight: 500; letter-spacing: .08em; color: var(--ivory); text-transform: uppercase; }
.float:hover .float__tag, .float:focus-visible .float__tag { opacity: 1; transform: none; }

/* floor reflection & glow */
.hero__floor {
  position: absolute; left: -10%; right: -10%; bottom: -6%; height: 34%;
  background: radial-gradient(50% 55% at 50% 40%, rgba(198, 161, 91, .16), transparent 70%);
  filter: blur(8px);
  transform: rotateX(70deg);
  pointer-events: none;
}

.scroll-cue {
  position: absolute; left: var(--gutter); bottom: 1.8rem; z-index: 3;
  display: inline-flex; align-items: center; gap: .9rem;
  font-size: .78rem; color: var(--ivory-3); letter-spacing: .04em;
}
.scroll-cue__track { position: relative; width: 1px; height: 46px; background: var(--line-2); overflow: hidden; }
.scroll-cue__track::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%;
  background: var(--gold); animation: cue 2.2s var(--ease-io) infinite;
}
@keyframes cue { to { top: 100%; } }

/* ---------- Entrance (only with JS) ---------- */
.js .hero__title .ln > span { transform: translateY(108%); }
.js .hero__text, .js .hero__actions, .js .scroll-cue { opacity: 0; transform: translateY(16px); }
.js .float { opacity: 0; }
.js .float .float__inner { transform: translateZ(-500px) rotateY(18deg); }

.is-ready .hero__title .ln > span { transform: none; transition: transform 1.2s var(--ease); }
.is-ready .hero__title .ln:nth-child(2) > span { transition-delay: .08s; }
.is-ready .hero__title .ln:nth-child(3) > span { transition-delay: .16s; }
.is-ready .hero__title .ln:nth-child(4) > span { transition-delay: .24s; }
.is-ready .hero__text, .is-ready .hero__actions, .is-ready .scroll-cue { opacity: 1; transform: none; transition: opacity 1s var(--ease), transform 1s var(--ease); }
.is-ready .hero__text { transition-delay: .45s; }
.is-ready .hero__actions { transition-delay: .55s; }
.is-ready .scroll-cue { transition-delay: 1.2s; }
.is-ready .float { opacity: 1; transition: opacity 1.2s var(--ease) var(--in, .3s); }
.is-ready .float .float__inner { transform: none; transition: transform 1.8s var(--ease) var(--in, .3s); }
.is-ready .float:hover .float__inner { transform: translateZ(40px); transition-delay: 0s; transition-duration: .6s; }
.float--forge { --in: .35s; } .float--elora { --in: .5s; } .float--aurelle { --in: .7s; } .float--mobile { --in: .95s; }

@media (max-width: 1100px) {
  .hero { align-items: start; padding-bottom: 4rem; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__copy { max-width: 680px; }
  .hero__stage { height: clamp(320px, 62vw, 600px); margin: 1rem calc(var(--gutter) * -1) 0; }
  .scroll-cue { display: none; }
}
@media (max-width: 600px) {
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__stage { height: 92vw; perspective: 1200px; }
  .float--elora  { left: -6%; width: 66%; }
  .float--forge  { left: 40%; width: 66%; }
  .float--aurelle{ left: 4%; top: 30%; width: 78%; }
  .float--mobile { left: 70%; top: 40%; width: 25%; }
}
@media (prefers-reduced-motion: reduce) {
  .float__inner { animation: none; }
  .stage { transform: rotateX(6deg) rotateY(-14deg) !important; }
}
