/* Hallmark · shape: Stage · genre: modern-minimal · theme: Vantage (deal 2/3, seed dental-clinic-precision-digital-30c4·60a18457·2026-11-21·r0; re-grounded to light porcelain with an aqua signal, by brief) · job: book · draw: 6ce174 (hero posture swapped to Stage by brief)
 * hero: Stage · nav: edge-aligned, the section links from 68rem · footer: none yet, by the user's word (one section at a time) · sections: hero, pinned (Cómo trabajamos: scan, plan, treatment on one plate), index (Tratamientos: seven ruled rows, what each is and what gets measured; three carry a porcelain-series plate whose callout is the measure) · imagery: photographs, agy 5 (the arch, the same frame with the aligner removed, registered pixel for pixel; and the porcelain series in the same light: an aligner, a crown, an implant) · signature: a photo-to-plan comparison with a live millimetre readout · vantage: object/porcelain
 * axes: light/grotesk-sans/chromatic-aqua · posture: restrained · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 · weakest: E, the plan layer must register to the photograph at every crop; the plan is built on the photo's own pixel grid so one viewBox serves all crops */
/* Hallmark · waive 81 · span.plate__ticks holds only eight 1px gradients drawing corner ticks, and the photograph sits inside it · the frame marks the plate's corners in the Vantage way; the picture is the real image beneath, not a wash */
/* Hallmark · dismissed 77 · the page is the hero, Cómo trabajamos and Tratamientos for now, by the user's word; cases, team, questions and the close follow in docs/plan-secciones.md */
/* Hallmark · dismissed 3 · .how__steps: the three columns are one photograph in three states (scan, plan, treatment), not icon tiles, and only at rest: wide screens pin them into one plate */
/* Hallmark · answered F3 · the display head keeps text-wrap balance because a stub at 375 (F26) reads worse than an even three-line head */
/* Hallmark · theme note · DM Mono stays for figures only, by brief (README): the plan reads as a technical drawing; units sit a step smaller in muted and no word is set in mono */
/* Hallmark · finish-review: subagent · fix · 7 findings · 6 resolved 1 dismissed (lede kept: on a phone the nav sub-label is hidden and the lede is the only line naming the category) · impeccable critique: detector 0 findings, design review 4 priority issues · 3 resolved 1 declined (no invented visit length or price under the button) */
/* Hallmark · finish-review (Cómo trabajamos): subagent · fix · 6 findings · 6 resolved (the plan takes the widest stretch and its measures land sooner; a second pin threshold for 1366 × 768; the chain goes with its figures on small plates; no corner ticks at rest; the copy no longer echoes the hero; the line runs the pinned column) */
/* Hallmark · finish-review (Tratamientos): subagent · fix · 7 findings · 7 resolved (the aligner's callout is now its movement per stage, not the hero's 0,75, and the lede that echoed the hero is cut; plates on five columns, four on screens under 56rem tall to keep two screens; labels anchored left of their dots; the cleaning row no longer repeats its name; the measure in words on every row, above the plate, instead of a caption; this stamp) · impeccable critique: detector 0 findings in the section, design review 19/28, 5 priority issues · 3 resolved 2 declined (no line drawings for the four short rows, Hallmark 80, and no invented figure in them; the phone's bottom booking bar is page-wide, out of this section by the user's word) · a sticky column head was tried and dropped: Hallmark 56, Cómo trabajamos already pins at top 0 */
/* Hallmark · review (2026-11-23): Hallmark, Taste, Impeccable and Emil rounds · fix · 9 changes · 9 resolved (the hero rests and takes touches while a slow photograph loads, and its intro never repeats; the callouts of the series rise from their dot so no figure is cut at 1024 × 768; tablet rows pair the name with its line; a small plate drops the whole front-teeth chain, lines with figures; callouts name the patient's measures and promise nothing (A mover, Alineador, Ancho; Avance por etapa, Hueso al nervio) and the readout loses its x; a low laptop takes a landscape plate that fills its column; motion trimmed to 0.9 s and 350 ms, one beat per callout, hysteresis on the readout, Foto and Plano without aria-pressed, hover only on fine pointers; a series callout lights when its dot is in view and its leader no longer draws; the closing line runs free) */

/* ---------- Tokens ---------- */
@property --d { syntax: '<number>'; inherits: true; initial-value: 42; }

:root {
  color-scheme: light;

  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px;
  --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px; --space-3xl: 96px; --space-4xl: 144px;

  --text-xs: 0.8125rem; --text-sm: 0.875rem; --text-md: 1rem;
  --text-lead: clamp(1.0625rem, 0.3vw + 1rem, 1.3125rem);
  --text-title: clamp(1.25rem, 0.45vw + 1.05rem, 1.5rem);
  --text-section: clamp(2rem, 2.1vw + 1.05rem, 3.25rem);
  --text-display: clamp(2rem, min(3.9vw, 7.2svh) + 0.9rem, 4.5rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms;

  --container: 1440px; --gutter: 64px; --gap-columns: 32px;
  --section-gap: 144px;
  --nav-h: 72px;
  --z-base: 1; --z-raised: 10; --z-sticky-nav: 300; --z-toast: 500;

  /* Porcelain glacier paper, blue ink, one aqua signal */
  --color-paper: oklch(98.4% 0.006 225);
  --color-paper-2: oklch(96.2% 0.01 225);
  --color-paper-3: oklch(92.6% 0.016 226);
  --color-ink: oklch(25% 0.07 258);
  --color-ink-2: oklch(37% 0.06 255);
  --color-muted: oklch(49% 0.045 250);
  --color-rule: oklch(88.5% 0.014 230);
  --color-rule-2: oklch(79% 0.025 235);
  --color-plate: oklch(88.5% 0.026 200);
  --color-accent: oklch(83% 0.115 193);
  --color-accent-hi: oklch(87.5% 0.11 193);
  --color-accent-ink: oklch(25% 0.07 258);
  --color-accent-deep: oklch(50% 0.1 207);
  --color-focus: oklch(48% 0.13 225);

  --font-display: "Geologica", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-body: "Geologica", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-mono: "DM Mono", ui-monospace, "Cascadia Mono", "SF Mono", monospace;

  --radius-pill: 999px; --radius-card: 4px; --rule-hair: 1px; --tick: 14px;
  --tracking-display: -0.035em; --display-weight: 300;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scrollbar-color: var(--color-muted) var(--color-paper); }
body {
  margin: 0; background: var(--color-paper); color: var(--color-ink);
  font-family: var(--font-body); font-weight: 400; font-size: var(--text-md); line-height: 1.55;
  font-synthesis: none; -webkit-font-smoothing: antialiased; caret-color: var(--color-accent);
}
::selection { background: color-mix(in oklab, var(--color-accent) 40%, transparent); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
a { color: inherit; }
h1 {
  margin: 0; max-width: 14ch; font-family: var(--font-display); font-weight: var(--display-weight);
  font-variation-settings: "SHRP" 100; font-synthesis: none; letter-spacing: var(--tracking-display);
  font-size: var(--text-display); line-height: 1.02; overflow-wrap: break-word; min-width: 0; text-wrap: balance;
}
h2, h3 { margin: 0; font-family: var(--font-display); font-variation-settings: "SHRP" 100; font-synthesis: none; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
h2 { font-weight: var(--display-weight); font-size: var(--text-section); line-height: 1.04; letter-spacing: -0.03em; }
h3 { font-weight: 400; font-size: var(--text-title); line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0; text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
.container {
  width: 100%; max-width: var(--container); margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 400; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); }
.skip:focus-visible { top: var(--space-md); }

/* ---------- Nav: wordmark at one edge, the sections and the one action at the other ---------- */
.nav { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); position: relative; z-index: var(--z-sticky-nav); }
.nav__end { display: flex; align-items: center; gap: var(--space-lg); }
.nav__links { display: flex; align-items: center; gap: var(--space-xs); }
.nav__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-sm); border-radius: var(--radius-pill);
  font-size: var(--text-sm); color: var(--color-ink-2); text-decoration: none;
  transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .nav__link:hover { color: var(--color-ink); background: var(--color-paper-2); } }
.nav__link:active { background: var(--color-paper-3); }
@media (max-width: 67.99rem) { .nav__links { display: none; } }
.brand { display: inline-flex; align-items: center; gap: var(--space-sm); text-decoration: none; min-height: 44px; }
.brand__mark { font-family: var(--font-display); font-weight: 300; font-variation-settings: "SHRP" 100; font-size: 1.75rem; letter-spacing: -0.04em; line-height: 1; }
.brand__sub { font-size: var(--text-sm); color: var(--color-ink-2); padding-left: var(--space-sm); border-left: var(--rule-hair) solid var(--color-rule-2); line-height: 1.2; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-lg);
  border: 0; border-radius: var(--radius-pill); font: 500 var(--text-md)/1 var(--font-body); font-synthesis: none;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.btn--primary { background: var(--color-accent); color: var(--color-accent-ink); }
@media (hover: hover) and (pointer: fine) { .btn--primary:hover { background: var(--color-accent-hi); } }
.btn--quiet { background: transparent; color: var(--color-ink); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2); min-height: 44px; }
@media (hover: hover) and (pointer: fine) { .btn--quiet:hover { background: var(--color-paper-2); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-ink-2); } }
.btn:active { transform: scale(0.97); }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- Hero, desktop: copy at the left, the plate at the right ---------- */
/* the hero is the first screen and only the first screen: the screen less the nav */
.hero {
  height: calc(100svh - var(--nav-h)); overflow: clip;
  display: grid; grid-template-columns: minmax(0, 4.6fr) minmax(0, 7.4fr); column-gap: var(--space-2xl);
  align-items: center; align-content: center; min-height: 0; padding-bottom: var(--space-lg);
}
.hero__text { display: grid; gap: var(--space-lg); justify-items: start; align-content: center; min-width: 0; }
.lead { max-width: 30ch; font-size: var(--text-lead); line-height: 1.45; color: var(--color-ink-2); font-weight: 300; text-wrap: balance; }
.actions { display: flex; align-items: center; gap: var(--space-md); padding-top: var(--space-xs); }

/* the callout labels hang off the plate's right side: the stage reserves their width, so they end on the container line, level with the nav's button */
.stage { --marks: 84px; min-width: 0; display: grid; justify-items: end; align-items: center; padding-right: var(--marks); }
.plate {
  position: relative; margin: 0;
  width: min(100%, calc(100vh - var(--nav-h) - var(--space-2xl)));
  width: min(100%, calc(100svh - var(--nav-h) - var(--space-2xl)));
  aspect-ratio: 1; background: var(--color-plate);
}
/* a low laptop (1366 × 657, 1280 × 600): the height is what limits the plate, and a square would leave a gap beside the copy.
   The stage is a container so the plate can read its column; it stretches to fill it, up to 1.25:1, and stays square when the width limits it.
   The photograph crops the way it does on a phone (cover) and the plan with it (slice), so the ruler along the top may lose its edge. */
@media (min-width: 60rem) and (not ((orientation: landscape) and (max-height: 32.5rem))) {
  .stage { container-type: inline-size; }
  .plate {
    width: min(100%, calc((100vh - var(--nav-h) - var(--space-2xl)) * 1.25));
    width: min(100%, calc((100svh - var(--nav-h) - var(--space-2xl)) * 1.25));
    height: min(100cqw, calc(100vh - var(--nav-h) - var(--space-2xl)));
    height: min(100cqw, calc(100svh - var(--nav-h) - var(--space-2xl)));
    aspect-ratio: auto;
  }
}
/* a narrow desktop sets the headline a step smaller, so it keeps three lines and the plate keeps its size */
@media (min-width: 60rem) and (max-width: 79.99rem) {
  :root { --text-display: clamp(2rem, min(3.45vw, 7.2svh) + 0.9rem, 4.5rem); }
  .hero { grid-template-columns: minmax(0, 4.8fr) minmax(0, 7.2fr); column-gap: var(--space-xl); }
}

/* corner ticks: a frame that only marks its corners */
.plate__ticks {
  position: absolute; inset: calc(-1 * var(--space-sm)); pointer-events: none; --c: var(--color-ink-2);
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--tick) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 0 / 1px var(--tick) no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--tick) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 1px var(--tick) no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / var(--tick) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 1px var(--tick) no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--tick) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 1px var(--tick) no-repeat;
}

/* ---------- The plate: photograph, plan and marks share one pixel grid ---------- */
.plate { --z: 1; --k: 1.5; --t: 1; container-type: inline-size; touch-action: pan-y pinch-zoom; cursor: ew-resize; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.layer { position: absolute; inset: 0; overflow: hidden; }
.layer--marks { overflow: visible; pointer-events: none; }
.cam { position: absolute; inset: 0; transform: scale(var(--z)); transform-origin: var(--ox, 50%) var(--oy, 50%); }
.layer--photo img { width: 100%; height: 100%; max-width: none; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.layer--plan { clip-path: inset(0 0 0 calc(var(--d) * 1%)); }
.plan, .marks { width: 100%; height: 100%; max-width: none; }
.marks { overflow: visible; }

.plan__ground { fill: var(--color-paper); }
.plan__scan { opacity: 0.92; }
.plan__grid { fill: none; stroke: var(--color-ink); stroke-opacity: 0.075; stroke-width: 0.9; }
.plan__grid--major { stroke-opacity: 0.12; }
.plan__tick { stroke: var(--color-ink-2); fill: none; }
.plan__nums text, .plan__vals text { font-family: var(--font-mono); font-size: calc(var(--k) * var(--t) * 11px); fill: var(--color-ink-2); text-anchor: middle; }
.plan__nums--end text { text-anchor: end; }
.plan__vals text { font-size: calc(var(--k) * var(--t) * 11px); fill: var(--color-ink); }
.plate[data-fine="small"] .plan__vals text:not(.plan__val-m) { font-size: calc(var(--k) * var(--t) * 9.5px); }
/* a dimension line without its figure says nothing: on the smallest plate the front teeth's chain goes whole, as in «Cómo trabajamos» */
.plate[data-fine="lines"] .plan__chain { display: none; }
.plan__axis { stroke: var(--color-ink-2); stroke-width: 1; stroke-dasharray: 8 6; vector-effect: non-scaling-stroke; }
.plan__origin circle { fill: var(--color-paper); stroke: var(--color-accent-deep); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.plan__origin path { fill: none; stroke: var(--color-accent-deep); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.plan__note { font-family: var(--font-body); font-size: calc(var(--k) * var(--t) * 12px); fill: var(--color-ink-2); }
.plan__arch { fill: none; stroke: var(--color-accent-deep); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.plan__dim { fill: none; stroke: var(--color-ink); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.plan__ext { fill: none; stroke: var(--color-ink-2); stroke-width: 0.9; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.plan__detail { fill: none; stroke: var(--color-ink); stroke-width: 1.1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }

.mark { opacity: 0.4; }
.mark.is-on { opacity: 1; }
.mark__dot { fill: var(--color-paper); stroke: var(--color-ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.mark.is-on .mark__dot { fill: var(--color-accent); }
.mark__lead { fill: none; stroke: var(--color-ink); stroke-width: 1.1; vector-effect: non-scaling-stroke; }
.mark__name { font-family: var(--font-body); font-weight: 400; font-size: calc(var(--k) * var(--t) * 12.5px); fill: var(--color-ink-2); }
.mark__name--end, .mark__val--end { text-anchor: end; }
.mark__name--mid, .mark__val--mid { text-anchor: middle; }
.m-tight, .plan__val-m { display: none; }
.mark__val { font-family: var(--font-mono); font-weight: 400; font-size: calc(var(--k) * var(--t) * 13.5px); fill: var(--color-ink); font-variant-numeric: tabular-nums; }
.mark__unit { font-size: calc(var(--k) * var(--t) * 12px); fill: var(--color-muted); }

/* text on the plan sits on a paper halo, as on a drawing: a line that crosses it passes behind */
.mark__name, .plan__vals text, .plan__nums text, .plan__note { paint-order: stroke; stroke: var(--color-paper); stroke-width: calc(var(--k) * 3px); stroke-linejoin: round; }
.plan__nums text, .plan__vals text { transition: opacity var(--dur-micro) var(--ease-out); }
.plan__nums text.is-cut, .plan__vals text.is-cut { opacity: 0; }

/* the divider: a hairline that crosses the plate, a knob low enough for a thumb */
.divider, .handle { position: absolute; left: 0; transform: translateX(calc(var(--d) * 1cqw)); }
.handle { transform: translateX(clamp(24px, calc(var(--d) * 1cqw), calc(100cqw - 24px))); }
.divider { top: calc(-1 * var(--space-sm)); bottom: calc(-1 * var(--space-sm)); width: var(--rule-hair); margin-left: -0.5px; background: var(--color-ink); pointer-events: none; }
.handle {
  top: var(--knob-y, calc(100% - var(--space-sm) - 44px - var(--space-sm) - var(--space-lg))); width: 48px; height: 48px; margin: calc(-1 * var(--space-lg)) 0 0 calc(-1 * var(--space-lg)); border-radius: 50%; z-index: var(--z-raised);
  display: grid; place-items: center; background: var(--color-accent); color: var(--color-accent-ink); cursor: ew-resize; touch-action: none;
  box-shadow: 0 0 0 3px var(--color-paper);
  transition: background-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .handle:hover { background: var(--color-accent-hi); } }
.plate.is-dragging .handle { box-shadow: 0 0 0 3px var(--color-paper), 0 0 0 7px color-mix(in oklab, var(--color-accent) 45%, transparent); }
.handle:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 6px; }
.handle__read {
  position: absolute; left: calc(100% + var(--space-xs)); top: 50%; transform: translateY(-50%);
  padding: var(--space-3xs) var(--space-xs); background: var(--color-paper); color: var(--color-ink); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2);
  font-size: var(--text-xs); line-height: 1.5; white-space: nowrap; cursor: ew-resize; pointer-events: none;
}
.handle__unit { color: var(--color-muted); font-size: 0.6875rem; }
.plate[data-side="left"] .handle__read { left: auto; right: calc(100% + var(--space-xs)); }

.toggles { position: absolute; left: var(--space-sm); right: var(--space-sm); bottom: var(--space-sm); display: flex; justify-content: space-between; z-index: var(--z-raised); pointer-events: none; }
.toggle {
  pointer-events: auto; min-height: 44px; min-width: 44px; padding: 0 var(--space-md); border: 0; border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--color-paper) 88%, transparent); color: var(--color-ink); font-size: var(--text-sm); font-weight: 400; cursor: pointer;
  box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2);
  transition: background-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .toggle:hover { background: var(--color-paper); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-ink-2); } }
.toggle:active { transform: scale(0.97); }
.toggle.is-current { background: var(--color-paper); box-shadow: inset 0 0 0 2px var(--color-accent-deep); }

/* Without the script the plate rests at 42 and nothing pretends to be a control */
html:not(.js) .handle, html:not(.js) .toggles { display: none; }
html:not(.js) .plate { cursor: default; }

/* Intro: until the script takes over, the plate waits on the photograph alone; if the script never arrives, it settles by itself */
.js .plate[data-intro] { --d: 100; animation: settle 1ms linear 3s forwards; }
.js .plate[data-intro] .mark.is-on { opacity: 0.4; }
.js .plate[data-intro] .mark.is-on .mark__dot { fill: var(--color-paper); animation: none; }
@keyframes settle { to { --d: 42; } }

/* Entrance: one settle, 0.64 s with its stagger, from content that is already there */
@media (prefers-reduced-motion: no-preference) {
  .nav, .hero__text > * { animation: rise 640ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 80ms); }
  .stage { animation: appear 720ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 80ms); }
  /* the plates of the series and of «Cómo trabajamos» beat each time they light, as they always have */
  .fig .mark.is-on .mark__dot { transform-box: fill-box; transform-origin: center; animation: pop var(--dur-long) var(--ease-out); }
  /* the hero's dots beat only the first time each one lights (the script sets data-popped when the beat ends), never during the intro, and fade as they light and go out */
  .plate .mark.is-on:not([data-popped]) .mark__dot { transform-box: fill-box; transform-origin: center; animation: pop var(--dur-long) var(--ease-out); }
  .plate .mark { transition: opacity var(--dur-micro) var(--ease-out); }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.7); } 100% { transform: scale(1); } }

/* On a small plate the labels live inside the picture, in the open space of the arch */
@media (max-width: 59.99rem), (orientation: landscape) and (max-height: 32.5rem) {
  .m-wide, .plan__ruler, .plan__note { display: none; }
  .m-tight, .plan__val-m { display: inline; }
}

/* ---------- Mobile, portrait: the picture bleeds off the top, the panel is under the thumb ---------- */
@media (max-width: 59.99rem) {
  :root {
    --gutter: 20px; --nav-h: 56px;
    --text-display: clamp(1.875rem, 8.6vw, 2.75rem);
    --text-lead: 1.0625rem;
  }
  .nav {
    position: absolute; inset: 0 0 auto 0; height: calc(var(--nav-h) + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }
  .nav__end { display: none; }
  .brand__sub { display: none; }
  .brand__mark { font-size: 1.875rem; }

  .hero.container {
    height: 100svh;
    max-width: none; padding-inline: 0; padding-bottom: 0; column-gap: 0;
    grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; align-items: stretch; align-content: stretch;
  }
  .stage { order: -1; margin: 0; padding-right: 0; align-items: stretch; justify-items: stretch; min-height: 0; }
  .plate { width: 100%; height: 100%; aspect-ratio: auto; }
  .plate__ticks { display: none; }
  .plate { --knob-y: 90%; --k: 1.9; --t: 0.9; }
  .divider { top: 0; bottom: 0; }
  .toggles {
    top: calc(env(safe-area-inset-top) + var(--space-sm)); right: max(var(--space-sm), env(safe-area-inset-right)); bottom: auto; left: auto; gap: 0;
    padding: var(--space-3xs); border-radius: var(--radius-pill); background: color-mix(in oklab, var(--color-paper) 90%, transparent);
    box-shadow: inset 0 0 0 var(--rule-hair) var(--color-rule-2);
  }
  .toggle { background: transparent; box-shadow: none; padding: 0 var(--space-sm); }
  .toggle + .toggle { position: relative; }
  .toggle + .toggle::before { content: ""; position: absolute; left: 0; top: var(--space-sm); bottom: var(--space-sm); width: var(--rule-hair); background: var(--color-rule-2); }
  .toggle.is-current::before, .toggle.is-current + .toggle::before { opacity: 0; }
  @media (hover: hover) and (pointer: fine) { .toggle:hover { background: var(--color-paper-2); box-shadow: none; } }
  .toggle.is-current { background: var(--color-paper); box-shadow: inset 0 0 0 2px var(--color-accent-deep); }
  .hero__text {
    gap: var(--space-md); align-content: start;
    padding: var(--space-lg) max(var(--gutter), env(safe-area-inset-right)) max(var(--space-lg), env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
  }
  h1 { max-width: 16ch; }
  .lead { max-width: 34ch; }
  .actions { width: 100%; padding-top: var(--space-xs); }
  .actions .btn { width: 100%; min-height: 54px; }
}

/* a short phone tightens the panel so the plate keeps its height */
@media (max-width: 59.99rem) and (max-height: 40rem) and (orientation: portrait) {
  .plate { --t: 0.84; }
  .hero__text { gap: var(--space-sm); padding-top: var(--space-md); }
}

@media (min-width: 40rem) and (max-width: 59.99rem) {
  .plate { --t: 1; }
  .actions .btn { width: auto; min-width: 280px; }
}

/* ---------- Mobile, landscape and short screens: the picture takes the left square, the panel the rest ---------- */
@media (orientation: landscape) and (max-height: 32.5rem) {
  :root { --text-display: clamp(1.625rem, 9.4svh, 2.5rem); --text-lead: 1rem; }
  .hero.container {
    grid-template-columns: 100svh minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: stretch;
  }
  .hero__text {
    align-content: center; gap: var(--space-sm);
    padding: var(--space-md) max(var(--space-lg), env(safe-area-inset-right)) var(--space-md) var(--space-xl);
  }
  .actions { width: auto; }
  .actions .btn { width: auto; min-height: 48px; }
  .plate { --k: 2.6; --t: 0.84; }
}

/* ---------- Cómo trabajamos: three steps, one arch in three states ---------- */
/* At rest (no script, reduced motion, a phone, a short screen) each step carries its own plate.
   Wide and tall enough, pasos.js stacks the three plates in one pinned plate (.how__plate) and sets data-state. */
.how { padding-block: var(--section-gap); }
.how__pin { display: grid; }
.how__text { display: grid; gap: var(--space-lg); align-items: end; min-width: 0; }
.how__text .lead { max-width: 34ch; }
.how__stage { display: none; }

.how__steps { list-style: none; margin: var(--space-xl) 0 0; padding: 0; counter-reset: step; display: grid; gap: var(--space-2xl); min-width: 0; }
.step {
  counter-increment: step; position: relative; min-width: 0;
  display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: var(--space-sm); row-gap: var(--space-xs); align-content: start; align-items: center;
}
/* the step's number sits in a ring like a callout's dot; the one in hand fills with the signal */
.step::before {
  content: counter(step); grid-column: 1; grid-row: 1; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--color-paper); box-shadow: inset 0 0 0 var(--rule-hair) var(--color-ink);
  font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1; font-variant-numeric: tabular-nums; color: var(--color-ink);
  transition: background-color var(--dur-short) var(--ease-out);
}
.step__title { grid-column: 2; grid-row: 1; transition: color var(--dur-short) var(--ease-out); }
.step__body { grid-column: 2; grid-row: 2; max-width: 40ch; color: var(--color-ink-2); font-weight: 300; transition: color var(--dur-short) var(--ease-out); }
.step .fig { grid-column: 1 / -1; grid-row: 3; margin-top: var(--space-md); }

/* a plate: the photograph and its drawings share the photo's 1024 grid, cropped like object-fit: cover */
/* no corner ticks at rest: three plates side by side would knock their corners together; only the pinned plate and the hero's are framed */
.fig { --k: 1.5; --t: 1; position: relative; margin: 0; aspect-ratio: 4 / 3; background: var(--color-plate); container-type: size; }
.fig__photo, .fig__svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.fig__photo { object-fit: cover; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.fig__arch { vector-effect: none; stroke-width: calc(var(--k) * 2.4px); }
.fig--treat .fig__arch { stroke-opacity: 0.85; }
/* the front teeth's chain: its figures go a step smaller, then on the smallest plate the whole chain goes, lines with its figures, and the intermolar 58,5 carries the plan */
.fig[data-fine="small"] .fig__chain text { font-size: calc(var(--k) * var(--t) * 9.5px); }
.fig[data-fine="lines"] .fig__chain { display: none; }
.fig .plan__note { display: inline; }
.fig__sweep { display: none; }

@media (max-width: 59.99rem) {
  .how { padding-block: var(--space-2xl); }
}
@media (min-width: 40rem) {
  .how__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap-columns); }
  .step .fig { grid-row: 1; margin: 0 0 var(--space-md); aspect-ratio: 1; }
  .step::before, .step__title { grid-row: 2; }
  .step__body { grid-row: 3; }
}
/* on the twelve columns: the head on 1 to 6, its line on 8 to 12, the three plates across */
@media (min-width: 64rem) {
  .how__text { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); }
  .how__text h2 { grid-column: 1 / 7; }
  .how__text .lead { grid-column: 8 / 13; }
  .how__steps { grid-column: 1 / -1; }
}

/* ---------- Pinned: the section holds for a screen and a half while the plate goes scan, plan, treatment ---------- */
/* pasos.js splits the held travel; the plan, the thing the clinic sells, takes the widest stretch */
.how[data-live] { height: 250vh; height: 250svh; padding-block: 0; }
.how[data-live] .how__pin {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); align-items: center; align-content: center;
}
/* the plate on columns 1 to 6, an empty column, the steps on 8 to 12 */
.how[data-live] .how__text { grid-column: 8 / 13; grid-row: 1; grid-template-columns: minmax(0, 1fr); align-items: start; }
.how[data-live] .how__text > * { grid-column: auto; }
/* the line runs to the column's measure, like the steps under it; balanced at 34ch it broke into two short lines and left a step in the column */
.how[data-live] .how__text .lead { max-width: none; text-wrap: pretty; }
.how[data-live] .how__steps { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); margin-top: var(--space-lg); }
.how[data-live] .step::before, .how[data-live] .step__title { grid-row: 1; }
.how[data-live] .step__body { grid-row: 2; }
/* the steps hang off one dashed guide, as the plan's extension lines do */
.how[data-live] .step:not(:last-child)::after {
  content: ""; position: absolute; left: 15.5px; top: calc(32px + var(--space-xs)); bottom: calc(var(--space-xs) - var(--space-lg));
  border-left: var(--rule-hair) dashed var(--color-rule-2);
}
.how[data-live] .step:not(.is-on) .step__title, .how[data-live] .step:not(.is-on) .step__body { color: var(--color-muted); }
.how[data-live] .step.is-on::before { background: var(--color-accent); }

.how[data-live] .how__stage { display: grid; grid-column: 1 / 7; grid-row: 1; justify-items: start; align-items: center; min-width: 0; }
.how__plate {
  position: relative; aspect-ratio: 4 / 5; background: var(--color-plate);
  width: min(100%, calc((100vh - 2 * var(--space-2xl)) * 0.8)); width: min(100%, calc((100svh - 2 * var(--space-2xl)) * 0.8));
}
.how__plate .fig { position: absolute; inset: 0; aspect-ratio: auto; margin: 0; background: none; }
.how__plate .fig--plan .fig__base, .how__plate .fig__arch--own { display: none; }
.how__plate .fig--treat { z-index: 1; }
.how__plate .fig--scan { z-index: 2; }
.how__plate .fig--plan { z-index: 3; }

/* state 0, before the section arrives: the bare arch, photographed. Every rule here is also the way back. */
.how__plate .fig--scan { opacity: 1; transition: opacity 320ms var(--ease-out); }
.how__plate .fig__scan { clip-path: inset(0 0 100% 0); transition: clip-path 480ms var(--ease-in-out); }
.how__plate .fig__grid, .how__plate .fig__guides, .how__plate .fig__dims { opacity: 0; transition: opacity 180ms var(--ease-out); }
.how__plate .fig--plan .fig__arch { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: opacity 180ms var(--ease-out), stroke-dashoffset 0s linear 180ms; }
.how__plate .fig__mark { opacity: 0; transition: opacity 140ms var(--ease-out); }

/* 1 · scan: one pass from the top turns the photograph into its scan, a line riding the edge */
.how__plate:is([data-state="1"], [data-state="2"], [data-state="3"]) .fig__scan { clip-path: inset(0); transition: clip-path 1100ms var(--ease-in-out); }
.how__plate .fig__sweep {
  display: block; position: absolute; inset: 0 0 auto; height: 2px; margin-top: -1px; z-index: 2; pointer-events: none;
  background: var(--color-accent-deep); opacity: 0;
}
.how__plate[data-state="1"] .fig__sweep { animation: sweep 1100ms var(--ease-in-out) both; }
@keyframes sweep { 0% { transform: translateY(0); opacity: 0; } 6% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(100cqh); opacity: 0; } }

/* 2 · plan: the grid settles, the arch is traced, and the measures land as the trace crosses the front teeth */
.how__plate[data-state="2"] .fig__grid { opacity: 1; transition: opacity 420ms var(--ease-out); }
.how__plate[data-state="2"] .fig__guides { opacity: 1; transition: opacity 320ms var(--ease-out) 200ms; }
.how__plate:is([data-state="2"], [data-state="3"]) .fig--plan .fig__arch { stroke-dashoffset: 0; opacity: 1; transition: stroke-dashoffset 900ms var(--ease-in-out) 60ms, opacity 0s; }
.how__plate[data-state="2"] .fig__dims { opacity: 1; transition: opacity 320ms var(--ease-out) 400ms; }

/* 3 · treatment: the scan and the measures lift away; the traced arch stays, lying on the aligner */
.how__plate[data-state="3"] .fig--scan { opacity: 0; transition: opacity 520ms var(--ease-out); }
.how__plate[data-state="3"] .fig__mark { opacity: 1; transition: opacity 320ms var(--ease-out) 400ms; }

/* ---------- Tratamientos: an index, not cards. Each row: the treatment, what it is, what gets measured ---------- */
/* Every row names its measure in words; the three leading rows add a photograph from the porcelain series whose one callout gives the figure. */
.svc { padding-block: var(--section-gap) var(--space-2xl); }
.svc__head { display: grid; min-width: 0; }

.svc__index { margin-top: var(--space-xl); min-width: 0; }
.svc__cols { display: none; }
.svc__list { list-style: none; margin: 0; padding: 0; border-bottom: var(--rule-hair) solid var(--color-rule); }
.svc__row { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--space-xs); align-items: start; padding-block: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); min-width: 0; }
.svc__body { max-width: 40ch; color: var(--color-ink-2); font-weight: 300; }
.svc__measure { min-width: 0; padding-top: var(--space-xs); }
.svc__what { display: grid; gap: var(--space-3xs); color: var(--color-ink); }
.svc__label { font-size: var(--text-sm); color: var(--color-muted); }
.svc__measure .fig { margin-top: var(--space-md); }

/* a plate of the series: the photograph and its callout share the photo's 1024 grid, as the hero's plan does */
/* without the script --k stays at a plate of about 400 px, the size it has on most screens */
.fig--svc { --k: 2.6; }

.svc__close { display: grid; gap: var(--space-lg); justify-items: start; align-items: center; margin-top: var(--space-2xl); }
.svc__close-line { max-width: 30ch; font-size: var(--text-lead); line-height: 1.45; font-weight: 300; color: var(--color-ink); text-wrap: balance; }

@media (max-width: 59.99rem) {
  .svc { padding-block: var(--space-2xl); }
  .svc__close .btn { width: 100%; min-height: 54px; }
}
@media (min-width: 40rem) and (max-width: 59.99rem) {
  .svc__close .btn { width: auto; min-width: 280px; }
}

/* a tablet: the name and its line at the left, the measure (and its plate) at the right */
@media (min-width: 40rem) {
  .svc__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--gap-columns); }
  .svc__name, .svc__body { grid-column: 1; }
  .svc__measure { grid-column: 2; grid-row: 1 / span 2; padding-top: 0; }
}
/* la medida abarca las dos filas: sin esto su altura se reparte entre ambas y el párrafo flota bajo el nombre */
@media (min-width: 40rem) and (max-width: 63.99rem) {
  .svc__row { grid-template-rows: auto 1fr; }
}

/* on the twelve columns: name on 1 to 3, its line on 4 to 7, the measure and its plate on 8 to 12 */
@media (min-width: 64rem) {
  .svc__cols, .svc__row, .svc__close { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); }
  /* the columns are named once, at the top (not sticky: «Cómo trabajamos» already pins at top 0, Hallmark 56) */
  .svc__cols { display: grid; padding-bottom: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
  .svc__cols > :nth-child(1), .svc__name { grid-column: 1 / 4; }
  .svc__cols > :nth-child(2), .svc__body { grid-column: 4 / 8; }
  .svc__cols > :nth-child(3), .svc__measure { grid-column: 8 / 13; }
  .svc__name, .svc__body, .svc__measure { grid-row: 1; }
  .svc__row { padding-block: var(--space-md); }
  /* the column head already says it; the label stays for screen readers */
  .svc__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .svc__name { line-height: 1.3; }
  .svc__body, .svc__measure { padding-top: var(--space-3xs); }
  .svc__measure .fig { margin-top: 0; aspect-ratio: 16 / 10; }
  /* on a leading row the column head names it and the callout gives the measure and its figure: the line in words stays for screen readers */
  .svc__row--lead .svc__what { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  .svc__close { margin-top: var(--space-lg); }
  .svc__close-line { grid-column: 1 / 8; max-width: none; }
  .svc__close .btn { grid-column: 8 / 13; justify-self: start; }
}

/* a short laptop (1366 × 768 or 1536 × 864, under 56rem of window): the air tightens and the plates go back to four columns, so the index keeps to two screens */
@media (min-width: 64rem) and (max-height: 56rem) {
  .svc { padding-block: var(--space-3xl) var(--space-2xl); }
  .svc__cols > :nth-child(1), .svc__name { grid-column: 1 / 5; }
  .svc__cols > :nth-child(2), .svc__body { grid-column: 5 / 9; }
  .svc__cols > :nth-child(3), .svc__measure { grid-column: 9 / 13; }
  .svc__close-line { grid-column: 1 / 9; }
  .svc__close .btn { grid-column: 9 / 13; }
}

/* the callout lights once, when its dot comes into view: the dot fills and beats. The leader is 11 to 27 px on screen, too short to read as drawn, so it is always there */
@media (prefers-reduced-motion: no-preference) {
  .js .fig--svc:not(.is-seen) .mark.is-on { opacity: 0.4; }
  .js .fig--svc:not(.is-seen) .mark.is-on .mark__dot { fill: var(--color-paper); animation: none; }
  .fig--svc .mark { transition: opacity 320ms var(--ease-out); }
  .fig--svc .mark__dot { transition: fill var(--dur-short) var(--ease-out); }
}
