/* Hipótese D · "Eu amo ver você sorrindo" — o tecido da touca da Dra. Gi */

:root {
  /* tinta e tecido */
  --tinta: #1e3354;            /* marinho do logo, a tinta da estampa */
  --caramelo: #d9a46a;
  --mostarda: #c29741;
  --palha: #e8c48d;
  --caramelo-fundo: #c98e52;
  --barra: #b07636;            /* a dobra da barra do tecido */
  --creme: #fbf6ec;
  --rosa: #e9b7c6;
  --azul-jaleco: #bcd7ee;
  --magenta: #d6265a;          /* só acento */

  /* tipografia */
  --f-titulo: 'Bowlby One', 'Arial Black', system-ui, sans-serif;
  --f-texto: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* espaçamento */
  --pad-x: clamp(20px, 5.6vw, 104px);
  --nav-h: clamp(68px, 8vh, 92px);
  --raio: 14px;
  --mola: cubic-bezier(.34, 1.56, .64, 1);
  --suave: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--f-texto);
  color: var(--tinta);
  background: var(--caramelo);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }

/* ---------- palco ---------- */
.hd {
  --fig-w: min(600px, 41vw, calc((100svh - 130px) * .785));
  position: relative;
  min-height: max(100svh, 640px);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: center;
  touch-action: pan-y;
}

/* forro: o consultório branco que aparece pela abertura */
.hd-forro {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(in oklab ellipse 38% 46% at 74% 30%, #ffffff 0%, rgb(255 255 255 / 0) 100%),
    radial-gradient(in oklab ellipse 30% 40% at 88% 86%, #f4dde4 0%, rgb(244 221 228 / 0) 100%),
    radial-gradient(in oklab ellipse 32% 40% at 58% 92%, #e3ecf6 0%, rgb(227 236 246 / 0) 100%),
    var(--creme);
}

/* ---------- o tecido ---------- */
.hd-tecido {
  position: absolute; inset: 0; z-index: 1;
  /* a abertura é recortada por uma máscara gerada no JS */
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.hd-malha {
  position: absolute; inset: -18%;
  background:
    radial-gradient(in oklab ellipse 42% 38% at 16% 20%, #ebc993 0%, rgb(235 201 147 / 0) 100%),
    radial-gradient(in oklab ellipse 36% 34% at 78% 12%, #e2b47a 0%, rgb(226 180 122 / 0) 100%),
    radial-gradient(in oklab ellipse 46% 40% at 64% 88%, #c29741 0%, rgb(194 151 65 / 0) 100%),
    radial-gradient(in oklab ellipse 40% 44% at 8% 92%, var(--caramelo-fundo) 0%, rgb(201 142 82 / 0) 100%),
    radial-gradient(in oklab ellipse 30% 30% at 40% 52%, #e0ae73 0%, rgb(224 174 115 / 0) 100%),
    var(--caramelo);
  animation: hd-respira 34s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes hd-respira {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-3%, 2%, 0) scale(1.04); }
  100% { transform: translate3d(2%, -2.5%, 0) scale(1.02); }
}
.hd-pano {
  position: absolute; inset: 0; width: 100%; height: 100%;
  mix-blend-mode: multiply;   /* tinta impressa no pano */
}
/* luz de dobra: faixas largas e lentas, como pano sobre o corpo */
.hd-dobra {
  position: absolute; inset: -30%;
  background:
    linear-gradient(in oklab 112deg,
      rgb(255 244 226 / 0) 18%, rgb(255 244 226 / .22) 27%, rgb(255 244 226 / 0) 37%,
      rgb(110 60 18 / 0) 44%, rgb(110 60 18 / .12) 53%, rgb(110 60 18 / 0) 63%,
      rgb(255 244 226 / 0) 70%, rgb(255 244 226 / .16) 78%, rgb(255 244 226 / 0) 87%);
  background-size: 160% 160%;
  animation: hd-dobra 38s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes hd-dobra {
  from { background-position: 0% 30%; }
  to   { background-position: 100% 70%; }
}
/* sarja do tecido */
.hd-trama {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, rgb(255 246 230 / .07) 0 1px, rgb(0 0 0 / 0) 1px 3px),
    repeating-linear-gradient(45deg, rgb(90 50 10 / .045) 0 1px, rgb(0 0 0 / 0) 1px 4px);
  pointer-events: none;
}
.hd-grao {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2  0 0 0 0 .12  0 0 0 0 .05  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .05;
  pointer-events: none;
}

/* ---------- abertura costurada ---------- */
.hd-costura {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 2; pointer-events: none; overflow: visible;
}
.hd-c-sombra { fill: none; stroke: rgb(70 36 6 / .42); stroke-width: 30; transform: translateY(7px); }
.hd-c-barra  { fill: none; stroke: var(--barra); stroke-width: 15; }
.hd-c-dobra  { fill: none; stroke: rgb(255 236 204 / .55); stroke-width: 1.6; }
.hd-c-linha  { fill: none; stroke: var(--creme); stroke-width: 2.4; stroke-dasharray: 9 6; stroke-linecap: round; }
.hd-c-linha-sombra { fill: none; stroke: rgb(80 42 8 / .35); stroke-width: 2.4; stroke-dasharray: 9 6; stroke-linecap: round; transform: translate(.6px, 1.4px); }
.hd-c-linha-mask { fill: none; stroke: #fff; stroke-width: 14; stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .hd-c-linha-mask { stroke-dashoffset: 1; }
.js .hd.is-pronto .hd-c-linha-mask { animation: hd-traca 1.5s .25s var(--suave) forwards; }
@keyframes hd-traca { to { stroke-dashoffset: 0; } }

/* ---------- navegação ---------- */
.hd-nav {
  position: absolute; z-index: 7; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad-x);
}
.hd-marca {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--tinta); text-decoration: none;
  border-radius: 999px;
}
.hd-selo {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--creme);
  display: grid; place-items: center;
  box-shadow: 0 0 0 1.5px var(--creme), 0 0 0 3.5px rgb(30 51 84 / .0), inset 0 0 0 4px var(--creme), inset 0 0 0 5.5px rgb(194 151 65 / .0), 0 6px 14px -8px rgb(70 36 6 / .6);
  position: relative;
}
.hd-selo::after { /* pesponto em volta do selo */
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  border: 1.5px dashed rgb(194 151 65 / .9);
}
.hd-selo img { width: 40px; height: 40px; }
.hd-marca-txt { display: flex; flex-direction: column; line-height: 1.05; }
.hd-marca-txt b { font-family: var(--f-titulo); font-weight: 400; font-size: 19px; letter-spacing: .01em; }
.hd-marca-txt small { white-space: nowrap; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; margin-top: 3px; }
.hd-m-area { display: none; }

.hd-nav-wa {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px 9px 12px;
  font-size: 14.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--tinta); text-decoration: none;
  background: rgb(251 246 236 / .92);
  border-radius: 999px;
  box-shadow: 0 6px 14px -9px rgb(70 36 6 / .7);
  position: relative;
}
.hd-nav-wa::after {
  content: ""; position: absolute; inset: 3px; border-radius: 999px;
  border: 1.4px dashed rgb(194 151 65 / .85); pointer-events: none;
}
.hd-nav-wa svg { width: 18px; height: 18px; fill: currentColor; }
.hd-nav-wa:hover { background: var(--creme); }

/* ---------- texto ---------- */
.hd-texto {
  position: relative; z-index: 5;
  margin-left: var(--pad-x);
  width: calc(100% - var(--fig-w) - var(--pad-x) * 2 - clamp(24px, 4vw, 72px));
  max-width: 760px;
  padding: calc(var(--nav-h) + 8px) 0 clamp(40px, 7vh, 80px);
  container-type: inline-size;
}
.hd-sobre {
  display: inline-flex; gap: 9px; align-items: center;
  margin: 0 0 clamp(14px, 2.2vh, 22px);
  padding: 6px 14px 6px;
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  background: var(--tinta); color: var(--creme);
  border-radius: 4px;
  position: relative;
  transform: rotate(-1.2deg);
}
.hd-sobre::after {
  content: ""; position: absolute; inset: 3px; border-radius: 2px;
  border: 1.2px dashed rgb(251 246 236 / .55); pointer-events: none;
}

.hd-titulo {
  margin: 0;
  font-family: var(--f-titulo); font-weight: 400;
  text-transform: uppercase;
  font-size: min(14.6cqi, 118px);
  line-height: .98;
  letter-spacing: -.005em;
  color: var(--tinta);
}
.hd-l { display: block; width: fit-content; }
.hd-l3 { margin-top: .1em; }
.hd-remendo {
  position: relative; display: inline-block;
  padding: .13em .26em .34em;
  margin-left: -.12em;
  background:
    repeating-linear-gradient(0deg, rgb(194 151 65 / .07) 0 1px, rgb(0 0 0 / 0) 1px 3px),
    var(--creme);
  border-radius: .16em;
  transform: rotate(-2.4deg);
  box-shadow: 0 .04em 0 rgb(150 96 40 / .35), 0 .22em .4em -.18em rgb(70 36 6 / .55);
}
.hd-remendo::before { /* pesponto do remendo */
  content: ""; position: absolute; inset: .085em; border-radius: .1em;
  border: max(2px, .03em) dashed var(--mostarda);
  pointer-events: none;
}
.hd-sorriso {
  position: absolute; left: 22%; bottom: .06em; width: 56%; height: auto;
  overflow: visible;
}
.hd-sorriso path {
  fill: none; stroke: var(--magenta); stroke-width: 2.6; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
}

.hd-atrib {
  display: flex; align-items: center; gap: 10px;
  margin: clamp(14px, 2vh, 20px) 0 0;
  font-size: 15px; font-weight: 600; letter-spacing: .02em;
  width: fit-content;
}
.hd-atrib-traco { width: 26px; height: 2px; background: currentColor; border-radius: 2px; }

.hd-apoio {
  margin: clamp(14px, 2.2vh, 22px) 0 0;
  max-width: 31ch;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.45; font-weight: 500;
  width: fit-content;
}

.hd-acoes { margin-top: clamp(20px, 3.4vh, 32px); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hd-cta {
  --c: var(--tinta);
  position: relative;
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 60px;
  padding: 10px 22px 10px 12px;
  border-radius: var(--raio);
  background: var(--c);
  color: var(--creme);
  font-size: 17.5px; font-weight: 700; letter-spacing: .01em;
  text-decoration: none;
  box-shadow: 0 2px 0 #142640, 0 14px 26px -14px rgb(30 20 8 / .8);
  transition: transform .35s var(--mola), box-shadow .3s;
}
.hd-cta::before { /* pesponto da etiqueta */
  content: ""; position: absolute; inset: 5px; border-radius: 10px;
  border: 1.5px dashed rgb(251 246 236 / .5); pointer-events: none;
}
.hd-cta:hover { transform: translateY(-2px) rotate(-.6deg); }
.hd-cta:focus-visible, .hd-nav-wa:focus-visible, .hd-marca:focus-visible {
  outline: 3px solid var(--creme);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px var(--tinta);
}
/* botão de costura: quatro furos e a linha em X */
.hd-botao {
  position: relative; flex: none;
  width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(in oklab circle at 35% 30%, #fff6dd, var(--palha) 70%, var(--mostarda));
  box-shadow: inset 0 0 0 3px rgb(150 100 40 / .35), 0 2px 3px rgb(0 0 0 / .25);
  transition: transform .5s var(--mola);
}
.hd-botao i {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: #6b4512; top: 11px; left: 11px;
}
.hd-botao i:nth-child(2) { left: 21px; }
.hd-botao i:nth-child(3) { top: 21px; }
.hd-botao i:nth-child(4) { top: 21px; left: 21px; }
.hd-botao::before, .hd-botao::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 16px; height: 2.4px; margin: -1.2px 0 0 -8px;
  background: var(--magenta); border-radius: 2px;
  transform: rotate(45deg);
}
.hd-botao::after { transform: rotate(-45deg); }
.hd-cta:hover .hd-botao { transform: rotate(90deg); }
.hd-cta-seta { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--suave); }
.hd-cta:hover .hd-cta-seta { transform: translateX(3px); }

/* ---------- retrato ---------- */
.hd-retrato {
  position: absolute; z-index: 4;
  right: clamp(24px, 6.5vw, 130px); bottom: 0;
  width: var(--fig-w);
  margin: 0;
  aspect-ratio: 1164 / 1484;
}
.hd-retrato img {
  width: 100%; height: auto;
  filter: drop-shadow(0 18px 30px rgb(70 36 6 / .22));
}

/* etiqueta de roupa costurada */
.hd-etiqueta {
  position: absolute; z-index: 2;
  left: -17%; bottom: 7%;
  width: 262px;
  padding: 22px 18px 14px;
  background:
    repeating-linear-gradient(0deg, rgb(30 51 84 / .035) 0 1px, rgb(0 0 0 / 0) 1px 3px),
    var(--creme);
  color: var(--tinta);
  border-radius: 3px 3px 6px 6px;
  transform: rotate(-3.2deg);
  transform-origin: 50% 0;
  box-shadow: 0 1px 0 rgb(150 96 40 / .3), 0 22px 34px -18px rgb(50 26 4 / .6);
}
.hd-etiqueta::before { /* dobra costurada no alto */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 11px;
  background: linear-gradient(rgb(30 51 84 / .1), rgb(30 51 84 / .02));
  border-bottom: 1.6px dashed rgb(30 51 84 / .55);
  border-radius: 3px 3px 0 0;
}
.hd-etiqueta p, .hd-etiqueta blockquote { margin: 0; }
.et-nome { font-weight: 700; font-size: 15.5px; line-height: 1.2; letter-spacing: .005em; }
.et-cro { font-size: 13px; font-weight: 600; letter-spacing: .1em; margin-top: 3px; text-transform: uppercase; }
.et-nota {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px;
  margin-top: 11px !important; padding-top: 10px;
  border-top: 1.4px dashed rgb(30 51 84 / .4);
  font-size: 14px; font-weight: 500;
}
.et-nota b { font-weight: 700; }
.et-estrelas { color: #b07f25; letter-spacing: .08em; font-size: 14px; }
.et-frase { margin-top: 9px !important; font-size: 13.5px; line-height: 1.38; font-weight: 500; }
.et-frase cite { font-style: normal; font-weight: 700; white-space: nowrap; }
.et-simbolos { display: flex; gap: 9px; margin-top: 12px; }
.et-simbolos svg {
  width: 26px; height: 26px;
  border: 1.3px solid rgb(30 51 84 / .55); border-radius: 4px;
  fill: none; stroke: var(--tinta); stroke-linecap: round; stroke-linejoin: round;
}

/* seta desenhada até a touca */
.hd-seta {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 3; pointer-events: none; overflow: visible;
}
.hd-seta path { fill: none; stroke: var(--tinta); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }

/* ---------- entrada coreografada (só com JS) ---------- */
.js .hd-sobre, .js .hd-l, .js .hd-atrib, .js .hd-apoio, .js .hd-acoes, .js .hd-nav,
.js .hd-retrato img, .js .hd-etiqueta { opacity: 0; }
.js .hd-sorriso path, .js .hd-seta path { stroke-dashoffset: 1; }

.js .is-pronto .hd-nav { animation: hd-sobe .7s .05s var(--suave) both; }
.js .is-pronto .hd-sobre { animation: hd-sobe .6s .08s var(--suave) both; }
.js .is-pronto .hd-l1 { animation: hd-linha .8s .12s var(--mola) both; }
.js .is-pronto .hd-l2 { animation: hd-linha .8s .22s var(--mola) both; }
.js .is-pronto .hd-l3 { animation: hd-remenda .9s .5s var(--mola) both; }
.js .is-pronto .hd-sorriso path { animation: hd-traca .7s 1.1s var(--suave) forwards; }
.js .is-pronto .hd-atrib { animation: hd-sobe .6s .95s var(--suave) both; }
.js .is-pronto .hd-apoio { animation: hd-sobe .7s 1.05s var(--suave) both; }
.js .is-pronto .hd-acoes { animation: hd-sobe .7s 1.2s var(--mola) both; }
.js .is-pronto .hd-retrato img { animation: hd-retrato 1.1s .3s var(--suave) both; }
.js .is-pronto .hd-etiqueta { animation: hd-pendura 1.2s 1.15s var(--mola) both; }
.js .is-pronto .hd-seta path.hd-seta-linha { animation: hd-traca .8s 1.45s var(--suave) forwards; }
.js .is-pronto .hd-seta path.hd-seta-ponta { animation: hd-traca .25s 2.15s linear forwards; }

@keyframes hd-sobe { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hd-linha { from { opacity: 0; transform: translateY(.5em) rotate(1.5deg); } to { opacity: 1; transform: none; } }
@keyframes hd-remenda {
  0%   { opacity: 0; transform: translateY(-.3em) scale(1.18) rotate(4deg); }
  45%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes hd-retrato { from { opacity: 0; transform: translateY(34px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes hd-pendura {
  0%   { opacity: 0; transform: rotate(-16deg) translateY(-16px); }
  30%  { opacity: 1; }
  100% { opacity: 1; transform: rotate(-3.2deg); }
}

/* ---------- notebook baixo ---------- */
@media (min-width: 900px) and (max-height: 760px) {
  .hd-titulo { font-size: min(14.6cqi, 14vh); }
  .hd-apoio { font-size: 16.5px; }
  .hd-etiqueta { width: 236px; padding: 19px 15px 12px; }
  .et-frase { display: none; }
}

/* ---------- celular e tablet em pé ---------- */
@media (max-width: 899px) {
  .hd {
    --fig-w: clamp(236px, min(86vw, calc((100svh - 446px) * .785)), 540px);
    flex-direction: column; align-items: stretch;
  }
  .hd-nav { height: 66px; }
  .hd-selo { width: 42px; height: 42px; }
  .hd-selo img { width: 34px; height: 34px; }
  .hd-marca-txt b { font-size: 16px; }
  .hd-marca-txt small { font-size: 11px; letter-spacing: .03em; }
  .hd-m-nome { display: none; }
  .hd-m-area { display: inline; }
  .hd-sobre { display: none; }
  .hd-nav-wa { padding: 8px 12px 8px 10px; font-size: 13px; }
  .hd-nav-wa span { display: none; }
  .hd-nav-wa::before { content: "WhatsApp"; order: 2; }

  .hd-texto {
    width: auto; max-width: none;
    margin: 0; padding: 74px 20px 18px;
  }
  .hd-sobre { font-size: 11.5px; padding: 5px 11px; margin-bottom: 12px; }
  .hd-titulo { font-size: min(14.4cqi, 66px); }
  .hd-atrib { font-size: 13.5px; margin-top: 12px; }
  .hd-apoio { font-size: 15.5px; margin-top: 10px; max-width: 34ch; }
  .hd-acoes { margin-top: 16px; }
  .hd-cta { min-height: 54px; font-size: 16px; padding: 8px 18px 8px 9px; gap: 12px; }
  .hd-botao { width: 34px; height: 34px; }
  .hd-botao i { width: 5px; height: 5px; top: 10px; left: 10px; }
  .hd-botao i:nth-child(2) { left: 19px; }
  .hd-botao i:nth-child(3) { top: 19px; }
  .hd-botao i:nth-child(4) { top: 19px; left: 19px; }

  .hd-retrato {
    position: relative; right: auto;
    margin: auto 0 0 calc(50% - var(--fig-w) * .56);
    flex: none;
  }
  .hd-etiqueta {
    left: max(-12%, calc(var(--fig-w) * .56 - 50vw + 12px)); bottom: 5%;
    width: 192px; padding: 15px 11px 9px;
  }
  .et-nome { font-size: 12px; letter-spacing: -.005em; }
  .et-cro { font-size: 11px; letter-spacing: .08em; }
  .et-nota { font-size: 11px; margin-top: 7px !important; padding-top: 7px; gap: 1px 5px; }
  .et-estrelas { font-size: 11.5px; }
  .et-frase, .et-simbolos { display: none; }
}

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