/* Home hero: word reveal above a progressively typed accent. */
.nexa-hero-3d__lead[data-nexa-home-intro] {
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.7;
}
.nexa-hero-3d__copy h1[data-nexa-home-h1]:has(.nexa-home-title__line) {
  animation: none !important;
  transform: none !important;
  line-height: 1.06;
}
.nexa-hero-3d__copy h1[data-nexa-home-h1]:has(.nexa-home-title__line)::after {
  display: none;
}
.nexa-home-title__line { display: block; white-space: nowrap; }
.nexa-home-title__word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-block: .08em;
  margin-block: -.08em;
}
.nexa-home-title__word > span { display: inline-block; }
.nexa-home-title__accent {
  position: relative;
  display: inline-block;
  padding-bottom: .14em;
  margin-top: .03em;
  white-space: nowrap;
}
.nexa-home-title__accent .nexa-home-title__word > span {
  color: #ff8544;
  background: linear-gradient(110deg, #ff6517, #ffab77);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}
.nexa-home-title__accent::after {
  content: none;
}
html.nexa-brand-intro-seen .nexa-home-title__line .nexa-home-title__word > span {
  animation: nexa-home-word-reveal .88s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: var(--word-delay, 0s);
}
.nexa-home-title__typed-ink { display: inline-block; }
.nexa-home-title__accent.is-type-ready .nexa-home-title__typed-ink {
  clip-path: inset(-.12em 100% -.12em 0);
}
.nexa-home-title__caret {
  display: none;
  position: absolute;
  top: .13em;
  left: 0;
  width: 2px;
  height: .82em;
  margin-left: .035em;
  background: #ff9a60;
  pointer-events: none;
}
.nexa-home-title__accent.is-typing .nexa-home-title__caret {
  display: block;
  animation: nexa-home-caret-blink .65s step-end infinite;
}
@keyframes nexa-home-word-reveal {
  from { opacity: 0; transform: translateY(112%) rotate(3deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}
@keyframes nexa-home-caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@media (max-width: 760px) {
  .nexa-hero-3d__lead[data-nexa-home-intro] { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html.nexa-brand-intro-seen .nexa-home-title__line .nexa-home-title__word > span {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .nexa-home-title__accent.is-type-ready .nexa-home-title__typed-ink { clip-path: none; }
  .nexa-home-title__accent.is-typing .nexa-home-title__caret { display: none; }
}

/* Original SVG arm choreography; original B/G/P rules stay authoritative. */
.nexa-hero-3d[data-nexa-home-hero="v3"] {
  min-height: max(720px, calc(100svh - 88px));
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(145deg,#050505 0%,#080706 48%,#030303 100%);
}
.nexa-hero-3d[data-nexa-home-hero="v3"]::before {
  /* Low-contrast brand fragments drift as one layer behind the content. */
  z-index: 0;
  inset: -18px;
  background: url('/assets/hero-structures.svg?v=2') center / cover no-repeat;
  animation: nexa-home-structure-drift 28s ease-in-out infinite;
  pointer-events: none;
}
@keyframes nexa-home-structure-drift {
  0%, 100% { transform: translate(-6px, 4px); }
  50% { transform: translate(6px, -4px); }
}
.nexa-hero-3d.is-performance-paused[data-nexa-home-hero="v3"]::before {
  animation-play-state: paused;
}
.nexa-hero-3d[data-nexa-home-hero="v3"]::after {
  filter: none;
}
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__inner {
  min-height: max(720px, calc(100svh - 88px));
  padding-top: 70px;
  padding-bottom: 116px;
}
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__copy {
  width: min(990px, 74vw);
  opacity: 1;
  transform: none;
}
.nexa-hero-3d[data-nexa-home-hero="v3"] h1[data-nexa-home-h1] {
  font-size: clamp(59px, 5.35vw, 96px);
  letter-spacing: -.055em;
}
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__lead { max-width: 790px; }
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__eyebrow { font-size: 12px; margin-bottom: 28px; }
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__button { min-height: 58px; font-size: 16px; }
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__symbol {
  width: min(57vw, 1040px);
  right: -4%;
  /* Center within the hero area below the 88px header. */
  top: calc(50% + 44px);
  transform: translateY(-50%);
}
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__brand-pulse {
  right: clamp(46px, 5.2vw, 98px);
  bottom: 58px;
}
.nexa-hero-3d__object {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 1;
  /* Rotate the full-size layer in 2D, not the SVG's 256-unit viewBox. */
  transform-origin: 50% 50%;
  will-change: transform;
  animation: nexa-home-svg-turn 24s cubic-bezier(.45,0,.2,1) var(--nexa-arm-loop-delay) infinite both;
}
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__symbol-svg {
  opacity: 1;
  filter: none;
  animation: none;
  transform: none;
  shape-rendering: geometricPrecision;
}
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__symbol-turn {
  animation: none;
  transform: none;
  will-change: auto;
  backface-visibility: visible;
}
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__arm-loop {
  /* One smooth expansion/contraction instead of several changes of direction. */
  animation-duration: 10.8s;
  animation-timing-function: cubic-bezier(.45,0,.55,1);
  will-change: auto;
  backface-visibility: visible;
}
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__arm-loop--sw { animation-name: nexa-home-arm-sw; }
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__arm-loop--ne { animation-name: nexa-home-arm-ne; }
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__arm-loop--se { animation-name: nexa-home-arm-se; }
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__arm-loop--nw { animation-name: nexa-home-arm-nw; }
@keyframes nexa-home-arm-sw { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-10px,10px); } }
@keyframes nexa-home-arm-ne { 0%,100% { transform: translate(0,0); } 50% { transform: translate(10px,-10px); } }
@keyframes nexa-home-arm-se { 0%,100% { transform: translate(0,0); } 50% { transform: translate(7px,7px); } }
@keyframes nexa-home-arm-nw { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-7px,-7px); } }
.nexa-hero-3d.is-performance-paused .nexa-hero-3d__object { animation-play-state: paused; }
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__arm-accent {
  will-change: auto;
}
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__arm-face { fill: #f4f4f5; }
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__arm-accent { fill: #ff6b20; }
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__symbol-aura { display: none; }
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__grain {
  z-index: 0;
  opacity: .10;
  background-image: url('/assets/hero-grain.svg');
  background-size: 180px 180px;
  background-position: 0 0;
  mix-blend-mode: normal;
}
.nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__scroll { bottom: 32px; }

/* Rotate the full-resolution 2D layer without perspective or upscaling.
   Each half-turn gets 3.36 seconds, with a settled pose between turns. */
@keyframes nexa-home-svg-turn {
  0%, 36% { transform: rotate(0deg); }
  50%, 86% { transform: rotate(180deg); }
  100% { transform: rotate(360deg); }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__symbol { right: -24%; width: 70vw; opacity: .65; }
  .nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__copy { width: 78vw; }
  .nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__lead { max-width: 570px; }
}
@media (max-width: 760px) {
  .nexa-hero-3d[data-nexa-home-hero="v3"] { min-height: 0; }
  .nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__inner {
    min-height: 0;
    padding: 48px 20px 360px;
    align-items: start;
  }
  .nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__copy {
    width: 100%;
    min-width: 0;
    container-type: inline-size;
  }
  .nexa-hero-3d[data-nexa-home-hero="v3"] h1[data-nexa-home-h1]:has(.nexa-home-title__line) {
    /* Size against the space inside the margins, including scrollbar changes. */
    font-size: clamp(27px, 10.7cqw, 55px);
    line-height: 1.12;
  }
  .nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__eyebrow { font-size: 9px; letter-spacing: .13em; margin-bottom: 22px; }
  .nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__symbol {
    width: min(100vw, 440px);
    top: auto;
    bottom: 2px;
    right: -10%;
    transform: none;
    opacity: 1;
  }
  .nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__scroll { left: 24px; bottom: 24px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nexa-hero-3d__object { animation: none; will-change: auto; }
  .nexa-hero-3d[data-nexa-home-hero="v3"]::before {
    animation: none;
    transform: none;
  }
  .nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__symbol-turn,
  .nexa-hero-3d[data-nexa-home-hero="v3"] .nexa-hero-3d__arm-loop {
    animation: none;
    transform: none;
  }
}
