/* Hipótese C · "Mais que uma médica" — Dra. Márcia Heloísa Fogaça */

:root {
  /* cor */
  --hc-seda: #f7f2ee;
  --hc-perola: #efe3e0;
  --hc-pessego: #ecc9b8;
  --hc-pele: #e2b6a4;
  --hc-nevoa: #d8c4d1;
  --hc-malva: #6e4a63;
  --hc-ameixa: #3a2430;
  --hc-ameixa-funda: #2c1a24;
  --hc-tinta: #2e1f27;
  --hc-tinta-2: #5a4350;
  --hc-claro-2: #d9c4cb;
  --hc-unha: #a3172d;
  --hc-unha-escura: #86101f;

  /* tipo */
  --hc-f-titulo: "Rozha One", "Georgia", serif;
  --hc-f-texto: "Afacad", "Segoe UI", system-ui, sans-serif;
  --hc-t-corpo: clamp(1rem, .35vw + .9rem, 1.125rem);
  --hc-t-mini: .875rem;

  /* espaço */
  --hc-topo: 76px;
  --hc-gut: clamp(20px, 5.4vw, 84px);
  --hc-vao: clamp(32px, 4vw, 64px);
  --hc-h: max(100svh, 760px);
  --hc-faixa-h: clamp(240px, 33svh, 340px);
  --hc-fig-h: calc(var(--hc-h) - var(--hc-topo) - 26px);
  --hc-fig-w: min(calc(var(--hc-fig-h) * .6), 35vw, 500px);

  /* movimento */
  --hc-ciclo: 4.2s;
  --hc-suave: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--hc-perola);
  color: var(--hc-tinta);
  font-family: var(--hc-f-texto);
  font-size: var(--hc-t-corpo);
  line-height: 1.45;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img { display: block; }
p { margin: 0; }
a { color: inherit; }

/* granulado único, fixo */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  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='g'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.4 -.2'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
}

/* ---------- topo ---------- */
.hc-topo {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  height: var(--hc-topo);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--hc-gut);
}
.hc-marca {
  font-family: var(--hc-f-titulo);
  font-size: 1.2rem;
  line-height: 1;
  text-decoration: none;
  letter-spacing: .005em;
}
.hc-nav { display: flex; align-items: center; gap: 22px; font-size: 1rem; }
.hc-nav-local { color: var(--hc-tinta-2); }
.hc-nav-tel {
  white-space: nowrap;
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid color-mix(in oklab, var(--hc-tinta) 35%, transparent);
}
.hc-nav-tel:hover { border-color: var(--hc-unha); }

/* ---------- hero ---------- */
.hc-hero {
  position: relative;
  height: var(--hc-h);
  display: grid;
  grid-template-rows: minmax(0, 1fr) var(--hc-faixa-h);
  overflow: clip;
  isolation: isolate;
  container-type: inline-size;
}

/* malha quente */
.hc-malha {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hc-perola);
  overflow: clip;
}
.hc-malha i {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
  animation: hc-deriva 34s ease-in-out infinite alternate;
}
.hc-malha i:nth-child(1) {
  width: 78vw; height: 78vw; left: -26vw; top: -34vw;
  background: radial-gradient(circle closest-side in oklab, var(--hc-pessego), color-mix(in oklab, var(--hc-pessego) 55%, transparent) 48%, transparent);
}
.hc-malha i:nth-child(2) {
  width: 70vw; height: 70vw; right: -18vw; top: -22vw;
  background: radial-gradient(circle closest-side in oklab, var(--hc-nevoa), color-mix(in oklab, var(--hc-nevoa) 55%, transparent) 46%, transparent);
  animation-duration: 29s;
  animation-delay: -9s;
}
.hc-malha i:nth-child(3) {
  width: 56vw; height: 56vw; left: 22vw; top: 6vw;
  background: radial-gradient(circle closest-side in oklab, var(--hc-seda), color-mix(in oklab, var(--hc-seda) 50%, transparent) 50%, transparent);
  animation-duration: 38s;
  animation-delay: -14s;
}
.hc-malha i:nth-child(4) {
  width: 60vw; height: 60vw; left: 30vw; bottom: -30vw;
  background: radial-gradient(circle closest-side in oklab, color-mix(in oklab, var(--hc-malva) 40%, var(--hc-nevoa)), transparent);
  opacity: .55;
  animation-duration: 31s;
  animation-delay: -4s;
}
@keyframes hc-deriva {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(4vw, 2.5vw, 0) scale(1.06); }
  100% { transform: translate3d(-3vw, 4vw, 0) scale(.96); }
}

/* ---------- parte clara ---------- */
.hc-alto {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--hc-topo) + 4px) calc(var(--hc-fig-w) + var(--hc-gut) + var(--hc-vao)) 26px var(--hc-gut);
  container-type: inline-size;
}

.hc-sobre {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  letter-spacing: .02em;
  color: var(--hc-tinta-2);
  margin-bottom: clamp(6px, 1.2svh, 14px);
}
.hc-traco { width: 34px; height: 2px; background: var(--hc-unha); flex: none; }

.hc-titulo {
  margin: 0;
  font-family: var(--hc-f-titulo);
  font-weight: 400;
  font-size: min(16.4cqi, 13.4svh, 138px);
  line-height: .9;
  letter-spacing: -.012em;
  color: var(--hc-tinta);
}
.hc-linha { display: block; white-space: nowrap; }
.hc-linha + .hc-linha { margin-top: .04em; }
.hc-ponto { color: var(--hc-unha); }

.hc-par {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4svh, 26px);
  margin-top: clamp(14px, 2.8svh, 30px);
}

.hc-cita { margin: 0; position: relative; padding-top: 4px; }
.hc-cita { max-width: 64ch; }
.hc-cita p {
  display: inline;
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.42;
  color: var(--hc-tinta);
}
.hc-cita footer { display: inline; margin-left: .2em; font-size: 1rem; color: var(--hc-tinta-2); white-space: nowrap; }

.hc-quem { display: flex; flex-wrap: wrap; align-items: center; gap: 14px clamp(20px, 3cqi, 36px); }
.hc-id { min-width: 0; }
.hc-nome {
  font-family: var(--hc-f-titulo);
  font-size: clamp(1.45rem, 2.4cqi, 1.85rem);
  line-height: 1.05;
}
.hc-reg { margin-top: 6px; font-size: 1rem; line-height: 1.35; }
.hc-reg span { white-space: nowrap; }
.hc-onde { display: none; margin-top: 2px; font-size: 1rem; color: var(--hc-tinta-2); }
.hc-acao { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.hc-zap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px 0 18px;
  border-radius: 999px;
  background: var(--hc-unha);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 14px 30px -14px color-mix(in oklab, var(--hc-unha) 80%, transparent);
  transition: background .3s, transform .3s var(--hc-suave);
}
.hc-zap svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.hc-zap:hover { background: var(--hc-unha-escura); transform: translateY(-2px); }
.hc-zap:focus-visible, .hc-idx:focus-visible, .hc-nav-tel:focus-visible, .hc-marca:focus-visible {
  outline: 2px solid var(--hc-unha);
  outline-offset: 3px;
}
.hc-nota { font-size: 1rem; white-space: nowrap; }
.hc-estrela { color: var(--hc-unha); }

/* ---------- retrato ---------- */
.hc-retrato {
  position: absolute;
  z-index: 4;
  margin: 0;
  right: var(--hc-gut);
  top: calc(var(--hc-topo) + 2px);
  width: var(--hc-fig-w);
  height: var(--hc-fig-h);
  filter: drop-shadow(0 34px 44px rgba(46, 31, 39, .32));
}
.hc-quadro {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 3px;
  background: #d7cccc;
}
.hc-quadro img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
}
/* fio de pérola por dentro do quadro */
.hc-quadro::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, .6);
  pointer-events: none;
}

/* ---------- faixa das palavras ---------- */
.hc-faixa {
  position: relative;
  z-index: 1;
  color: var(--hc-perola);
  background: var(--hc-ameixa);
  overflow: clip;
}
.hc-faixa-malha { position: absolute; inset: 0; overflow: clip; }
.hc-faixa-malha i {
  position: absolute;
  border-radius: 50%;
  animation: hc-deriva 27s ease-in-out infinite alternate;
}
.hc-faixa-malha i:nth-child(1) {
  width: 64vw; height: 64vw; left: -14vw; top: -30vw;
  background: radial-gradient(circle closest-side in oklab, var(--hc-malva), color-mix(in oklab, var(--hc-malva) 45%, transparent) 50%, transparent);
  opacity: .85;
}
.hc-faixa-malha i:nth-child(2) {
  width: 48vw; height: 48vw; left: 34vw; top: -6vw;
  background: radial-gradient(circle closest-side in oklab, #5b2638, transparent);
  opacity: .7;
  animation-duration: 33s;
  animation-delay: -12s;
}

.hc-faixa-in {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas:
    "rot rot"
    "pal pal"
    "con fal"
    "idx idx";
  column-gap: clamp(20px, 3cqi, 40px);
  align-content: center;
  padding: clamp(18px, 2.6svh, 28px) calc(var(--hc-fig-w) + var(--hc-gut) + var(--hc-vao)) clamp(16px, 2.4svh, 26px) var(--hc-gut);
  container-type: inline-size;
}
.hc-rotulo {
  grid-area: rot;
  font-size: var(--hc-t-mini);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hc-claro-2);
}
.hc-rotulo span { text-transform: none; letter-spacing: .02em; }
.hc-rotulo span::before { content: "· "; }

.hc-palco { grid-area: pal; position: relative; min-width: 0; align-self: center; }
.hc-palavra {
  font-family: var(--hc-f-titulo);
  font-size: min(16.8cqi, calc((var(--hc-faixa-h) - 150px) / 1.1), 156px);
  line-height: 1;
  padding: .06em 0 .02em;
  white-space: nowrap;
  color: var(--hc-perola);
}
.hc-palavra.hc-sai { position: absolute; left: 0; top: 0; pointer-events: none; }
.hc-l { display: inline-block; }

.hc-conta {
  grid-area: con;
  display: flex;
  align-items: center;
  gap: 12px;
  align-self: start;
}
.hc-n {
  font-family: var(--hc-f-titulo);
  font-size: 3rem;
  line-height: .9;
  color: var(--hc-pessego);
  min-width: .7em;
  text-align: right;
}
.hc-n-txt { display: flex; flex-direction: column; font-size: 1rem; line-height: 1.25; color: var(--hc-claro-2); }
.hc-n-txt em { font-style: italic; color: var(--hc-pessego); }
.hc-n-txt em:empty { display: none; }

.hc-fala {
  grid-area: fal;
  align-self: center;
  font-size: 1.0625rem;
  line-height: 1.4;
  color: var(--hc-perola);
  max-width: 46ch;
  transition: opacity .5s, transform .5s var(--hc-suave);
}
.hc-fala b {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--hc-pessego);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.hc-fala span { color: var(--hc-claro-2); white-space: nowrap; }
.hc-fala.hc-troca { opacity: 0; transform: translateY(6px); }

.hc-indice {
  grid-area: idx;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 22px;
  margin-top: clamp(10px, 1.8svh, 18px);
}
.hc-idx {
  position: relative;
  appearance: none;
  border: 0;
  background: none;
  color: color-mix(in oklab, var(--hc-perola) 62%, transparent);
  font: inherit;
  font-size: 1rem;
  padding: 8px 0 9px;
  cursor: pointer;
  transition: color .4s;
}
.hc-idx sup { font-size: .72em; margin-left: 2px; }
.hc-idx i {
  position: absolute;
  left: 0; right: 0; bottom: 3px;
  height: 2px;
  background: var(--hc-pessego);
  transform: scaleX(0);
  transform-origin: left;
}
.hc-idx:hover { color: var(--hc-perola); }
.hc-idx[aria-pressed="true"] { color: var(--hc-perola); }
.hc-idx[aria-pressed="true"] i { transform: scaleX(1); }
.hc-roda .hc-idx[aria-pressed="true"] i { animation: hc-tempo var(--hc-ciclo) linear both; }
@keyframes hc-tempo { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- entrada (só com JS e com movimento) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hc-topo { animation: hc-sobe .9s var(--hc-suave) both; }
  .js .hc-sobre { animation: hc-sobe .8s var(--hc-suave) .05s both; }
  .js .hc-titulo .hc-c {
    display: inline-block;
    animation: hc-assenta 1s var(--hc-suave) both;
    animation-delay: calc(.12s + var(--i) * 42ms);
  }
  .js .hc-titulo .hc-ponto .hc-c { animation: hc-pinga .7s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: 1.05s; }
  .js .hc-retrato .hc-quadro { animation: hc-abre 1.3s var(--hc-suave) .3s both; }
  .js .hc-retrato img { animation: hc-zoom 2.2s var(--hc-suave) .3s both; }
  .js .hc-par > * { animation: hc-sobe .9s var(--hc-suave) both; }
  .js .hc-cita { animation-delay: .85s; }
  .js .hc-quem { animation-delay: .95s; }
  .js .hc-faixa-in > :not(.hc-palco) { animation: hc-sobe .8s var(--hc-suave) 1.2s both; }
  .js .hc-faixa { animation: hc-faixa 1s var(--hc-suave) .7s both; }

  .hc-palavra .hc-l {
    animation: hc-acende .9s var(--hc-suave) both;
    animation-delay: calc(var(--atraso, 0s) + var(--i) * 45ms);
  }
  .hc-palavra.hc-sai .hc-l {
    animation: hc-apaga .55s ease-in both;
    animation-delay: calc(var(--i) * 22ms);
  }
}

@keyframes hc-sobe { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hc-assenta {
  from { opacity: 0; transform: translateY(.42em) rotate(4deg); filter: blur(8px); }
  60% { filter: blur(0); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes hc-pinga {
  from { opacity: 0; transform: translateY(-.6em) scale(.6); }
  to { opacity: 1; transform: none; }
}
@keyframes hc-abre { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes hc-zoom { from { transform: scale(1.1); } to { transform: none; } }
@keyframes hc-faixa { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hc-acende {
  from { opacity: 0; transform: translateY(.28em); filter: blur(6px); color: var(--hc-pessego); }
  55% { color: var(--hc-pessego); filter: blur(0); }
  to { opacity: 1; transform: none; filter: none; color: var(--hc-perola); }
}
@keyframes hc-apaga {
  to { opacity: 0; transform: translateY(-.22em); filter: blur(5px); }
}

/* pausa fora da tela */
.hc-pausa .hc-malha i, .hc-pausa .hc-faixa-malha i { animation-play-state: paused; }

/* ---------- notebook estreito ---------- */
@media (min-width: 901px) and (max-width: 1180px) {
  :root { --hc-h: max(100svh, 800px); --hc-fig-w: min(calc(var(--hc-fig-h) * .6), 32vw, 500px); --hc-vao: 32px; }
  .hc-cita p { font-size: 1rem; }
  .hc-acao { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
}

/* ---------- notebook baixo ---------- */
@media (min-width: 901px) and (max-height: 780px) {
  .hc-cita p { font-size: 1rem; }
  .hc-n { font-size: 2.5rem; }
}

/* ---------- celular e tablet em pé ---------- */
@media (max-width: 900px) {
  :root { --hc-topo: 64px; }
  .hc-marca { font-size: 1.05rem; }
  .hc-nav-local { display: none; }
  .hc-nav-tel { font-size: .95rem; }

  .hc-hero {
    height: auto;
    display: flex;
    flex-direction: column;
  }
  .hc-alto, .hc-par { display: contents; }
  .hc-sobre { order: 1; padding: calc(var(--hc-topo) + 6px) var(--hc-gut) 0; font-size: .95rem; }
  .hc-titulo {
    order: 2;
    padding: 0 var(--hc-gut);
    font-size: min(15.4cqi, 92px);
  }
  .hc-retrato {
    order: 3;
    position: relative;
    inset: auto;
    width: min(calc(100% - 2 * var(--hc-gut)), 520px);
    height: auto;
    aspect-ratio: 4 / 5;
    min-height: 0;
    margin: 22px auto 0;
  }
  .hc-quem {
    order: 4;
    position: relative;
    z-index: 5;
    width: min(calc(100% - 2 * var(--hc-gut)), 520px);
    margin: 0 auto;
    animation-delay: .6s;
  }
  .hc-quem { flex-direction: column; align-items: stretch; gap: 0; }
  .hc-acao { order: -1; margin-top: -30px; padding-left: 14px; margin-bottom: 18px; gap: 12px; }
  .hc-nota { padding-left: 4px; }
  .hc-onde { display: block; }
  .hc-reg .hc-sep { display: none; }
  .hc-reg span { display: block; }
  .hc-cita footer { display: block; margin: 8px 0 0; }
  .hc-rotulo span { display: block; margin: 4px 0 0; }
  .hc-rotulo span::before { content: none; }
  .hc-nome { font-size: 1.6rem; }
  .hc-cita {
    order: 5;
    width: min(calc(100% - 2 * var(--hc-gut)), 520px);
    margin: 22px auto 30px;
  }
  .hc-faixa { order: 6; }
  .hc-faixa-malha i:nth-child(1) { width: 140vw; height: 140vw; left: -40vw; top: -60vw; }
  .hc-faixa-malha i:nth-child(2) { width: 110vw; height: 110vw; left: 20vw; top: 10vw; }
  .hc-faixa-in {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "rot" "pal" "con" "fal" "idx";
    row-gap: 12px;
    padding: 34px var(--hc-gut) 30px;
  }
  .hc-palavra { font-size: min(16.2cqi, 120px); }
  .hc-n { font-size: 2.6rem; }
  .hc-malha i:nth-child(1) { width: 150vw; height: 150vw; left: -60vw; top: -60vw; }
  .hc-malha i:nth-child(2) { width: 130vw; height: 130vw; right: -60vw; top: 40vw; }
  .hc-malha i:nth-child(3) { width: 120vw; height: 120vw; left: -20vw; top: 110vw; }
  .hc-malha i:nth-child(4) { display: none; }
}

@media (max-width: 380px) {
  .hc-marca { font-size: .95rem; }
  .hc-nav-tel { white-space: nowrap; font-size: .9rem; }
  .hc-nome { font-size: 1.42rem; }
  .hc-rotulo { letter-spacing: .1em; }
  .hc-sobre { font-size: .875rem; gap: 10px; }
  .hc-traco { width: 24px; }
  .hc-zap { padding: 0 18px 0 15px; font-size: 1rem; }
  .hc-indice { gap: 0 16px; }
}

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