/* Hero B · Resposta direta — Dr. Alfredo Urbano */
:root {
  --giz: #f3efe8;
  --giz-2: #faf7f2;
  --areia: #dcd3bd;
  --agua: #9cc3b4;
  --agua-fundo: #c9ddd3;
  --ferrugem: #a5432a;
  --ferrugem-esc: #8a3421;
  --tinta: #1f1a17;
  --tinta-2: #4a423b;
  --linha: rgb(31 26 23 / .16);

  --f-titulo: "Clash Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --nav-h: 76px;
  --lado: clamp(20px, 4.2vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--giz);
  color: var(--tinta);
  font-family: var(--f-titulo);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ferrugem); outline-offset: 3px; }

/* ---------- Navegação ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 32px;
  padding: 0 var(--lado);
  border-bottom: 1px solid transparent;
  transition: background-color .4s, border-color .4s, backdrop-filter .4s;
}
.nav.is-rolado {
  background: rgb(243 239 232 / .82);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-color: var(--linha);
}
.nav__marca { display: flex; flex-direction: column; gap: 2px; text-decoration: none; line-height: 1.1; }
.nav__nome { font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.nav__crm { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; color: var(--tinta-2); }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a {
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .04em;
  text-decoration: none; color: var(--tinta-2);
  padding: 6px 0; background: linear-gradient(var(--ferrugem), var(--ferrugem)) 0 100% / 0 1px no-repeat;
  transition: background-size .35s var(--ease), color .35s;
}
.nav__links a:hover { color: var(--tinta); background-size: 100% 1px; }
.nav__tel {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 13.5px; font-weight: 700; letter-spacing: .02em;
  text-decoration: none;
  padding: 10px 16px; border: 1px solid var(--tinta); border-radius: 999px;
  transition: background-color .3s, color .3s;
}
.nav__tel svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.nav__tel:hover { background: var(--tinta); color: var(--giz); }

/* ---------- Hero ---------- */
.hb {
  position: relative;
  min-height: 100svh;
  overflow: clip;
  isolation: isolate;
  background: var(--giz);
}

/* malha */
.hb__malha { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hb__malha::before { /* base em oklab: giz → areia, sem tom rosado */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg in oklab, var(--areia) 0%, var(--giz) 46%, var(--giz-2) 70%, #e6efe9 100%);
}
.hb__m {
  position: absolute; display: block; border-radius: 50%;
  will-change: transform;
}
.hb__m--areia {
  width: 78vmax; height: 70vmax; left: -22vmax; top: -6vmax;
  background: radial-gradient(closest-side in oklab, rgb(214 203 177 / .95), rgb(220 211 189 / .55) 55%, rgb(220 211 189 / 0));
  animation: hb-deriva-a 34s ease-in-out infinite alternate;
}
.hb__m--agua {
  width: 62vmax; height: 56vmax; right: -20vmax; top: -18vmax;
  background: radial-gradient(closest-side in oklab, rgb(156 195 180 / .62), rgb(156 195 180 / .22) 58%, rgb(156 195 180 / 0));
  animation: hb-deriva-b 38s ease-in-out infinite alternate;
}
.hb__m--giz {
  width: 54vmax; height: 46vmax; left: 30vw; top: 22vh;
  background: radial-gradient(closest-side in oklab, rgb(250 247 242 / .95), rgb(250 247 242 / 0));
  animation: hb-deriva-c 29s ease-in-out infinite alternate;
}
.hb__m--agua2 {
  width: 46vmax; height: 40vmax; left: 8vw; bottom: -24vmax;
  background: radial-gradient(closest-side in oklab, rgb(156 195 180 / .5), rgb(156 195 180 / 0));
  animation: hb-deriva-d 31s ease-in-out infinite alternate;
}
.hb__m--ferrugem {
  width: 30vmax; height: 26vmax; right: -9vmax; bottom: -12vmax;
  background: radial-gradient(closest-side in oklab, rgb(170 92 50 / .24), rgb(192 138 62 / .12) 55%, rgb(192 138 62 / 0));
  animation: hb-deriva-e 26s ease-in-out infinite alternate;
}
.hb__malha { --px: 0; --py: 0; }
.hb__m--agua, .hb__m--ferrugem { translate: calc(var(--px) * 3vmax) calc(var(--py) * 2vmax); transition: translate 1.6s var(--ease); }
.hb__m--giz { translate: calc(var(--px) * -2.2vmax) calc(var(--py) * -1.6vmax); transition: translate 1.8s var(--ease); }

@keyframes hb-deriva-a { to { transform: translate(6vmax, 5vmax) scale(1.08); } }
@keyframes hb-deriva-b { to { transform: translate(-8vmax, 9vmax) scale(.92); } }
@keyframes hb-deriva-c { to { transform: translate(-7vmax, -5vmax) scale(1.12); } }
@keyframes hb-deriva-d { to { transform: translate(10vmax, -4vmax) scale(1.1); } }
@keyframes hb-deriva-e { to { transform: translate(-6vmax, -5vmax) scale(1.15); } }

/* granulado único, fixo */
.hb__grao {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  opacity: .055; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.4 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* grade */
.hb__grade {
  position: relative; z-index: 2;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6.2fr);
  grid-template-areas: "fig txt";
  column-gap: clamp(24px, 3vw, 56px);
  padding: 0 var(--lado) 0 0;
}
.hb__texto {
  grid-area: txt;
  align-self: center;
  padding: calc(var(--nav-h) + 16px) 0 40px;
  max-width: 760px;
}
.hb__figura { grid-area: fig; position: relative; margin: 0; align-self: end; height: 100svh; }

/* rótulo */
.hb__rotulo {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin: 0 0 clamp(16px, 2.6svh, 28px);
  font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--tinta-2);
}
.hb__rotulo i { width: 5px; height: 5px; background: var(--ferrugem); display: block; }

/* título */
.hb__titulo {
  margin: 0;
  font-family: var(--f-titulo);
  font-weight: 600;
  font-size: min(7vw, 10.8svh, 118px);
  line-height: .9;
  letter-spacing: -.035em;
  color: var(--tinta);
}
.hb__linha { display: block; overflow: clip; padding-bottom: .07em; margin-bottom: -.07em; }
.hb__linha > span { display: inline-block; }
.hb__linha--leve { font-weight: 300; letter-spacing: -.03em; }
.hb__linha--leve strong { font-weight: 600; }
.hb__ponto { color: var(--ferrugem); font-weight: inherit; }

/* apoio */
.hb__apoio {
  margin: clamp(18px, 3svh, 30px) 0 0;
  max-width: 34em;
  font-size: clamp(18px, 1.35vw, 20px);
  line-height: 1.5;
  color: var(--tinta-2);
}
.hb__apoio strong { color: var(--tinta); font-weight: 500; }

/* ações */
.hb__acoes {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px;
  margin-top: clamp(20px, 3.2svh, 32px);
}
.hb__ligar {
  display: inline-grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 16px;
  padding: 17px 26px 17px 24px;
  background: var(--tinta); color: var(--giz);
  text-decoration: none; border-radius: 2px;
  position: relative; overflow: hidden;
  transition: background-color .35s var(--ease);
}
.hb__ligar::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ferrugem);
  transition: width .45s var(--ease);
}
.hb__ligar:hover { background: #2d2622; }
.hb__ligar:hover::before { width: 8px; }
.hb__ligar-rot { font-weight: 500; font-size: 19px; letter-spacing: -.005em; }
.hb__ligar-num { font-family: var(--f-mono); font-size: 14.5px; letter-spacing: .02em; color: #d9d2c7; }
.hb__chegar {
  font-family: var(--f-mono); font-size: 14px; letter-spacing: .03em; text-decoration: none;
  padding: 6px 0; border-bottom: 1px solid var(--tinta);
  transition: color .3s, border-color .3s;
}
.hb__chegar:hover { color: var(--ferrugem-esc); border-color: var(--ferrugem); }

/* balcão de pergunta → resposta */
.hb__balcao {
  margin-top: clamp(22px, 3.6svh, 40px);
  max-width: 640px;
  border-top: 1px solid var(--tinta);
  background: linear-gradient(180deg in oklab, rgb(250 247 242 / .74), rgb(250 247 242 / .42));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--linha);
}
.hb__balcao-topo {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px 10px;
  border-bottom: 1px solid var(--linha);
}
.hb__balcao-fonte {
  margin: 0; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-2);
}
.hb__balcao-nums { display: flex; gap: 4px; }
.hb__balcao-nums button {
  position: relative;
  min-width: 44px; min-height: 36px; padding: 6px 8px;
  border: 0; background: none; cursor: pointer;
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em; color: #7a7067;
}
.hb__balcao-nums button::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 4px; height: 2px;
  background: var(--ferrugem);
  transform: scaleX(var(--prog, 0)); transform-origin: left;
}
.hb__balcao-nums button[aria-selected="true"] { color: var(--tinta); font-weight: 700; }
.hb__balcao-nums button[aria-selected="true"]::after { --prog: 1; }
.hb__balcao.is-auto .hb__balcao-nums button[aria-selected="true"]::after { transform: scaleX(var(--prog-auto, 0)); }

.hb__qas { display: grid; padding: 18px 20px 22px; }
.hb__qa { grid-area: 1 / 1; }
.hb__qa[hidden] { display: block; visibility: hidden; }
.hb__p, .hb__r { display: grid; grid-template-columns: 34px minmax(0, 1fr); margin: 0; }
.hb__sig { font-family: var(--f-mono); font-size: 13px; font-weight: 700; padding-top: .28em; color: #7a7067; }
.hb__ptxt {
  font-family: var(--f-mono); font-size: clamp(14.5px, 1.05vw, 15.5px); line-height: 1.6; color: var(--tinta-2);
}
.hb__ptxt .hb__resto { color: transparent; }
.hb__ptxt .hb__cursor {
  display: inline-block; width: .55em; height: 1.1em; vertical-align: -.18em; margin-left: 1px;
  background: var(--ferrugem); animation: hb-pisca 1s steps(1) infinite;
}
@keyframes hb-pisca { 50% { opacity: 0; } }
.hb__r { margin-top: 14px; }
.hb__r .hb__sig { color: var(--ferrugem); padding-top: .62em; }
.hb__rtxt {
  font-family: var(--f-titulo); font-weight: 500;
  font-size: clamp(22px, 1.9vw, 28px); line-height: 1.18; letter-spacing: -.015em;
  color: var(--tinta);
}
.js .hb__qa .hb__r { opacity: 0; }
.js .hb__qa.is-resp .hb__r { opacity: 1; transition: opacity .18s linear; }

/* retrato */
.hb__retrato {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: min(91svh, 880px);
  display: flex; justify-content: flex-end; align-items: flex-end;
  filter: drop-shadow(0 30px 40px rgb(74 52 30 / .16));
}
.hb__retrato img {
  height: 100%; width: auto; max-width: none;
  object-fit: contain; object-position: bottom;
  -webkit-mask-image: linear-gradient(to bottom, #000 90%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 90%, transparent 100%);
}
.hb__retrato::after { /* granulado leve sobre a foto ampliada */
  content: ""; position: absolute; inset: 0; pointer-events: none;
}

/* prova */
.hb__prova {
  position: absolute; z-index: 4;
  left: var(--lado); bottom: clamp(24px, 5svh, 52px);
  width: min(300px, 70%);
  padding: 16px 18px 14px;
  background: rgb(250 247 242 / .86);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-left: 3px solid var(--ferrugem);
  box-shadow: 0 18px 40px -18px rgb(60 40 25 / .35);
}
.hb__prova blockquote { margin: 0; }
.hb__prova blockquote p { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 500; letter-spacing: -.01em; }
.hb__prova footer { margin-top: 6px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; color: var(--tinta-2); }
.hb__nota {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
  margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--linha);
}
.hb__nota-num { font-weight: 600; font-size: 22px; line-height: 1; letter-spacing: -.02em; }
.hb__estrelas { display: inline-flex; gap: 3px; }
.hb__estrelas i {
  width: 11px; height: 11px; background: var(--ferrugem);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.hb__nota-txt { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; color: var(--tinta-2); }


/* ---------- entrada ---------- */
.js [data-rev] { opacity: 0; transform: translateY(18px); }
.js .hb__linha > [data-rev] { opacity: 1; transform: translateY(108%); }
.js .hb__retrato[data-rev] { transform: translateY(26px); }
.hb.is-in [data-rev] {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}
.hb.is-in .hb__retrato[data-rev] { transition-duration: 1.6s, 1.8s; }

/* ---------- notebook baixo ---------- */
@media (min-width: 981px) and (max-height: 820px) {
  .hb__balcao-topo { padding-block: 8px 6px; }
  .hb__qas { padding: 12px 20px 16px; }
  .hb__r { margin-top: 8px; }
  .hb__titulo { font-size: min(6.6vw, 9.6svh, 118px); }
  .hb__texto { padding-bottom: 26px; }
  .hb__apoio { margin-top: 14px; }
  .hb__acoes { margin-top: 18px; }
  .hb__balcao { margin-top: 20px; }
  .hb__rotulo { margin-bottom: 12px; }
  .hb__ligar { padding-block: 14px; }
  .hb__rtxt { font-size: clamp(21px, 1.7vw, 25px); }
}

/* ---------- tablet / celular ---------- */
@media (max-width: 980px) {
  :root { --nav-h: 64px; }
  .nav__links { display: none; }
  .nav__tel { margin-left: auto; }
  .hb__grade {
    display: flex; flex-direction: column;
    padding: calc(var(--nav-h) + 20px) var(--lado) 40px;
    min-height: 0;
  }
  .hb__texto { display: contents; }
  .hb__rotulo { order: 1; }
  .hb__titulo { order: 2; font-size: clamp(46px, 13.4vw, 92px); }
  .hb__apoio { order: 3; }
  .hb__acoes { order: 4; }
  .hb__figura { order: 5; height: auto; margin: 28px calc(var(--lado) * -1) 0; align-self: stretch; }
  .hb__balcao { order: 6; margin-top: -36px; max-width: none; position: relative; z-index: 5; }
  .hb__retrato {
    position: relative; height: auto;
    display: block; margin-left: auto; width: min(84%, 520px);
    aspect-ratio: 1242 / 1707;
  }
  .hb__retrato img { width: 100%; height: 100%; }
  .hb__prova {
    left: var(--lado); bottom: 64px; width: min(250px, 62%);
    padding: 12px 14px 12px;
  }
  .hb__prova blockquote p { font-size: 17px; }
  .hb__nota-num { font-size: 19px; }
  .hb__m--areia { left: -40vmax; top: 30vh; }
  .hb__m--agua { top: -30vmax; }
}
@media (max-width: 560px) {
  .nav__tel span { display: none; }
  .nav__tel { padding: 11px; }
  .nav__nome { font-size: 18px; }
  .hb__rotulo { font-size: 11.5px; letter-spacing: .1em; gap: 8px; }
  .hb__ligar { width: 100%; grid-template-columns: 1fr auto; column-gap: 10px; padding: 16px 18px 16px 22px; white-space: nowrap; }
  .hb__ligar-num { font-size: 13.5px; }
  .hb__acoes { gap: 14px 24px; }
  .hb__figura { margin-top: 14px; }
  .hb__retrato { width: 90%; }
  .hb__qas { padding: 16px 16px 18px; }
  .hb__balcao-topo { padding: 10px 12px 8px 16px; }
  .hb__balcao-fonte { font-size: 10.5px; letter-spacing: .02em; white-space: nowrap; }
  .hb__nota-txt { white-space: nowrap; }
  .hb__p, .hb__r { grid-template-columns: 28px minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .hb__prova { width: 58%; bottom: 56px; }
  .hb__prova blockquote p { font-size: 16px; }
}

/* ---------- movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .js [data-rev], .js .hb__linha > [data-rev] { opacity: 1 !important; transform: none !important; }
  .js .hb__qa .hb__r { opacity: 1; }
  .hb__m { animation: none !important; translate: none !important; }
  .hb__ptxt .hb__cursor { display: none; }
}

.hb.is-fora .hb__m { animation-play-state: paused; }
.js .hb__balcao:not(.is-pronto) .hb__ptxt { visibility: hidden; }
