/* VORA — Hero com cena Spline sobre fundo White Blue.
   Tipografia e alinhamento de texto preservados da etapa anterior. */

/* Rolagem funcional sem barra lateral visível. */
html { scrollbar-width: none; }
body { -ms-overflow-style: none; }
html::-webkit-scrollbar,
body::-webkit-scrollbar { display: none; width: 0; height: 0; }

.site-shell {
  visibility: hidden;
  opacity: 0;
  transition: opacity 650ms cubic-bezier(.22, 1, .36, 1);
}
.site-shell.is-visible { visibility: visible; opacity: 1; }

.hero {
  position: relative;
  isolation: isolate;
  height: max(720px, 100svh);
  overflow: clip;
  background: #E4E5F2;
  color: #0E0F28;
}

/* Transição visual Hero → Projetos: o White Blue se dissolve em
   azul-marinho e termina no preto da galeria, sem faixa ou corte seco.
   A camada é puramente decorativa: não intercepta o 3D ou a rolagem. */
.hero::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  height: clamp(180px, 27svh, 300px);
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(228, 229, 242, 0) 0%,
    rgba(177, 183, 211, .20) 20%,
    rgba(80, 87, 139, .53) 45%,
    rgba(14, 15, 40, .90) 78%,
    #000000 100%
  );
}

.hero__spline-stage {
  position: absolute;
  z-index: 1;
  /* A cena ocupa todo o Hero, inclusive a area atras do header fixo. */
  inset: 0;
  overflow: hidden;
  background: transparent;
}

/* Spline Viewer oficial: mostra a cena assim que o componente a renderizar.
   Não esconder o canvas com opacity:0 (isso deixava o Hero vazio se a importação falhasse). */
.hero__spline-viewer,
.hero__spline-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent !important;
  opacity: 1; /* Sem camada translúcida: preserva as cores originais do Spline. */
  touch-action: pan-y;
}
.hero__spline-viewer[hidden] { display: none; }
.hero__spline-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.hero__spline-status {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(228,229,242,.94);
  color: #555B77;
  font: 400 11px/1.4 var(--font-ui);
  text-align: center;
  z-index: 5;
  max-width: min(92%, 460px);
}
.hero__spline-status[hidden] { display: none; }

.hero__copy {
  position: absolute;
  z-index: 3;
  inset: 0;
  width: min(100%, 520px);
  margin: 0 auto;
  padding: calc(var(--header-height, 106px) + 22px) 24px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 14px;
  pointer-events: none;
}
.hero__eyebrow {
  margin: 0 0 1px;
  font: 400 11px/1.25 var(--font-ui);
  letter-spacing: .19em;
  text-transform: uppercase;
  color: #686D8A;
}
.hero__title {
  margin: 0;
  max-width: 440px;
  font: 400 clamp(31px, 2.7vw, 41px)/1.12 var(--font-display);
  letter-spacing: -.022em;
  text-wrap: balance;
  text-transform: none;
  color: #0E0F28;
}
.hero__description {
  max-width: 390px;
  margin: 1px 0 0;
  font: 400 clamp(12px, .96vw, 14px)/1.62 var(--font-ui);
  color: #555B77;
  text-wrap: pretty;
}
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 6px 1px 8px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(14,15,40,.55);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  color: #0E0F28;
  text-decoration: none;
  font: 400 14px/1.3 var(--font-display);
  letter-spacing: .065em;
  pointer-events: auto;
  transition: color 250ms ease, border-color 250ms ease, letter-spacing 280ms ease;
}
.hero__cta:hover { color: #2A3EF4; border-color: #2A3EF4; letter-spacing: .11em; }
.hero__cta:focus-visible { outline: 2px solid #2A3EF4; outline-offset: 5px; }

/* O header mantém contraste sobre o fundo claro do Hero. */
.site-header.is-on-light-hero:not(.is-on-projects) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.site-header.is-on-light-hero:not(.is-on-projects) .site-header__logo,
.site-header.is-on-light-hero:not(.is-on-projects) .site-header__link { color: #0E0F28; }
.site-header.is-on-light-hero:not(.is-on-projects) .site-header__link:hover { color: #2A3EF4; }
body.is-on-light-hero:not(.is-on-projects) .language__button { color: #737792; }
body.is-on-light-hero:not(.is-on-projects) .language__button:hover,
body.is-on-light-hero:not(.is-on-projects) .language__button.is-current { color: #0E0F28; }
body.is-on-light-hero:not(.is-on-projects) .language__separator { color: #989DB3; }

@media (max-width: 760px) {
  .hero { height: max(690px, 100svh); }
  /* Gradiente mais curto no celular, para não escurecer o CTA. */
  .hero::after { height: clamp(120px, 19svh, 175px); }
  .hero__copy { width: 100%; padding: calc(var(--header-height, 89px) + 24px) 23px 62px; gap: 13px; }
  .hero__eyebrow { font-size: 10px; letter-spacing: .13em; }
  .hero__title { max-width: 350px; font-size: clamp(27px, 7.5vw, 34px); line-height: 1.13; letter-spacing: -.016em; }
  .hero__description { max-width: 305px; font-size: 12px; line-height: 1.6; }
  .hero__cta { font-size: 12px; margin-top: 10px; gap: 8px; }
  .hero__spline-viewer, .hero__spline-canvas { opacity: 1; }
  .site-header.is-on-light-hero:not(.is-on-projects) .site-header__toggle {
    background: #0E0F28;
    color: #E4E5F2;
    border-color: transparent;
  }
  body.menu-is-open .site-header.is-on-light-hero:not(.is-on-projects) { background: var(--black-blue); backdrop-filter: none; }
  body.menu-is-open .site-header.is-on-light-hero:not(.is-on-projects) .site-header__toggle { background: #E4E5F2; color: #0E0F28; }
  body.menu-is-open .site-header.is-on-light-hero:not(.is-on-projects) .site-header__logo { color: #E4E5F2; }
}
@media (max-width: 370px) {
  .hero__title { font-size: 26px; }
  .hero__copy { padding-inline: 19px; }
}
@media (min-width: 761px) and (max-height: 820px) {
  .hero__copy { padding-top: calc(var(--header-height, 106px) + 16px); padding-bottom: 42px; gap: 10px; }
  .hero__title { font-size: clamp(30px, 2.6vw, 38px); line-height: 1.14; }
  .hero__description { max-width: 430px; }
  .hero__cta { margin-top: 9px; font-size: 13px; }
}
@media (max-width: 760px) {
  .hero__copy { padding-top: calc(var(--header-height, 89px) + 16px); padding-bottom: 48px; }
}
@media (min-width: 761px) and (max-height: 740px) {
  .hero { height: max(620px, 100svh); }
  .hero__copy { padding-bottom: 38px; gap: 10px; }
  .hero__cta { margin-top: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__spline-viewer, .hero__spline-canvas { transition: none; }
}

/* No celular, arrastar para os lados manipula o 3D; deslizar para cima/baixo
   mantém a rolagem normal da página. */
.hero__spline-stage { touch-action: pan-y; }
@media (max-width: 760px) {
  .hero__spline-canvas, .hero__spline-viewer {
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
  }
  .hero__spline-stage.is-touch-rotating { cursor: grabbing; }
}

/* Superfície de controle: separada do canvas para não depender dos eventos
   internos do Spline. Somente gestos horizontais giram o objeto; o gesto
   vertical permanece nativo (rolagem da página). */
.hero__spline-drag-surface {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  background: transparent;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
@media (max-width: 1024px), (pointer: coarse) {
  .hero__spline-drag-surface { display: block; cursor: grab; }
  .hero__spline-drag-surface.is-dragging { cursor: grabbing; }
}

/* HEADER SOBRE O HERO — completamente transparente, inclusive depois de
   pequenos movimentos de scroll. As regras de vidro do footer.css usam
   !important, entao este estado precisa vence-las sem afetar outros setores.
   No menu mobile aberto, o fundo escuro original continua prevalecendo. */
body:not(.menu-is-open) #site-header.site-header.is-on-light-hero {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}

/* VORA / Header mobile sobre o Spline
   No Safari iOS, a cena precisa ocupar o espaço ATRÁS do cabeçalho;
   o fundo do menu aberto permanece opaco. */
@media (max-width: 760px) {
  .hero .hero__spline-stage {
    inset: 0 !important;
    inset-block-start: 0 !important;
    top: 0 !important;
    height: 100%;
  }

  body:not(.menu-is-open) #site-header.site-header.is-on-light-hero {
    background: transparent !important;
    background-color: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
  }
}
