/* BioAuca: estrutura da biopage. Cores, fontes e raio vêm de modelos.js (variáveis no <html>).
   Formas variam por atributo: data-banner, data-cartoes, data-avatar. */

:root {
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pat: var(--ac);
  --fade: 0;
  --av-r: 50%;
  --card: color-mix(in srgb, var(--tx) 6%, var(--bg));
  --bd: color-mix(in srgb, var(--tx) 13%, var(--bg));
  --bd2: color-mix(in srgb, var(--tx) 24%, var(--bg));
  --bg0: color-mix(in srgb, var(--ac) 12%, var(--bg));
  --glow: color-mix(in srgb, var(--ac) 28%, transparent);
  --tile: color-mix(in srgb, var(--ac) 15%, transparent);
  --tile-ic: var(--ac);
  --av-bg: var(--ac);
  --av-tx: var(--ac-tx);
  --blob2: var(--ac2);
  --onda: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='40' viewBox='0 0 200 40'><path d='M0 22C25 6 75 6 100 22S175 38 200 22V40H0Z'/></svg>");
  --chev: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M9 6l6 6-6 6'/></svg>");
}
html[data-avatar='arredondado'] { --av-r: 32%; }
html[data-avatar='arco'] { --av-r: 56px 56px 24px 24px; }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
/* trava de rolagem: no iPhone, overflow:hidden no html não basta; o JS fixa o body (com top negativo) e devolve a posição ao fechar */
html.trava { overflow: hidden; }
html.trava body { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
body { min-height: 100dvh; background: var(--bg0); color: var(--tx); font: 400 16px/1.5 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 3px; }

/* ---------- moldura ---------- */
.fundo { display: none; position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.fundo i { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; background: var(--ac); opacity: .2; filter: blur(90px); animation: flutuar 24s ease-in-out infinite alternate; }
.fundo i:nth-child(1) { top: -22vmax; left: -16vmax; }
.fundo i:nth-child(2) { bottom: -26vmax; right: -16vmax; background: var(--blob2); animation-delay: -9s; }

.tela { position: relative; max-width: 480px; min-height: 100dvh; margin: 0 auto; overflow: hidden; background: var(--bg); padding-bottom: max(28px, env(safe-area-inset-bottom)); isolation: isolate; }
.tela::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .05; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.tela > * { position: relative; z-index: 1; }
@media (min-width: 560px) {
  .fundo { display: block; }
  .tela { margin: 28px auto; min-height: calc(100dvh - 56px); border-radius: 34px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .45), 0 0 0 1px var(--bd); }
}

/* ---------- banner ---------- */
.banner { height: 188px; overflow: hidden; background: var(--banner); }
.padrao, .banner-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.padrao { overflow: hidden; animation: aparecer 1s var(--ease) both; }
.padrao::before { content: ''; position: absolute; inset: 0; }
.banner-img { object-fit: cover; animation: zoom 1.4s var(--ease) both; }
.banner::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; opacity: var(--fade); }

html[data-banner='listras'] .padrao::before { left: -80px; right: -80px; background: radial-gradient(circle at 82% 10%, color-mix(in srgb, var(--pat) 38%, transparent), transparent 48%), repeating-linear-gradient(-45deg, color-mix(in srgb, var(--pat) 18%, transparent) 0 16px, transparent 16px 32px); animation: poste 7s linear infinite; }
html[data-banner='circulos'] .padrao::before { background: radial-gradient(circle at 18% 125%, color-mix(in srgb, var(--bg) 72%, transparent) 0 40%, transparent 40.4%), radial-gradient(circle at 88% -12%, color-mix(in srgb, var(--pat) 30%, transparent) 0 36%, transparent 36.4%), radial-gradient(circle at 58% 135%, color-mix(in srgb, var(--pat) 20%, transparent) 0 28%, transparent 28.4%); animation: respirar 9s ease-in-out infinite alternate; }
html[data-banner='pontos'] .padrao::before { inset: -14px; background: radial-gradient(circle at 90% 6%, var(--pat) 0 21%, transparent 21.4%), radial-gradient(color-mix(in srgb, var(--pat) 24%, transparent) 1.5px, transparent 1.9px) 0 0 / 14px 14px; animation: pontos 5s linear infinite; }
html[data-banner='grade'] .padrao::before { inset: -24px; background: radial-gradient(circle at 80% 0, color-mix(in srgb, var(--pat) 34%, transparent), transparent 55%), linear-gradient(color-mix(in srgb, var(--pat) 18%, transparent) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, color-mix(in srgb, var(--pat) 18%, transparent) 1px, transparent 1px) 0 0 / 24px 24px; animation: grade 6s linear infinite; }
html[data-banner='ondas'] .padrao::before, html[data-banner='ondas'] .padrao::after { content: ''; position: absolute; left: -200px; right: 0; bottom: 0; height: 74px; background: color-mix(in srgb, var(--pat) 34%, transparent); -webkit-mask: var(--onda) repeat-x left bottom / 200px 100%; mask: var(--onda) repeat-x left bottom / 200px 100%; animation: onda 9s linear infinite; }
html[data-banner='ondas'] .padrao::before { inset: auto 0 0 -200px; }
html[data-banner='ondas'] .padrao::after { height: 52px; background: color-mix(in srgb, var(--pat) 22%, transparent); animation: onda 14s linear infinite reverse; }

.compartilhar { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--sh-bg); color: var(--sh-tx); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .3s var(--ease); z-index: 3; }
.compartilhar:active { transform: scale(.92); }
.compartilhar .ic { width: 20px; height: 20px; }

/* ---------- perfil ---------- */
.perfil { padding: 0 24px; text-align: center; margin-top: -56px; }
.avatar { position: relative; width: 112px; height: 112px; margin: 0 auto; }
.avatar::before { content: ''; position: absolute; inset: -4px; border-radius: var(--av-r); background: conic-gradient(from 0deg, var(--ac), var(--ac2), var(--ac)); animation: girar 9s linear infinite; }
html[data-avatar='arredondado'] .avatar::before, html[data-avatar='arco'] .avatar::before { animation: none; background: var(--ac); }
.foto { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; border-radius: var(--av-r); border: 4px solid var(--bg); background: var(--av-bg); color: var(--av-tx); font-family: var(--f-titulo); font-weight: var(--pesot); font-size: 38px; letter-spacing: var(--ls); }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.nome { margin-top: 18px; font-family: var(--f-titulo); font-weight: var(--pesot); font-size: var(--sz); line-height: 1.05; letter-spacing: var(--ls); text-transform: var(--tt); text-wrap: balance; }
.sub { margin-top: 6px; color: var(--mt); font-size: 15px; font-weight: 500; }
.status { display: flex; width: fit-content; align-items: center; gap: 8px; margin: 12px auto 0; padding: 6px 14px 6px 11px; border-radius: 99px; background: var(--card); border: 1px solid var(--bd); font-size: 13px; font-weight: 600; }
.status[hidden] { display: none; }
.status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--mt); }
.status.aberto::before { background: #22c55e; animation: ponto 2.2s ease-out infinite; }
.registro { margin-top: 4px; color: var(--mt); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.registro-q { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--bd); color: var(--mt); font-size: 14px; }
.registro-q b { color: var(--tx); font-weight: 600; }
.demo-faixa { padding: 5px 16px; background: var(--tx); color: var(--bg); text-align: center; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.bio { max-width: 32ch; margin: 12px auto 0; font-size: 16px; line-height: 1.5; text-wrap: balance; }

[style*='--i'] { animation: subir .8s var(--ease) both; animation-delay: calc(var(--i) * 70ms + 120ms); }

/* ---------- ações ---------- */
.acoes { display: grid; gap: 12px; padding: 24px 20px 0; }

.whats { position: relative; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 20px; border-radius: var(--r); background: var(--wa); color: var(--wa-tx); font-size: 17px; font-weight: 700; box-shadow: 0 14px 28px -14px var(--wa); transition: transform .35s var(--ease); -webkit-tap-highlight-color: transparent; }
.whats::before { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--wa); pointer-events: none; animation: anel 3s var(--ease) 1.6s infinite; }
.whats .rot { flex: 1; text-align: left; }
.whats .ic:first-of-type { width: 26px; height: 26px; stroke-width: 1.9; }
.whats .ic:last-of-type { width: 20px; height: 20px; transition: transform .35s var(--ease); }
.brilho { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.brilho::after { content: ''; position: absolute; top: 0; bottom: 0; left: -90px; width: 60px; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .42), transparent); transform: skewX(-20deg); animation: brilho 5.5s var(--ease) 1.8s infinite; }
.whats:active { transform: scale(.975); }
.whats.mini { height: 56px; margin-top: 8px; }
.whats.mini::before { display: none; }

.cartoes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cartoes > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.cartao { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 16px; min-height: 104px; padding: 16px; overflow: hidden; border-radius: var(--r); background: var(--card); border: 1px solid var(--bd); text-align: left; font-size: 16px; font-weight: 600; transition: transform .4s var(--ease), border-color .3s, background .3s; -webkit-tap-highlight-color: transparent; }
.cartao::before, .linha::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 70%); transition: opacity .35s; }
.cartao:active { transform: scale(.96); }
.cartao:active::before, .linha:active::before { opacity: 1; }
.tile { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: calc(var(--r) - 5px); background: var(--tile); color: var(--tile-ic); transition: transform .45s var(--ease); }
.rot { position: relative; }

html[data-cartoes='lista'] .cartoes { grid-template-columns: 1fr; gap: 10px; }
html[data-cartoes='lista'] .cartoes > :last-child:nth-child(odd) { grid-column: auto; }
html[data-cartoes='lista'] .cartao, html[data-cartoes='compacto'] .cartao { flex-direction: row; align-items: center; justify-content: flex-start; min-height: 68px; padding: 12px 16px; gap: 14px; }
html[data-cartoes='lista'] .cartao::after { content: ''; margin-left: auto; width: 18px; height: 18px; background: currentColor; opacity: .45; -webkit-mask: var(--chev) center / contain no-repeat; mask: var(--chev) center / contain no-repeat; }
html[data-cartoes='compacto'] .cartao { padding: 12px 10px; gap: 8px; font-size: 14.5px; }
html[data-cartoes='compacto'] .tile { width: 36px; height: 36px; }
html[data-cartoes='compacto'] .tile .ic { width: 20px; height: 20px; }

.redes { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 10px; }
.redes a { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 1px solid var(--bd); transition: transform .4s var(--ease), background .25s, color .25s, border-color .25s; -webkit-tap-highlight-color: transparent; }
.redes a:active { transform: scale(.9); }

.avaliar { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 18px; border-radius: var(--r); border: 1px dashed var(--bd2); font-size: 15px; font-weight: 600; transition: transform .35s var(--ease), background .25s, border-color .25s; -webkit-tap-highlight-color: transparent; }
.avaliar .ic { width: 20px; height: 20px; color: var(--ac); }
.avaliar:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .avaliar:hover { background: var(--card); border-style: solid; border-color: var(--ac); } }

.rodape { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 6px; margin-top: 30px; text-align: center; font-size: 13px; color: var(--mt); }
.rodape a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; text-decoration: underline; text-decoration-color: var(--bd2); text-underline-offset: 4px; }
.rodape .cta { gap: 6px; padding: 0 16px; min-height: 44px; border: 1px solid var(--bd2); border-radius: 99px; text-decoration: none; color: var(--mt); transition: border-color .25s, background .25s; -webkit-tap-highlight-color: transparent; }
.rodape .cta b { color: var(--tx); font-weight: 700; }
.rodape .cta .ic { width: 16px; height: 16px; color: var(--ac); }
.rodape .cta:active { background: var(--card); }
@media (hover: hover) and (pointer: fine) { .rodape .cta:hover { border-color: var(--ac); } }
.rodape a + a::before { content: '·'; margin-right: 14px; margin-left: -6px; color: var(--mt); text-decoration: none; display: inline-block; }
.rodape .priv { font-size: 12px; }

@media (hover: hover) and (pointer: fine) {
  .whats:hover { transform: translateY(-2px); }
  .whats:hover .ic:last-of-type { transform: translateX(4px); }
  .cartao:hover { transform: translateY(-3px); border-color: var(--bd2); }
  .cartao:hover::before, .linha:hover::before { opacity: 1; }
  .cartao:hover .tile { transform: rotate(-6deg) scale(1.08); }
  .redes a:hover { transform: translateY(-4px); background: var(--ac); color: var(--ac-tx); border-color: var(--ac); }
}

/* ---------- gavetas ---------- */
.gaveta { position: fixed; inset: 0; width: 100%; height: 100vh; height: -webkit-fill-available; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--tx); overflow: hidden; }
.gaveta[open] { display: block; }
.gaveta::backdrop { background: rgba(8, 8, 10, .5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: aparecer .35s ease both; }
.gaveta.fechando::backdrop { animation: sumir .28s ease both; }
.painel { position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; width: 100%; max-width: 480px; max-height: 86vh; max-height: 86dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 22px max(26px, env(safe-area-inset-bottom)); background: var(--bg); border: 1px solid var(--bd); border-bottom: 0; border-radius: 30px 30px 0 0; animation: painel .55s cubic-bezier(.32, .72, 0, 1) both; }
.gaveta.fechando .painel { animation: painelSai .28s cubic-bezier(.4, 0, 1, 1) both; }
.puxador { position: sticky; top: 0; z-index: 2; padding: 12px 0 10px; background: var(--bg); cursor: grab; touch-action: none; }
.puxador::before { content: ''; display: block; width: 44px; height: 5px; margin: 0 auto; border-radius: 99px; background: var(--bd2); }
.cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cab h2 { font-family: var(--f-titulo); font-weight: var(--pesot); font-size: calc(var(--sz) * .74); line-height: 1.1; letter-spacing: var(--ls); text-transform: var(--tt); }
.fechar { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 1px solid var(--bd); transition: transform .3s var(--ease); }
.fechar:active { transform: scale(.9); }
.texto p + p { margin-top: 12px; }
.texto p { font-size: 16px; line-height: 1.6; }
.endereco { margin-bottom: 14px; color: var(--mt); font-size: 15px; line-height: 1.5; }

.servicos { list-style: none; padding: 0; }
.servicos li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--bd); }
.servicos li:last-child { border-bottom: 0; }
.servicos strong { display: block; font-weight: 600; font-size: 16px; }
.servicos span { display: block; color: var(--mt); font-size: 14px; margin-top: 2px; }
.servicos b { flex: none; font-family: var(--f-titulo); font-weight: var(--pesot); font-size: 18px; letter-spacing: var(--ls); }

.linhas { display: grid; gap: 10px; }
.linha { position: relative; display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 0 18px; overflow: hidden; border-radius: var(--r); background: var(--card); border: 1px solid var(--bd); font-weight: 600; text-align: left; transition: transform .35s var(--ease); }
.linha:active { transform: scale(.98); }

.aviso { position: fixed; inset: auto auto max(28px, env(safe-area-inset-bottom)) 50%; margin: 0; border: 0; transform: translate(-50%, 20px); padding: 12px 20px; border-radius: 99px; background: var(--tx); color: var(--bg); font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .3s, transform .4s var(--ease); }
.aviso.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- movimento ---------- */
@keyframes subir { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes sumir { to { opacity: 0; } }
@keyframes zoom { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes anel { 0% { opacity: .55; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.07, 1.28); } }
@keyframes brilho { 0% { transform: translateX(0) skewX(-20deg); } 24%, 100% { transform: translateX(560px) skewX(-20deg); } }
@keyframes ponto { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }
@keyframes poste { to { transform: translateX(45.25px); } }
@keyframes pontos { to { transform: translate(14px, 14px); } }
@keyframes grade { to { transform: translate(24px, 24px); } }
@keyframes onda { to { transform: translateX(200px); } }
@keyframes respirar { from { transform: scale(1); } to { transform: scale(1.08) translateY(-4px); } }
@keyframes flutuar { to { transform: translate(6vmax, 4vmax) scale(1.1); } }
@keyframes painel { from { transform: translateY(100%); } to { transform: none; } }
@keyframes painelSai { to { transform: translateY(100%); } }

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