/* Premium V2 overlay (T12): odontological block, minimal menu, minimal footer, desktop WhatsApp.
   Loaded after the page styles; scoped to its own classes. Reuses the page tokens (--v2-*) and the signal-line / node motif. */

/* ---------- 1. Proyectos: bloque odontológico (riel + nodos, sin tarjetas) ---------- */
.odo {
  --pad: 2.25rem; --n: .5rem;
  display: grid; gap: var(--v2-space-lg); margin-top: var(--v2-space-xl);
  padding: clamp(1.75rem, 1rem + 3.6vw, 4rem);
  border-radius: var(--v2-radius-lg); border: 1px solid var(--v2-line);
  background: linear-gradient(165deg, var(--v2-void-elevated), var(--v2-void) 62%);
  box-shadow: 0 28px 48px -32px rgb(4 8 16 / .75);
}
@media (min-width: 860px) { .odo { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--v2-space-xl); align-items: start; } }
/* Mobile (<640): the four cases share ONE compact treatment on a single rail, so the 2 + 2 hierarchy
   of the approved desktop composition collapses into a plain, evenly weighted list. */
@media (max-width: 639.98px) {
  .odo { --pad: 1.5rem; gap: var(--v2-space-sm); margin-top: var(--v2-space-lg); padding: 1.25rem 1rem 1.25rem; }
  .odo .odo-intro { display: contents; }
  .odo .odo-intro > * { order: 0; }
  .odo .odo-flow { order: 1; }
  .odo .odo-intro > .odo-credit { order: 2; margin-top: 0; }
  .odo .odo-kicker { margin-bottom: var(--v2-space-3xs); font-size: .8rem; letter-spacing: .01em; white-space: nowrap; }
  .odo .odo-title { max-width: none; font-size: var(--v2-text-xl); }
  .odo .odo-lede { margin-top: var(--v2-space-2xs); font-size: var(--v2-text-sm); line-height: 1.5; }
  .odo .odo-credit { padding-top: var(--v2-space-xs); max-width: none; line-height: 1.5; }
  .odo .odo-flow { position: relative; display: grid; gap: var(--v2-space-sm); }
  .odo .odo-branch, .odo .odo-pair { display: contents; }
  .odo .odo-main, .odo .odo-pair li { position: relative; padding: 0 0 0 var(--pad); border: 0; }
  .odo .odo-main::before, .odo .odo-pair li::before { content: ""; position: absolute; left: 0; top: .4rem; width: 11px; height: 11px; border-radius: 50%; border: 0; background: var(--v2-accent); }
  .odo .odo-branch::before { display: none; }
  .odo .odo-flow .odo-main::after, .odo .odo-flow .odo-pair li::after {
    content: ""; position: absolute; left: 5px; top: calc(.4rem + 11px); bottom: calc(var(--v2-space-sm) * -1); width: 1px;
    background: linear-gradient(var(--v2-accent), var(--v2-rule));
  }
  .odo .odo-flow .odo-pair li:last-child::after { display: none; }
  .odo .odo-main .proof2-category { margin-bottom: 0; font-size: .8rem; }
  .odo .odo-main h4, .odo .odo-pair h4 { margin-bottom: var(--v2-space-3xs); font-size: var(--v2-text-lg); }
  .odo .odo-main p, .odo .odo-pair p { max-width: none; font-size: var(--v2-text-sm); line-height: 1.5; }
}
@media (max-width: 349.98px) { .odo .odo-kicker { white-space: normal; } }

.odo-kicker { margin: 0 0 var(--v2-space-xs); font-size: var(--v2-text-xs); letter-spacing: .08em; }
.odo-title {
  margin: 0; max-width: 16ch; text-wrap: balance;
  font-family: var(--v2-font-display); font-weight: 700; line-height: 1.12; letter-spacing: -.012em;
  font-size: var(--v2-text-2xl); color: var(--v2-ink);
}
.odo-lede { margin: var(--v2-space-sm) 0 0; max-width: 40ch; font-size: var(--v2-text-base); color: var(--v2-ink-muted); text-wrap: pretty; }
.odo-credit { margin: var(--v2-space-md) 0 0; padding-top: var(--v2-space-sm); max-width: 36ch; border-top: 1px solid var(--v2-rule); font-size: var(--v2-text-xs); color: var(--v2-ink-muted); text-wrap: pretty; }

.odo-flow { list-style: none; margin: 0; padding: 0; }
.odo-main { position: relative; padding: 0 0 var(--v2-space-lg) var(--pad); }
.odo-main::before { content: ""; position: absolute; left: 0; top: var(--n); width: 11px; height: 11px; border-radius: 50%; background: var(--v2-accent); }
.odo-main::after {
  content: ""; position: absolute; left: 5px; top: calc(var(--n) + 11px); bottom: calc(var(--n) * -1); width: 1px;
  background: linear-gradient(var(--v2-accent), var(--v2-rule));
}
.odo-main:nth-last-child(2)::after { bottom: 0; }
.odo-main .proof2-category { margin-bottom: var(--v2-space-3xs); }
.odo-main h4, .odo-pair h4 { margin: 0; font-family: var(--v2-font-display); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; color: var(--v2-ink); }
.odo-main h4 { font-size: var(--v2-text-2xl); margin-bottom: var(--v2-space-xs); }
.odo-main p { margin: 0; max-width: 46ch; font-size: var(--v2-text-base); color: var(--v2-ink-muted); text-wrap: pretty; }

.odo-branch { position: relative; padding-left: var(--pad); }
.odo-branch::before { content: ""; position: absolute; left: 5px; top: 0; width: calc(var(--pad) - 5px); height: 1px; background: var(--v2-accent); }
.odo-pair { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-md); }
.odo-pair li { position: relative; padding-top: var(--v2-space-sm); border-top: 1px solid var(--v2-rule); }
.odo-pair li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--v2-accent); background: var(--v2-void); }
.odo-pair h4 { font-size: var(--v2-text-lg); margin-bottom: var(--v2-space-2xs); }
.odo-pair p { margin: 0; max-width: 34ch; font-size: var(--v2-text-sm); color: var(--v2-ink-muted); text-wrap: pretty; }

/* ---------- 2. Menú mínimo ---------- */
.px-nav { display: flex; align-items: center; gap: var(--v2-space-md); }
.px-nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 2rem; padding-inline: .125rem;
  font-size: var(--v2-text-xs); font-weight: 500; color: var(--v2-ink-on-void-muted); text-decoration: none;
  transition: color .2s var(--v2-ease);
}
.px-nav a::after {
  content: ""; position: absolute; left: .125rem; right: .125rem; bottom: .2rem; height: 1px;
  background: var(--v2-accent-on-void); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--v2-ease);
}
.px-nav a:hover, .px-nav a[aria-current] { color: var(--v2-ink-on-void); }
.px-nav a:hover::after, .px-nav a[aria-current]::after { transform: scaleX(1); }
.px-nav a:focus-visible { outline: 2px solid var(--v2-accent-on-void); outline-offset: 3px; border-radius: 4px; }

.px-toggle { display: none; }
.px-nav .px-nav-wa { display: none; }
@media (max-width: 719.98px) { .px-nav .px-nav-wa { display: inline-flex; } }
@media (max-width: 359.98px) { .js-menu .v2-header-cta { padding-inline: .625rem; } .js-menu .v2-brand span { font-size: .875rem; } }
@media (max-width: 719.98px) {
  .js-menu .px-toggle {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 2.75rem; height: 2.75rem; margin-block: -.375rem; margin-inline-start: auto; padding: 0;
    border: 1px solid var(--v2-line); border-radius: 50%; background: transparent; color: var(--v2-ink-on-void); cursor: pointer;
    transition: border-color .2s var(--v2-ease), background-color .2s var(--v2-ease);
  }
  .js-menu .px-toggle:hover, .js-menu .px-toggle[aria-expanded="true"] { border-color: var(--v2-accent-on-void); background: color-mix(in oklch, var(--v2-brand) 14%, transparent); }
  .js-menu .px-toggle:focus-visible { outline: 2px solid var(--v2-accent-on-void); outline-offset: 3px; }
  .px-bars { position: relative; width: 1.0625rem; height: .5rem; }
  .px-bars i { position: absolute; left: 0; width: 100%; height: 1.5px; border-radius: 1px; background: currentColor; transition: transform .3s var(--v2-ease), top .3s var(--v2-ease); }
  .px-bars i:first-child { top: 0; }
  .px-bars i:last-child { top: calc(100% - 1.5px); width: 65%; left: 35%; }
  .px-toggle[aria-expanded="true"] .px-bars i { top: calc(50% - .75px); width: 100%; left: 0; }
  .px-toggle[aria-expanded="true"] .px-bars i:first-child { transform: rotate(45deg); }
  .px-toggle[aria-expanded="true"] .px-bars i:last-child { transform: rotate(-45deg); }

  .js-menu .px-nav {
    position: absolute; top: calc(100% + .5rem); right: var(--v2-space-md);
    width: min(15rem, calc(100vw - 2 * var(--v2-space-md)));
    flex-direction: column; align-items: stretch; gap: 0; padding: .375rem;
    border: 1px solid var(--v2-line); border-radius: var(--v2-radius-md);
    background: color-mix(in oklch, var(--v2-void-elevated) 97%, transparent);
    box-shadow: 0 22px 36px -20px rgb(0 0 0 / .65);
    visibility: hidden; opacity: 0; transform: translateY(-6px); pointer-events: none;
    transition: opacity .25s var(--v2-ease), transform .25s var(--v2-ease), visibility 0s .25s;
  }
  .js-menu .px-nav[data-open="true"] { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition-delay: 0s; }
  .js-menu .px-nav a { min-height: 2.75rem; padding: 0 .75rem; gap: .75rem; border-radius: 8px; font-size: var(--v2-text-sm); }
  .js-menu .px-nav a::after { display: none; }
  .js-menu .px-nav a::before { content: ""; width: 7px; height: 7px; border: 1.5px solid currentColor; border-radius: 50%; opacity: .55; transition: background-color .2s, opacity .2s; }
  .js-menu .px-nav a[aria-current]::before { background: var(--v2-accent-on-void); border-color: var(--v2-accent-on-void); opacity: 1; }
  .js-menu .px-nav a:hover { background: color-mix(in oklch, var(--v2-brand) 14%, transparent); }
  .v2-header.js-menu { flex-wrap: nowrap; gap: .5rem; padding-inline: 1rem; }
  .js-menu .v2-brand { min-width: 0; min-height: 2.75rem; }
  .js-menu .px-toggle { margin-inline-start: auto; }
  .js-menu .v2-header-cta { min-height: 2.75rem; padding-inline: .875rem; white-space: nowrap; }
  .js-menu .px-nav .px-nav-wa { margin-top: .25rem; border-top: 1px solid var(--v2-line); border-radius: 0 0 8px 8px; }
  /* Without JS the three anchors simply wrap under the brand row. */
  .v2-header:not(.js-menu) .px-nav { flex: 1 0 100%; gap: var(--v2-space-md); }
}

/* ---------- 3. Footer mínimo ---------- */
body .v2-footer-inner.px-footer {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  column-gap: var(--v2-space-lg); row-gap: var(--v2-space-sm);
}
.px-footer-nav, .px-footer-contact { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem var(--v2-space-md); }
.px-footer-nav { justify-content: center; }
.px-footer-contact { justify-content: flex-end; }
.px-footer-nav a, .px-footer-contact a {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  font-size: var(--v2-text-xs); color: var(--v2-ink-on-void-muted); text-decoration: none;
  text-underline-offset: .3em; transition: color .2s var(--v2-ease);
}
.px-footer-nav a:hover, .px-footer-contact a:hover { color: var(--v2-ink-on-void); text-decoration: underline; text-decoration-color: var(--v2-accent-on-void); }
.px-footer-nav a:focus-visible, .px-footer-contact a:focus-visible { outline: 2px solid var(--v2-accent-on-void); outline-offset: 2px; border-radius: 4px; }
.px-footer-legal { position: relative; grid-column: 1 / -1; padding-top: var(--v2-space-sm); border-top: 1px solid var(--v2-line); }
.px-footer-legal::before { content: ""; position: absolute; top: -3px; left: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--v2-accent-on-void); }
@media (max-width: 719.98px) {
  body .v2-footer-inner.px-footer { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .px-footer-nav, .px-footer-contact { justify-content: flex-start; }
  .px-footer-nav { column-gap: var(--v2-space-md); }
  .px-footer-legal { justify-self: stretch; }
}

/* ---------- 4. WhatsApp discreto ---------- */
.px-wa {
  position: fixed; z-index: 90; width: 2.75rem; height: 2.75rem;
  right: max(.875rem, calc(env(safe-area-inset-right) + .625rem));
  bottom: max(.875rem, calc(env(safe-area-inset-bottom) + .625rem));
  display: grid; place-items: center; border-radius: 50%; text-decoration: none;
  color: var(--v2-ink-on-void-muted); background: color-mix(in oklch, var(--v2-void) 92%, transparent);
  border: 1px solid var(--v2-line); opacity: .66;
  transition: opacity .3s var(--v2-ease), color .3s var(--v2-ease), background-color .3s var(--v2-ease), border-color .3s var(--v2-ease), visibility 0s;
}
.px-wa svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.px-wa:hover, .px-wa:focus-visible { opacity: 1; color: var(--v2-on-action); background: var(--v2-action); border-color: var(--v2-action); }
.px-wa:focus-visible { outline: 2px solid var(--v2-accent-on-void); outline-offset: 3px; }
.px-wa[data-hidden="true"] { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s var(--v2-ease), visibility 0s .25s; }
@media (prefers-reduced-motion: reduce) {
  .px-wa, .px-wa[data-hidden="true"], .px-nav a, .px-nav a::after, .px-toggle, .px-bars i, .js-menu .px-nav { transition: none; }
}
/* Mobile (<720): no floating button. Any fixed 44 px disc over a full-width text column must cross text at some
   scroll position (measured, evidence-r2), so the entry moves into the menu panel and the footer. */
@media (max-width: 719.98px) { .px-wa { display: none; } }

/* ---------- T14: the Motor owns the viewport while pinned ---------- */
/* The header is hidden, not removed (layout and anchors stay), only in motion mode and only while overlay.js marks the Motor over its band. */
.v2-header { transition: transform .25s var(--v2-ease), visibility 0s; }
body:has(#motor-v2[data-mode="motion"]) .v2-header[data-over-motor="true"] {
  transform: translateY(-100%); visibility: hidden; pointer-events: none;
  transition: transform .25s var(--v2-ease), visibility 0s .25s;
}
body:has(#motor-v2[data-mode="motion"]) .v2-header[data-over-motor="true"] .px-nav { display: none; }
@media (prefers-reduced-motion: reduce) { .v2-header, body:has(#motor-v2[data-mode="motion"]) .v2-header[data-over-motor="true"] { transition: none; } }

/* ---------- T16 (S22): the Motor stage covers the viewport ---------- */
/* Nothing is redrawn, re-timed or deformed. The lab capped the artboard at 1280px and centred it in a darker stage, so the art's own background
   showed as a lighter panel. Here the artboard may grow with the viewport (uniformly: every size inside it is cqw driven and the SVG keeps its
   viewBox), the stage carries a matching atmosphere, and where strips remain beside the art its background melts into that atmosphere. The art
   layer itself is never masked or re-sampled; see the edge blend below. */
body #motor-v2[data-mode='motion'] .artboard { max-width: none; }
body #motor-v2[data-mode='motion'] .sticky { background: radial-gradient(ellipse 72% 64% at 50% 50%, #07131f 0%, #06101b 48%, #050b15 100%); }
/* Edge blend. Masking the art layer was tried and rejected: the browser re-samples a masked layer, and at a fractional stage offset (1366px: 143.45)
   the 2px exit beam lost its peak (#9fd0ff -> #85b2dc, smeared over four columns), which damages the approved seam. So the art is never touched: two
   decorative layers sit ABOVE it (and below the HTML captions, cards and chips, which carry z-index 2-3) and paint the stage's own atmosphere over a
   thin strip along the art's edges, fading inward. overlay.js hands over the stage size and the art's offset (--px-sw/sh/ax/ay) so the gradient is
   aligned with the stage background: 7% on each side, 3% top and bottom (the tile tips sit further inside), and the vertical one leaves a soft column
   open around the exit beam, which ends exactly on the bottom edge. */
body #motor-v2[data-mode='motion'] { --px-beam: 83.75%; --px-fx: 7%; --px-fy: 3%; }
body #motor-v2[data-mode='motion'][data-portrait='true'] { --px-beam: 79.69%; }
body #motor-v2[data-mode='motion'][data-px-bar-x] .visual::before,
body #motor-v2[data-mode='motion'][data-px-bar-y] .visual::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse calc(var(--px-sw) * .72) calc(var(--px-sh) * .64) at calc(var(--px-sw) / 2 - var(--px-ax)) calc(var(--px-sh) / 2 - var(--px-ay)), #07131f 0%, #06101b 48%, #050b15 100%);
}
body #motor-v2[data-mode='motion'][data-px-bar-x] .visual::before {
  -webkit-mask-image: linear-gradient(90deg, #000 0, transparent var(--px-fx)), linear-gradient(270deg, #000 0, transparent var(--px-fx));
  mask-image: linear-gradient(90deg, #000 0, transparent var(--px-fx)), linear-gradient(270deg, #000 0, transparent var(--px-fx));
  -webkit-mask-composite: source-over; mask-composite: add;
}
/* Layer order: top (add) over bottom (subtract) over the beam column, i.e. top | (bottom - beam). */
body #motor-v2[data-mode='motion'][data-px-bar-y] .visual::after {
  -webkit-mask-image: linear-gradient(180deg, #000 0, transparent var(--px-fy)), linear-gradient(0deg, #000 0, transparent var(--px-fy)),
    linear-gradient(90deg, transparent calc(var(--px-beam) - 2.2%), #000 var(--px-beam), transparent calc(var(--px-beam) + 2.2%));
  mask-image: linear-gradient(180deg, #000 0, transparent var(--px-fy)), linear-gradient(0deg, #000 0, transparent var(--px-fy)),
    linear-gradient(90deg, transparent calc(var(--px-beam) - 2.2%), #000 var(--px-beam), transparent calc(var(--px-beam) + 2.2%));
  -webkit-mask-composite: source-over, source-out; mask-composite: add, subtract;
}
/* Phones: the stage height comes from overlay.js (--px-stage-h), which ignores browser-toolbar growth, so the pinned art never re-centres or
   resizes while the address bar hides and shows. Without JS the var is unset and the lab's 100svh applies. */
body #motor-v2[data-mode='motion'][data-portrait='true'] .sticky { height: var(--px-stage-h, 100svh); }
body #motor-v2[data-mode='motion'][data-portrait='true'] .artboard { width: min(100%, 420px, calc(var(--px-stage-h, 100svh) * 384 / 736)); }
