/* =====================================================================
   HERO CINEMATOGRÁFICO — Instituto Mosaico
   Canvas mosaico animado + reveal cinemático + paralaxe
   ===================================================================== */

/* --- HERO WRAPPER ---------------------------------------------------- */
.hero-cinematic {
  position: relative;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  background: #0a1a0f;       /* preto-verde profundo */
  display: flex;
  align-items: center;
}

/* Canvas de fundo — mosaico animado */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#hero-canvas.loaded { opacity: 1; }

/* Overlay de gradiente sobre o canvas */
.hero-cinematic__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to right,
      rgba(10, 26, 15, 0.92) 0%,
      rgba(10, 26, 15, 0.75) 55%,
      rgba(10, 26, 15, 0.30) 100%
    ),
    linear-gradient(
      to top,
      rgba(10, 26, 15, 0.80) 0%,
      transparent 45%
    );
  pointer-events: none;
  z-index: 1;
}

/* --- CONTEÚDO DO HERO ----------------------------------------------- */
.hero-cinematic__content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin-inline: auto;
  padding: var(--s20) var(--s8) var(--s16);
  width: 100%;
}

/* Eyebrow com linha animada */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--green-300);
  margin-bottom: var(--s6);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.hero-eyebrow.visible { opacity: 1; transform: none; }
.hero-eyebrow__line {
  display: block;
  width: 0;
  height: 2px;
  background: var(--green-300);
  border-radius: 2px;
  transition: width 0.8s 0.3s ease;
}
.hero-eyebrow.visible .hero-eyebrow__line { width: 32px; }

/* Título split reveal */
.hero-cinematic__title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-style: normal;
  font-optical-sizing: auto;
  line-height: 0.90;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: var(--s6);
  font-size: clamp(4rem, 9vw, 8.5rem);
}

.hero-word {
  display: inline-block;
  overflow: hidden;
  margin-right: 0.06em;
  vertical-align: bottom;
}

/* No desktop: quebra de linha antes de "alizando" */
.hero-word--break { display: block; margin-right: 0; }

.hero-word__inner {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.85s var(--ease-spring), opacity 0.6s ease;
}
.hero-word__inner.visible {
  transform: translateY(0);
  opacity: 1;
}

.hero-cinematic__title em {
  color: var(--amber-300);
  font-style: italic;
}

/* Subtítulo */
.hero-cinematic__sub {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  color: rgba(255,255,255,0.65);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: var(--s8);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.hero-cinematic__sub.visible { opacity: 1; transform: none; }

/* Ações */
.hero-cinematic__actions {
  display: flex;
  gap: var(--s4);
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.hero-cinematic__actions.visible { opacity: 1; transform: none; }

/* PIX inline no hero */
.hero-pix {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--r-md);
  padding: var(--s3) var(--s5);
  margin-top: var(--s8);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hero-pix.visible { opacity: 1; transform: none; }
.hero-pix__icon { color: var(--amber-300); }
.hero-pix__icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; display: block; }
.hero-pix__label { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--green-300); display: block; }
.hero-pix__key   { font-family: var(--font-body); font-size: 0.88rem; font-weight: 700; color: #fff; display: block; }

/* --- FOTO PANEL --- */
.hero-photo-panel {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 42%;
  overflow: hidden;
  z-index: 0;
}
.hero-photo-panel img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
  transition: transform 12s ease;
}
.hero-photo-panel img.loaded { transform: scale(1); }
.hero-photo-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10,26,15,0.75) 0%, transparent 60%);
  z-index: 1;
}

/* --- STATS FLUTUANTES ------------------------------------------------ */
.hero-stats {
  position: absolute;
  bottom: var(--s12);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-xl);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.hero-stats.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hero-stat {
  text-align: center;
  padding: var(--s4) var(--s8);
  border-right: 1px solid rgba(255,255,255,0.10);
}
.hero-stat:last-child { border-right: none; }
.hero-stat__num {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  font-optical-sizing: auto;
  color: var(--amber-300);
  line-height: 1;
  letter-spacing: -0.04em;
}
.hero-stat__lbl {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-top: 3px;
}

/* --- SCROLL INDICATOR --- */
.hero-scroll {
  position: absolute;
  bottom: var(--s8);
  right: var(--s8);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  opacity: 0;
  animation: heroScrollIn 1s 2.5s ease forwards;
}
@keyframes heroScrollIn { to { opacity: 1; } }

.hero-scroll__line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
  animation: scrollPulse 2s 2.5s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50%       { transform: scaleY(0.5); opacity: 0.2; }
}

.hero-scroll__text {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  writing-mode: vertical-rl;
  margin-top: var(--s2);
}

/* --- CURSOR PARTICLE ------------------------------------------------ */
.cursor-particle {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  border-radius: 50%;
  mix-blend-mode: screen;
  transition: opacity 0.3s;
  opacity: 0;
}

/* --- RESPONSIVO ------------------------------------------------------ */
@media (max-width: 900px) {
  .hero-photo-panel {
    width: 100%;
    position: absolute;
    inset: 0;
    opacity: 0.18;     /* fundo sutil, não remove */
  }
  .hero-cinematic__overlay {
    background:
      linear-gradient(to bottom, rgba(10,26,15,0.85) 50%, rgba(10,26,15,0.95) 100%);
  }
  .hero-stats { width: 92%; font-size: 0.85rem; }
}

@media (max-width: 768px) {
  /* Banner topo: 1 linha */
  .banner-top {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    padding: var(--s2) var(--s3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Hero: título natural sem hífen */
  .hero-cinematic { min-height: 100svh; }

  .hero-cinematic__title {
    font-size: clamp(2.8rem, 12vw, 4rem);
    line-height: 1.0;
    letter-spacing: -0.02em;
  }

  /* Remove hifenação artificial — mostra título simples */
  .hero-word { display: inline; margin-right: 0.08em; overflow: visible; }
  .hero-word--break { display: inline; }   /* volta a inline no mobile */
  .hero-word__inner { display: inline; transform: none; opacity: 1; }

  .hero-cinematic__content {
    padding: var(--s16) var(--s5) var(--s10);
  }

  .hero-cinematic__sub {
    font-size: 0.95rem;
    margin-bottom: var(--s6);
  }

  .hero-cinematic__actions {
    flex-direction: column;
    gap: var(--s3);
  }
  .hero-cinematic__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-pix {
    width: 100%;
    margin-top: var(--s6);
  }

  /* Stats: grade 2x2 no mobile */
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: var(--r-lg);
    width: calc(100% - var(--s8));
    bottom: var(--s5);
  }
  .hero-stat { border-right: none !important; border-bottom: 1px solid rgba(255,255,255,0.10); }
  .hero-stat:nth-child(1), .hero-stat:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,0.10); }
  .hero-stat:nth-child(1), .hero-stat:nth-child(3) { border-right: 1px solid rgba(255,255,255,0.10) !important; }
  .hero-stat__num { font-size: 1.6rem; }
  .hero-stat { padding: var(--s4); }

  /* Canvas: mantido mas mais leve */
  #hero-canvas { opacity: 0.7; }

  .hero-scroll { display: none; }
}

@media (max-width: 480px) {
  .hero-cinematic__title { font-size: clamp(2.4rem, 11vw, 3.2rem); }
  .banner-top { font-size: 0.58rem; }
}
