/* ---------- Hero editorial: fundo de estúdio + retrato recortado ---------- */

.hero {
  --champagne: #ddb15f;
  --cream-text: #f6eee2;
  --hero-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --mx: 0;
  --my: 0;
  --sy: 0;

  position: relative;
  display: flex;
  min-height: max(100svh, 720px);
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  background: #1c1007;
}

.hero__bg {
  position: absolute;
  z-index: -3;
  inset: -4%;
  background:
    radial-gradient(ellipse at 70% 45%, transparent 10%, rgba(10, 5, 1, 0.55) 75%),
    url("../images/fundo-estudio.jpg") center / cover no-repeat;
  translate: calc(var(--mx) * 10px) calc(var(--my) * 6px + var(--sy) * 0.25px);
}

/* Luz de estúdio atrás da modelo */
.hero__spot {
  position: absolute;
  z-index: -2;
  top: 6%;
  right: 4%;
  width: min(62vw, 900px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 180, 110, 0.32) 0%, rgba(167, 110, 50, 0.12) 38%, transparent 68%);
  filter: blur(10px);
  pointer-events: none;
  translate: calc(var(--mx) * -14px) calc(var(--my) * -10px);
}

/* Curvas orgânicas da identidade (baixa opacidade) */
.hero__curves {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: min(70vw, 1000px);
  height: 46%;
  pointer-events: none;
  translate: calc(var(--mx) * -8px) calc(var(--sy) * 0.15px);
}

.hero__curves path {
  fill: var(--champagne);
}

.hero__curves path:first-child { opacity: 0.08; }
.hero__curves path:last-child { opacity: 0.16; }

/* Transição para a próxima seção */
.hero::after {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  height: 22%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(25, 24, 23, 0.6) 55%, var(--dark));
  pointer-events: none;
}

.hero .navbar {
  z-index: 30;
}

.hero__inner {
  position: relative;
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: stretch;
}

/* ---------- Texto ---------- */

.hero__content {
  position: relative;
  z-index: 10;
  align-self: center;
  padding: 40px 0 120px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
  color: var(--champagne);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow__line {
  display: block;
  width: 46px;
  height: 1px;
  background: currentColor;
  transform-origin: left;
}

.hero h1 {
  margin: 0 0 28px;
  color: var(--cream-text);
  font-family: var(--heading);
  font-size: clamp(42px, 5.2vw, 78px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.hero h1 .line > span {
  display: block;
}

.hero h1 em {
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.hero__intro {
  max-width: 470px;
  margin-bottom: 36px;
  color: rgba(246, 238, 226, 0.72);
  font-size: 15px;
  line-height: 1.6;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__meta {
  display: flex;
  gap: 28px;
  margin: 44px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid rgba(228, 199, 147, 0.18);
  list-style: none;
  max-width: 470px;
}

.hero__meta li {
  display: grid;
  gap: 3px;
  color: rgba(246, 238, 226, 0.55);
  font-size: 12px;
}

.hero__meta b {
  color: var(--champagne);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ---------- Palco da modelo ---------- */

.hero__stage {
  position: relative;
  min-height: 560px;
}

.hero__word {
  position: absolute;
  z-index: 0;
  top: 8%;
  right: -2%;
  color: transparent;
  font-family: var(--serif);
  font-size: clamp(120px, 15vw, 240px);
  font-style: italic;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  -webkit-text-stroke: 1px rgba(228, 199, 147, 0.28);
  pointer-events: none;
  user-select: none;
  translate: calc(var(--mx) * 28px) calc(var(--my) * 14px + var(--sy) * 0.35px);
}

.hero__word .char {
  display: inline-block;
}

.hero__ring {
  position: absolute;
  z-index: 1;
  bottom: 4%;
  left: 50%;
  width: min(88%, 620px);
  margin-left: max(-44%, -310px);
  overflow: visible;
  pointer-events: none;
  translate: calc(var(--mx) * -16px) calc(var(--my) * -10px + var(--sy) * 0.18px);
}

.hero__ring circle {
  fill: none;
  stroke: var(--champagne);
  stroke-opacity: 0.45;
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  vector-effect: non-scaling-stroke;
}

.hero__model {
  position: absolute;
  z-index: 2;
  right: -6%;
  bottom: 0;
  width: 112%;
  translate: calc(var(--mx) * -10px) calc(var(--my) * -6px + var(--sy) * 0.1px);
}

.hero__model picture,
.hero__model img {
  display: block;
  width: 100%;
  height: auto;
}

/* Sombra no wrapper: com mask-image no img ela seria recortada em retângulo */
.hero__model {
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.4));
}

.hero__model img {
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
}

/* Brilho que atravessa somente a silhueta */
.hero__model::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(105deg, transparent 35%, rgba(255, 240, 215, 0.4) 50%, transparent 65%);
  background-size: 250% 100%;
  background-position: 120% 0;
  -webkit-mask: url("../images/doutor.webp") center / 100% 100% no-repeat;
  mask: url("../images/doutor.webp") center / 100% 100% no-repeat;
  mix-blend-mode: soft-light;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Selos de vidro ---------- */

.hero-badge {
  position: absolute;
  z-index: 6;
  translate: calc(var(--mx) * -22px) calc(var(--my) * -14px);
}

.hero-badge__inner {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 240, 215, 0.18);
  border-radius: 999px;
  padding: 6px 15px 6px 6px;
  color: var(--cream-text);
  background: rgba(40, 24, 10, 0.38);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 500;
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  animation: float 6s ease-in-out infinite;
}

.hero-badge__icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #12200c;
  background: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.hero-badge--1 { top: 34%; left: 6%; }
.hero-badge--1 .hero-badge__icon { background: #e7ded0; }
.hero-badge--2 { top: 52%; right: 0; }
.hero-badge--2 .hero-badge__inner { animation-delay: -2s; }
.hero-badge--3 { bottom: 20%; left: 12%; }
.hero-badge--3 .hero-badge__icon { background: var(--champagne); }
.hero-badge--3 .hero-badge__inner { animation-delay: -4s; }

/* ---------- Indicador de rolagem ---------- */

.hero__scroll {
  position: absolute;
  z-index: 12;
  bottom: 30px;
  left: 50%;
  display: grid;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 1px solid rgba(246, 238, 226, 0.3);
  border-radius: 999px;
  place-items: start center;
  padding-top: 8px;
}

.hero__scroll span {
  width: 3px;
  height: 8px;
  border-radius: 3px;
  background: var(--champagne);
  animation: scroll-dot 2s var(--hero-ease) infinite;
}

@keyframes scroll-dot {
  0% { opacity: 0; transform: translateY(-4px); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ============================================================
   Coreografia de entrada (só com JS; dispara em .is-ready)
   ============================================================ */

.js .hero [data-anim],
.js .hero .hero__bg,
.js .hero .hero__spot,
.js .hero .navbar,
.js .hero .eyebrow__line,
.js .hero h1 .line > span,
.js .hero .hero__word .char,
.js .hero .hero__ring circle,
.js .hero .hero__model picture,
.js .hero .hero__model::after,
.js .hero .hero-badge,
.js .hero .hero__scroll {
  animation-fill-mode: both;
  animation-play-state: paused;
}

.js .hero.is-ready [data-anim],
.js .hero.is-ready .hero__bg,
.js .hero.is-ready .hero__spot,
.js .hero.is-ready .navbar,
.js .hero.is-ready .eyebrow__line,
.js .hero.is-ready h1 .line > span,
.js .hero.is-ready .hero__word .char,
.js .hero.is-ready .hero__ring circle,
.js .hero.is-ready .hero__model picture,
.js .hero.is-ready .hero__model::after,
.js .hero.is-ready .hero-badge,
.js .hero.is-ready .hero__scroll {
  animation-play-state: running;
}

/* 1. Estúdio acende */
.js .hero .hero__bg {
  animation: studio-in 2.6s var(--hero-ease) 0s both;
}

.js .hero .hero__spot {
  animation: spot-in 2.4s ease-out 0.5s both;
}

@keyframes studio-in {
  from { opacity: 0; transform: scale(1.14); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes spot-in {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

/* 2. Anel desenha */
.js .hero .hero__ring circle {
  animation: ring-draw 2.2s var(--hero-ease) 0.45s both;
}

@keyframes ring-draw {
  from { stroke-dashoffset: 1; opacity: 0; }
  20% { opacity: 1; }
  to { stroke-dashoffset: 0; opacity: 1; }
}

/* 3. Palavra de fundo sobe letra a letra */
.js .hero .hero__word .char {
  animation: char-rise 1.4s var(--hero-ease) both;
  animation-delay: calc(0.55s + var(--i) * 55ms);
}

@keyframes char-rise {
  from { opacity: 0; transform: translateY(60%) rotate(6deg); }
  to { opacity: 1; transform: none; }
}

/* 4. Modelo: revelação de baixo pra cima com foco */
.js .hero .hero__model picture {
  animation: model-reveal 2s var(--hero-ease) 0.7s both;
  transform-origin: 60% 100%;
}

@keyframes model-reveal {
  0% {
    clip-path: inset(100% 0 0 0);
    filter: blur(18px) brightness(0.35) saturate(0.6);
    transform: translateY(70px) scale(1.08);
  }
  45% {
    filter: blur(4px) brightness(0.85) saturate(0.9);
  }
  100% {
    clip-path: inset(0 0 0 0);
    filter: blur(0) brightness(1) saturate(1);
    transform: none;
  }
}

/* 5. Reflexo de luz atravessa a silhueta */
.js .hero .hero__model::after {
  animation: shine 1.8s ease-in-out 2.2s both;
}

@keyframes shine {
  0% { opacity: 0; background-position: 120% 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; background-position: -30% 0; }
}

/* 6. Texto: linhas emergem da máscara */
.js .hero .navbar {
  animation: fade-down 1.2s var(--hero-ease) 0.2s both;
}

.js .hero .eyebrow__line {
  animation: line-grow 1.2s var(--hero-ease) 0.9s both;
}

.js .hero h1 .line > span {
  animation: line-up 1.3s var(--hero-ease) both;
}

.js .hero h1 .line:nth-child(1) > span { animation-delay: 1s; }
.js .hero h1 .line:nth-child(2) > span { animation-delay: 1.12s; }
.js .hero h1 .line:nth-child(3) > span { animation-delay: 1.24s; }

.js .hero [data-anim] {
  animation: soft-up 1.2s var(--hero-ease) both;
  animation-delay: var(--d, 1.4s);
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: none; }
}

@keyframes line-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes line-up {
  from { transform: translateY(110%); }
  to { transform: none; }
}

@keyframes soft-up {
  from { opacity: 0; transform: translateY(24px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* 7. Selos surgem por último */
.js .hero .hero-badge {
  animation: badge-pop 1s var(--hero-ease) both;
}

.js .hero .hero-badge--1 { animation-delay: 2s; }
.js .hero .hero-badge--2 { animation-delay: 2.18s; }
.js .hero .hero-badge--3 { animation-delay: 2.36s; }

.js .hero .hero__scroll {
  animation: soft-up 1s var(--hero-ease) 2.6s both;
}

@keyframes badge-pop {
  from { opacity: 0; transform: translateY(16px) scale(0.7); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* Desktop: texto e retrato dividem a hero meio a meio, na mesma altura */
@media (min-width: 901px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto;
    align-content: center;
    align-items: stretch;
    column-gap: 40px;
    padding: 24px 0 72px;
  }

  .hero__content {
    padding: 0;
  }

  .hero__stage {
    min-height: 0;
  }

  .hero__model {
    top: 0;
    right: auto;
    bottom: 0;
    left: 50%;
    width: max-content;
    transform: translateX(-50%);
  }

  .hero__model picture,
  .hero__model img {
    width: auto;
    height: 100%;
    max-width: none;
  }

  .hero__model img {
    -webkit-mask-image: linear-gradient(180deg, #000 86%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 86%, transparent 100%);
  }

  .hero__ring {
    top: -6%;
    bottom: auto;
    left: 54%;
    width: auto;
    height: 112%;
    aspect-ratio: 1;
    margin-left: 0;
    transform: translateX(-50%);
  }

  .hero__word {
    top: -14%;
    right: -6%;
  }

  .hero-badge--1 { top: 30%; left: -2%; }
  .hero-badge--2 { top: 56%; right: -4%; }
  .hero-badge--3 { top: auto; bottom: 8%; left: 4%; }
}

/* ---------- Responsivo ---------- */

@media (max-width: 1100px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero__word { font-size: clamp(100px, 14vw, 180px); }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }

  .hero__inner {
    display: flex;
    flex-direction: column-reverse;
  }

  .hero__stage {
    height: min(62svh, 560px);
    min-height: 380px;
    margin-inline: -26px;
  }

  .hero__model {
    top: 4%;
    right: auto;
    left: 50%;
    width: auto;
    transform: translateX(-50%);
  }

  .hero__model picture,
  .hero__model img {
    width: auto;
    height: 100%;
    max-width: none;
  }

  .hero__ring {
    width: min(80%, 440px);
    margin-left: max(-40%, -220px);
    bottom: 2%;
  }

  .hero__word {
    top: 4%;
    right: 50%;
    transform: translateX(50%);
  }

  .hero__content {
    margin-top: -60px;
    padding: 0 0 96px;
  }

  .hero-badge--1 { top: 46%; left: 16px; }
  .hero-badge--2 { top: 62%; right: 16px; }
  .hero-badge--3 { display: none; }

  .hero__scroll { display: none; }
}

@media (max-width: 600px) {
  .hero__stage {
    height: 56svh;
    min-height: 340px;
    margin-inline: -16px;
  }

  .hero__word { font-size: 96px; }
  /* Corte do braço na foto original fica rente à borda da tela */
  .hero__model { left: auto; right: -2px; transform: none; }
  .hero__model img { -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 100%); mask-image: linear-gradient(180deg, #000 80%, transparent 100%); }
  .hero__curves { width: 100vw; height: 30%; }

  .eyebrow { margin-bottom: 20px; font-size: 9px; }
  .eyebrow__line { width: 30px; }
  .hero h1 { font-size: clamp(36px, 10.4vw, 48px); }
  .hero__intro { font-size: 14px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .button { width: 100%; }
  .hero__meta { margin-top: 32px; }
  .hero-badge__inner { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .js .hero *,
  .js .hero *::after,
  .js .hero .hero__bg,
  .js .hero .hero__spot {
    animation: none !important;
  }

  .hero-badge__inner,
  .hero__scroll span {
    animation: none;
  }
}
