/**
 * hero.css — Estilos da Nova Hero Section Cinematográfica (Etapa 02/03)
 * SETTA Comunicação Visual
 * Estrutura:
 *   .hero-section (Container principal 100vw / 100svh)
 *   ├── .hero-background (Camada absoluta de vídeo com GPU)
 *   ├── .hero-gradient-overlay (Gradiente focal cinematográfico discreto)
 *   └── .hero-content (Tipografia editorial sobreposta aos frames)
 *       ├── .hero-headline (Texto principal animado via SplitText)
 *       └── .hero-cta-action (Ação de duas palavras "FAÇA ACONTECER ↗")
 */

:root {
  --hero-video-object-position: center center;
  --hero-z-background: 1;
  --hero-z-overlay: 2;
  --hero-z-content: 3;
}

/* 1. SEÇÃO HERO PRINCIPAL */
.hero-section {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #020C1C;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-section.is-ready {
  opacity: 1;
  pointer-events: auto;
}

/* 2. BACKGROUND CINEMATOGRÁFICO DE ALTA PERFORMANCE */
.hero-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: var(--hero-z-background);
  pointer-events: none;
  user-select: none;
  background-color: #020C1C;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%) translateZ(0);
  object-fit: cover;
  object-position: var(--hero-video-object-position);
  display: block;
  border: none;
  outline: none;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  opacity: 1;
  transition: opacity 0.6s ease;
}

/* 3. GRADIENTE FOCAL CINEMATOGRÁFICO DISCRETO (0.20 A 0.35 DE INTENSIDADE) */
.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--hero-z-overlay);
  pointer-events: none;
  opacity: 0;
  background-color: #020C1C;
  will-change: opacity;
}

/* Borda inferior escura anterior desativada para dar lugar à fusão com a seção branca */
.hero-gradient-overlay::after {
  display: none;
}

/* 3.1 GRADIENTE DE FUSÃO SUAVE ENTRE HERO E PRIMEIRA SECTION
   Transição visual gradual: VÍDEO ESCURO ↓ GRADIENTE SUAVE ↓ SECTION BRANCA
   Sem linha de separação, sem corte brusco, sem bloco sobreposto. */
.hero-bottom-blend {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: clamp(180px, 26vh, 320px);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.015) 12%,
    rgba(255, 255, 255, 0.05) 24%,
    rgba(255, 255, 255, 0.12) 38%,
    rgba(255, 255, 255, 0.24) 52%,
    rgba(255, 255, 255, 0.44) 68%,
    rgba(255, 255, 255, 0.70) 82%,
    rgba(255, 255, 255, 0.90) 93%,
    #FFFFFF 100%
  );
  pointer-events: none;
  z-index: 4;
}

/* 4. CAMADA TEXTUAL SOBREPOSTA AOS FRAMES */
.hero-content {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: auto;
  margin-top: calc(var(--header-height-desktop) * 0.35);
  box-sizing: border-box;
}

/* 5. TIPOGRAFIA PRINCIPAL (HEADLINE EDITORIAL: IDEIAS QUE / GANHAM FORMA RIGOROSAMENTE CENTRALIZADO) */
.hero-headline {
  font-family: var(--font-headline);
  font-size: clamp(34px, 5.6vw, 82px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0 auto;
  padding: 0;
  user-select: none;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: auto;
  z-index: 10;
  visibility: visible !important;
}

/* Quebra intencional e obrigatória em duas linhas editoriais */
.hero-headline .hero-headline-line {
  display: block;
  white-space: nowrap;
  background: linear-gradient(180deg, #FFFFFF 68%, #F7D417 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Suporte aos elementos divididos pelo SplitText (Palavras e Caracteres) */
.hero-headline .hero-word {
  display: inline-block;
  white-space: nowrap;
  padding: 0 0.08em;
  visibility: visible;
}

/* Revelação letra por letra com o gradiente cinematográfico SETTA (#FFFFFF -> #F7D417) */
.hero-headline .hero-char {
  display: inline-block;
  background: linear-gradient(180deg, #FFFFFF 68%, #F7D417 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  will-change: transform, opacity, filter;
  visibility: visible;
}

/* 5.1 MINI DESCRIÇÃO EDITORIAL (ENTRE TÍTULO E BOTÃO) */
.hero-subheadline {
  font-family: var(--font-primary);
  font-size: clamp(13.5px, 1.1vw, 16.5px);
  font-weight: 450;
  line-height: 1.55;
  letter-spacing: 0.03em;
  color: #FFFFFF !important;
  text-align: center;
  max-width: 52ch;
  margin: clamp(14px, 2vh, 22px) auto 0;
  padding: 0;
  user-select: none;
  position: relative;
  z-index: 10;
  visibility: visible !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 2px 14px rgba(0, 0, 0, 0.9), 0 0 2px rgba(255, 255, 255, 0.4);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Suporte aos caracteres divididos pelo SplitText para animação letra por letra */
.hero-subheadline .hero-sub-char {
  display: inline-block;
  will-change: transform, opacity;
  white-space: pre-wrap;
  color: #FFFFFF !important;
}

.hero-subheadline .hero-sub-word {
  display: inline-block;
  white-space: nowrap;
}

/* 6. BOTÃO SÓLIDO UNIFICADO (.setta-btn) — FAÇA ACONTECER ↗ / ENTRAR EM CONTATO ↗ */
.setta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 32px;
  background-color: #F7D417;
  color: #00214D;
  font-family: var(--font-primary);
  font-size: clamp(12.5px, 1.05vw, 14.5px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  outline: none;
  overflow: visible;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  user-select: none;
  transition: background-color 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.32s ease;
  will-change: background-color, color, transform;
}

.hero-cta-action.setta-btn {
  margin-top: clamp(24px, 3.2vh, 38px);
}

.setta-btn:hover {
  background-color: #1662C4;
  color: #FFFFFF;
  box-shadow: 0 6px 22px rgba(22, 98, 196, 0.35);
}

.setta-btn:hover .btn-frame-outer {
  opacity: 1;
  transform: scale(1);
}

.setta-btn:hover .btn-arrow {
  transform: translate(3px, -3px);
}

.setta-btn:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 4px;
}

.setta-btn .btn-inner {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.setta-btn .btn-text {
  display: inline-block;
  color: inherit;
}

.setta-btn .btn-arrow {
  display: inline-block;
  font-size: 1.15em;
  line-height: 1;
  color: inherit;
  will-change: transform;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Moldura Externa Retangular Flutuante e Animada */
.setta-btn .btn-frame-outer {
  position: absolute;
  inset: -6px;
  border: 1.5px solid #1662C4;
  border-radius: 9px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transform: scale(0.90);
  will-change: transform, opacity;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 7. RESPONSIVIDADE (OBJECT POSITION & BREAKPOINTS) */
@media (min-width: 1920px) {
  :root {
    --hero-video-object-position: center center;
  }
}

@media (max-width: 1440px) {
  :root {
    --hero-video-object-position: center center;
  }
}

@media (max-width: 1366px) {
  :root {
    --hero-video-object-position: center center;
  }
}

@media (max-width: 768px) {
  :root {
    --hero-video-object-position: center center;
  }
  .hero-content {
    padding: 0 16px;
    margin-top: calc(var(--header-height-mobile) * 0.4);
  }
  .hero-headline {
    font-size: clamp(24px, 6.8vw, 38px);
    line-height: 1.08;
  }
  .hero-subheadline {
    font-size: clamp(13px, 3.4vw, 15px);
    padding: 0 8px;
  }
  .hero-cta-action.setta-btn {
    padding: 12px 26px;
    font-size: 13px;
  }
}

@media (max-width: 430px) {
  :root {
    --hero-video-object-position: center 48%;
  }
  .hero-headline {
    font-size: clamp(22px, 6.4vw, 32px);
  }
}

/* Otimização específica para Mobile Landscape (dispositivos deitados) */
@media (max-height: 520px) and (orientation: landscape) {
  .hero-content {
    margin-top: calc(var(--header-height-mobile) * 0.3);
    padding: 0 20px;
  }
  .hero-headline {
    font-size: clamp(19px, 6.2vh, 26px);
    line-height: 1.05;
  }
  .hero-subheadline {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
    max-width: 44ch;
  }
  .hero-cta-action.setta-btn {
    margin-top: 10px;
    padding: 8px 18px;
    font-size: 11px;
  }
}

/* 8. ACESSIBILIDADE — PREFERS-REDUCED-MOTION */
@media (prefers-reduced-motion: reduce) {
  .hero-section,
  .hero-gradient-overlay,
  .hero-cta-action,
  .hero-cta-arrow {
    transition: none !important;
  }
  .hero-video {
    animation: none !important;
  }
}
