/* Header Desktop da SETTA Comunicação Visual (Etapa 02) */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height-desktop);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease,
              background-color 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              backdrop-filter 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              -webkit-backdrop-filter 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              border-bottom-color 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-header.is-visible {
  opacity: 1;
  pointer-events: auto !important;
}

/* Estado com Efeito Vidro Transparente (Glassmorphism) ao Scrollar */
.site-header.is-scrolled {
  background-color: rgba(6, 14, 28, 0.28);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Grid em 3 Zonas Equilibradas (Esquerda: Marca | Centro: Nav | Direita: CTA) */
.header-container {
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 clamp(28px, 2.8vw, 40px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  pointer-events: auto;
}

/* 1. Bloco Marca (S / SETTA) */
.header-brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  height: 100%;
  user-select: none;
}

.header-brand:focus-visible {
  outline: 2px solid var(--setta-yellow);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Slot do S (Âncora do S definitivo) */
.brand-s-slot {
  position: relative;
  height: var(--header-slot-height-desktop);
  aspect-ratio: var(--s-aspect-ratio);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-s-svg {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
}

/* Cores Estritas do S.svg definitivo (Branco #FEFEFE + Amarelo #F7D417) */
.s-def-white {
  fill: #FEFEFE !important;
}

.s-def-yellow {
  fill: #F7D417 !important;
}

/* Slot do ETTA (Controlado por scroll — alinhamento próximo para formar SETTA) */
.brand-etta-slot {
  position: relative;
  height: calc(var(--header-slot-height-desktop) * 0.72);
  aspect-ratio: var(--etta-aspect-ratio);
  display: flex;
  align-items: center;
  margin-left: -4px;
  margin-top: 1px;
  opacity: 0;
  transform: translateX(-10px);
  will-change: transform, opacity;
  pointer-events: none;
  flex-shrink: 0;
}

.etta-svg-img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: contain;
}

/* 2. Bloco Central: Navegação com Amplo Respiro */
.header-nav {
  justify-self: center;
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  display: inline-flex;
  align-items: center;
}

.nav-link {
  font-family: var(--font-primary);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #FFFFFF !important;
  text-decoration: none;
  padding: 6px 10px;
  position: relative;
  opacity: 0;
  transform: translateY(-6px);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.nav-link-text {
  display: inline-block;
  color: #FFFFFF !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75), 0 0 1px rgba(255, 255, 255, 0.6);
  will-change: transform, color;
  transition: color 0.26s ease, transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
  will-change: transform;
  transition: transform 0.30s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link[data-hover-color="#F7D417"]:hover .nav-link-text,
.nav-link.is-active[data-hover-color="#F7D417"] .nav-link-text {
  color: #F7D417 !important;
  transform: scale(1.035);
}

.nav-link[data-hover-color="#1662C4"]:hover .nav-link-text,
.nav-link.is-active[data-hover-color="#1662C4"] .nav-link-text {
  color: #4C9AFF !important;
  transform: scale(1.035);
}

.nav-link:hover .nav-link-line,
.nav-link.is-active .nav-link-line {
  transform: scaleX(1);
}

.nav-link:focus-visible {
  outline: 2px solid var(--setta-yellow);
  outline-offset: 4px;
  border-radius: 2px;
}

/* 3. Bloco Direita: CTA Editorial Refinado */
/* 3. Bloco Direita: CTA Editorial Refinado */
.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Botão do Header compartilhado com o componente .setta-btn */
.header-cta-btn.setta-btn {
  margin-top: 0;
  padding: 9px 18px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(247, 212, 23, 0.16);
  opacity: 0;
  transform: translateY(-6px);
  flex-shrink: 0;
}

.header-cta-btn.setta-btn .btn-frame-outer {
  inset: -5px;
  border-radius: 8px;
}

.header-cta-btn.setta-btn:active {
  transform: translateY(0) scale(0.99);
}

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

/* Botão de Toggle do Menu Mobile (oculto no desktop) */
.header-mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  z-index: 1002;
  outline: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}

.header-mobile-toggle:active {
  transform: scale(0.94);
}

.header-mobile-toggle .toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: #FEFEFE;
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.header-mobile-toggle.is-open .toggle-bar:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}

.header-mobile-toggle.is-open .toggle-bar:nth-child(2) {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Elementos do Menu Touch Drawer Mobile (ocultos no desktop) */
.nav-drawer-backdrop,
.nav-drawer-header,
.nav-drawer-cta {
  display: none;
}

/* RESPONSIVIDADE DO HEADER PARA MOBILE E TABLETS (<= 900px) */
@media (max-width: 900px) {
  .site-header {
    height: calc(var(--header-height-mobile, 68px) + var(--safe-area-top, 0px));
    padding-top: var(--safe-area-top, 0px);
  }

  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 max(16px, var(--safe-area-left, 0px)) 0 max(16px, var(--safe-area-right, 0px));
  }

  .brand-s-slot {
    height: var(--header-slot-height-mobile, 36px);
  }

  .brand-etta-slot {
    height: calc(var(--header-slot-height-mobile, 36px) * 0.72);
    margin-left: -3px;
    margin-top: 1px;
  }

  /* Exibe o botão de Menu Touch */
  .header-mobile-toggle {
    display: flex;
  }

  /* CTA compacto no header mobile para liberar espaço */
  .header-cta-btn.setta-btn {
    padding: 8px 14px;
    font-size: 11px;
    letter-spacing: 0.05em;
  }

  /* Gaveta Touch (Drawer) de Navegação Mobile */
  .header-nav {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 10000;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0s linear 0.35s;
    display: block;
    margin: 0;
    padding: 0;
  }

  .header-nav.is-open {
    visibility: visible;
    pointer-events: auto;
    transition: visibility 0s linear 0s;
  }

  /* Fundo escurecido cinematográfico com blur */
  .nav-drawer-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background-color: rgba(0, 18, 43, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.35s ease;
    cursor: pointer;
  }

  .header-nav.is-open .nav-drawer-backdrop {
    opacity: 1;
  }

  /* Painel deslizante lateral com visual glassmorphism */
  .nav-drawer-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: absolute;
    top: 0;
    right: 0;
    width: min(320px, 84vw);
    height: 100%;
    background-color: rgba(0, 33, 77, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
    padding: calc(20px + var(--safe-area-top, 0px)) 20px calc(24px + var(--safe-area-bottom, 0px));
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 2;
  }

  .header-nav.is-open .nav-drawer-panel {
    transform: translateX(0);
  }

  /* Cabeçalho do Menu Mobile */
  .nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-drawer-title {
    font-family: var(--font-headline);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: var(--setta-yellow);
    text-transform: uppercase;
  }

  .nav-drawer-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #FFFFFF;
    font-size: 1.6rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
  }

  .nav-drawer-close:active {
    transform: scale(0.92);
  }

  /* Lista Vertical de Links Touch */
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 24px 0 auto;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 6px;
    flex-direction: row;
    justify-content: space-between;
    opacity: 1 !important;
    transform: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-link-text {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
  }

  .nav-link:active {
    background-color: rgba(255, 255, 255, 0.08);
  }

  /* CTA dentro do Menu Mobile */
  .nav-drawer-cta {
    display: block;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-drawer-cta-btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header-actions .header-cta-btn {
    display: none; /* No mobile estreito, o CTA fica perfeitamente integrado no Menu Touch */
  }
}

/* Intro Container Principal */
.intro-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  z-index: 150;
  overflow: hidden;
  pointer-events: none;
}

/* Área de Apresentação do Logo */
.logo-viewport {
  position: relative;
  width: var(--logo-max-width);
  aspect-ratio: var(--logo-aspect-ratio);
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Camada do Rabisco SVG Procedural */
.scribble-layer {
  position: absolute;
  inset: -25%;
  width: 150%;
  height: 150%;
  pointer-events: none;
  z-index: 20;
  overflow: visible;
}

.scribble-stroke {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  will-change: stroke-dashoffset, opacity, stroke-width;
}

/* Camada de Linhas Guias e Geometria Blueprint */
.construction-guides-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
}

.guide-line {
  stroke: rgba(0, 33, 77, 0.28);
  stroke-dasharray: 4 6;
  fill: none;
  vector-effect: non-scaling-stroke;
}

.guide-circle {
  stroke: rgba(0, 33, 77, 0.22);
  stroke-dasharray: 6 8;
  fill: none;
  vector-effect: non-scaling-stroke;
}

/* Camada do Logo SVG Oficial */
.official-logo-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 30;
  overflow: visible;
  filter: drop-shadow(0 4px 20px rgba(0, 33, 77, 0.04));
  shape-rendering: geometricPrecision;
  text-rendering: geometricPrecision;
  image-rendering: optimizeQuality;
}

/* Camada de Highlight / Brilho Cinemático */
.highlight-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40;
  mix-blend-mode: overlay;
  opacity: 0;
}

/* Container de Transição e Próxima Etapa */
.future-content-wrapper {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: var(--setta-pure-white);
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.future-content-wrapper.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Overlay de Transição Cinematográfica */
.transition-veil {
  position: fixed;
  inset: 0;
  background-color: var(--setta-navy);
  z-index: 999;
  transform: translateY(100%);
  pointer-events: none;
}

/* Redução de Movimento (Acessibilidade) */
@media (prefers-reduced-motion: reduce) {
  .scribble-layer,
  .construction-guides-layer,
  .highlight-overlay {
    display: none !important;
  }
  .official-logo-svg {
    display: none !important;
  }
  .site-header {
    opacity: 1 !important;
    pointer-events: auto !important;
    transition: none !important;
  }
  .header-s-svg {
    opacity: 1 !important;
  }
  .nav-link,
  .header-cta-btn {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
