/* Hero B · Implantação — Dra. Camila Toffoli */
:root {
  --b-noite: #0b1f38;
  --b-noite-2: #0f2a4a;
  --b-marinho: #144677;
  --b-perola: #f3eeea;
  --b-pele: #e0cbc4;
  --b-taupe: #c0a79c;
  --b-madeira: #704c35;
  --b-pessego: #f0b9a3;
  --b-batom: #b3262f;

  --b-serif: "Radley", "Georgia", serif;
  --b-sans: "Catamaran", system-ui, sans-serif;

  --b-margem: clamp(22px, 6vw, 92px);
  --b-nav-h: 92px;
  --b-esp-1: 8px;
  --b-esp-2: 16px;
  --b-esp-3: 24px;
  --b-esp-4: 36px;

  --b-titulo: clamp(2.15rem, 3.95vw, 4.1rem);
  --b-corpo: clamp(1rem, 1.18vw, 1.14rem);

  --b-ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--b-noite); }
body {
  font-family: var(--b-sans);
  color: var(--b-perola);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- palco ---------- */
.b-hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 660px;
  overflow: clip;
  isolation: isolate;
  /* fundo de reserva = mesmo desenho do shader (aparece antes da cena) */
  background:
    radial-gradient(60% 55% at 74% 40% in oklab, #1a5288 0%, transparent 70%),
    radial-gradient(45% 40% at 18% 12% in oklab, #123a66 0%, transparent 70%),
    radial-gradient(70% 38% at 45% 104% in oklab, #8a5d63 0%, transparent 75%),
    linear-gradient(in oklab 180deg, #0a1b31 0%, var(--b-noite) 45%, #1a2c47 100%);
}
.b-hero::after { /* granulado fixo */
  content: "";
  position: absolute; inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.4 -.2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.b-cena {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.8s ease;
}
.b-hero.b-pronta .b-cena { opacity: 1; }

.b-veu { /* sombra atrás do texto, para contraste em qualquer momento */
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(48% 70% at 18% 52%, rgb(9 25 46 / .62) 0%, rgb(9 25 46 / .3) 55%, transparent 80%),
    linear-gradient(90deg, rgb(9 25 46 / .45) 0%, transparent 46%);
}

/* ---------- retrato ---------- */
.b-figura {
  position: absolute;
  z-index: 2;
  margin: 0;
  right: clamp(-60px, -2.8vw, 0px);
  bottom: 0;
  height: min(92%, 880px);
  aspect-ratio: 1792 / 2400;
  filter: drop-shadow(-18px 0 42px rgb(240 185 163 / .16)) drop-shadow(0 -10px 60px rgb(20 70 119 / .5));
  animation: b-entra-figura 1.6s var(--b-ease) .25s both;
}
.b-retrato {
  display: block;
  width: 100%; height: 100%;
  object-fit: contain;
  -webkit-mask-image: linear-gradient(180deg, #000 88%, rgb(0 0 0 / .55) 100%);
          mask-image: linear-gradient(180deg, #000 88%, rgb(0 0 0 / .55) 100%);
}
.b-luz { /* a mesma luz rosada da cena, só sobre o recorte */
  position: absolute; inset: 0;
  pointer-events: none;
  mix-blend-mode: soft-light;
  background:
    radial-gradient(70% 55% at 0% 88%, rgb(255 168 140 / .75) 0%, transparent 70%),
    radial-gradient(60% 40% at 100% 0%, rgb(20 70 119 / .7) 0%, transparent 75%),
    linear-gradient(180deg, transparent 60%, rgb(150 90 95 / .45) 100%);
  -webkit-mask: url("../img/retrato-camila-toffoli.webp") center / 100% 100% no-repeat;
          mask: url("../img/retrato-camila-toffoli.webp") center / 100% 100% no-repeat;
}

/* ponto onde o blastocisto se aninha (o JS lê esta caixa) */
.b-alvo {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  width: clamp(120px, 12.5vw, 200px);
  aspect-ratio: 1;
  left: calc(47.5vw + 48px);
  top: 70%;
  translate: -50% -50%;
}
.b-legenda {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  translate: -50% 0;
  display: flex; flex-direction: column-reverse; align-items: center; gap: 8px;
  text-align: center;
  white-space: nowrap;
  font: 400 .8125rem/1 var(--b-sans);
  letter-spacing: .14em;
  text-transform: lowercase;
  color: rgb(243 238 234 / .78);
  opacity: 0;
  animation: b-aparece 2s ease 12s both;
}
.b-legenda i {
  display: block;
  width: 1px; height: 16px;
  background: rgb(243 238 234 / .5);
}
.b-legenda br { display: none; }

/* ---------- navegação ---------- */
.b-nav {
  position: absolute;
  z-index: 5;
  inset: 0 0 auto 0;
  height: var(--b-nav-h);
  padding: 0 var(--b-margem);
  display: flex;
  align-items: center;
  gap: var(--b-esp-4);
  animation: b-aparece 1.2s ease .1s both;
}
.b-marca {
  font: 400 1.32rem/1 var(--b-serif);
  color: var(--b-perola);
  text-decoration: none;
  letter-spacing: .01em;
  margin-right: auto;
}
.b-links {
  display: flex; gap: 30px;
  list-style: none; margin: 0; padding: 0;
}
.b-links a, .b-sec {
  color: rgb(243 238 234 / .86);
  text-decoration: none;
  font: 400 1rem/1 var(--b-sans);
  letter-spacing: .02em;
  padding-block: 8px;
  background: linear-gradient(currentColor 0 0) left bottom / 0 1px no-repeat;
  transition: background-size .5s var(--b-ease), color .3s;
}
.b-links a:hover, .b-sec:hover { background-size: 100% 1px; color: var(--b-perola); }
.b-nav-botao {
  font: 600 .95rem/1 var(--b-sans);
  letter-spacing: .03em;
  color: var(--b-noite);
  background: var(--b-perola);
  text-decoration: none;
  padding: 13px 22px 12px;
  border-radius: 999px;
  transition: background .3s;
}
.b-nav-botao:hover { background: var(--b-pele); }

/* ---------- texto ---------- */
.b-texto {
  position: absolute;
  z-index: 4;
  left: var(--b-margem);
  top: calc(var(--b-nav-h) + 1vh);
  bottom: 4vh;
  width: min(600px, 44vw);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.b-sobre {
  margin: 0 0 var(--b-esp-3);
  font: 600 .8125rem/1.2 var(--b-sans);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--b-pessego);
  animation: b-sobe .9s var(--b-ease) .15s both;
}
.b-titulo {
  margin: 0;
  font: 400 var(--b-titulo)/1.04 var(--b-serif);
  letter-spacing: -.012em;
  color: var(--b-perola);
}
.b-titulo em { font-style: italic; }
.b-linha {
  display: block;
  overflow: hidden;
  padding: .1em 0 .08em;
  margin: -.1em 0 -.08em;
}
.b-linha > span {
  display: inline-block;
  animation: b-linha 1.15s var(--b-ease) both;
}
.b-linha:nth-child(1) > span { animation-delay: .25s; }
.b-linha:nth-child(2) > span { animation-delay: .4s; }
.b-linha:nth-child(3) > span { animation-delay: .55s; }

.b-apoio {
  margin: var(--b-esp-4) 0 0;
  max-width: 31em;
  font: 300 var(--b-corpo)/1.6 var(--b-sans);
  color: rgb(243 238 234 / .88);
  animation: b-sobe 1s var(--b-ease) .85s both;
}
.b-apoio span[data-confirmar] { color: var(--b-perola); }

.b-acoes {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--b-esp-2) 28px;
  margin-top: var(--b-esp-4);
  animation: b-sobe 1s var(--b-ease) 1.05s both;
}
.b-botao {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 1.02rem/1 var(--b-sans);
  letter-spacing: .02em;
  color: var(--b-noite);
  text-decoration: none;
  padding: 17px 28px 16px 24px;
  border-radius: 999px;
  background: linear-gradient(in oklab 135deg, #f7ece6, var(--b-pele));
  box-shadow: 0 10px 30px -10px rgb(240 185 163 / .55), inset 0 1px 0 rgb(255 255 255 / .6);
  transition: transform .4s var(--b-ease), box-shadow .4s;
}
.b-botao svg { width: 20px; height: 20px; fill: var(--b-marinho); }
.b-botao:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgb(240 185 163 / .7), inset 0 1px 0 rgb(255 255 255 / .6); }
.b-botao:focus-visible, .b-sec:focus-visible, .b-links a:focus-visible, .b-nav-botao:focus-visible, .b-marca:focus-visible {
  outline: 2px solid var(--b-pessego); outline-offset: 4px;
}

.b-prova {
  margin: var(--b-esp-4) 0 0;
  padding-left: 18px;
  border-left: 1px solid rgb(240 185 163 / .55);
  animation: b-sobe 1s var(--b-ease) 1.2s both;
}
.b-prova p {
  margin: 0;
  font: italic 400 1.2rem/1.35 var(--b-serif);
  color: var(--b-perola);
}
.b-prova footer {
  margin-top: 6px;
  font: 400 .9rem/1.3 var(--b-sans);
  letter-spacing: .04em;
  color: rgb(243 238 234 / .74);
}
.b-registro {
  margin: var(--b-esp-3) 0 0;
  font: 400 .9rem/1.4 var(--b-sans);
  letter-spacing: .05em;
  color: rgb(243 238 234 / .74);
  animation: b-aparece 1s ease 1.35s both;
}
.b-registro strong { font-weight: 600; color: rgb(243 238 234 / .9); }

/* ---------- entrada ---------- */
@keyframes b-linha { from { transform: translateY(108%); } to { transform: none; } }
@keyframes b-sobe { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes b-aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes b-entra-figura {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

/* ---------- notebook baixo ---------- */
@media (max-height: 760px) and (min-width: 761px) {
  :root { --b-nav-h: 76px; --b-titulo: clamp(2rem, 3.5vw, 3.5rem); --b-esp-4: 26px; }
  .b-apoio { line-height: 1.5; }
}

/* ---------- tablet ---------- */
@media (max-width: 1100px) and (min-width: 761px) {
  .b-links { display: none; }
  .b-texto { width: 50vw; }
  .b-figura { right: -12vw; height: min(84%, 820px); }
  .b-alvo { left: 52vw; top: 76%; width: 120px; }
}

/* ---------- celular ---------- */
@media (max-width: 760px) {
  :root {
    --b-nav-h: 64px;
    --b-margem: 22px;
    --b-titulo: clamp(2rem, 9vw, 2.45rem);
    --b-corpo: 1rem;
    --b-esp-4: 22px;
    --b-esp-3: 18px;
  }
  .b-hero {
    height: auto;
    min-height: 100svh;
    background:
      radial-gradient(90% 40% at 70% 22% in oklab, #1a5288 0%, transparent 70%),
      radial-gradient(90% 22% at 30% 50% in oklab, #6e4c58 0%, transparent 75%),
      linear-gradient(in oklab 180deg, #0a1b31 0%, var(--b-noite) 60%, #0d2340 100%);
  }
  .b-links { display: none; }
  .b-marca { font-size: 1.15rem; }
  .b-nav-botao { padding: 11px 18px 10px; font-size: .95rem; }

  .b-figura {
    top: calc(var(--b-nav-h) - 6px);
    bottom: auto;
    right: -17%;
    height: min(46svh, 112vw);
    filter: drop-shadow(-10px 0 26px rgb(240 185 163 / .14));
  }
  .b-retrato, .b-luz {
    -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 97%);
            mask-image: linear-gradient(180deg, #000 62%, transparent 97%);
  }
  .b-luz {
    -webkit-mask: url("../img/retrato-camila-toffoli.webp") center / 100% 100% no-repeat,
                  linear-gradient(180deg, #000 62%, transparent 97%);
    -webkit-mask-composite: source-in;
            mask: url("../img/retrato-camila-toffoli.webp") center / 100% 100% no-repeat,
                  linear-gradient(180deg, #000 62%, transparent 97%);
            mask-composite: intersect;
  }
  .b-veu {
    background: linear-gradient(180deg, transparent 0, transparent calc(var(--b-nav-h) + 36svh), rgb(9 25 46 / .84) calc(var(--b-nav-h) + 47svh), var(--b-noite) 100%);
    z-index: 3;
  }
  .b-alvo {
    width: clamp(78px, 24vw, 104px);
    left: max(54px, 15vw);
    top: calc(var(--b-nav-h) + 27svh);
  }
  .b-legenda {
    left: calc(var(--b-margem) - max(54px, 15vw) + 50%);
    translate: 0 0;
    align-items: flex-start;
    text-align: left;
    font-size: .75rem;
    line-height: 1.35;
    letter-spacing: .1em;
  }
  .b-legenda br { display: inline; }
  .b-legenda i { display: none; }

  .b-texto {
    position: relative;
    inset: auto;
    width: auto;
    padding: calc(var(--b-nav-h) + 46svh - 58px) var(--b-margem) 34px;
    display: block;
  }
  .b-sobre { font-size: .75rem; letter-spacing: .12em; margin-bottom: 12px; }
  .b-apoio { margin-top: 18px; line-height: 1.55; }
  .b-acoes { gap: 14px 22px; margin-top: 22px; }
  .b-botao { padding: 16px 24px 15px 20px; font-size: 1rem; }
  .b-prova p { font-size: 1.12rem; }
  .b-prova footer, .b-registro { font-size: .9375rem; }
}

/* ---------- movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}
