/* ==========================================================================
   HERO & ABERTURA — PRIMEIRA VIEWPORT COMPLETA MSA
   Fundo Branco (#FFFFFF), Logo Pequena, Título 100% Preto (500),
   Hero ocupa ~100svh, textos em 2 linhas máx, imagem grande e protagonista.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Abertura com Logo Pequena Centralizada
   Respiro controlado — Redução e esmaecimento sutil no scroll
   -------------------------------------------------------------------------- */
.brand-opening {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding-top: clamp(1.5rem, 2.5vh, 2.25rem);
  padding-bottom: clamp(1rem, 1.5vh, 1.5rem);
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  position: relative;
  z-index: 20;

  /* Interpolação sutil via JS durante o scroll */
  transform: scale(var(--logo-scale, 1)) translateY(var(--logo-translate-y, 0px));
  opacity: var(--logo-opacity, 1);
  will-change: transform, opacity;
  transition: opacity 0.04s linear;
}

.brand-opening.is-hidden {
  pointer-events: none;
  visibility: hidden;
}

.brand-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  width: clamp(92px, 7.5vw, 108px);
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   2. Hero — Primeira Viewport Completa
   Ocupa toda a altura restante após o logo para preencher a primeira tela.
   Conteúdo centralizado verticalmente dentro desse espaço.
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  width: 100%;
  background-color: var(--section-bg, #F2EFEB);
  color: var(--section-text, #000000);
  overflow: hidden;

  /* Ocupa o restante da viewport após o logo (~60px de logo area) */
  min-height: calc(100svh - 72px);
  display: flex;
  align-items: center;
  padding-top: clamp(1.5rem, 2vh, 2.5rem);
  padding-bottom: clamp(2rem, 3vh, 3.5rem);
}

.hero-container {
  width: 100%;
  max-width: 1680px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.5rem, 3vw, 3rem);
  padding-right: clamp(1.5rem, 3vw, 3rem);
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: clamp(2rem, 3vw, 3rem);
}

/* Desktop: Imagem grande e protagonista à direita + Título em 2 linhas equilibrado */
@media (min-width: 992px) {
  .hero-container {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: clamp(1.5rem, 2.5vw, 3rem);
    align-items: center;
  }
}

@media (min-width: 1200px) {
  .hero-container {
    grid-template-columns: minmax(440px, 1fr) minmax(500px, 1.35fr);
  }
}

/* --------------------------------------------------------------------------
   3. Coluna Esquerda: Conteúdo Principal
   Bloco textual amplo — Título em 2 linhas, Subtítulo em 2 linhas, 100% Preto
   -------------------------------------------------------------------------- */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  position: relative;
  z-index: 2;
  justify-self: start;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 2.65vw, 3.25rem);
  font-weight: var(--font-weight-medium); /* 500 */
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: #000000;
  margin: 0;
}

.hero-highlight {
  font-family: inherit;
  font-style: normal;
  font-weight: var(--font-weight-semibold, 600);
  color: var(--color-accent-blue, #075bf5);
  letter-spacing: inherit;
}

/* No desktop, garante que as 2 linhas não quebrem em 3 ou 4 linhas */
@media (min-width: 992px) {
  .hero-title {
    width: 100%;
    max-width: 100%;
  }
}

/* Quebra para 2 linhas no desktop */
.hero-title-break {
  display: block;
}

@media (max-width: 991px) {
  .hero-title-break {
    display: none;
  }
}

.hero-description {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 1.1vw, 1.175rem);
  font-weight: var(--font-weight-regular); /* 400 */
  line-height: 1.6;
  color: var(--section-muted, #555555);
  margin-top: 1.25rem;
  max-width: 500px;
  letter-spacing: -0.01em;
}

.hero-cta-wrapper {
  margin-top: 1.75rem;
  width: 100%;
}

@media (min-width: 560px) {
  .hero-cta-wrapper {
    width: auto;
  }
}

/* CTA Principal Monocromático */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background-color: var(--section-btn-bg, #000000);
  color: var(--section-btn-text, #FFFFFF);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: var(--font-weight-medium);
  line-height: 1;
  letter-spacing: -0.01em;
  padding: 1.15rem 2.25rem;
  min-height: 52px;
  border-radius: var(--radius-button, 14px);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  width: 100%;
}

@media (min-width: 560px) {
  .btn-cta {
    width: auto;
  }
}

.btn-cta:hover {
  background-color: var(--section-btn-hover-bg, #222222);
  transform: translateY(-1px);
}

.btn-cta:hover .btn-cta-icon {
  transform: translateX(3px);
}

.btn-cta:active {
  transform: translateY(0);
}

.btn-cta-icon {
  display: inline-block;
  vertical-align: middle;
  transition: transform var(--transition-fast);
  stroke: currentColor;
}

/* --------------------------------------------------------------------------
   4. Coluna Direita: Imagem Principal Grande
   SEM MOLDURA. SEM BORDA. SEM CARD. SEM FUNDO CINZA. SEM CAIXA.
   ~10-15% maior que a versão anterior, dentro do padding simétrico.
   -------------------------------------------------------------------------- */
.hero-visual {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  background: transparent;
  border: none;
  box-shadow: none;
}

.hero-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

/* Desktop: imagem grande, volumosa e protagonista com escala fluida */
@media (min-width: 992px) {
  .hero-image {
    width: 100%;
    max-width: 100%;
  }
}

@media (min-width: 1200px) {
  .hero-image {
    width: 112%;
    max-width: 112%;
  }
}

@media (min-width: 1400px) {
  .hero-image {
    width: 120%;
    max-width: 120%;
  }
}

/* --------------------------------------------------------------------------
   5. Animações de Revelação Coreografadas do Hero:
   -------------------------------------------------------------------------- */
html.intro-running .hero-kicker,
html.intro-running .hero-title,
html.intro-running .hero-description,
html.intro-running .hero-cta-wrapper {
  opacity: 0;
  transform: translateX(clamp(-320px, -50vw, -550px));
}

html.intro-running .hero-visual {
  opacity: 0;
  transform: translateY(clamp(360px, 70vh, 700px));
}

/* Coluna Esquerda: Deslize fluido e cadenciado a partir da esquerda */
.hero-section.hero-animate-in .hero-kicker,
html.intro-complete .hero-section:not(.hero-instant-show) .hero-kicker {
  animation: heroTextLeftEntrance 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.02s both;
  will-change: transform, opacity;
}

.hero-section.hero-animate-in .hero-title,
html.intro-complete .hero-section:not(.hero-instant-show) .hero-title {
  animation: heroTextLeftEntrance 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
  will-change: transform, opacity;
}

.hero-section.hero-animate-in .hero-description,
html.intro-complete .hero-section:not(.hero-instant-show) .hero-description {
  animation: heroTextLeftEntrance 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
  will-change: transform, opacity;
}

.hero-section.hero-animate-in .hero-cta-wrapper,
html.intro-complete .hero-section:not(.hero-instant-show) .hero-cta-wrapper {
  animation: heroTextLeftEntrance 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
  will-change: transform, opacity;
}

/* Coluna Direita: Imagem subindo majestosamente do final da tela */
.hero-section.hero-animate-in .hero-visual,
html.intro-complete .hero-section:not(.hero-instant-show) .hero-visual {
  animation: heroVisualDelicateEntrance 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
  will-change: transform, opacity;
}

.hero-section.hero-instant-show .hero-kicker,
.hero-section.hero-instant-show .hero-title,
.hero-section.hero-instant-show .hero-description,
.hero-section.hero-instant-show .hero-cta-wrapper,
.hero-section.hero-instant-show .hero-visual {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

@keyframes heroTextLeftEntrance {
  0% {
    opacity: 0;
    transform: translateX(clamp(-320px, -50vw, -550px));
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes heroVisualDelicateEntrance {
  0% {
    opacity: 0;
    transform: translateY(clamp(360px, 70vh, 700px));
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.intro-running .hero-kicker,
  html.intro-running .hero-title,
  html.intro-running .hero-description,
  html.intro-running .hero-cta-wrapper,
  html.intro-running .hero-visual,
  .hero-section.hero-animate-in .hero-kicker,
  .hero-section.hero-animate-in .hero-title,
  .hero-section.hero-animate-in .hero-description,
  .hero-section.hero-animate-in .hero-cta-wrapper,
  .hero-section.hero-animate-in .hero-visual,
  html.intro-complete .hero-section .hero-kicker,
  html.intro-complete .hero-section .hero-title,
  html.intro-complete .hero-section .hero-description,
  html.intro-complete .hero-section .hero-cta-wrapper,
  html.intro-complete .hero-section .hero-visual {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    will-change: auto !important;
  }
}

/* --------------------------------------------------------------------------
   6. Adaptações Responsivas (Mobile & Tablet)
   -------------------------------------------------------------------------- */

/* Tablet: Hero ainda ocupa a viewport mas em coluna única */
@media (max-width: 991px) {
  .hero-section {
    min-height: auto; /* no mobile/tablet, conteúdo define a altura */
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
  }

  .brand-opening {
    padding-top: 1.5rem;
    padding-bottom: 1.25rem;
  }

  .hero-container {
    gap: 2.5rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-title {
    font-size: clamp(2.15rem, 7vw, 2.75rem);
    line-height: 1.12;
    max-width: 100%;
  }

  .hero-description {
    font-size: 1.05rem;
    margin-top: 1rem;
    max-width: 100%;
  }

  .hero-cta-wrapper {
    margin-top: 1.5rem;
  }

  .btn-cta {
    width: 100%;
  }

  .hero-visual {
    margin-top: 0.5rem;
    justify-content: center;
  }

  .hero-image {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .brand-opening {
    padding-top: 1.25rem;
    padding-bottom: 1rem;
  }

  .brand-logo {
    width: 92px;
  }

  .hero-container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    gap: 2rem;
  }

  .hero-title {
    font-size: clamp(1.75rem, 7.5vw, 2.15rem);
    line-height: 1.15;
  }

  .hero-description {
    font-size: 0.9875rem;
    line-height: 1.58;
  }

  .btn-cta {
    padding: 1.05rem 1.75rem;
    font-size: 1rem;
  }
}
