/* Tiago Pimentel · Specialist Endodontist — versão "vidro à luz do dia".
   Branco sobre branco. Um dente de vidro (WebGL, assets/js/vidro.js) atravessa a página por trás do texto.
   As letras grandes [data-gl] existem no HTML mas são desenhadas na cena, para o vidro as poder dobrar.
   Sem WebGL (html.sem-gl) a página fica completa: letras normais, vidro em CSS e um desenho simples do dente. */
:root {
  --tinta: #14213D; --azul: #326CB5; --suave: #5A6680; --linha: rgba(20, 33, 61, .12);
  --f: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mx: clamp(20px, 5.4vw, 96px);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--tinta); font: 400 18px/1.55 var(--f); overflow-x: clip; }
h1, h2, h3, p, ol, ul, address, figure { margin: 0; padding: 0; font-style: normal; }
ol, ul { list-style: none; }
a { color: inherit; }
::selection { background: rgba(50, 108, 181, .22); }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; border-radius: 6px; }
.saltar { position: absolute; left: -999px; top: 8px; z-index: 9; background: var(--tinta); color: #fff; padding: .6em 1em; border-radius: 10px; }
.saltar:focus { left: 8px; }

#vidro { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
html.sem-gl #vidro { display: none; }
html.sem-gl body { background: linear-gradient(#fff, #EEF2F7) fixed; }
.cab, main, .rodape { position: relative; z-index: 1; }

/* Letras grandes: no HTML para quem lê e para os motores de busca; na cena para quem vê. */
[data-gl] { --gl: #14213D; }
html.gl [data-gl], html.gl [data-gl] * { color: transparent; }
h2 { font-weight: 200; font-size: clamp(2.5rem, 5.6vw, 5.8rem); line-height: 1; letter-spacing: -.04em; }

/* Vidro: o contorno é do CSS (acompanha o scroll sem atraso); a refração vem da cena. */
.vb, .cartao, .retrato, .doca, .rotulo b {
  background: rgba(255, 255, 255, .2); border: 1px solid rgba(20, 33, 61, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -10px 16px -12px rgba(20, 33, 61, .2), 0 14px 30px -16px rgba(20, 33, 61, .32), 0 2px 5px rgba(20, 33, 61, .05);
}
html.sem-gl .vb, html.sem-gl .cartao, html.sem-gl .retrato, html.sem-gl .doca { -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); background: rgba(255, 255, 255, .55); }
.vb { display: inline-flex; align-items: center; gap: .7em; padding: .92em 1.55em; border-radius: 999px; font-weight: 500; font-size: 1rem; line-height: 1.2; text-decoration: none; color: var(--tinta); transition: transform .25s; }
.vb:hover { transform: translateY(-2px); }
.vb .pt { width: 9px; height: 9px; border-radius: 50%; background: var(--azul); flex: none; }
.vb-tinta { background: var(--tinta); color: #fff; border-color: var(--tinta); box-shadow: 0 14px 30px -16px rgba(20, 33, 61, .6); }
.acoes { display: flex; flex-wrap: wrap; gap: 12px; }

/* Cabeçalho */
.cab { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 26px var(--mx) 0; font-size: .9rem; letter-spacing: .13em; text-transform: uppercase; }
.cab-nome { font-weight: 500; text-decoration: none; }
.cab-reg { display: flex; gap: 1em; color: var(--suave); }
.cab-reg b { font-weight: 500; color: var(--tinta); }

/* 00 · Herói */
.heroi { position: relative; container-type: inline-size; margin: 0 var(--mx); height: calc(100vh - 62px); height: calc(100svh - 62px); min-height: 620px; display: flex; flex-direction: column; justify-content: center; padding: clamp(22px, 5vh, 56px) 0 clamp(96px, 12vh, 132px); }
.palavra { order: 1; align-self: flex-start; font-weight: 200; font-size: min(15cqi, 17rem); line-height: .8; letter-spacing: -.05em; white-space: nowrap; margin-left: -.045em; }
.palavra em { font-style: normal; font-weight: 500; --gl: #326CB5; }
html:not(.gl) .palavra em { color: var(--azul); }
.palavra .q { display: none; }
.palco { pointer-events: none; }
/* A palavra ocupa menos de 3/4 da largura; o dente fica no quarto da direita, a toda a altura. */
.palco-heroi { position: absolute; right: 0; top: 0; bottom: 84px; width: 26%; }
.heroi-txt { order: 2; max-width: 29rem; margin-top: clamp(26px, 5vh, 60px); }
.fon { color: var(--suave); font-size: 1.12rem; }
.fon i { margin-left: .5em; }
.def { font-size: clamp(1.18rem, 1.6vw, 1.42rem); line-height: 1.38; font-weight: 300; margin-top: .5em; }
.quem { color: var(--suave); font-size: .98rem; margin: .7em 0 1.8em; }
.reserva { display: none; width: 100%; height: 100%; fill: rgba(255, 255, 255, .6); stroke: var(--tinta); stroke-width: 1.4; }
.reserva .p { fill: none; stroke: #C8323C; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
html.sem-gl .reserva, html:not(.gl) .reserva { display: block; }   /* também quando o JavaScript não corre (ex.: pré-visualização de ficheiros no iPhone) */

/* 01 · Por dentro */
.dentro { height: 440vh; }
.dentro-fixo { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 4vw; padding: 0 var(--mx) 84px; }
.palco-dentro { height: 78vh; }
.passos { max-width: 34rem; }
.passos-lista { margin-top: clamp(22px, 4vh, 48px); counter-reset: p; }
.passos-lista li { counter-increment: p; display: grid; grid-template-columns: 2.6em 1fr; padding: .78em 0; border-top: 1px solid var(--linha); opacity: .36; transition: opacity .45s; }
.passos-lista li::before { content: counter(p); font-weight: 300; color: var(--azul); font-size: 1.2rem; }
.passos-lista h3 { font-weight: 400; font-size: 1.32rem; letter-spacing: -.01em; }
.passos-lista p { grid-column: 2; color: var(--suave); display: none; margin-top: .2em; max-width: 27em; }
.passos-lista li.ativo { opacity: 1; }
.passos-lista li.ativo p { display: block; animation: surge .5s both; }
.passos-lista li.feito { opacity: .62; }
@keyframes surge { from { opacity: 0; transform: translateY(6px); } }
.passos-pe { border-top: 1px solid var(--linha); padding-top: 1em; color: var(--suave); font-size: .98rem; }

/* 02 · Quem trata */
.quemsou { display: grid; grid-template-columns: minmax(0, .82fr) 15% minmax(0, 1fr); align-items: center; padding: clamp(90px, 15vh, 180px) var(--mx) 0; }
.retrato { justify-self: end; width: 100%; max-width: 500px; border-radius: 36px; padding: clamp(18px, 2.6vw, 40px) clamp(18px, 2.6vw, 40px) 0; overflow: hidden; }
.retrato img { display: block; width: 100%; height: auto; }
.palco-quem { height: 62vh; margin-left: -34%; }
.quemsou-reg { margin-top: 1.5em; font-size: .86rem; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: var(--azul); }
.quemsou-frase { font-weight: 300; font-size: clamp(1.4rem, 2.3vw, 2.1rem); line-height: 1.22; letter-spacing: -.015em; margin: .6em 0 .7em; max-width: 19em; }
.quemsou-nota { color: var(--suave); max-width: 30em; }

/* 03 · Duas portas */
.portas { padding: clamp(90px, 16vh, 190px) var(--mx) clamp(70px, 12vh, 150px); }
.portas-grelha { display: grid; grid-template-columns: minmax(0, 1fr) 17% minmax(0, 1fr); align-items: center; margin-top: clamp(30px, 6vh, 70px); }
.palco-portas { height: 66vh; }
.cartao { position: relative; border-radius: 36px; padding: clamp(26px, 3.2vw, 50px); min-height: min(52vh, 470px); display: flex; flex-direction: column; align-items: flex-start; }
.cartao h3 { font-size: .86rem; font-weight: 500; letter-spacing: .15em; text-transform: uppercase; color: var(--azul); }
.cartao-txt { font-weight: 300; font-size: clamp(1.3rem, 2vw, 1.82rem); line-height: 1.26; letter-spacing: -.015em; margin: .7em 0 .8em; }
.cartao-nota { color: var(--suave); font-size: .98rem; margin-bottom: 1.8em; }
.cartao .vb { margin-top: auto; }

/* 03 · Onde */
.onde { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 4vw; padding: clamp(60px, 10vh, 130px) var(--mx) clamp(80px, 14vh, 170px); }
.palco-onde { height: 68vh; }
.hora { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1em .6em; margin: clamp(22px, 4vh, 44px) 0 1.2em; font-size: 1.1rem; }
.hora-est { display: inline-flex; align-items: center; gap: .6em; font-size: .86rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--suave); flex-basis: 100%; }
.hora-est::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #9AA8BF; }
.hora.aberto .hora-est::before { background: #2E9B6B; box-shadow: 0 0 0 5px rgba(46, 155, 107, .16); }
.hora.fechado .hora-est::before { background: #EC8566; }
.hora b { font-weight: 200; font-size: clamp(2.3rem, 4.4vw, 4rem); letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.onde address { font-size: 1.22rem; line-height: 1.5; font-weight: 300; }
.onde address b { font-weight: 500; }
.factos { margin: 1.1em 0 1.9em; color: var(--suave); }
.factos li { padding: .42em 0; border-top: 1px solid var(--linha); max-width: 26em; }
.factos li:last-child { border-bottom: 1px solid var(--linha); }

/* Rodapé */
.rodape { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 5vw, 90px); padding: 34px var(--mx) 124px; border-top: 1px solid var(--linha); font-size: .92rem; color: var(--suave); }
.rodape p { margin-bottom: .55em; max-width: 34em; }
.rodape b { color: var(--tinta); font-weight: 500; }

/* Doca */
.doca { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 2px; padding: 7px; border-radius: 999px; white-space: nowrap; }
/* o texto da página passa por baixo do menu: fosco, para não se misturar com as letras do menu */
.doca { background: rgba(255, 255, 255, .66); -webkit-backdrop-filter: blur(16px) saturate(1.15); backdrop-filter: blur(16px) saturate(1.15); }
.doca a, .doca button { font: 500 .95rem/1 var(--f); color: var(--tinta); text-decoration: none; padding: .85em 1.15em; border-radius: 999px; border: 0; background: none; cursor: pointer; }
.doca a[aria-current] { background: rgba(50, 108, 181, .12); }
.doca-dir { display: none; }
.doca .doca-lang { border: 1px solid rgba(20, 33, 61, .35); padding: .78em .9em; margin: 0 6px; }
.doca .doca-tel { background: var(--tinta); color: #fff; display: inline-flex; gap: .6em; }
.doca-tel span { font-weight: 400; opacity: .86; }

/* Rótulos de vidro presos ao dente */
.rotulos { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.rotulo { position: absolute; inset: 0; opacity: 0; }
.rotulo b { position: absolute; left: 0; top: 0; white-space: nowrap; font-weight: 500; font-size: .96rem; line-height: 1.2; padding: .6em 1.2em; border-radius: 999px; }
.rotulo i { position: absolute; left: 0; top: 0; height: 1px; background: rgba(20, 33, 61, .6); transform-origin: 0 0; }
.rotulo i::before { content: ""; position: absolute; left: -3px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--tinta); }
.rotulo .fim, .rotulo[data-fase="fim"] .ini { display: none; }
.rotulo[data-fase="fim"] .fim { display: inline; }

/* Estado estático (verificação e capturas de página inteira) e movimento reduzido */
html.estatico .dentro { height: auto; }
html.estatico .dentro-fixo { position: static; height: auto; padding-top: 12vh; padding-bottom: 12vh; }
html.estatico .passos-lista li { opacity: 1; }
html.estatico .passos-lista p { display: block; animation: none; }

@media (max-width: 900px) {
  body { font-size: 17px; }
  .cab { padding-top: 18px; font-size: .78rem; }
  .cab-reg span { display: none; }
  .heroi { height: auto; min-height: 0; justify-content: flex-start; padding: 2vh 0 110px; }
  .palavra { order: 1; font-size: 29cqi; line-height: .86; }
  .palavra .q { display: block; }
  .palco-heroi { position: relative; right: auto; top: auto; bottom: auto; order: 2; width: 70%; height: 44vh; margin: 3vh auto 0; }
  .heroi-txt { order: 3; margin-top: 14px; }
  .dentro { height: 420vh; }
  .dentro-fixo { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; gap: 6px; padding-top: 10px; padding-bottom: 96px; }
  .palco-dentro { height: 44vh; }
  .passos-lista { margin-top: 14px; }
  .passos-lista li { padding: .5em 0; }
  .passos-lista h3 { font-size: 1.14rem; }
  .passos-pe { display: none; }
  .quemsou { grid-template-columns: minmax(0, 1fr); padding-top: 70px; }
  .retrato { max-width: none; border-radius: 30px; padding: 22px 22px 0; }
  .palco-quem { height: 36vh; width: 56%; margin: -44px 0 4px 44%; }
  .portas-grelha { grid-template-columns: minmax(0, 1fr); }
  .palco-portas { height: 46vh; margin: -44px 0; }
  .cartao { min-height: 0; border-radius: 30px; }
  .onde { grid-template-columns: minmax(0, 1fr); }
  .palco-onde { height: 46vh; order: -1; margin-bottom: -6vh; }
  .rodape { grid-template-columns: minmax(0, 1fr); padding-bottom: 120px; }
  .doca { left: 12px; right: 12px; transform: none; justify-content: space-between; }
  .doca-l { display: none; }
  .doca .doca-dir { display: inline-block; order: 2; border: 1px solid rgba(20, 33, 61, .35); padding: .78em 1em; }
  .doca .doca-lang { order: 3; margin: 0; }
  .doca .doca-tel { order: 1; flex: 1; justify-content: center; margin-right: 6px; }
  .doca-tel span { display: none; }
  html.estatico .dentro-fixo { padding-top: 6vh; padding-bottom: 6vh; }
}
@media (max-width: 900px) and (max-height: 720px) { .palco-dentro { height: 36vh; } h2 { font-size: 2.1rem; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .vb:hover { transform: none; }
  .passos-lista li.ativo p { animation: none; }
}
