/* ==========================================================================
   hero.css
   Hero editorial drenched em vermelho, espelhando a capa da Tabela Parceiros:
   tipografia em pilha de 4 linhas, plate verde atrás de "marca", meta-pill
   top-right, doc id bottom-right, foto da fachada como anchor à direita
   (papel do tigre na capa), trim verde no rodapé. Motion contínuo em vários
   elementos para o hero respirar.
   ========================================================================== */

.hero {
  position: relative;
  background: var(--bg-red);
  color: var(--fg-on-red);
  padding-block:
    clamp(2.25rem, 1.5rem + 2.5vw, 3.75rem)
    clamp(2rem, 1.5rem + 1.5vw, 3rem);
  overflow: clip;
  isolation: isolate;
}

/* Trim verde de 4px no rodapé. */
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--joy);
  z-index: 3;
}

/* ---------------------------------------------------------------------- */
/* Anchors gráficos                                                       */
/* ---------------------------------------------------------------------- */

.hero__bg-asterisk {
  position: absolute;
  top: -8%;
  left: -10%;
  width: clamp(18rem, 12rem + 18vw, 36rem);
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  transform: rotate(-12deg);
}

.hero__burst {
  position: absolute;
  top: clamp(7rem, 5.5rem + 3vw, 10.5rem);
  right: clamp(3rem, 1.5rem + 3vw, 5.5rem);
  width: clamp(3.5rem, 2.5rem + 2.5vw, 6rem);
  z-index: 1;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 8px 18px oklch(48% 0.205 27.5 / 0.50));
}
@media (max-width: 760px) {
  .hero__burst {
    top: 5.5rem;
    right: 1.25rem;
    width: 3rem;
  }
}

/* Tigre — mascote da marca, ancorado no canto inferior direito do hero.
   Motion contínuo definido em motion.css (entry + perpetual breath). */
.hero__tigre {
  position: absolute;
  bottom: clamp(-2rem, -1rem - 1.2vw, -0.5rem);
  right: clamp(-1.5rem, -0.5rem - 1.2vw, 0rem);
  width: clamp(11rem, 7rem + 13vw, 22rem);
  z-index: 1;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 22px 32px oklch(22% 0.105 22 / 0.55));
  transform-origin: bottom right;
  will-change: transform;
}
@media (max-width: 760px) {
  .hero__tigre {
    bottom: -0.75rem;
    right: -1rem;
    width: 9rem;
    opacity: 0.78;
  }
}

/* ---------------------------------------------------------------------- */
/* Inner — grid de 2 colunas (texto + foto)                               */
/* ---------------------------------------------------------------------- */

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  column-gap: clamp(2rem, 1rem + 3vw, 4.5rem);
  row-gap: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
  align-items: center;
}
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  /* Empilhado, a foto vem antes da headline: no celular a imagem é o que
     ancora a mensagem, e a headline sozinha no topo abre a página fria.
     Só a ordem visual muda — o DOM segue lead → visual, então leitor de tela
     e ordem de tabulação continuam na sequência correta. */
  .hero__visual { order: -1; justify-self: center; }
}

.hero__lead {
  display: grid;
  gap: clamp(0.85rem, 0.6rem + 0.85vw, 1.25rem);
  max-width: 38rem;
}

/* ---------------------------------------------------------------------- */
/* Meta pill + doc id (cantos do inner)                                   */
/* ---------------------------------------------------------------------- */

.hero__meta {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 1.5px solid oklch(99% 0.005 27.5 / 0.45);
  background: oklch(48% 0.205 27.5 / 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: var(--w-bold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  z-index: 4;
  white-space: nowrap;
}
@media (max-width: 540px) {
  .hero__meta {
    position: static;
    justify-self: start;
    margin-bottom: 0.25rem;
    grid-column: 1 / -1;
    order: -2;
  }
}

.hero__doc {
  position: absolute;
  bottom: clamp(0.5rem, 0.25rem + 0.5vw, 1rem);
  right: 0;
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: var(--w-bold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: oklch(99% 0.005 27.5 / 0.55);
  z-index: 2;
}
.hero__doc::after {
  content: "▍";
  display: inline-block;
  margin-left: 0.4em;
  color: var(--joy);
  animation: heroCursorBlink 1.2s ease-in-out infinite;
}
@keyframes heroCursorBlink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}
@media (max-width: 760px) {
  .hero__doc { display: none; }
}

/* ---------------------------------------------------------------------- */
/* Eyebrow                                                                */
/* ---------------------------------------------------------------------- */

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: var(--w-bold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
  max-width: 44ch;
  margin: 0;
}
.hero__eyebrow-rule {
  display: block;
  width: 2.5rem;
  height: 2px;
  background: var(--paper);
  flex-shrink: 0;
  animation: heroEyebrowGlow 4s ease-in-out 1.5s infinite;
}
@keyframes heroEyebrowGlow {
  0%, 100% { opacity: 1;    transform: scaleX(1);    }
  50%      { opacity: 0.55; transform: scaleX(0.85); }
}

/* ---------------------------------------------------------------------- */
/* Headline (4 linhas em pilha)                                           */
/* ---------------------------------------------------------------------- */

.hero__heading {
  margin: 0;
  font-size: clamp(2.5rem, 1.5rem + 4vw, 5.25rem);
  font-weight: var(--w-bold);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--fg-on-red);
}
.hero__heading-line {
  display: block;
}

/* Plate verde atrás de "marca" — assinatura. */
.hero__plate {
  display: inline-block;
  background: var(--joy);
  color: var(--paper);
  padding: 0.04em 0.32em 0.1em;
  font-style: normal;
  border-radius: 4px;
  box-shadow:
    0 14px 32px -16px oklch(72% 0.215 145 / 0.65),
    inset 0 0 0 1.5px oklch(28% 0.06 152 / 0.35);
}

/* ---------------------------------------------------------------------- */
/* Sub + CTAs                                                             */
/* ---------------------------------------------------------------------- */

.hero__sub {
  font-size: var(--step-1);
  color: var(--fg-on-red-soft);
  font-weight: var(--w-medium);
  max-width: 44ch;
  line-height: 1.4;
  margin: 0;
}
.hero__sub-strong {
  font-weight: var(--w-bold);
  color: var(--paper);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-2xs);
}

/* ---------------------------------------------------------------------- */
/* Stats trio com hairlines verticais                                     */
/* ---------------------------------------------------------------------- */

.hero__stats {
  margin: clamp(0.5rem, 0.25rem + 0.5vw, 1rem) 0 0;
  padding-top: clamp(0.75rem, 0.5rem + 0.5vw, 1.1rem);
  border-top: 1px solid oklch(99% 0.005 27.5 / 0.22);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.85rem, 0.5rem + 1vw, 2rem);
  max-width: 36rem;
}
.hero__stat {
  display: grid;
  gap: 0.4rem;
  padding-left: clamp(0.85rem, 0.4rem + 0.9vw, 1.5rem);
  border-left: 1px solid oklch(99% 0.005 27.5 / 0.30);
}
.hero__stat:first-child {
  padding-left: 0;
  border-left: none;
}
.hero__stat dt {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: var(--w-bold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-on-red-soft);
  margin: 0;
}
.hero__stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 0.9rem + 0.85vw, 1.5rem);
  font-weight: var(--w-bold);
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--paper);
}
@media (max-width: 540px) {
  .hero__stats {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    max-width: 100%;
  }
  .hero__stat {
    padding: 0 0 0.85rem;
    border-left: none;
    border-bottom: 1px solid oklch(99% 0.005 27.5 / 0.22);
  }
  .hero__stat:last-child {
    padding-bottom: 0;
    border-bottom: none;
  }
}

/* ---------------------------------------------------------------------- */
/* Visual — foto da fachada como anchor (papel do tigre na capa)          */
/* ---------------------------------------------------------------------- */

.hero__visual {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: 44rem;
  justify-self: end;
  transform-origin: center;
  will-change: transform;
  /* Animation defined in motion.css — entry + perpetual float. */
}
@media (max-width: 960px) {
  .hero__visual {
    max-width: 32rem;
    justify-self: center;
    aspect-ratio: 16 / 10;
  }
}

/* Bloco verde editorial offset por trás — Swiss layered card. */
.hero__visual::before {
  content: "";
  position: absolute;
  top: 1.25rem;
  right: -1rem;
  bottom: -1rem;
  left: 1.25rem;
  background: var(--joy);
  border-radius: 6px;
  z-index: -1;
  box-shadow: 0 24px 48px -18px oklch(28% 0.06 152 / 0.55);
}
@media (max-width: 540px) {
  .hero__visual::before {
    top: 0.85rem;
    right: -0.65rem;
    bottom: -0.65rem;
    left: 0.85rem;
  }
}

.hero__visual-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--paper-3);
  border: 8px solid var(--paper);
  /* Corte editorial no canto inferior direito — feel de placa industrial cortada. */
  clip-path: polygon(
    0 0,
    100% 0,
    100% calc(100% - 2.25rem),
    calc(100% - 2.25rem) 100%,
    0 100%
  );
  filter:
    drop-shadow(0 36px 60px oklch(22% 0.105 22 / 0.55));
}
.hero__visual-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Foto já vem enquadrada; zoom leve só pra raspar o filete branco (esq.)
     e a borda do prédio vizinho (dir.). */
  transform: scale(1.08);
  transform-origin: 52% 40%;
}


/* Continuous motions que respeitam reduced-motion abaixo. */
@keyframes heroVisualFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1.5deg); }
  50%      { transform: translate3d(0, -10px, 0) rotate(0.8deg); }
}

/* Reduced motion: corta motions contínuos (mantém entry sutil em motion.css). */
@media (prefers-reduced-motion: reduce) {
  .hero__visual,
  .hero__eyebrow-rule,
  .hero__doc::after,
  .hero__plate {
    animation: none !important;
  }
}
