/* Hero A · Com propriedade — Dr. Edmundo Kreisner */

@property --rev { syntax: "<percentage>"; inherits: false; initial-value: 130%; }

:root {
  /* cor (amostrada do retrato) */
  --creme: #efeadc;
  --creme-luz: #f7f3e8;
  --creme-quente: #f1e9d6;
  --trelica: #d6d2c0;
  --verde: #a5c4a7;
  --verde-claro: #c6d9c6;
  --agua: #b6d0c9;
  --verde-fundo: #375647;
  --verde-botao: #2a4737;
  --tinta: #1b2f26;
  --tinta-suave: #33483d;
  --azul: #859ab3;
  --azul-tinta: #465c78;

  /* tipografia */
  --f-titulo: "Cardo", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-texto: "Inria Sans", "Gill Sans", "Trebuchet MS", sans-serif;
  --t-titulo: clamp(2.5rem, 4.15vw, 4.5rem);
  --t-apoio: clamp(1.0625rem, 1.2vw, 1.25rem);
  --t-mini: .875rem;

  /* espaço */
  --margem: clamp(1.5rem, 5.6vw, 6rem);
  --nav-alt: 5.5rem;
  --passo: clamp(1rem, 1.6vw, 1.6rem);

  /* foto */
  --desloca: 17svh;
  --tile: clamp(200px, 25vw, 360px);

  --suave: cubic-bezier(.2, .7, .1, 1);
}

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

/* ───────── hero ───────── */

.hero {
  --px: 0; --py: 0;
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: clip;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--nav-alt) var(--margem) clamp(1.5rem, 4svh, 3rem);
  background:
    linear-gradient(98deg in oklab, var(--creme-luz) 0%, var(--creme) 30%, #d3dfca 50%, #b4ccb5 68%, #a9c4ac 100%);
}

/* malha: a luz do jardim */
.malha { position: absolute; inset: 0; z-index: 0; pointer-events: none; animation: surge 1s ease-out both; }
.malha i {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  will-change: transform;
}
.malha i:nth-child(1) { /* creme claro, sobre o texto */
  width: 85vmax; height: 85vmax; left: -28vmax; top: -34vmax;
  background: radial-gradient(closest-side in oklab, var(--creme-luz) 0%, rgb(247 243 232 / .7) 45%, transparent 100%);
  animation: deriva-a 31s ease-in-out infinite alternate;
}
.malha i:nth-child(2) { /* verde do jardim, atrás da treliça */
  width: 66vmax; height: 66vmax; left: 24%; top: -20vmax;
  background: radial-gradient(closest-side in oklch, var(--verde) 0%, rgb(165 196 167 / .55) 42%, transparent 100%);
  animation: deriva-b 24s ease-in-out infinite alternate;
}
.malha i:nth-child(3) { /* água */
  width: 56vmax; height: 56vmax; left: 26%; top: 30%;
  background: radial-gradient(closest-side in oklch, var(--agua) 0%, rgb(182 208 201 / .5) 45%, transparent 100%);
  animation: deriva-c 37s ease-in-out infinite alternate;
}
.malha i:nth-child(4) { /* sombra de folhagem */
  width: 42vmax; height: 42vmax; left: 36%; top: 52%;
  background: radial-gradient(closest-side in oklch, rgb(55 86 71 / .42) 0%, rgb(55 86 71 / .16) 50%, transparent 100%);
  animation: deriva-b 29s ease-in-out infinite alternate-reverse;
}
.malha i:nth-child(5) { /* creme quente, embaixo à esquerda */
  width: 60vmax; height: 60vmax; left: -22vmax; top: 48%;
  background: radial-gradient(closest-side in oklab, var(--creme-quente) 0%, rgb(241 233 214 / .6) 50%, transparent 100%);
  animation: deriva-c 26s ease-in-out infinite alternate-reverse;
}
@keyframes deriva-a { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(5vmax, 3vmax, 0) scale(1.1); } }
@keyframes deriva-b { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-7vmax, 5vmax, 0) scale(1.16); } }
@keyframes deriva-c { from { transform: translate3d(0, 0, 0) scale(1.08); } to { transform: translate3d(6vmax, -5vmax, 0) scale(.94); } }

/* treliça redesenhada: uma camada atrás da foto e outra entre o fundo da foto e a figura */
.trelica {
  position: absolute; inset: -48px; z-index: 1; pointer-events: none;
  transform: translate3d(calc(var(--px) * -16px), calc(var(--py) * -10px), 0);
}
.trelica--frente { z-index: 3; }
.trelica__desenho {
  --perfil: linear-gradient(to right, rgb(0 0 0 / .1) 0%, rgb(0 0 0 / .17) 27%, rgb(0 0 0 / .62) 41%, #000 50%);
  position: absolute; inset: 0;
  background: url("../img/trelica.svg") calc(100% - 20px) 30px / var(--tile) var(--tile);
  filter: blur(.6px);
  -webkit-mask-image: linear-gradient(to left, #000 calc(var(--rev) - 30%), transparent var(--rev)), var(--perfil);
  mask-image: linear-gradient(to left, #000 calc(var(--rev) - 30%), transparent var(--rev)), var(--perfil);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  animation: varre 1.9s var(--suave) .15s both;
}
.trelica--frente .trelica__desenho {
  --perfil: linear-gradient(to right, transparent 36%, rgb(0 0 0 / .8) 45%, rgb(0 0 0 / .7) 50%, transparent 64%);
  filter: blur(1px);
}
@keyframes varre { from { --rev: 0%; } to { --rev: 130%; } }

/* retrato: fundo e figura são duas caixas com a mesma geometria */
.quadro {
  position: absolute; z-index: 2;
  top: 0; bottom: 0; right: calc(var(--desloca) * -1);
  height: 100%;
  aspect-ratio: 1600 / 1385;
  margin: 0;
  pointer-events: none;
  transform-origin: 55% 100%;
  animation: chega 1.5s var(--suave) .1s both;
}
.quadro--figura { z-index: 4; }
.quadro img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: 50% 16%;
}
.quadro--fundo {
  -webkit-mask-image: linear-gradient(to right, transparent 2%, rgb(0 0 0 / .3) 15%, rgb(0 0 0 / .8) 29%, #000 40%);
  mask-image: linear-gradient(to right, transparent 2%, rgb(0 0 0 / .3) 15%, rgb(0 0 0 / .8) 29%, #000 40%);
}
@keyframes chega { from { opacity: 0; transform: scale(1.035); } to { opacity: 1; transform: none; } }

.placa {
  position: absolute; z-index: 6; margin: 0;
  right: clamp(1.5rem, 3.4vw, 3.5rem);
  bottom: clamp(1.5rem, 4.5svh, 2.75rem);
  display: grid; gap: .1rem;
  padding: .8rem 1.1rem .75rem;
  background: rgb(247 243 232 / .86);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
  border: 1px solid rgb(27 47 38 / .14);
  outline: 1px solid rgb(247 243 232 / .7);
  outline-offset: 4px;
  animation: sobe .7s var(--suave) 1.3s both;
}
.placa__nome { font-family: var(--f-titulo); font-size: 1.1875rem; line-height: 1.2; color: var(--tinta); }
.placa__reg { font-size: var(--t-mini); letter-spacing: .09em; color: var(--tinta-suave); }

/* granulado */
.grao {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .13 0 0 0 0 .1 0 0 0 1.6 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* navegação */
.nav {
  position: absolute; z-index: 7; top: 0; left: 0; right: 0;
  height: var(--nav-alt);
  padding: 0 clamp(1.25rem, 2.6vw, 2.5rem) 0 var(--margem);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  animation: desce .8s var(--suave) .15s both;
}
.marca { display: grid; gap: .05rem; text-decoration: none; white-space: nowrap; }
.marca__nome { font-family: var(--f-titulo); font-size: 1.3125rem; line-height: 1.15; letter-spacing: .005em; }
.marca__esp { font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--tinta-suave); }

.nav__capsula {
  display: flex; align-items: center; gap: .25rem;
  padding: .3rem .3rem .3rem .6rem;
  background: rgb(247 243 232 / .84);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  backdrop-filter: blur(12px) saturate(1.1);
  border: 1px solid rgb(27 47 38 / .12);
  border-radius: 3px;
}
.nav__link {
  padding: .55rem .8rem;
  font-size: .9375rem; text-decoration: none; color: var(--tinta);
  background: linear-gradient(currentColor, currentColor) no-repeat .8rem calc(100% - .4rem) / 0 1px;
  transition: background-size .35s var(--suave);
}
.nav__link:hover, .nav__link:focus-visible { background-size: calc(100% - 1.6rem) 1px; }
.nav__fone {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-left: .35rem; padding: .6rem .95rem;
  font-weight: 700; font-size: .9375rem; letter-spacing: .01em; text-decoration: none;
  color: var(--creme-luz); background: var(--verde-botao);
  border-radius: 2px;
  transition: background-color .3s;
}
.nav__fone:hover { background: var(--tinta); }
.nav__fone { white-space: nowrap; }
.nav__ligar { display: none; }

/* texto */
.texto {
  position: relative; z-index: 6;
  width: min(43vw, 47rem);
}
.olho {
  display: flex; align-items: center; gap: .85rem;
  margin: 0 0 var(--passo);
  font-size: var(--t-mini); letter-spacing: .18em; text-transform: uppercase;
  color: var(--azul-tinta);
  animation: sobe .7s var(--suave) .2s both;
}
.olho__traco { width: 2.25rem; height: 1px; background: var(--azul); }

.titulo {
  margin: 0;
  font-family: var(--f-titulo); font-weight: 400;
  font-size: var(--t-titulo); line-height: 1.07; letter-spacing: -.012em;
  text-indent: -.43em;
  text-wrap: balance;
  color: var(--tinta);
}
.titulo .p {
  display: inline-block; text-indent: 0;
  animation: palavra .85s var(--suave) both;
  animation-delay: calc(.28s + var(--i, 0) * .055s);
}
.titulo .p--it { font-style: italic; color: var(--verde-fundo); letter-spacing: -.005em; }
.titulo .p:nth-child(1) { --i: 0 } .titulo .p:nth-child(2) { --i: 1 } .titulo .p:nth-child(3) { --i: 2 }
.titulo .p:nth-child(4) { --i: 3 } .titulo .p:nth-child(5) { --i: 4 } .titulo .p:nth-child(6) { --i: 5 }
.titulo .p:nth-child(7) { --i: 6 } .titulo .p:nth-child(8) { --i: 7 } .titulo .p:nth-child(9) { --i: 8 }
.titulo .p:nth-child(10) { --i: 9 }
@keyframes palavra {
  from { opacity: 0; transform: translate3d(0, .32em, 0); filter: blur(7px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

.assina {
  display: flex; align-items: center; gap: .85rem;
  margin: calc(var(--passo) * .9) 0 0;
  font-family: var(--f-titulo); font-style: italic; font-size: 1.1875rem; color: var(--tinta-suave);
  animation: sobe .7s var(--suave) .95s both;
}
.assina__traco { width: 2.25rem; height: 1px; background: currentColor; opacity: .6; }

.apoio {
  max-width: 31em;
  margin: calc(var(--passo) * 1.5) 0 0;
  font-size: var(--t-apoio); line-height: 1.5; color: var(--tinta-suave);
  animation: sobe .7s var(--suave) 1.05s both;
}
.apoio strong { font-weight: 700; color: var(--tinta); }

.acoes {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem;
  margin-top: calc(var(--passo) * 1.5);
  animation: sobe .7s var(--suave) 1.15s both;
}
.botao {
  position: relative;
  display: inline-flex; align-items: center; gap: .7rem;
  min-height: 3.5rem; padding: .9rem 1.5rem;
  font-weight: 700; font-size: 1.0625rem; letter-spacing: .01em; text-decoration: none;
  color: var(--creme-luz); background: var(--verde-botao);
  border-radius: 2px;
  transition: background-color .3s, transform .3s var(--suave);
}
.botao::after { /* retângulo concêntrico, como na treliça */
  content: ""; position: absolute; inset: -6px;
  border: 1px solid rgb(42 71 55 / .38); border-radius: 3px;
  transition: inset .35s var(--suave), border-color .35s;
}
.botao:hover { background: var(--tinta); }
.botao:hover::after { inset: -9px; border-color: rgb(42 71 55 / .6); }
.botao:active { transform: translateY(1px); }
.botao__fone { font-weight: 400; opacity: .92; }

.chegar {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 3rem; padding: .25rem 0;
  font-size: 1.0625rem; color: var(--tinta);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .32em;
  text-decoration-color: rgb(27 47 38 / .45);
  transition: text-decoration-color .3s;
}
.chegar:hover { text-decoration-color: currentColor; }
.chegar svg { transition: transform .3s var(--suave); }
.chegar:hover svg { transform: translate(2px, -2px); }

.prova {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem;
  margin: calc(var(--passo) * 1.9) 0 0; padding: 0; list-style: none;
  font-size: .9375rem; color: var(--tinta-suave);
  animation: sobe .7s var(--suave) 1.25s both;
}
.prova li { display: inline-flex; align-items: center; gap: .65rem; }
.prova__reg { display: none !important; letter-spacing: .06em; }
.estrelas { display: inline-flex; color: var(--verde-fundo); }

@keyframes sobe { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }
@keyframes desce { from { opacity: 0; transform: translate3d(0, -10px, 0); } to { opacity: 1; transform: none; } }
@keyframes surge { from { opacity: 0; } to { opacity: 1; } }

a:focus-visible { outline: 2px solid var(--azul-tinta); outline-offset: 3px; }

/* ───────── telas largas e baixas / intermediárias ───────── */

@media (min-width: 901px) and (max-width: 1240px) {
  :root { --desloca: 30svh; --t-titulo: clamp(2.25rem, 4.2vw, 3.25rem); }
  .texto { width: min(40vw, 30rem); }
  .texto::before { /* véu de creme: o texto encosta no fundo da foto nestas larguras */
    content: ""; position: absolute; z-index: -1; inset: -12% -14% -12% -30%;
    background: radial-gradient(closest-side in oklab, rgb(244 240 228 / .9) 0%, rgb(244 240 228 / .72) 55%, transparent 100%);
    filter: blur(18px);
  }
  .apoio { color: var(--tinta); }
  .quadro--fundo {
    -webkit-mask-image: linear-gradient(to right, transparent 8%, rgb(0 0 0 / .3) 20%, rgb(0 0 0 / .8) 33%, #000 44%);
    mask-image: linear-gradient(to right, transparent 8%, rgb(0 0 0 / .3) 20%, rgb(0 0 0 / .8) 33%, #000 44%);
  }
  .nav__link { padding-inline: .55rem; }
  .marca__esp { display: none; }
}
@media (min-width: 901px) and (max-aspect-ratio: 5/4) {
  .quadro { top: auto; height: min(100%, 86vw); }
  .quadro--figura { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%); mask-image: linear-gradient(to bottom, transparent 0, #000 9%); }
  .quadro--fundo {
    -webkit-mask-image: linear-gradient(to right, transparent 8%, rgb(0 0 0 / .3) 20%, rgb(0 0 0 / .8) 33%, #000 44%), linear-gradient(to bottom, transparent 0, #000 12%);
    mask-image: linear-gradient(to right, transparent 8%, rgb(0 0 0 / .3) 20%, rgb(0 0 0 / .8) 33%, #000 44%), linear-gradient(to bottom, transparent 0, #000 12%);
    -webkit-mask-composite: source-in; mask-composite: intersect;
  }
}
@media (min-width: 901px) and (max-height: 700px) {
  :root { --t-titulo: clamp(2.1rem, 3.5vw, 3.25rem); --passo: .8rem; --nav-alt: 4.5rem; }
}

/* ───────── empilhado: celular e tablet em pé ───────── */

@media (max-width: 900px) {
  :root {
    --nav-alt: 4rem;
    --foto-topo: 1.75rem;
    --foto-alt: max(45svh, 76vw);
    --t-titulo: clamp(1.8rem, 7.9vw, 3.4rem);
    --passo: .9rem;
    --margem: clamp(1.25rem, 6vw, 3.5rem);
  }
  .hero {
    justify-content: flex-start;
    padding-top: calc(var(--foto-topo) + var(--foto-alt) * .84);
    padding-bottom: 1.75rem;
    background: linear-gradient(178deg in oklab, #bfd3bd 0%, #d5e0cd 26%, var(--creme) 52%, var(--creme-luz) 100%);
  }
  .malha i:nth-child(1) { left: -30vmax; top: 38%; }
  .malha i:nth-child(2) { left: -10%; top: -22vmax; }
  .malha i:nth-child(3) { left: 30%; top: 8%; }
  .malha i:nth-child(4) { left: 38%; top: 12%; width: 38vmax; height: 38vmax; }
  .malha i:nth-child(5) { left: 10%; top: 60%; }

  .trelica--frente { display: none; }
  .trelica__desenho {
    --perfil: linear-gradient(to bottom, #000 0%, #000 34%, rgb(0 0 0 / .3) 50%, rgb(0 0 0 / .14) 62%, rgb(0 0 0 / .1) 100%);
    background-position: 50% 12px;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(var(--rev) - 30%), transparent var(--rev)), var(--perfil);
    mask-image: linear-gradient(to bottom, #000 calc(var(--rev) - 30%), transparent var(--rev)), var(--perfil);
  }

  .quadro {
    top: var(--foto-topo); bottom: auto; left: 0; right: 0;
    width: 100%; height: var(--foto-alt);
    aspect-ratio: auto;
    transform-origin: 50% 60%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 61%, rgb(0 0 0 / .36) 80%, transparent 97%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 61%, rgb(0 0 0 / .36) 80%, transparent 97%);
  }
  .placa { display: none; }
  .olho { display: none; }

  .nav { padding-right: var(--margem); }
  .nav__capsula { padding: 0; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav__link { display: none; }
  .nav__num { display: none; }
  .nav__ligar { display: inline; }
  .nav__fone { margin: 0; min-height: 2.75rem; padding: .55rem .9rem; box-shadow: 0 0 0 1px rgb(247 243 232 / .5); }
  .marca__nome { font-size: 1.1875rem; }
  .marca__esp { display: none; }
  .marca {
    padding: .4rem .7rem; margin-left: -.7rem;
    background: rgb(247 243 232 / .8);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-radius: 2px;
  }

  .texto { width: 100%; max-width: 36rem; margin-inline: auto; }
  .titulo { line-height: 1.08; }
  .apoio { margin-top: 1rem; }
  .acoes { margin-top: 1.25rem; gap: .5rem 1.5rem; }
  .botao { flex: 1 1 auto; justify-content: center; padding-inline: 1.1rem; }
  .prova { margin-top: 1.4rem; gap: .35rem 1.25rem; font-size: var(--t-mini); }
  .prova__reg { display: inline-flex !important; }
}

@media (max-width: 900px) and (min-width: 600px) {
  :root { --foto-alt: min(76vw, 50svh); }
  .hero { padding-top: calc(var(--foto-topo) + var(--foto-alt) * .88); }
  .nav__num { display: inline; }
  .nav__ligar { display: none; }
  .texto { text-align: left; }
  .botao { flex: 0 0 auto; }
}

@media (max-width: 374px) {
  .botao { font-size: 1rem; padding-inline: .8rem; gap: .5rem; }
}

/* ───────── movimento reduzido (reset geral, sempre por último) ───────── */

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