/* Cárcel Laboratorio Dental — talonario de órdenes de trabajo.
   Original blanco, copia canario, copia rosa. Tinta de imprenta azul marino,
   bolígrafo azul para lo rellenado, sello rojo solo para urgencias. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wdth.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wdth-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --canary: #f5e482;
  --canary-soft: #fbf3c4;
  --rosa: #f3c3cc;
  --ink: #0b3661;
  --ink-2: #34506f;
  --ink-deep: #072845;
  --rule: #a9b8c9;
  --pen: #1f3fbf;
  --stamp: #c3202f;
  --on-ink-2: #b4c8dd;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --narrow: 74%;
  --semi: 88%;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --sheet-shadow: 0 1px 2px rgba(11, 54, 97, 0.12), 0 22px 44px -28px rgba(11, 54, 97, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; scrollbar-color: var(--ink) var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--canary); color: var(--ink); }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { font-stretch: var(--narrow); text-wrap: balance; letter-spacing: -0.015em; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--pen); color: var(--pen); }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 3px; border-radius: 2px; }
input, textarea, button { font: inherit; color: inherit; caret-color: var(--pen); }

.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.ico { width: 1.15em; height: 1.15em; flex: none; }
.ico-sm { width: 0.95em; height: 0.95em; display: inline-block; vertical-align: -0.1em; }
.skip { position: absolute; left: var(--s4); top: -100px; z-index: 100; background: var(--ink); color: var(--paper); padding: var(--s3) var(--s4); }
.skip:focus { top: var(--s4); }

/* ------------------------------------------------------------ botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px;
  border: 1.5px solid transparent; border-radius: 6px;
  font-weight: 650; font-stretch: var(--semi); font-size: 1rem; line-height: 1.1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 120ms var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 0.9375rem; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--pen); color: var(--paper); }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { background: var(--canary); color: var(--ink); }
.btn-line-paper { border-color: var(--on-ink-2); color: var(--paper); }
.btn-line-paper:hover { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ------------------------------------------------------------ membrete */
.masthead { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 2px solid var(--ink); }
.masthead-row { display: flex; align-items: center; gap: var(--s6); min-height: 76px; }
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 40px; height: 40px; }
.brand-name { display: flex; flex-direction: column; font-weight: 800; font-stretch: var(--narrow); font-size: 1.5rem; line-height: 0.95; text-transform: uppercase; letter-spacing: 0.01em; }
.brand-name span { font-weight: 500; font-stretch: var(--semi); font-size: 0.75rem; text-transform: none; letter-spacing: 0; color: var(--ink-2); margin-top: 4px; }
.nav { display: flex; gap: var(--s5); margin-left: auto; }
.nav a { text-decoration: none; font-weight: 550; font-stretch: var(--semi); font-size: 0.9875rem; padding: var(--s2) 0; }
.nav a:hover, .nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
.masthead-actions { display: flex; align-items: center; gap: var(--s4); }
.link-portal { display: inline-flex; align-items: center; gap: 4px; font-weight: 550; font-stretch: var(--semi); font-size: 0.9375rem; text-decoration: none; min-height: 44px; }
.link-portal:hover { text-decoration: underline; }

/* ------------------------------------------------------------ hero */
.hero { padding-block: clamp(40px, 6vw, 88px) clamp(64px, 8vw, 120px); overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s7) clamp(40px, 6vw, 96px); align-items: start; }
.hero-copy, .hero-facts { grid-column: 1; }
.hero .slip { grid-column: 2; grid-row: 1 / span 2; }
.hero-copy { padding-top: clamp(0px, 2vw, 32px); }
.hero h1 { font-size: clamp(2.75rem, 5.4vw, 5.25rem); line-height: 0.94; font-weight: 780; letter-spacing: -0.02em; }
.lede { margin-top: var(--s5); font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.hero .cta-row { margin-top: var(--s6); }
.hero-facts { align-self: end; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.hero-facts div { padding: var(--s3) var(--s4) 0 0; }
.hero-facts div + div { padding-left: var(--s4); border-left: 1px solid var(--rule); }
.hero-facts dt { font-size: 0.8125rem; font-weight: 600; font-stretch: var(--semi); color: var(--ink-2); }
.hero-facts dd { font-weight: 650; font-stretch: var(--semi); line-height: 1.3; margin-top: 2px; }

/* Hero con la foto del laboratorio detrás (pedido 2026-10-28). Velo neutro y cálido, como la web de Prothesio:
   oscuro bajo el titular y abierto a la derecha para que se vea el laboratorio. La orden de trabajo queda
   encima como papel sobre la mesa. Contraste medido en el peor punto: titular 7,4:1, entradilla 6,2:1. */
.hero-photo { --on-photo: 244 242 238; position: relative; isolation: isolate; background: #110f0d; color: var(--paper); }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 40%; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgb(14 12 10 / 0.88) 0%, rgb(14 12 10 / 0.66) 36%, rgb(14 12 10 / 0.16) 66%, rgb(14 12 10 / 0.28) 100%),
    linear-gradient(0deg, rgb(14 12 10 / 0.45) 0%, rgb(14 12 10 / 0) 35%);
}
.hero-photo h1 { color: var(--paper); }
.hero-photo .slip { color: var(--ink); } /* la orden de trabajo sigue impresa en tinta azul */
.hero-photo .lede { color: rgb(var(--on-photo) / 0.84); }
.hero-photo .hero-mail a { color: var(--paper); }
.hero-photo .hero-facts { border-top-color: var(--paper); }
.hero-photo .hero-facts div + div { border-left-color: rgb(var(--on-photo) / 0.3); }
.hero-photo .hero-facts dt { color: rgb(var(--on-photo) / 0.72); }
.hero-photo :focus-visible { outline-color: var(--canary); }
@media (max-width: 1024px) {
  .hero-media img { object-position: 30% 30%; }
  .hero-media::after { background: linear-gradient(180deg, rgb(14 12 10 / 0.72) 0%, rgb(14 12 10 / 0.8) 50%, rgb(14 12 10 / 0.9) 100%); }
}

/* ------------------------------------------------------------ orden de trabajo (visual) */
.slip { position: relative; isolation: isolate; margin: 24px 28px 26px 0; grid-row: span 2; }
.slip-sheet { position: relative; z-index: 2; background: var(--paper); box-shadow: var(--sheet-shadow); padding: clamp(20px, 2.6vw, 36px); border-radius: 3px; }
.slip-copy { position: absolute; inset: 0; border-radius: 3px; box-shadow: 0 1px 2px rgba(11, 54, 97, 0.12); }
.slip-copy-1 { z-index: 1; background: var(--canary); transform: translate(14px, 13px) rotate(0.5deg); }
.slip-copy-2 { z-index: 0; background: var(--rosa); transform: translate(28px, 26px) rotate(1.1deg); }
.slip-head { display: flex; align-items: baseline; gap: var(--s5); padding-bottom: var(--s3); border-bottom: 2px solid var(--ink); padding-right: 30%; }
.slip-title { font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 800; font-stretch: var(--narrow); text-transform: uppercase; letter-spacing: 0.01em; line-height: 1; }
.slip-no { font-size: 0.9375rem; font-weight: 600; font-stretch: var(--semi); white-space: nowrap; }
.serial { color: var(--stamp); font-weight: 700; letter-spacing: 0.04em; }
.slip-row { margin-top: var(--s4); }
.field-short { max-width: 62%; }
.field-l { display: block; font-size: 0.8125rem; font-weight: 600; font-stretch: var(--semi); color: var(--ink-2); }
.field-l .hint { font-weight: 450; }
.field-v { display: block; border-bottom: 1px solid var(--ink); padding: 6px 0 5px; min-height: 40px; color: var(--pen); font-size: 1.0625rem; font-weight: 500; font-style: italic; }
.slip-block { margin-top: var(--s5); }
.slip-block > .field-l { margin-bottom: var(--s2); }
.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px var(--s4); }
.check { display: flex; align-items: center; gap: 10px; min-height: 38px; font-weight: 520; font-stretch: var(--semi); line-height: 1.2; }
.box { position: relative; width: 22px; height: 22px; flex: none; border: 1.5px solid var(--ink); border-radius: 1px; background: var(--paper); }
.pen { position: absolute; pointer-events: none; fill: none; stroke: var(--pen); stroke-linecap: round; stroke-width: 2.6; visibility: hidden; }
.pen-x { inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); }
.is-on > .box .pen, .is-on > .pen { visibility: visible; }
.pen path { stroke-dasharray: 110; stroke-dashoffset: 0; }
.arch-jaw { display: grid; grid-template-columns: 1fr 1fr; }
.arch-jaw:first-child { border-bottom: 1.5px solid var(--ink); }
.arch-q { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); }
.q1, .q4 { border-right: 1.5px solid var(--ink); }
.tooth, .shade { position: relative; display: grid; place-items: center; height: 36px; }
.tooth > span, .shade > span { font-size: 0.875rem; font-weight: 600; font-stretch: var(--narrow); line-height: 1; }
.is-on > span { color: var(--pen); }
.pen-o { inset: 3px 0; width: 100%; height: calc(100% - 6px); stroke-width: 2; }
.shades { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); }
.slip-imprint { margin-top: var(--s5); padding-top: var(--s2); border-top: 1px solid var(--rule); font-size: 0.75rem; font-weight: 600; font-stretch: var(--semi); color: var(--ink-2); }

.slip-photo {
  position: absolute; z-index: 4; top: -22px; right: 16px; width: 30%;
  background: var(--paper); padding: 7px 7px 22px; transform: rotate(4deg);
  box-shadow: 0 2px 3px rgba(11, 54, 97, 0.18), 0 16px 30px -16px rgba(11, 54, 97, 0.5);
}
.slip-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.clip { position: absolute; top: -26px; left: 18%; width: 16px; height: auto; fill: none; stroke: #7d8a99; stroke-width: 2.6; stroke-linecap: round; }

.stamp {
  position: absolute; z-index: 3; border: 3px solid var(--stamp); border-radius: 4px; color: var(--stamp);
  padding: 2px 12px 0; font-weight: 850; font-stretch: var(--narrow); font-size: 1.625rem; letter-spacing: 0.08em;
  text-transform: uppercase; line-height: 1.2; mix-blend-mode: multiply; pointer-events: none;
  transform: rotate(-9deg); opacity: 0.88;
}
.stamp-recibido { right: clamp(18px, 3vw, 40px); bottom: 64px; }

@media (prefers-reduced-motion: no-preference) {
  .slip-copy-1 { animation: copy-out 900ms var(--ease-out) 250ms both; }
  .slip-copy-2 { animation: copy-out 1000ms var(--ease-out) 330ms both; }
  .slip-photo { animation: photo-in 700ms var(--ease-out) 450ms both; }
  .check.is-on .pen path { animation: draw 260ms var(--ease-out) both; }
  .check.is-on .pen path:first-child { animation-delay: 1000ms; }
  .check.is-on .pen path:last-child { animation-delay: 1150ms; }
  .tooth.is-on[data-n="11"] .pen path { animation: draw 420ms var(--ease-out) 1400ms both; }
  .tooth.is-on[data-n="21"] .pen path { animation: draw 420ms var(--ease-out) 1650ms both; }
  .shade.is-on .pen path { animation: draw 420ms var(--ease-out) 1950ms both; }
  .stamp-recibido { animation: stamp 260ms cubic-bezier(0.22, 1, 0.36, 1) 2450ms both; }
}
@keyframes copy-out { from { transform: translate(0, 0) rotate(0); } }
@keyframes photo-in { from { opacity: 0; transform: translateY(-14px) rotate(9deg); } }
@keyframes draw { from { stroke-dashoffset: 110; } }
@keyframes stamp { from { opacity: 0; transform: rotate(-9deg) scale(1.4); } }

/* ------------------------------------------------------------ copias de color */
.copy-canary, .copy-rosa { position: relative; padding-block: clamp(72px, 9vw, 128px); }
.copy-canary { background: var(--canary); }
.copy-rosa { background: var(--rosa); }
/* Perforado del talonario: fila de agujeros justo bajo el borde recto */
.copy-canary::before, .copy-rosa::before {
  content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 4px;
  background: radial-gradient(circle at 4px 2px, rgba(11, 54, 97, 0.28) 1.6px, transparent 2.1px) 0 0 / 9px 4px repeat-x;
}
.copy-legend { position: absolute; top: 26px; right: var(--gutter); font-size: 0.75rem; font-weight: 600; font-stretch: var(--semi); color: #23405f; }
.section-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s5) var(--s8); align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head h2, .faq h2 { font-size: clamp(2.125rem, 4vw, 3.5rem); line-height: 0.98; font-weight: 780; letter-spacing: -0.02em; }
.section-head p { color: var(--ink-2); max-width: 46ch; }

.route { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s6); counter-reset: paso; }
.route li { counter-increment: paso; border-top: 2px solid var(--ink); padding-top: var(--s4); }
.route li::before { content: counter(paso); display: block; font-size: clamp(3rem, 5vw, 4.5rem); font-weight: 300; font-stretch: var(--narrow); line-height: 1; margin-bottom: var(--s4); }
.route h3, .notes h3 { font-size: 1.375rem; font-weight: 720; line-height: 1.15; margin-bottom: var(--s2); }
.route p, .notes p { color: var(--ink-2); }
.copy-canary .route p, .copy-canary .section-head p, .copy-rosa p { color: #23405f; }

/* ------------------------------------------------------------ trabajos */
.trabajos { padding-block: clamp(80px, 10vw, 144px); }
.ledger { width: 100%; border-collapse: collapse; }
.ledger thead th { text-align: left; font-size: 0.8125rem; font-weight: 600; font-stretch: var(--semi); color: var(--ink-2); padding: 0 var(--s4) var(--s3) 0; border-bottom: 2px solid var(--ink); }
.ledger tbody tr { position: relative; border-bottom: 1px solid var(--rule); transition: background-color 140ms linear; }
.ledger tbody tr:hover { background: var(--canary-soft); }
.ledger th[scope="row"], .ledger td { text-align: left; vertical-align: baseline; padding: var(--s5) var(--s4) var(--s5) 0; }
.ledger th[scope="row"] { width: 32%; font-size: clamp(1.25rem, 1.8vw, 1.625rem); font-weight: 720; font-stretch: var(--narrow); line-height: 1.1; letter-spacing: -0.01em; }
.ledger th[scope="row"] a { text-decoration: none; }
.ledger th[scope="row"] a::after { content: ""; position: absolute; inset: 0; }
.ledger tr:hover th a { color: var(--pen); text-decoration: underline; text-decoration-thickness: 2px; }
.ledger td { color: var(--ink-2); font-size: 1rem; line-height: 1.45; }
.ledger td[data-l="Para"] { width: 42%; }
.ledger td[data-l="Plazo"] { color: var(--pen); font-weight: 520; }

/* ------------------------------------------------------------ clínicas */
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s7) var(--s8); }
.notes li { border-top: 2px solid var(--ink); padding-top: var(--s4); max-width: 54ch; }
.notes a { font-weight: 650; white-space: nowrap; }

/* ------------------------------------------------------------ preguntas */
.faq { padding-block: clamp(80px, 10vw, 144px); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s8); align-items: start; }
.faq h2 { position: sticky; top: 112px; }
.faq-list { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { position: relative; list-style: none; cursor: pointer; padding: var(--s5) 48px var(--s5) 0; font-size: clamp(1.1875rem, 1.6vw, 1.375rem); font-weight: 680; font-stretch: var(--semi); line-height: 1.25; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 16px; height: 2px; background: var(--ink); transition: transform 220ms var(--ease-out); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0); }
.faq summary:hover { color: var(--pen); }
.faq details p { color: var(--ink-2); max-width: 62ch; padding-bottom: var(--s5); margin-top: calc(var(--s2) * -1); }

/* ------------------------------------------------------------ contacto */
.contact { background: var(--ink); color: var(--paper); padding-block: clamp(80px, 10vw, 136px); }
.contact a { color: var(--paper); }
.contact a:hover { color: var(--canary); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s8); align-items: end; }
.contact h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 720; line-height: 1.05; }
.phone-big { display: block; margin-top: var(--s4); font-size: clamp(3.25rem, 8.5vw, 7.5rem); font-weight: 800; font-stretch: var(--narrow); line-height: 0.9; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.contact-note { color: var(--on-ink-2); margin-top: var(--s4); }
.contact .cta-row { margin-top: var(--s6); }
.contact-data { display: grid; gap: var(--s5); }
.contact-data div { border-top: 1px solid rgba(180, 200, 221, 0.4); padding-top: var(--s3); }
.contact-data dt { font-size: 0.8125rem; font-weight: 600; font-stretch: var(--semi); color: var(--on-ink-2); }
.contact-data dd { font-weight: 550; line-height: 1.4; margin-top: 2px; }
.contact .btn-paper { color: var(--ink); }
.contact .btn-paper:hover { color: var(--ink); }
.contact .btn-line-paper:hover { color: var(--ink); }

.foot { background: var(--ink-deep); color: var(--on-ink-2); padding-block: var(--s7); font-size: 0.9375rem; }
.foot a { color: var(--on-ink-2); text-decoration: none; }
.foot a:hover { color: var(--paper); text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 2fr); gap: var(--s6); align-items: start; }
.foot-brand { color: var(--paper); font-weight: 650; line-height: 1.4; }
.foot-brand span { color: var(--on-ink-2); font-weight: 400; }
.foot-links { columns: 2; column-gap: var(--s6); }
.foot-links li { padding-block: 3px; break-inside: avoid; }
.foot-legal { text-align: right; }

.dock { display: none; }

/* ------------------------------------------------------------ fichas de trabajo */
.ficha-hero { padding-block: clamp(32px, 5vw, 72px) clamp(64px, 8vw, 112px); overflow-x: clip; }
.ficha-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--s2); font-size: 0.9375rem; font-stretch: var(--semi); color: var(--ink-2); margin-bottom: var(--s5); }
.crumbs a { color: var(--ink-2); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.ficha-hero h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 0.96; font-weight: 780; letter-spacing: -0.02em; }
.ficha-hero .lede { max-width: 54ch; }
.ficha-hero .cta-row { margin-top: var(--s6); }
.ficha-alt { margin-top: var(--s4); font-weight: 600; font-stretch: var(--semi); }
.ficha-card { position: relative; background: var(--canary); box-shadow: var(--sheet-shadow); border-radius: 3px; padding: clamp(20px, 2.6vw, 32px); margin-top: var(--s2); }
.ficha-card-h { font-size: 1.375rem; font-weight: 800; font-stretch: var(--narrow); text-transform: uppercase; letter-spacing: 0.01em; padding-bottom: var(--s3); border-bottom: 2px solid var(--ink); }
.ficha-card dl div { padding-block: var(--s3); border-bottom: 1px solid rgba(11, 54, 97, 0.35); }
.ficha-card dt { font-size: 0.8125rem; font-weight: 600; font-stretch: var(--semi); color: #23405f; }
.ficha-card dd { color: var(--pen); font-weight: 520; line-height: 1.4; margin-top: 2px; }
.ficha-card .stamp { top: 10px; right: 18px; }

.ficha-body { padding-bottom: clamp(80px, 10vw, 128px); }
.ficha-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s8); align-items: start; }
.ficha-section h2, .ficha-clinic h2, .ficha-more h2 { font-size: clamp(1.75rem, 2.8vw, 2.5rem); font-weight: 760; line-height: 1; letter-spacing: -0.02em; margin-bottom: var(--s5); }
.defs { border-top: 2px solid var(--ink); }
.defs div { padding-block: var(--s4); border-bottom: 1px solid var(--rule); }
.copy-canary .defs div { border-bottom-color: rgba(11, 54, 97, 0.3); }
.defs dt { font-size: 1.1875rem; font-weight: 700; font-stretch: var(--semi); line-height: 1.25; }
.defs dd { color: var(--ink-2); margin-top: var(--s1); max-width: 58ch; }
.copy-canary .defs dd { color: #23405f; }
.steps { border-top: 2px solid var(--ink); counter-reset: paso; }
.steps li { counter-increment: paso; position: relative; padding: var(--s4) 0 var(--s4) 52px; border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(paso); position: absolute; left: 0; top: var(--s3); font-size: 1.75rem; font-weight: 300; font-stretch: var(--narrow); line-height: 1.1; color: var(--pen); }
.ficha-more { padding-block: clamp(72px, 9vw, 120px); }
.more-list { border-top: 2px solid var(--ink); display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); column-gap: var(--s6); }
.more-list li { display: flex; justify-content: space-between; gap: var(--s4); align-items: baseline; padding-block: var(--s4); border-bottom: 1px solid var(--rule); }
.more-list a { font-size: 1.25rem; font-weight: 700; font-stretch: var(--narrow); line-height: 1.15; text-decoration: none; }
.more-list a:hover { text-decoration: underline; }
.more-list span { color: var(--pen); font-size: 0.9375rem; text-align: right; }


/* ------------------------------------------------------------ garantías, preguntas por ficha y páginas legales */
.garantias { padding-block: clamp(80px, 10vw, 136px); }
.defs-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s8); }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--s6); margin-top: var(--s8); }
.quote blockquote p { font-size: 1.1875rem; line-height: 1.5; }
.quote figcaption { margin-top: var(--s3); font-weight: 650; font-stretch: var(--semi); }
.quote figcaption span { display: block; font-weight: 400; color: var(--ink-2); }
.ficha-faq { padding-bottom: 0; }
.legal { padding-bottom: clamp(72px, 9vw, 120px); }
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.375rem, 2vw, 1.75rem); font-weight: 740; line-height: 1.1; margin: var(--s7) 0 var(--s3); }
.prose p { color: var(--ink-2); max-width: 66ch; margin-bottom: var(--s3); }
.prose .defs { margin-top: var(--s4); }
.pendiente { background: var(--canary); color: var(--stamp); font-weight: 700; padding: 0 4px; }
.foot-legal ul { margin-top: var(--s2); }
.foot-legal li { padding-block: 3px; }
@media (max-width: 860px) {
  .defs-2 { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------ utilidades */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-mail { margin-top: var(--s4); }
.hero-mail a, .link-strong { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 650; font-stretch: var(--semi); }
.contact-fijo { margin-top: var(--s4); color: var(--on-ink-2); }

/* ------------------------------------------------------------ escena de scroll: la dentadura se abre */
.bite { --open: 1; --s: 1; --o1: 1; --o2: 1; --o3: 1; --t: 1; position: relative; background: var(--ink-deep); color: var(--paper); }
.bite-stage { position: relative; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: var(--s5); padding: clamp(72px, 9vw, 120px) var(--gutter); overflow: hidden; }
.bite.is-live { height: 330vh; }
.bite.is-live .bite-stage { position: sticky; top: 0; height: 100vh; height: 100svh; padding-block: clamp(84px, 11vh, 120px) clamp(28px, 5vh, 56px); }
.bite-copy { text-align: center; }
.bite-h { font-size: clamp(2.25rem, 4.6vw, 4.25rem); line-height: 0.96; font-weight: 780; letter-spacing: -0.02em; }
.bite-sub { color: var(--on-ink-2); max-width: 52ch; margin: 0 auto var(--s2); }
.bite-object { position: relative; align-self: center; margin-block: 2% 9%; width: min(60vw, 760px, calc((100svh - 300px) * 1.05)); aspect-ratio: 835 / 635; transform: scale(var(--s)); }
.bite.is-live .bite-object { will-change: transform; }
.bite-object img { position: absolute; inset: 0; width: 100%; height: 100%; }
.bite-sup { transform: translateY(calc(var(--open) * -11%)) rotate(calc(var(--open) * -1.5deg)); transform-origin: 50% 60%; }
.bite-inf { transform: translateY(calc(var(--open) * 11%)) rotate(calc(var(--open) * 1deg)); transform-origin: 50% 40%; }
.bite-notes li {
  position: absolute; left: var(--x); top: calc(var(--y) + var(--open) * var(--dy) * 11%);
  display: flex; align-items: center; transform: translate(-5px, -50%);
  font-size: 0.9375rem; font-weight: 600; font-stretch: var(--semi); white-space: nowrap;
}
.bite-notes li.l { flex-direction: row-reverse; transform: translate(calc(-100% + 5px), -50%); }
.bite-notes li::before { content: ""; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--canary); box-shadow: 0 0 0 4px rgba(245, 228, 130, 0.25); }
.bite-notes i { width: clamp(32px, 6vw, 72px); height: 1px; background: var(--canary); }
.bite-notes span { padding: 0 10px; }
.bite-notes .n1 { opacity: var(--o1); }
.bite-notes .n2 { opacity: var(--o2); }
.bite-notes .n3 { opacity: var(--o3); }
.bite-foot { opacity: var(--t); text-align: center; transform: translateY(calc((1 - var(--t)) * 12px)); }
.bite-foot a { color: var(--paper); font-weight: 650; font-stretch: var(--semi); }
.bite-foot a:hover { color: var(--canary); }


/* ------------------------------------------------------------ minilaboratorio (vídeo avanzado por scroll) */
.minilab { --lab-bg: #e8ecf1; position: relative; background: var(--lab-bg); }
.ml-stage { position: relative; overflow: hidden; padding-block: clamp(64px, 8vw, 112px); }
.ml-video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--lab-bg); }
.ml-head h2 { font-size: clamp(2.125rem, 4vw, 3.5rem); line-height: 0.98; font-weight: 780; letter-spacing: -0.02em; }
.ml-head p { margin-top: var(--s2); color: var(--ink-2); }
.ml-head { margin-bottom: var(--s6); }
.ml-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s6); counter-reset: paso; }
.ml-steps li { counter-increment: paso; background: var(--paper); border-radius: 3px; box-shadow: var(--sheet-shadow); padding: var(--s4) var(--s4) var(--s5); }
.ml-steps li::before { content: counter(paso); display: block; font-size: 2rem; font-weight: 300; font-stretch: var(--narrow); line-height: 1; color: var(--pen); margin-bottom: var(--s2); }
.ml-steps h3 { font-size: 1.25rem; font-weight: 720; line-height: 1.15; }
.ml-steps p { margin-top: var(--s1); color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; }
.ml-bar { display: none; }

.minilab.is-live { height: 560vh; }
.minilab.is-live .ml-stage { position: sticky; top: 0; height: 100vh; height: 100svh; padding: 0; }
.minilab.is-live .ml-video { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
.minilab.is-live .ml-head { position: absolute; left: 0; right: 0; top: clamp(92px, 12vh, 132px); margin: 0; pointer-events: none; }
.minilab.is-live .ml-steps { position: absolute; left: 0; right: 0; bottom: clamp(28px, 6vh, 64px); display: block; margin: 0; height: 0; }
.minilab.is-live .ml-steps li {
  position: absolute; left: var(--gutter); bottom: 0; width: min(380px, calc(100% - 2 * var(--gutter)));
  opacity: 0; transform: translateY(12px); transition: opacity 260ms var(--ease-out), transform 360ms var(--ease-out);
}
.minilab.is-live .ml-steps li.on { opacity: 1; transform: none; }
.minilab.is-live .ml-bar { display: block; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 14px; height: 3px; background: rgba(11, 54, 97, 0.12); border-radius: 2px; }
.ml-bar span { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--ink); border-radius: 2px; }

/* ------------------------------------------------------------ condiciones (copia rosa) */
.terms-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.terms-photo { position: sticky; top: 112px; }
.terms-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 38% 50%; border-radius: 3px; box-shadow: var(--sheet-shadow); }
.terms h2 { font-size: clamp(2.125rem, 4vw, 3.5rem); line-height: 0.98; font-weight: 780; letter-spacing: -0.02em; }
.terms-intro { margin-top: var(--s4); max-width: 52ch; }
.clauses { margin-top: var(--s6); border-top: 2px solid var(--ink); counter-reset: cl; }
.clauses li { counter-increment: cl; position: relative; padding: var(--s4) 0 var(--s4) 44px; border-bottom: 1px solid rgba(11, 54, 97, 0.3); color: #23405f; }
.clauses li::before { content: counter(cl) "."; position: absolute; left: 0; top: var(--s4); font-weight: 800; font-stretch: var(--narrow); color: var(--ink); }
.clauses strong { color: var(--ink); font-weight: 700; }

/* ------------------------------------------------------------ Prothesio */
.prothesio { padding-block: clamp(80px, 10vw, 144px); }
.pt-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.pt-copy h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1; font-weight: 780; letter-spacing: -0.02em; }
.pt-copy > p { margin-top: var(--s4); color: var(--ink-2); max-width: 46ch; }
.pt-list { margin-block: var(--s5); border-top: 2px solid var(--ink); }
.pt-list li { padding: var(--s3) 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.pt-list strong { color: var(--ink); font-weight: 680; }
.pt-screen { position: relative; background: var(--paper); border-radius: 10px; box-shadow: 0 1px 2px rgba(11, 54, 97, 0.14), 0 30px 60px -30px rgba(11, 54, 97, 0.55); overflow: hidden; font-size: 0.875rem; }
.pt-bar { display: flex; justify-content: space-between; align-items: center; background: var(--ink); color: var(--paper); padding: 12px 18px; }
.pt-logo { font-weight: 800; font-stretch: var(--narrow); font-size: 1.125rem; }
.pt-clinic { color: var(--on-ink-2); font-size: 0.8125rem; }
.pt-tabs { display: flex; gap: var(--s5); padding: 0 18px; border-bottom: 1px solid var(--rule); }
.pt-tabs span { padding: 12px 0 10px; color: var(--ink-2); font-weight: 550; font-stretch: var(--semi); border-bottom: 2px solid transparent; }
.pt-tabs .on { color: var(--ink); border-bottom-color: var(--pen); }
.pt-tabs b { color: var(--pen); }
.pt-table { width: 100%; border-collapse: collapse; }
.pt-table th { text-align: left; font-size: 0.75rem; font-weight: 600; font-stretch: var(--semi); color: var(--ink-2); padding: 12px 18px 8px; }
.pt-table td { padding: 11px 18px; border-top: 1px solid #e3e8ee; vertical-align: middle; }
.pt-ref { font-weight: 650; font-stretch: var(--semi); }
.pt-date { color: var(--pen); font-weight: 600; white-space: nowrap; }
.phase { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 8px; }
.phase i { width: 14px; height: 6px; border-radius: 1px; background: #dbe2ea; }
.phase i.f { background: var(--pen); }
.phase-l { color: var(--ink-2); font-size: 0.8125rem; }
.pt-docs { display: flex; gap: var(--s3); padding: 14px 18px; border-top: 1px solid var(--rule); background: #f4f6f9; }
.pt-docs span { padding: 6px 10px; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); font-size: 0.8125rem; font-weight: 550; }
.pt-screen figcaption { padding: 0 18px 12px; background: #f4f6f9; text-align: right; font-size: 0.75rem; color: var(--ink-2); }

.ficha-card.has-print { margin-top: clamp(120px, 14vw, 170px); }
.ficha-card.has-print .ficha-card-h { padding-right: 40%; }
.ficha-print { width: 36%; top: auto; bottom: calc(100% - 44px); right: 14px; }
.ficha-print img { aspect-ratio: 1; object-fit: cover; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .nav { gap: var(--s4); }
  .link-portal { display: none; }
}
@media (max-width: 1024px) {
  .hero-grid, .ficha-grid, .terms-grid, .pt-grid { grid-template-columns: minmax(0, 1fr); }
  .hero .slip { grid-column: 1; grid-row: auto; }
  .terms-photo { position: static; max-width: 560px; }
  .terms-photo img { aspect-ratio: 3 / 2; }
  .hero-copy { max-width: 720px; }
  .slip { max-width: 760px; }
  .ficha-card { max-width: 560px; }
  .route { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s7); }
  .ml-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .faq h2 { position: static; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot-legal { text-align: left; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .masthead-actions { margin-left: auto; }
  .section-head { grid-template-columns: minmax(0, 1fr); }
  .notes, .ficha-cols { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .ledger, .ledger tbody, .ledger tr, .ledger th, .ledger td { display: block; width: auto !important; }
  .ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ledger tbody { border-top: 2px solid var(--ink); }
  .ledger tbody tr { padding-block: var(--s4); display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--s4); }
  .ledger th[scope="row"] { grid-column: 1 / -1; padding: 0 0 var(--s2); }
  .ledger td { padding: var(--s2) 0 0; font-size: 0.9375rem; }
  .ledger td[data-l="Para"] { grid-column: 1 / -1; padding-top: 0; }
  .ledger td[data-l="Material"]::before { content: attr(data-l); display: block; font-size: 0.75rem; font-weight: 600; font-stretch: var(--semi); color: var(--ink-2); }
}
@media (max-width: 640px) {
  body { font-size: 1rem; padding-bottom: 72px; }
  .masthead-row { min-height: 64px; gap: var(--s3); }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: 1.25rem; }
  .brand-name span { font-size: 0.6875rem; }
  .masthead .btn-sm span { display: none; }
  .masthead .btn-sm { width: 44px; padding: 0; }
  .lede { font-size: 1.0625rem; }
  .hero-facts { grid-template-columns: minmax(0, 1fr); }
  .hero-facts div, .hero-facts div + div { padding: var(--s3) 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .hero .cta-row .btn, .ficha-hero .cta-row .btn { flex: 1 1 100%; }
  .slip { margin-right: 14px; margin-bottom: 14px; }
  .slip-copy-1 { transform: translate(7px, 7px) rotate(0.4deg); }
  .slip-copy-2 { transform: translate(14px, 14px) rotate(0.8deg); }
  .slip-photo { width: 34%; top: -14px; right: 6px; padding: 5px 5px 14px; }
  .slip-head { padding-right: 34%; flex-wrap: wrap; gap: 4px var(--s3); }
  .field-short { max-width: 60%; }
  .bite.is-live { height: 260vh; }
  .bite-object { width: 92vw; }
  .bite-notes { display: grid; gap: var(--s2); justify-items: center; margin-top: 2%; position: absolute; left: 0; right: 0; top: 100%; }
  .bite-notes li, .bite-notes li.l { position: static; transform: none; flex-direction: row; white-space: normal; }
  .bite-notes i { display: none; }
  .pt-table th:nth-child(1), .pt-table td:nth-child(1) { display: none; }
  .ml-steps { grid-template-columns: minmax(0, 1fr); }
  .minilab.is-live { height: 460vh; }
  .minilab.is-live .ml-video { inset: 150px 0 auto; height: 50svh; object-fit: cover; object-position: 50% 50%; }
  .minilab.is-live .ml-head { top: 84px; }
  .minilab.is-live .ml-steps { bottom: 96px; }
  .minilab.is-live .ml-bar { bottom: 76px; }
  .pt-table td, .pt-table th { padding-inline: 12px; }
  .phase-l { display: none; }
  .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .arch-q { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tooth, .shade { height: 32px; }
  .slip-foot .btn { width: 100%; }
  .stamp { font-size: 1.125rem; }
  .stamp-recibido { bottom: 48px; right: 16px; }
  .bite-object { margin-bottom: 7.5rem; }
  .route { grid-template-columns: minmax(0, 1fr); row-gap: var(--s6); }
  .route li { display: grid; grid-template-columns: 56px 1fr; column-gap: var(--s3); }
  .route li::before { grid-row: span 2; font-size: 2.75rem; margin: 0; }
  .contact .cta-row .btn { flex: 1 1 100%; }
  .phone-big { font-size: 17.5vw; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-links { columns: 1; }
  .dock {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    background: var(--ink); border-top: 2px solid var(--ink-deep); padding-bottom: env(safe-area-inset-bottom);
  }
  .dock a { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; color: var(--paper); font-weight: 650; font-stretch: var(--semi); text-decoration: none; }
  .dock a + a { border-left: 1px solid rgba(180, 200, 221, 0.35); }
  .dock a:active { background: var(--pen); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
}
@media print {
  .masthead, .dock, .contact .cta-row, .slip-copy { display: none; }
  .copy-canary, .copy-rosa, .contact { background: none; color: var(--ink); }
}
