/* Laboratório CART, prévia do site (Luque Produções, 2026-11-23)
   Só azul e branco: o azul-noite vem do logo da CART e o branco é o da ficha, da bancada e do papel de desenho.
   Os fundos saem do ofício do laboratório: grade de desenho técnico, régua, escala de cor, perfil dos dentes
   com cota, disco de zircônia fresado e a mesa quadriculada onde a ficha é preenchida. */

:root {
  --noite: #0A1330;
  --noite-2: #0F1A3D;
  --noite-3: #1C2858;
  --prata: #C3CAD8;
  --prata-2: #949EB6;
  --esmalte: #F6F7F9;
  --azul: #8AA4FF;
  --azul-papel: #3A50B0;
  --azul-claro: #EEF3FB;
  --azul-claro-2: #DCE5F7;
  --azul-linha: #A9BBE6;
  --branco: #FFFFFF;
  --tinta: #0E1630;
  --tinta-2: #4A5470;
  --linha-papel: #CDD5E4;
  --sombra: 10 19 48;
  --fonte: "Archivo", "Segoe UI", system-ui, sans-serif;
  --conteudo: 1200px;
  --margem: clamp(16px, 4.5vw, 48px);
  --topo-altura: 64px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topo-altura) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--noite);
  color: var(--esmalte);
  font-family: var(--fonte);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

@media (min-width: 960px) {
  body { font-size: 1.125rem; }
}

img, video, svg { max-width: 100%; }
img { height: auto; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  font-stretch: 116%;
  line-height: 1.06;
  letter-spacing: -0.008em;
  text-wrap: balance;
}

h2 { font-size: clamp(1.95rem, 1.25rem + 2.5vw, 3.2rem); }
h3 { font-size: 1.25rem; font-stretch: 110%; font-weight: 650; line-height: 1.2; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.pular {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--esmalte); color: var(--noite); padding: 10px 16px; border-radius: 8px;
}
.pular:focus { top: 12px; }

.envoltorio { max-width: var(--conteudo); margin: 0 auto; padding-inline: var(--margem); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

.confirmar {
  display: inline-block;
  padding: 0 0.5em;
  border: 1px dashed currentColor;
  border-radius: 4px;
  font-size: 0.85em;
  line-height: 1.55;
  color: var(--azul);
}

/* seções claras: régua, mostruário, como enviar e ficha */
.claro { background: var(--branco); color: var(--tinta); color-scheme: light; }
.claro :focus-visible { outline-color: var(--azul-papel); }
.claro .confirmar { color: var(--azul-papel); }

/* ---------- prévia ---------- */

.previa { background: var(--azul-claro-2); color: var(--tinta); font-size: 0.875rem; line-height: 1.45; }
.previa :focus-visible { outline-color: var(--azul-papel); }
.previa-dentro {
  max-width: var(--conteudo); margin: 0 auto; padding: 8px var(--margem);
  display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline;
}
.previa p { margin: 0; }
.previa summary { cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; font-weight: 600; }
.previa ul { margin: 8px 0 6px; padding-left: 1.2em; max-width: 60em; }
.previa li { margin: 2px 0; }

/* ---------- botões ---------- */

.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 48px; padding: 0 1.3em;
  border: 1px solid transparent; border-radius: 8px;
  font: inherit; font-size: 1rem; font-weight: 650; font-stretch: 108%; line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.botao:hover { text-decoration: none; }
.botao svg { width: 1.15em; height: 1.15em; flex: none; }
.botao-claro { background: var(--esmalte); color: var(--noite); }
.botao-claro:hover { background: var(--azul-claro-2); }
.botao-linha { background: transparent; color: var(--esmalte); border-color: rgb(195 202 216 / 0.45); }
.botao-linha:hover { border-color: var(--esmalte); }
.botao-escuro { background: var(--noite); color: var(--esmalte); }
.botao-escuro:hover { background: var(--noite-3); }
.botao-linha-escura { background: transparent; color: var(--tinta); border-color: rgb(var(--sombra) / 0.45); }
.botao-linha-escura:hover { border-color: var(--tinta); background: rgb(var(--sombra) / 0.04); }

/* ---------- topo ---------- */

.topo {
  position: sticky; top: 0; z-index: 20;
  background: rgb(10 19 48 / 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgb(195 202 216 / 0.12);
}
.topo-dentro {
  max-width: var(--conteudo); margin: 0 auto; padding: 0 var(--margem);
  height: var(--topo-altura); display: flex; align-items: center; gap: 20px;
}
.marca { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.marca img { display: block; height: 34px; width: auto; }
.marca-texto {
  font-size: 0.8125rem; line-height: 1.15; color: var(--prata-2);
  max-width: 7.5em; border-left: 1px solid rgb(195 202 216 / 0.25); padding-left: 12px;
}
.topo nav { margin-left: auto; }
.topo nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.topo nav a {
  display: block; padding: 8px 11px; border-radius: 6px;
  color: var(--prata); text-decoration: none; font-size: 0.9375rem;
}
.topo nav a:hover { color: var(--esmalte); background: rgb(195 202 216 / 0.07); }
/* a seção em que o dentista está fica marcada no menu */
.topo nav a[aria-current="true"] { color: var(--esmalte); box-shadow: inset 0 -2px 0 var(--azul); border-radius: 6px 6px 0 0; }
.topo-cta { min-height: 42px; padding: 0 1.1em; font-size: 0.9375rem; }
.menu-botao {
  display: none; min-height: 42px; padding: 0 14px; border-radius: 8px;
  border: 1px solid rgb(195 202 216 / 0.35); background: transparent; color: var(--esmalte);
  font: inherit; font-size: 0.9375rem; font-weight: 600; cursor: pointer;
}

@media (max-width: 1020px) {
  .menu-botao { display: inline-flex; align-items: center; }
  .topo nav ul {
    display: none; position: absolute; left: 0; right: 0; top: var(--topo-altura);
    flex-direction: column; gap: 0; padding: 8px var(--margem) 18px;
    background: var(--noite); border-bottom: 1px solid var(--noite-3);
  }
  .topo nav ul.aberto { display: flex; }
  .topo nav a { padding: 12px 4px; font-size: 1.0625rem; border-bottom: 1px solid rgb(195 202 216 / 0.08); border-radius: 0; }
  .topo nav a[aria-current="true"] { box-shadow: inset 3px 0 0 var(--azul); padding-left: 14px; border-radius: 0; }
}
@media (max-width: 560px) {
  .topo-cta { display: none; }
  .marca-texto { display: none; }
  .marca img { height: 30px; }
}

/* ---------- abertura ---------- */

.abertura { position: relative; overflow: clip; isolation: isolate; }
/* grade de desenho técnico, mais forte em volta da arcada */
.abertura::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgb(138 164 255 / 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgb(138 164 255 / 0.12) 1px, transparent 1px),
    linear-gradient(rgb(138 164 255 / 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(138 164 255 / 0.05) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 46% at 50% 44%, white 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 80% 46% at 50% 44%, white 10%, transparent 72%);
}
.abertura-dentro {
  max-width: var(--conteudo); margin: 0 auto;
  padding: clamp(28px, 6vw, 80px) var(--margem) clamp(48px, 7vw, 96px);
  display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "titulo" "arcada" "lead" "acoes" "aviso";
  row-gap: 20px;
}
.abertura h1 {
  grid-area: titulo;
  font-size: clamp(2.1rem, 0.6rem + 4.4vw, 4.3rem);
  font-stretch: 118%;
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.014em;
}
.titulo-dentes, .titulo-fim { display: block; }
.titulo-dentes { font-variant-numeric: tabular-nums; transition: opacity 0.18s ease; }
.titulo-dentes.trocando { opacity: 0.25; }
.abertura-lead { grid-area: lead; max-width: 33em; margin: 0; color: var(--prata); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); }
.abertura .acoes { grid-area: acoes; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.aviso-dentista { grid-area: aviso; margin: 4px 0 0; font-size: 0.9375rem; color: var(--prata-2); }
.abertura-arcada { grid-area: arcada; margin: 0; position: relative; isolation: isolate; width: 100%; max-width: 480px; justify-self: center; }
.abertura-arcada::before {
  content: ""; position: absolute; inset: -14% -20% -4%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgb(138 164 255 / 0.14), rgb(138 164 255 / 0.04) 55%, transparent 75%);
}
/* marcas de corte nos cantos, como numa prancha */
.arcada-quadro {
  --marca: rgb(138 164 255 / 0.6);
  --tam: 16px;
  padding: clamp(10px, 2.2vw, 22px);
  background:
    linear-gradient(var(--marca) 0 0) left top / var(--tam) 1px,
    linear-gradient(var(--marca) 0 0) left top / 1px var(--tam),
    linear-gradient(var(--marca) 0 0) right top / var(--tam) 1px,
    linear-gradient(var(--marca) 0 0) right top / 1px var(--tam),
    linear-gradient(var(--marca) 0 0) left bottom / var(--tam) 1px,
    linear-gradient(var(--marca) 0 0) left bottom / 1px var(--tam),
    linear-gradient(var(--marca) 0 0) right bottom / var(--tam) 1px,
    linear-gradient(var(--marca) 0 0) right bottom / 1px var(--tam);
  background-repeat: no-repeat;
}
.abertura-arcada figcaption { margin-top: 12px; font-size: 0.875rem; line-height: 1.45; color: var(--prata-2); text-align: center; }

@media (min-width: 960px) {
  .abertura::before {
    -webkit-mask-image: radial-gradient(ellipse 46% 78% at 74% 50%, white 12%, transparent 70%);
    mask-image: radial-gradient(ellipse 46% 78% at 74% 50%, white 12%, transparent 70%);
  }
  .abertura-dentro {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-areas: "titulo arcada" "lead arcada" "acoes arcada" "aviso arcada";
    grid-template-rows: auto auto auto auto;
    column-gap: clamp(32px, 4vw, 64px);
    row-gap: 0;
    padding-bottom: clamp(40px, 5vw, 72px);
    min-height: min(660px, calc(100svh - var(--topo-altura) - 36px));
    align-content: center;
  }
  .abertura h1 { margin-bottom: 28px; }
  .abertura .acoes { margin-top: 30px; }
  .aviso-dentista { margin-top: 18px; }
  /* a arcada passa a margem da direita: é o desenho da página e merece o espaço */
  .abertura-arcada { justify-self: stretch; max-width: none; width: auto; margin-right: calc(12px - var(--margem)); align-self: center; }
  .arcada-quadro { padding: 14px; }
}

/* ---------- odontograma ---------- */

.arcada {
  --d-fundo: rgb(255 255 255 / 0.035);
  --d-linha: rgb(195 202 216 / 0.5);
  --d-linha-forte: rgb(230 234 242 / 0.95);
  --d-sulco: rgb(195 202 216 / 0.26);
  --d-numero: var(--prata-2);
  --d-numero-marcado: var(--esmalte);
  --d-marcado: var(--esmalte);
  --d-marcado-linha: #FFFFFF;
  --d-marcado-sulco: rgb(72 90 140 / 0.45);
}
.arcada[data-tema="papel"] {
  --d-fundo: #FFFFFF;
  --d-linha: #7E889E;
  --d-linha-forte: var(--tinta);
  --d-sulco: #BCC3D0;
  --d-numero: var(--tinta-2);
  --d-numero-marcado: var(--tinta);
  --d-marcado: var(--noite);
  --d-marcado-linha: var(--noite);
  --d-marcado-sulco: rgb(255 255 255 / 0.4);
}
.odontograma { display: block; width: 100%; height: auto; overflow: visible; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.odontograma .alvos circle { fill: transparent; cursor: pointer; }
.dente { cursor: pointer; outline: none; }
.dente .contorno {
  fill: var(--d-fundo); stroke: var(--d-linha); stroke-width: 1.1px;
  vector-effect: non-scaling-stroke; transition: fill 0.24s ease, stroke 0.24s ease;
}
.dente .sulco {
  fill: none; stroke: var(--d-sulco); stroke-width: 0.9px; vector-effect: non-scaling-stroke;
  stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.24s ease;
}
.dente .halo { fill: #FFFFFF; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.dente .numero {
  fill: var(--d-numero); font-family: var(--fonte); font-size: 21px; font-weight: 560; font-stretch: 112%;
  text-anchor: middle; dominant-baseline: central; font-variant-numeric: tabular-nums;
  user-select: none; -webkit-user-select: none; transition: fill 0.24s ease;
}
@media (max-width: 600px) {
  .dente .numero { font-size: 31px; }
  .abertura .arcada-quadro { padding: 8px; }
}
.dente:hover .contorno { stroke: var(--d-linha-forte); }
.dente[aria-checked="true"] .contorno { fill: var(--d-marcado); stroke: var(--d-marcado-linha); }
.dente[aria-checked="true"] .sulco { stroke: var(--d-marcado-sulco); }
.dente[aria-checked="true"] .halo { opacity: 0.32; }
.dente[aria-checked="true"] .numero { fill: var(--d-numero-marcado); font-weight: 760; }
.dente:focus-visible .contorno { stroke: var(--azul); stroke-width: 2.6px; }
.arcada[data-tema="papel"] .dente:focus-visible .contorno { stroke: var(--azul-papel); }

/* cota por dentro da arcada: a linha de medida dos dentes marcados */
.odontograma .cotas { pointer-events: none; transition: opacity 0.5s ease 0.15s; }
.cota, .cota-ponta { fill: none; stroke: var(--azul); stroke-width: 1.2px; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.cota-texto {
  fill: var(--azul); font-family: var(--fonte); font-size: 23px; font-weight: 580; font-stretch: 112%;
  letter-spacing: 0.02em; text-anchor: middle; dominant-baseline: central;
  user-select: none; -webkit-user-select: none;
}
@media (max-width: 600px) { .cota-texto { font-size: 29px; } }

/* a abertura acende os dentes um a um; a cota chega depois */
.aguardando .dente[aria-checked="true"]:not(.aceso) .contorno { fill: var(--d-fundo); stroke: var(--d-linha); }
.aguardando .dente[aria-checked="true"]:not(.aceso) .sulco { stroke: var(--d-sulco); }
.aguardando .dente[aria-checked="true"]:not(.aceso) .halo { opacity: 0; }
.aguardando .dente[aria-checked="true"]:not(.aceso) .numero { fill: var(--d-numero); font-weight: 560; }
.aguardando .cotas { opacity: 0; transition: none; }

/* ---------- régua ---------- */

.regua { position: relative; padding: clamp(40px, 5vw, 60px) 0 clamp(34px, 4.5vw, 52px); }
/* a borda de cima é uma régua: traço a cada milímetro e traço longo a cada cinco */
.regua::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 13px; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, var(--azul-papel) 0 1px, transparent 1px 50px) left top / 100% 13px no-repeat,
    repeating-linear-gradient(90deg, var(--azul-linha) 0 1px, transparent 1px 10px) left top / 100% 7px no-repeat;
}
.regua-lista { list-style: none; margin: 0 auto; display: grid; gap: 26px 36px; }
.regua-lista li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-content: start; }
.regua-lista .ico { grid-row: span 2; width: 30px; height: 30px; color: var(--azul-papel); stroke-width: 1.5; }
.regua-lista strong { font-weight: 680; font-stretch: 110%; font-size: 1.0625rem; line-height: 1.3; }
.regua-lista span { color: var(--tinta-2); font-size: 0.9375rem; line-height: 1.45; }
@media (min-width: 600px) { .regua-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) {
  .regua-lista { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .regua-lista li { padding: 0 24px; border-left: 1px solid var(--linha-papel); }
  .regua-lista li:first-child { padding-left: 0; border-left: 0; }
}

/* ---------- antes e depois ---------- */

.casos { padding: clamp(56px, 8vw, 112px) 0; }
.casos-dentro { display: grid; gap: 28px; }
.casos-texto > p { color: var(--prata); max-width: 30em; }
.casos h2 { margin-bottom: 16px; }
.casos-abas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.caso-aba {
  font: inherit; font-size: 0.9375rem; line-height: 1.3; cursor: pointer;
  padding: 9px 14px; border-radius: 6px;
  color: var(--prata); background: transparent; border: 1px solid rgb(195 202 216 / 0.28);
}
.caso-aba:hover { color: var(--esmalte); border-color: rgb(195 202 216 / 0.6); }
.caso-aba[aria-pressed="true"] { background: var(--esmalte); color: var(--noite); border-color: var(--esmalte); }
.caso { min-width: 0; }
.caso[hidden] { display: none; }

.comparador {
  --corte: 50%;
  position: relative; overflow: hidden; border-radius: 4px; background: var(--noite-2);
  aspect-ratio: var(--proporcao, 2 / 1);
}
.comparador img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.comparador-depois { clip-path: inset(0 0 0 var(--corte)); }
.comparador-linha {
  position: absolute; top: 0; bottom: 0; left: var(--corte); width: 2px; margin-left: -1px;
  background: var(--esmalte); box-shadow: 0 0 0 1px rgb(var(--sombra) / 0.3); pointer-events: none;
}
.comparador-linha::after {
  content: "\2039\2009\203A"; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--esmalte); color: var(--noite);
  font-size: 1.35rem; font-weight: 700; line-height: 1; padding-bottom: 3px;
  box-shadow: 0 2px 10px rgb(var(--sombra) / 0.45);
}
.comparador input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none;
}
.comparador:focus-within { outline: 3px solid var(--azul); outline-offset: 3px; }
.rotulo {
  position: absolute; top: 12px; padding: 3px 9px; border-radius: 4px;
  background: rgb(10 19 48 / 0.78); color: var(--esmalte); font-size: 0.8125rem; font-weight: 600; pointer-events: none;
}
.rotulo-antes { left: 12px; }
.rotulo-depois { right: 12px; }
.caso-credito { margin-top: 14px; font-size: 0.9375rem; color: var(--prata); }
.caso-citacao { margin: 18px 0 0; padding: 0 0 0 18px; border-left: 2px solid var(--azul); }
.caso-citacao p { font-size: 1.1875rem; line-height: 1.4; font-stretch: 104%; margin-bottom: 6px; }
.caso-citacao footer { font-size: 0.875rem; color: var(--prata-2); }

/* escala de cor desenhada em linha, ao lado do comparador */
.escala { display: none; }

@media (min-width: 960px) {
  .casos-dentro { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.6fr); column-gap: 56px; align-items: start; }
  .casos-texto { position: sticky; top: calc(var(--topo-altura) + 32px); }
  .escala { display: block; margin: 48px 0 0; max-width: 340px; color: var(--azul); }
  .escala svg { display: block; width: 100%; height: auto; }
  .escala .haste { fill: none; stroke: currentColor; stroke-width: 1; opacity: 0.6; }
  .escala .aba { fill: rgb(138 164 255 / 0.08); stroke: currentColor; stroke-width: 1; }
  .escala text { fill: var(--prata-2); font-family: var(--fonte); font-size: 9.5px; text-anchor: middle; }
  .escala figcaption { margin-top: 10px; font-size: 0.875rem; line-height: 1.45; color: var(--prata-2); }
}

/* ---------- mostruário ---------- */

.trabalhos { padding: clamp(60px, 8vw, 116px) 0; }
.trabalhos-cabeca { display: grid; gap: 30px 56px; }
.trabalhos-cabeca h2 { margin-bottom: 14px; }
.trabalhos-cabeca p { color: var(--tinta-2); max-width: 32em; margin: 0; }
/* prancha de anatomia com a largura de cada coroa */
.prancha { margin: 0; color: var(--azul-papel); max-width: 330px; }
.prancha svg { display: block; width: 100%; height: auto; overflow: visible; }
.prancha .perfil { fill: var(--azul-claro); stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
.prancha .atras { fill: var(--azul-claro-2); stroke-opacity: 0.55; }
.prancha .detalhe { fill: none; stroke: currentColor; stroke-width: 0.9; stroke-linecap: round; opacity: 0.45; }
.prancha .guia { fill: none; stroke: var(--azul-linha); stroke-width: 0.9; stroke-dasharray: 2 3; }
.prancha .cota-p { fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; }
.prancha text { fill: currentColor; font-family: var(--fonte); font-size: 11.5px; font-weight: 560; font-stretch: 108%; text-anchor: middle; }
.prancha .num { fill: var(--tinta); font-size: 13px; font-weight: 720; }
.prancha figcaption { margin-top: 10px; font-size: 0.8125rem; line-height: 1.4; color: var(--tinta-2); }
@media (max-width: 599px) { .prancha { max-width: 270px; } }
@media (min-width: 960px) {
  .trabalhos-cabeca { grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr); align-items: end; }
  .prancha { justify-self: end; }
}

.filtros { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 14px; }
.filtro {
  font: inherit; font-size: 0.9375rem; line-height: 1.3; cursor: pointer;
  padding: 9px 14px; border-radius: 6px;
  color: var(--tinta-2); background: var(--branco); border: 1px solid var(--linha-papel);
}
.filtro:hover { color: var(--tinta); border-color: var(--tinta-2); }
.filtro[aria-pressed="true"] { background: var(--noite); color: var(--esmalte); border-color: var(--noite); }
.filtro-descricao { color: var(--tinta-2); min-height: 1.6em; margin: 0 0 30px; max-width: 46em; font-size: 0.9375rem; }
.mostruario { list-style: none; margin: 0; padding: 0; columns: 3 260px; column-gap: 24px; }
.peca { break-inside: avoid; margin: 0 0 32px; }
/* no celular, duas colunas: a galeria não vira um corredor de 13 fotos */
@media (max-width: 599px) {
  .mostruario { columns: 2; column-gap: 14px; }
  .peca { margin-bottom: 22px; }
  .peca-legenda { font-size: 0.8125rem; margin-top: 8px; }
  .peca-titulo { font-size: 0.875rem; }
  .peca-abrir::after { width: 34px; height: 34px; right: 8px; bottom: 8px; background-size: 19px; }
}
.peca[hidden] { display: none; }
.peca-abrir {
  position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--azul-claro);
  border-radius: 4px; overflow: hidden; cursor: zoom-in;
}
.peca-abrir img { display: block; width: 100%; height: auto; }
/* lupa que aparece sobre a foto: abre o visor */
.peca-abrir::after {
  content: ""; position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%;
  background: rgb(255 255 255 / 0.94) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A1330' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E") center / 22px no-repeat;
  opacity: 0; transform: scale(0.9); transition: opacity 0.18s ease, transform 0.18s ease;
}
.peca-abrir:hover::after, .peca-abrir:focus-visible::after { opacity: 1; transform: none; }
.peca-abrir:focus-visible { outline-offset: 4px; }
.peca-legenda { margin: 12px 0 0; font-size: 0.9375rem; line-height: 1.45; color: var(--tinta-2); }
.peca-titulo { display: block; color: var(--tinta); font-weight: 620; font-stretch: 106%; font-size: 1rem; }

/* visor de foto */
.visor {
  width: min(1100px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px);
  padding: 0; border: 0; border-radius: 10px; background: var(--branco); color: var(--tinta);
  color-scheme: light; overflow: hidden; box-shadow: 0 30px 90px rgb(var(--sombra) / 0.5);
}
.visor::backdrop { background: rgb(10 19 48 / 0.9); }
.visor :focus-visible { outline-color: var(--azul-papel); }
.visor-corpo { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.visor img { display: block; width: 100%; min-height: 0; flex: 1 1 auto; max-height: calc(100dvh - 190px); object-fit: contain; background: var(--azul-claro); }
.visor-rodape { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 16px 20px; border-top: 1px solid var(--linha-papel); }
.visor-texto { flex: 1 1 260px; }
.visor-texto h3 { font-size: 1.125rem; margin-bottom: 4px; }
.visor-texto p { color: var(--tinta-2); font-size: 0.9375rem; margin: 0; }
.visor-botoes { display: flex; flex-wrap: wrap; gap: 8px; }
.icone {
  width: 48px; height: 48px; display: inline-grid; place-items: center; cursor: pointer;
  border-radius: 8px; border: 1px solid var(--linha-papel); background: transparent; color: var(--tinta);
}
.icone:hover { border-color: var(--tinta-2); background: var(--azul-claro); }
.icone svg { width: 22px; height: 22px; }

/* ---------- laboratório ---------- */

.laboratorio { position: relative; isolation: isolate; overflow: clip; padding: clamp(64px, 9vw, 128px) 0; }
/* disco de zircônia depois da fresagem, de fundo */
.laboratorio::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: clamp(440px, 58vw, 780px); aspect-ratio: 1;
  left: clamp(-320px, -17vw, -150px); bottom: clamp(-320px, -15vw, -130px);
  background: url("../img/disco-zirconia.svg") center / contain no-repeat;
  opacity: 0.16;
}
.lab-dentro { display: grid; gap: 44px; }
.lab-texto h2 { font-size: clamp(2.1rem, 1.1rem + 3.4vw, 3.9rem); font-stretch: 120%; margin-bottom: 26px; }
.lab-texto > p { max-width: 35em; color: var(--prata); }
.lab-citacao { margin: 36px 0; padding: 0 0 0 22px; border-left: 2px solid var(--azul); max-width: 34em; }
.lab-citacao p { font-size: clamp(1.25rem, 1rem + 0.9vw, 1.6rem); line-height: 1.35; font-stretch: 104%; font-weight: 500; color: var(--esmalte); margin-bottom: 10px; }
.lab-citacao footer { color: var(--prata-2); font-size: 0.9375rem; }
/* o caminho do caso dentro do laboratório, em ordem */
.fluxo { list-style: none; margin: 34px 0 40px; padding: 0; max-width: 34em; }
.fluxo li { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 16px; padding-bottom: 22px; }
.fluxo li:last-child { padding-bottom: 0; }
.fluxo li:not(:last-child)::before {
  content: ""; position: absolute; left: 22.5px; top: 52px; bottom: 6px; width: 1px;
  background: repeating-linear-gradient(180deg, rgb(138 164 255 / 0.55) 0 4px, transparent 4px 8px);
}
.fluxo-ico {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  color: var(--azul); background: var(--noite-2); border: 1px solid rgb(138 164 255 / 0.4);
}
.fluxo strong { display: block; font-weight: 650; font-stretch: 110%; padding-top: 2px; }
.fluxo div span { display: block; color: var(--prata); font-size: 0.9375rem; line-height: 1.45; }
.lab-video { margin: 0; justify-self: center; width: 100%; max-width: 380px; }
.lab-video-quadro { position: relative; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; background: var(--noite-2); border: 1px solid var(--noite-3); }
.lab-video video { display: block; width: 100%; height: 100%; object-fit: cover; }
.lab-video-play { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); white-space: nowrap; box-shadow: 0 6px 24px rgb(var(--sombra) / 0.5); }
.lab-video-play[hidden] { display: none; }
.lab-video figcaption { margin-top: 12px; font-size: 0.875rem; line-height: 1.45; color: var(--prata-2); }
video::cue { font-family: var(--fonte); font-size: 0.95rem; background: rgb(10 19 48 / 0.8); }

@media (min-width: 960px) {
  .lab-dentro { grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); column-gap: 72px; align-items: start; }
  .lab-video { position: sticky; top: calc(var(--topo-altura) + 28px); }
}

/* ---------- como enviar ---------- */

.como { padding: clamp(64px, 9vw, 120px) 0; }
.como-dentro { display: grid; gap: 40px; }
.como h2 { margin-bottom: 30px; }
.passos { list-style: none; margin: 0; padding: 0; counter-reset: passo; }
.passos li {
  counter-increment: passo; display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto;
  column-gap: 18px; padding: 22px 0; border-top: 1px solid var(--linha-papel);
}
.passos li:last-child { border-bottom: 1px solid var(--linha-papel); }
.passos li::before {
  content: counter(passo); grid-column: 1; grid-row: 1 / span 3;
  font-size: 2.1rem; font-weight: 720; font-stretch: 125%; line-height: 1; color: var(--azul-papel);
}
.passo-ico {
  grid-column: 3; grid-row: 1 / span 3; align-self: start;
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--azul-claro); color: var(--azul-papel);
}
.passo-ico .ico { width: 27px; height: 27px; stroke-width: 1.5; }
.passos h3 { grid-column: 2; margin-bottom: 6px; }
.passos p { grid-column: 2; color: var(--tinta-2); margin-bottom: 6px; max-width: 34em; }
.passos .pendente { font-size: 0.9375rem; }
.como-caixa { margin: 0; }
.como-caixa img { display: block; width: 100%; border-radius: 4px; }
.como-caixa figcaption { margin-top: 10px; font-size: 0.875rem; color: var(--tinta-2); }
@media (max-width: 520px) {
  .passos li { grid-template-columns: 2.2rem minmax(0, 1fr) auto; column-gap: 12px; }
  .passo-ico { width: 40px; height: 40px; }
  .passo-ico .ico { width: 21px; height: 21px; }
}
@media (min-width: 960px) {
  .como-dentro { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); column-gap: 64px; align-items: end; }
}

/* ---------- ficha de pedido, sobre a mesa quadriculada ---------- */

.ficha {
  padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 9vw, 120px);
  background-color: var(--azul-claro);
  background-image:
    linear-gradient(rgb(58 80 176 / 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgb(58 80 176 / 0.11) 1px, transparent 1px),
    linear-gradient(rgb(58 80 176 / 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(58 80 176 / 0.05) 1px, transparent 1px);
  background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
  background-position: center top;
  border-top: 1px solid var(--linha-papel);
}
.ficha-cabeca { margin-bottom: 28px; max-width: 40em; }
.ficha-cabeca h2 { margin-bottom: 12px; }
.ficha-cabeca h2:focus { outline: none; }
.ficha-cabeca p { color: var(--tinta-2); }
.ficha-grade { display: grid; gap: 28px; }
@media (min-width: 1040px) {
  .ficha-grade { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr); column-gap: 36px; align-items: start; }
  .saida { position: sticky; top: calc(var(--topo-altura) + 20px); }
}

.folha {
  background: var(--branco); border: 1px solid var(--linha-papel); border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 2px rgb(var(--sombra) / 0.06), 0 18px 40px -18px rgb(var(--sombra) / 0.3);
}
/* cabeçalho da folha na cor do laboratório, com o logo */
.folha-topo {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 13px 22px; background: var(--noite); color: var(--prata); font-size: 0.875rem;
}
.folha-topo img { display: block; height: 26px; width: auto; }
.folha fieldset { border: 0; margin: 0; padding: 22px; border-bottom: 1px solid var(--linha-papel); min-width: 0; }
.folha fieldset:last-of-type { border-bottom: 0; }
.folha legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; font-weight: 650; font-stretch: 110%; font-size: 1.0625rem; }
.folha legend + * { clear: both; }
.legenda-nota, .opcional { font-weight: 400; font-stretch: 100%; font-size: 0.8125rem; color: var(--tinta-2); margin-left: 6px; }

.lados { display: flex; justify-content: space-between; max-width: 460px; margin: 0 auto 4px; font-size: 0.8125rem; color: var(--tinta-2); }
.arcadas { display: grid; gap: 4px; max-width: 420px; margin: 0 auto; }
.atalhos { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.atalho {
  font: inherit; font-size: 0.875rem; padding: 8px 13px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--linha-papel); background: transparent; color: var(--tinta);
}
.atalho:hover { border-color: var(--tinta-2); background: var(--azul-claro); }
.ficha-resumo { text-align: center; margin: 14px 0 0; font-weight: 620; font-stretch: 106%; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 9px 13px; border-radius: 6px; border: 1px solid var(--linha-papel);
  background: var(--branco); font-size: 0.9375rem; line-height: 1.3; transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.chip:hover span { border-color: var(--tinta-2); }
.chip input:checked + span { background: var(--noite); border-color: var(--noite); color: var(--esmalte); }
.chip input:focus-visible + span { outline: 3px solid var(--azul-papel); outline-offset: 2px; }

.rotulo-grupo { font-size: 0.875rem; font-weight: 600; margin: 18px 0 8px; }
.campos { display: grid; gap: 16px; }
.campos-espaco { margin-top: 16px; }
@media (min-width: 640px) {
  .campos-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campos-3 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1fr); }
}
.campo { min-width: 0; }
.campo label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 6px;
  border: 1px solid #AEB7C6; background: var(--branco); color: var(--tinta);
  font: inherit; font-size: 1rem; line-height: 1.4;
}
.campo textarea { min-height: 96px; resize: vertical; }
.campo input::placeholder { color: #8C95A8; }
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible { outline: 3px solid var(--azul-papel); outline-offset: 1px; border-color: var(--tinta); }
.dica { margin: 6px 0 0; font-size: 0.8125rem; line-height: 1.4; color: var(--tinta-2); }

.saida h3 { font-size: 1.125rem; margin-bottom: 14px; }
.mensagem {
  background: var(--branco); border: 1px solid var(--linha-papel); border-radius: 12px 12px 12px 3px;
  padding: 16px 18px; font-size: 0.9375rem; line-height: 1.5; overflow-wrap: anywhere;
  box-shadow: 0 12px 30px -16px rgb(var(--sombra) / 0.3);
}
.mensagem p { margin: 0 0 10px; }
.mensagem dl { margin: 0 0 10px; }
.mensagem dl div { display: flex; flex-wrap: wrap; gap: 0 6px; }
.mensagem dt { font-weight: 700; }
.mensagem dd { margin: 0; }
.mensagem .lembrete { color: #8C95A8; }
.mensagem-fecho { color: var(--tinta-2); font-size: 0.875rem; }
.saida-acoes { display: grid; gap: 10px; margin-top: 16px; }
.saida-acoes .botao-linha-escura { background: var(--branco); }
.saida-acoes .botao-linha-escura:hover { background: var(--azul-claro); }
.erro { margin: 12px 0 0; color: #9E2A2A; font-weight: 600; font-size: 0.9375rem; }
.estado { margin: 10px 0 0; min-height: 1.4em; font-size: 0.875rem; color: var(--tinta-2); }

/* ---------- perguntas ---------- */

.perguntas { padding: clamp(64px, 9vw, 120px) 0; }
.perguntas-dentro { display: grid; gap: 32px; }
.perguntas-cabeca p { color: var(--prata); margin-top: 16px; }
.perguntas-foto { display: none; }
@media (min-width: 960px) {
  .perguntas-dentro { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); column-gap: 64px; align-items: start; }
  /* foto do laboratório em azul: o fundo preto do estúdio vira o azul da seção */
  .perguntas-foto { display: block; margin: 28px 0 0 -24px; max-width: 380px; }
  .perguntas-foto img {
    display: block; width: 100%; height: auto;
    -webkit-mask-image: radial-gradient(ellipse 60% 56% at 50% 50%, white 38%, transparent 80%);
    mask-image: radial-gradient(ellipse 60% 56% at 50% 50%, white 38%, transparent 80%);
  }
}
.perguntas details { border-top: 1px solid var(--noite-3); }
.perguntas details:last-child { border-bottom: 1px solid var(--noite-3); }
.perguntas summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 20px 0; font-weight: 620; font-stretch: 106%; font-size: 1.125rem; line-height: 1.35;
}
.perguntas summary::-webkit-details-marker { display: none; }
.perguntas summary::after { content: "+"; flex: none; font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--azul); }
.perguntas details[open] summary::after { content: "\2212"; }
.perguntas details p { color: var(--prata); max-width: 40em; padding-bottom: 22px; margin: 0; }

/* ---------- chamada final ---------- */

.chamada {
  position: relative; isolation: isolate; overflow: clip;
  background: var(--noite-2); padding: clamp(72px, 10vw, 136px) 0;
  border-top: 1px solid var(--noite-3);
}
/* protocolo cerâmico em azul, entrando pela direita */
.chamada::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: 0; bottom: 0; right: 0; width: min(66%, 860px);
  background: url("../img/fundo-protocolo.webp") 40% 55% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent, white 42%);
  mask-image: linear-gradient(90deg, transparent, white 42%);
}
.chamada h2 { font-size: clamp(2.3rem, 1.2rem + 3.8vw, 4.4rem); font-stretch: 120%; font-weight: 740; max-width: 9em; margin-bottom: 18px; }
.chamada p { color: var(--prata); max-width: 24em; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); }
.chamada .acoes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
@media (max-width: 760px) {
  .chamada { padding-bottom: 62vw; }
  .chamada::before {
    top: auto; width: 100%; height: 72vw; background-position: center;
    -webkit-mask-image: linear-gradient(180deg, transparent, white 45%);
    mask-image: linear-gradient(180deg, transparent, white 45%);
  }
}

/* ---------- rodapé ---------- */

.rodape { background: var(--noite); color: var(--prata); padding: 56px 0 40px; font-size: 0.9375rem; line-height: 1.5; border-top: 1px solid var(--noite-3); }
.rodape-dentro { display: grid; gap: 32px; }
@media (min-width: 880px) { .rodape-dentro { grid-template-columns: 1fr 1fr 1.15fr; column-gap: 40px; } }
.rodape img { display: block; height: 40px; width: auto; margin-bottom: 14px; }
.rodape h2 { font-size: 1rem; font-stretch: 110%; color: var(--esmalte); margin-bottom: 10px; }
.rodape p { margin: 0 0 8px; }
.contato-linha { display: flex; align-items: flex-start; gap: 10px; }
.contato-linha .ico { width: 19px; height: 19px; margin-top: 2px; color: var(--azul); }
.rodape-credito { grid-column: 1 / -1; border-top: 1px solid var(--noite-3); padding-top: 20px; color: var(--prata-2); font-size: 0.8125rem; }

/* ---------- barra de pedido no celular ---------- */

.barra-pedido {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30;
  display: flex; gap: 10px; padding: 10px;
  background: rgb(10 19 48 / 0.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--noite-3); border-radius: 12px;
  transform: translateY(150%); visibility: hidden;
  transition: transform 0.25s ease, visibility 0s linear 0.25s;
}
.barra-pedido.visivel { transform: none; visibility: visible; transition: transform 0.25s ease, visibility 0s; }
.barra-pedido .botao:first-child { flex: 1; }
@media (min-width: 880px) { .barra-pedido { display: none; } }

/* ---------- movimento reduzido ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- impressão: a ficha que vai na caixa com a moldagem ---------- */

.impressao { display: none; }

@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #FFFFFF !important; color: #0A1330; font-size: 10.5pt; }
  body > :not(.impressao) { display: none !important; }
  .impressao { display: block; color: #0A1330; }
  .imp-topo { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #0A1330; padding-bottom: 8px; margin-bottom: 10px; }
  .imp-topo img {
    height: 12mm; width: auto; padding: 2mm 3.5mm; border-radius: 1.5mm; background: #0A1330;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .imp-topo div { text-align: right; }
  .imp-topo strong { display: block; font-size: 15pt; font-stretch: 116%; }
  .imp-lados { display: flex; justify-content: space-between; font-size: 8.5pt; margin: 0 auto 2px; max-width: 150mm; }
  .imp-arcadas { display: grid; gap: 2mm; max-width: 150mm; margin: 0 auto 8mm; }
  .imp-arcadas svg { width: 100%; height: auto; }
  .imp-arcadas .dente .contorno { fill: #FFFFFF; stroke: #6B7895; }
  .imp-arcadas .dente .sulco { stroke: #C3CAD8; }
  .imp-arcadas .dente .numero { fill: #4A5470; font-size: 19px; }
  .imp-arcadas .dente[aria-checked="true"] .contorno { fill: #0A1330; stroke: #0A1330; }
  .imp-arcadas .dente[aria-checked="true"] .sulco { stroke: #FFFFFF; }
  .imp-arcadas .dente[aria-checked="true"] .numero { fill: #0A1330; font-weight: 800; }
  .imp-dados { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10mm; margin: 0 0 6mm; }
  .imp-dados div { display: flex; gap: 3mm; border-bottom: 1px solid #A9B3C9; padding: 2.2mm 0; break-inside: avoid; }
  .imp-dados dt { font-weight: 700; flex: none; width: 34mm; }
  .imp-dados dd { margin: 0; }
  .imp-obs { border: 1px solid #A9B3C9; min-height: 30mm; padding: 3mm; margin-bottom: 6mm; }
  .imp-obs p { margin: 2mm 0 0; white-space: pre-wrap; }
  .imp-pe { font-size: 8.5pt; color: #4A5470; border-top: 1px solid #A9B3C9; padding-top: 3mm; }
}
