/* MedX — plano de ingeniería biomédica
   Vellum sheet, technical ink, non-photo blue construction, operating-room green as the only action color. */

:root {
  color-scheme: light;
  --vellum: #F3F5F2;
  --vellum-2: #E8ECE8;
  --paper: #FAFBF9;
  --ink: #0E1A2B;
  --ink-2: #2B3747;
  --muted: #56616F;
  --rule: rgba(14, 26, 43, 0.16);
  --rule-strong: rgba(14, 26, 43, 0.55);
  --blue: #9CC7E4;
  --blue-soft: rgba(156, 199, 228, 0.45);
  --blue-ink: #2E6A96;
  --green: #1F7A63;
  --green-dark: #155A49;
  --green-tint: #DCEDE6;
  --red: #B42318;
  --night: #0A1422;
  --on-ink: #E6ECF1;
  --on-ink-muted: #9FB0C2;

  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --text: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Chivo Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --fs-display: clamp(2.5rem, 1.15rem + 4.6vw, 5.6rem);
  --fs-h2: clamp(2rem, 1.25rem + 2.5vw, 3.4rem);
  --fs-h3: 1.1875rem;
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-mono: 0.8125rem;

  --gutter: clamp(20px, 3.6vw, 56px);
  --sheet: 1440px;
  --frame: 0px;
  --head-h: 68px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-plot: cubic-bezier(0.65, 0, 0.35, 1);
}

@media (min-width: 1000px) {
  :root { --frame: 18px; }
}

@view-transition { navigation: auto; }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
  scroll-padding-top: calc(var(--frame) + var(--head-h) + 16px);
}

body {
  margin: 0;
  padding: var(--frame);
  background: var(--vellum);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

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

.skip {
  position: absolute; left: calc(var(--frame) + 12px); top: -60px; z-index: 100;
  background: var(--ink); color: var(--vellum); padding: 10px 16px; text-decoration: none;
  font-weight: 600;
}
.skip:focus { top: calc(var(--frame) + 8px); }

.mono { font-family: var(--mono); font-size: var(--fs-mono); letter-spacing: 0; }

/* ---------- Drawing frame with zone markers ---------- */

.frame { display: none; }

@media (min-width: 1000px) {
  .frame {
    display: block; position: fixed; inset: 0; z-index: 80; pointer-events: none;
    view-transition-name: frame;
  }
  .frame-edge {
    position: absolute; background: var(--vellum);
    display: grid; font-family: var(--mono); font-size: 10px; line-height: 1; color: var(--muted);
  }
  .frame-edge span { display: grid; place-items: center; transition: color .25s, background-color .25s; }
  .frame-edge span.is-on { color: var(--green); }
  .frame-top, .frame-bottom { left: 0; right: 0; height: var(--frame); grid-auto-flow: column; grid-auto-columns: 1fr; padding-inline: var(--frame); }
  .frame-top { top: 0; }
  .frame-bottom { bottom: 0; }
  .frame-left, .frame-right { top: var(--frame); bottom: var(--frame); width: var(--frame); grid-auto-flow: row; grid-auto-rows: 1fr; }
  .frame-left { left: 0; }
  .frame-right { right: 0; }
  .frame-top span + span, .frame-bottom span + span { box-shadow: inset 1px 0 0 var(--rule); }
  .frame-left span + span, .frame-right span + span { box-shadow: inset 0 1px 0 var(--rule); }
  .frame-line {
    position: absolute; inset: var(--frame); border: 1px solid var(--rule-strong);
  }
}

/* ---------- Promo strip ---------- */

.promo {
  background: var(--ink); color: var(--on-ink);
  font-size: 13.5px; line-height: 1.4;
  text-align: center; padding: 8px var(--gutter);
}

/* ---------- Header: sheet tabs ---------- */

.site-head {
  position: sticky; top: var(--frame); z-index: 50;
  background: var(--vellum);
  border-bottom: 1px solid var(--rule-strong);
  view-transition-name: site-head;
}
.head-row {
  max-width: var(--sheet); margin: 0 auto; height: var(--head-h);
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: stretch;
  padding-left: var(--gutter);
}
.wordmark {
  display: flex; align-items: center; padding-right: 28px;
  font-family: var(--display); font-weight: 800; font-stretch: 120%;
  font-size: 1.75rem; letter-spacing: -0.03em; text-decoration: none; color: var(--ink);
}
.wordmark b { color: var(--green); font-weight: 800; }

.tabs { display: flex; align-items: stretch; border-left: 1px solid var(--rule); }
.tab {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  min-width: 132px; padding: 0 22px; text-decoration: none;
  border-right: 1px solid var(--rule); color: var(--muted);
  transition: color .2s, background-color .2s;
}
.tab small { font-family: var(--mono); font-size: 11px; line-height: 1.2; color: var(--muted); }
.tab > span { font-weight: 600; font-size: 15px; line-height: 1.3; }
.tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--green); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.tab:hover { color: var(--ink); background: var(--vellum-2); }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"]::after { transform: scaleX(1); }

.lang {
  display: flex; align-items: center; gap: 4px; padding: 0 18px;
  border-left: 1px solid var(--rule); background: none; border-top: 0; border-bottom: 0; border-right: 0;
  font-family: var(--mono); font-size: 12px; cursor: pointer; color: var(--muted);
}
.lang .is-on { font-weight: 600; color: var(--ink); }
.lang:hover { background: var(--vellum-2); }

.head-cta { display: flex; align-items: center; padding: 0 var(--gutter) 0 18px; border-left: 1px solid var(--rule); }

.menu-btn { display: none; }
.head-cta .lbl-short { display: none; }
@media (max-width: 999px) { .head-cta .lbl-short { display: inline; } }

@media (max-width: 999px) {
  .head-row { grid-template-columns: 1fr auto auto auto; padding-left: var(--gutter); }
  .tabs {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; background: var(--vellum); border-left: 0; border-bottom: 1px solid var(--rule-strong);
  }
  .site-head.is-open .tabs { display: flex; }
  .tab { min-width: 0; padding: 16px var(--gutter); border-right: 0; border-top: 1px solid var(--rule); }
  .tab > span { font-size: 1.25rem; }
  .tab::after { top: 0; bottom: 0; left: 0; right: auto; width: 3px; height: auto; transform: scaleY(0); transform-origin: top; }
  .tab[aria-current="page"]::after { transform: scaleY(1); }
  .lang { padding: 0 14px; }
  .head-cta { padding: 0 12px; }
  .head-cta .lbl-long { display: none; }
  .menu-btn {
    display: grid; place-items: center; width: 60px; border: 0; border-left: 1px solid var(--rule);
    background: none; cursor: pointer; color: var(--ink);
  }
  .menu-btn svg { width: 22px; height: 22px; }
}

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 2px;
  background: var(--green); color: #fff; text-decoration: none; cursor: pointer;
  font-family: var(--text); font-weight: 600; font-size: 15px; line-height: 1.2; white-space: nowrap;
  transition: background-color .2s, transform .15s;
}
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease-out); }
.btn:hover { background: var(--green-dark); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: var(--vellum-2); color: var(--muted); cursor: not-allowed; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }

.btn-ghost {
  background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--vellum); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none;
  color: var(--ink); border-bottom: 1.5px solid currentColor; padding-bottom: 2px;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .3s var(--ease-out); }
.link-arrow:hover { color: var(--green); }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Sheet layout ---------- */

.sheet { max-width: var(--sheet); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 9vw, 128px); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 4vw, 52px); max-width: 760px; }
.h-display {
  font-family: var(--display); font-weight: 800; font-stretch: 118%;
  font-size: var(--fs-display); line-height: 0.98; letter-spacing: -0.03em; text-wrap: balance;
}
.h-section {
  font-family: var(--display); font-weight: 800; font-stretch: 115%;
  font-size: var(--fs-h2); line-height: 1.02; letter-spacing: -0.028em; text-wrap: balance;
}
.lede { font-size: 1.1875rem; line-height: 1.6; color: var(--ink-2); max-width: 60ch; text-wrap: pretty; }
.body-copy { color: var(--ink-2); max-width: 66ch; text-wrap: pretty; }

/* Drawing data block (metadata cell next to headings) */
.datablock {
  display: grid; grid-template-columns: auto 1fr; align-self: start;
  border: 1px solid var(--rule-strong); font-family: var(--mono); font-size: 12px; line-height: 1.35;
  background: var(--vellum);
}
.datablock dt, .datablock dd { padding: 7px 12px; border-top: 1px solid var(--rule); }
.datablock dt { color: var(--muted); border-right: 1px solid var(--rule); }
.datablock dd { color: var(--ink); }
.datablock dt:first-of-type, .datablock dt:first-of-type + dd { border-top: 0; }

/* ---------- Hero ---------- */

.hero { padding-top: clamp(36px, 5vw, 64px); }
.hero-top {
  display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(300px, 1fr); gap: clamp(28px, 4vw, 64px);
  align-items: end;
}
.hero-top .h-display { font-size: clamp(2.5rem, 1.1rem + 3.9vw, 4.6rem); }
.hero-side { display: grid; gap: 22px; }
.hero-side .lede { font-size: 1.0625rem; }

.stage-wrap { position: relative; margin-top: clamp(24px, 3vw, 40px); }
.stage { position: relative; aspect-ratio: 2688 / 980; }
.stage-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.part {
  position: absolute; display: block;
  background-color: var(--ink);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  transition: background-color .35s, opacity .35s;
}
.stage[data-active] .part { opacity: .28; }
.stage[data-active] .part.is-active { opacity: 1; background-color: var(--green); }
.stage-svg .balloon circle { fill: var(--vellum); stroke: var(--ink); transition: fill .3s, stroke .3s; }
.stage-svg .balloon text { font-family: var(--mono); font-size: 28px; fill: var(--ink); transition: fill .3s; }
.stage-svg .balloon.is-active circle { fill: var(--green); stroke: var(--green); }
.stage-svg .balloon.is-active text { fill: #fff; }
.stage-svg .part-label { font-family: var(--mono); font-size: 22px; fill: var(--muted); }
.stage-svg .leader { stroke: var(--ink); }
.stage-svg .balloon.is-active + .leader, .stage-svg .leader.is-active { stroke: var(--green); }
.stage-svg .construction { stroke: var(--blue); }
.stage-svg .axis { stroke: var(--blue-ink); }
.stage-svg .dimension { stroke: var(--blue-ink); }
.stage-svg .dim-text { font-family: var(--mono); font-size: 26px; fill: var(--blue-ink); }
.stage-hint { display: none; margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.scanline {
  position: absolute; top: -2%; bottom: -2%; left: 0; width: 1.5px; background: var(--green);
  opacity: 0; pointer-events: none;
}

.steps {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; align-items: stretch;
  border-top: 1px solid var(--rule-strong); margin-top: clamp(8px, 1.5vw, 20px);
}
.step {
  padding: 18px 20px 6px 0; display: grid; gap: 6px; align-content: start; cursor: default;
}
.step + .step { padding-left: 20px; border-left: 1px solid var(--rule); }
.step-title { display: flex; align-items: baseline; gap: 10px; font-weight: 700; font-size: 1.125rem; }
.step-title .mono { color: var(--muted); transition: color .3s; }
.step p { font-size: var(--fs-small); line-height: 1.5; color: var(--muted); }
.step.is-active .step-title .mono { color: var(--green); }
.step.is-active .step-title { color: var(--green-dark); }
.steps-cta { display: flex; align-items: center; padding-left: 20px; border-left: 1px solid var(--rule); }

@media (max-width: 1100px) {
  .hero-top { grid-template-columns: 1fr; align-items: start; }
  .hero-side { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 860px) {
  .stage-wrap { overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: thin; }
  .stage { min-width: 780px; }
  .stage-hint { display: block; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 16px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .step:first-child { border-top: 0; }
  .steps-cta { padding: 20px 0 0; border-left: 0; }
}
@media (max-width: 640px) {
  .hero-side { grid-template-columns: 1fr; }
  .datablock { display: none; }
}

/* ---------- Title block (certifications) ---------- */

.titleblock {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  border: 1px solid var(--rule-strong); margin-top: clamp(40px, 5vw, 64px);
}
.titleblock li { padding: 16px 20px; display: grid; gap: 4px; align-content: start; }
.titleblock li + li { border-left: 1px solid var(--rule-strong); }
.titleblock strong { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.titleblock span { font-size: 13.5px; color: var(--muted); }
.titleblock .tb-sheet { justify-items: end; text-align: right; }
.titleblock .tb-sheet strong { font-family: var(--mono); font-weight: 500; font-size: 13px; }
@media (max-width: 900px) {
  .titleblock { grid-template-columns: 1fr 1fr; }
  .titleblock li + li { border-left: 0; }
  .titleblock li { border-top: 1px solid var(--rule-strong); }
  .titleblock li:nth-child(-n+2) { border-top: 0; }
  .titleblock li:nth-child(even) { border-left: 1px solid var(--rule-strong); }
  .titleblock .tb-sheet { grid-column: 1 / -1; justify-items: start; text-align: left; border-left: 0 !important; }
}

/* ---------- Ink band: measurements ---------- */

.band-ink { background: var(--ink); color: var(--on-ink); }
.measures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.band-ink .datatable { border-color: rgba(156, 199, 228, 0.35); }
.band-ink .datatable th { color: #fff; border-color: rgba(156, 199, 228, 0.25); }
.band-ink .datatable td { color: var(--on-ink-muted); border-color: rgba(156, 199, 228, 0.25); }
.measure { padding: clamp(36px, 4vw, 56px) clamp(16px, 2vw, 32px); display: grid; gap: 12px; }
.measure + .measure { border-left: 1px solid rgba(156, 199, 228, 0.22); }
.cota { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.cota::before, .cota::after { content: ""; height: 1px; background: var(--blue); opacity: .7; }
.cota-end { position: absolute; top: 50%; width: 1px; height: 22px; margin-top: -11px; background: var(--blue); opacity: .7; }
.cota-end.l { left: 0; } .cota-end.r { right: 0; }
.cota-end::after {
  content: ""; position: absolute; top: 50%; width: 9px; height: 7px; margin-top: -3.5px; background: var(--blue);
}
.cota-end.l::after { left: 1px; clip-path: polygon(0 50%, 100% 0, 100% 100%); }
.cota-end.r::after { right: 1px; clip-path: polygon(100% 50%, 0 0, 0 100%); }
.measure-value {
  font-family: var(--display); font-weight: 800; font-stretch: 115%;
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.6rem); line-height: 1; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; color: #fff;
}
.measure-label { text-align: center; color: var(--on-ink-muted); font-size: var(--fs-small); }
@media (max-width: 860px) {
  .measures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .measure { padding-inline: 12px; }
  .measure:nth-child(3) { border-left: 0; }
  .measure:nth-child(n+3) { border-top: 1px solid rgba(156, 199, 228, 0.22); }
}

/* ---------- Category index strip ---------- */

.cats {
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr));
  border: 1px solid var(--rule-strong);
}
.cat {
  position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px;
  min-height: 300px; padding: 18px 16px 16px; text-decoration: none; color: var(--ink);
  transition: background-color .25s;
}
.cats li + li .cat { box-shadow: inset 1px 0 0 var(--rule-strong); }
.cat-n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.cat h3 { font-size: 1.0625rem; font-weight: 700; line-height: 1.25; }
.cat-draw {
  align-self: center; justify-self: center; width: 100%; aspect-ratio: 1; max-width: 140px;
  background-color: var(--ink);
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  transition: background-color .3s, transform .5s var(--ease-out);
}
.cat-count { font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cat-count svg { width: 16px; height: 16px; color: var(--ink); transition: transform .3s var(--ease-out), color .3s; }
.cat:hover { background: var(--paper); }
.cat:hover .cat-draw { background-color: var(--green); transform: translateY(-4px); }
.cat:hover .cat-count svg { transform: translateX(3px); color: var(--green); }
.cat-all { background: var(--ink); color: var(--on-ink); }
.cat-all .cat-n, .cat-all .cat-count { color: var(--on-ink-muted); }
.cat-all .cat-count svg { color: var(--on-ink); }
.cat-all:hover { background: var(--green-dark); }
.cat-all .cat-big {
  align-self: center; font-family: var(--display); font-weight: 800; font-stretch: 115%;
  font-size: 3.5rem; line-height: 1; letter-spacing: -0.03em; color: #fff;
}
@media (max-width: 1200px) {
  .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cats li:nth-child(n+5) .cat { border-top: 1px solid var(--rule-strong); }
  .cats li:nth-child(5) .cat { box-shadow: none; }
}
@media (max-width: 640px) {
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cats li .cat { box-shadow: none !important; }
  .cats li:nth-child(even) .cat { box-shadow: inset 1px 0 0 var(--rule-strong) !important; }
  .cats li:nth-child(n+3) .cat { border-top: 1px solid var(--rule-strong); }
  .cat { min-height: 240px; }
}

/* ---------- Product plates ---------- */

.plates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px); }
.plate { position: relative; display: grid; grid-template-rows: auto 1fr auto auto auto; padding: 18px 20px 20px; }
.plate::before, .plate::after { content: ""; position: absolute; pointer-events: none; transition: border-color .3s; }
.plate::before { left: -12px; right: -12px; top: 0; bottom: 0; border-top: 1px solid var(--blue); border-bottom: 1px solid var(--blue); }
.plate::after { top: -12px; bottom: -12px; left: 0; right: 0; border-left: 1px solid var(--blue); border-right: 1px solid var(--blue); }
.plate-ref { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.plate-ref b { font-weight: 500; color: var(--ink); }
.plate-fig { position: relative; margin: 14px 0 6px; padding: 0 0 34px 34px; }
.plate-fig img {
  width: 100%; aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply;
  transition: transform .6s var(--ease-out);
}
.dim { position: absolute; color: var(--blue-ink); font-family: var(--mono); font-size: 11.5px; line-height: 1; }
.dim::before { content: ""; position: absolute; background: currentColor; opacity: .75; }
.dim i {
  position: absolute; font-style: normal; background: var(--vellum); padding: 2px 6px; white-space: nowrap;
}
.dim-h { left: calc(34px + 12%); right: 12%; bottom: 12px; height: 9px; border-left: 1px solid; border-right: 1px solid; }
.dim-h::before { left: 0; right: 0; top: 4px; height: 1px; }
.dim-h i { left: 50%; top: 4px; transform: translate(-50%, -50%); }
.dim-v { left: 12px; top: 12%; bottom: calc(34px + 12%); width: 9px; border-top: 1px solid; border-bottom: 1px solid; }
.dim-v::before { top: 0; bottom: 0; left: 4px; width: 1px; }
.dim-v i { top: 50%; left: 4px; transform: translate(-50%, -50%) rotate(-90deg); }
.plate h3 { font-size: 1.125rem; font-weight: 700; line-height: 1.3; margin-top: 4px; text-wrap: balance; }
.plate-spec { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.plate-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule);
}
.price { font-family: var(--mono); font-size: 1rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.price small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.plate:hover::before, .plate:hover::after { border-color: var(--green); }
.plate:hover .plate-fig img { transform: scale(1.035); }
.plate .btn-sm { background: transparent; color: var(--green-dark); box-shadow: inset 0 0 0 1.5px var(--green); }
.plate .btn-sm:hover { background: var(--green); color: #fff; }
.plate[hidden] { display: none; }

@media (max-width: 1100px) { .plates { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .plates { grid-template-columns: 1fr; gap: 40px; } }

.section-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: clamp(36px, 4vw, 56px); }
.note { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- Coverage map (inverted sheet) ---------- */

.map-sec { background: var(--ink); color: var(--on-ink); position: relative; overflow: hidden; }
.map-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px);
  align-items: center; padding-block: clamp(72px, 8vw, 120px);
}
.map-fig { position: relative; margin: 0; }
.map-fig svg { width: 100%; height: auto; display: block; overflow: visible; }
.map-fig .graticule { stroke: rgba(156, 199, 228, 0.16); stroke-width: 1; fill: none; }
.map-fig .country { fill: rgba(156, 199, 228, 0.06); stroke: rgba(230, 236, 241, 0.85); stroke-width: 1.2; stroke-linejoin: round; }
.map-fig .route { fill: none; stroke: var(--blue); stroke-width: 1.5; stroke-dasharray: 6 7; }
.map-fig .node-ring { fill: none; stroke: #6CC3A6; stroke-width: 1.5; }
.map-fig .node { fill: #2E9A7E; }
.map-fig .node-label { font-family: var(--mono); font-size: 17px; fill: var(--on-ink); }
.map-fig .node-coord { font-family: var(--mono); font-size: 12.5px; fill: var(--on-ink-muted); }
.map-fig .node-label, .map-fig .node-coord { paint-order: stroke; stroke: var(--ink); stroke-width: 6px; stroke-linejoin: round; }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; font-family: var(--mono); font-size: 12px; color: var(--on-ink-muted); }
.map-legend span { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 640px) { .map-fig .node-label, .map-fig .node-coord { display: none; } }
.map-legend i { display: inline-block; }
.lg-node { width: 10px; height: 10px; border-radius: 50%; background: #2E9A7E; box-shadow: 0 0 0 3px var(--ink), 0 0 0 4.5px #6CC3A6; }
.lg-route { width: 26px; border-top: 1.5px dashed var(--blue); }
.map-copy { display: grid; gap: 22px; justify-items: start; }
.map-copy .h-section { color: #fff; }
.map-copy p { color: var(--on-ink-muted); max-width: 46ch; font-size: 1.125rem; }
.map-sec .crosshair { position: absolute; width: 36px; height: 36px; color: rgba(156, 199, 228, 0.5); }
@media (max-width: 900px) { .map-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.site-foot { background: var(--night); color: var(--on-ink-muted); }
.foot-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-block: 64px 40px;
}
.foot-grid .wordmark { color: #fff; padding: 0; font-size: 2rem; }
.foot-grid .wordmark b { color: #4FB896; }
.foot-tag { margin-top: 14px; max-width: 34ch; font-size: var(--fs-small); }
.foot-col h2 { font-family: var(--mono); font-size: 12px; font-weight: 500; color: #fff; margin-bottom: 14px; }
.foot-col li + li { margin-top: 8px; }
.foot-col a { text-decoration: none; font-size: var(--fs-small); }
.foot-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-col p { font-size: var(--fs-small); }
.foot-block {
  display: grid; grid-template-columns: 1fr auto auto; border-top: 1px solid rgba(156, 199, 228, 0.2);
  font-family: var(--mono); font-size: 12px;
}
.foot-block > * { padding: 16px 0; }
.foot-block > * + * { padding-left: 20px; margin-left: 20px; border-left: 1px solid rgba(156, 199, 228, 0.2); }
@media (max-width: 760px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-block { grid-template-columns: 1fr; }
  .foot-block > * + * { padding-left: 0; margin-left: 0; border-left: 0; border-top: 1px solid rgba(156, 199, 228, 0.2); }
}

/* ---------- Page heads (inner sheets) ---------- */

.page-head {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: clamp(28px, 4vw, 72px);
  align-items: end; padding-top: clamp(48px, 6vw, 88px);
}
.page-head .h-display { max-width: 16ch; }
.page-head .lede { margin-top: 24px; }
@media (max-width: 900px) { .page-head { grid-template-columns: 1fr; } }

/* ---------- Nosotros: photo ⇄ drawing ---------- */

.wipe { position: relative; margin: clamp(40px, 5vw, 64px) 0 0; }
.wipe-stage {
  position: relative; aspect-ratio: 2048 / 1360; overflow: hidden; background: var(--paper);
  --x: 30%;
  touch-action: pan-y;
}
.wipe-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wipe-draw {
  position: absolute; inset: 0; background: var(--vellum);
  clip-path: inset(0 0 0 var(--x));
}
.wipe-draw img { mix-blend-mode: multiply; }
.wipe-handle {
  position: absolute; top: 0; bottom: 0; left: var(--x); width: 0; pointer-events: none;
  border-left: 1.5px solid var(--green);
}
.wipe-knob {
  position: absolute; top: 50%; left: 0; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(14, 26, 43, 0.25);
}
.wipe-knob svg { width: 26px; height: 26px; }
.wipe-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize;
}
.wipe-range:focus-visible + .wipe-handle .wipe-knob { outline: 3px solid var(--ink); outline-offset: 3px; }
.wipe-tag {
  position: absolute; top: 16px; font-family: var(--mono); font-size: 12px; padding: 6px 10px;
  background: var(--vellum); border: 1px solid var(--rule-strong); pointer-events: none;
}
.wipe-tag.l { left: 16px; }
.wipe-tag .lbl-short { display: none; }
.wipe-tag.r { right: 16px; }
.detail {
  position: absolute; right: 4%; top: 9%; width: 25%; aspect-ratio: 1; border-radius: 50%;
  border: 1.5px solid var(--ink); background-color: var(--vellum); overflow: hidden; pointer-events: none;
  transition: opacity .4s;
}
.detail-img { position: absolute; inset: 0; background-repeat: no-repeat; }
.detail-dims { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.detail-dims line { stroke: var(--blue-ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.detail-dims text { font-family: var(--mono); font-size: 4.6px; fill: var(--blue-ink); }
.detail-title {
  position: absolute; right: calc(29% + 14px); top: 12%; pointer-events: none;
  padding: 6px 10px; background: var(--vellum); border: 1px solid var(--rule-strong);
  font-family: var(--mono); font-size: 12px; color: var(--ink); transition: opacity .4s;
}
.wipe-stage.photo-heavy .detail-title { opacity: 0; }
.draw-dims { position: absolute; inset: 0; width: 100%; height: 100%; }
.draw-dims line, .draw-dims path { stroke: var(--blue-ink); stroke-width: 1.25; fill: none; vector-effect: non-scaling-stroke; }
.draw-dims text { font-family: var(--mono); font-size: 26px; fill: var(--blue-ink); }
.draw-dims .bg { fill: var(--vellum); stroke: none; }
.detail-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.detail-svg .leader { stroke: var(--ink); stroke-width: 1.25; fill: none; }
.detail-svg .ring { fill: none; stroke: var(--ink); stroke-width: 1.25; }
.detail-svg .lbl { font-family: var(--mono); font-size: 26px; fill: var(--ink); }
.detail-svg .lbl-bg { fill: var(--vellum); }
.wipe-stage.photo-heavy .detail { opacity: 0; }
.wipe-stage.photo-heavy .detail-svg { opacity: 0; }
.detail-svg { transition: opacity .4s; }
.wipe figcaption { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 14px; font-size: var(--fs-small); color: var(--muted); }
@media (max-width: 700px) {
  .detail { width: 34%; top: 12%; right: 4%; }
  .detail-title { display: none; }
  .wipe-tag { font-size: 11px; }
  .wipe-tag.r { top: auto; bottom: 12px; right: 12px; }
  .wipe-tag .lbl-long { display: none; }
  .wipe-tag .lbl-short { display: inline; }
}

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 88px); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.notes { counter-reset: note; display: grid; gap: 0; border-top: 1px solid var(--rule-strong); }
.notes li { display: grid; grid-template-columns: 52px 1fr; gap: 6px 18px; padding: 24px 0; border-bottom: 1px solid var(--rule); }
.notes .num {
  grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; border: 1.25px solid var(--ink);
  display: grid; place-items: center; font-family: var(--mono); font-size: 15px;
}
.notes h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.3; }
.notes p { color: var(--ink-2); }

.plate-photo { position: relative; margin: 0; padding: 14px; }
.plate-photo::before, .plate-photo::after { content: ""; position: absolute; pointer-events: none; }
.plate-photo::before { left: -12px; right: -12px; top: 0; bottom: 0; border-top: 1px solid var(--blue); border-bottom: 1px solid var(--blue); }
.plate-photo::after { top: -12px; bottom: -12px; left: 0; right: 0; border-left: 1px solid var(--blue); border-right: 1px solid var(--blue); }
.plate-photo figcaption { margin-top: 10px; font-size: var(--fs-small); color: var(--muted); }

.datatable { width: 100%; border-collapse: collapse; border: 1px solid var(--rule-strong); }
.datatable caption { text-align: left; font-family: var(--mono); font-size: 12px; color: var(--muted); padding-bottom: 10px; }
.datatable th, .datatable td { padding: 18px 20px; text-align: left; border-top: 1px solid var(--rule); vertical-align: baseline; }
.datatable th {
  width: 260px; font-family: var(--display); font-weight: 800; font-stretch: 115%; font-size: 2.25rem; line-height: 1;
  letter-spacing: -0.03em; border-right: 1px solid var(--rule); font-variant-numeric: tabular-nums;
}
.datatable td { color: var(--ink-2); }

.cta-strip {
  display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
  border: 1px solid var(--rule-strong); padding: clamp(28px, 4vw, 48px);
}
.cta-strip p { color: var(--ink-2); margin-top: 10px; max-width: 56ch; }
@media (max-width: 760px) { .cta-strip { grid-template-columns: 1fr; } }

/* ---------- Productos ---------- */

.filters { display: flex; flex-wrap: wrap; border: 1px solid var(--rule-strong); margin-top: clamp(32px, 4vw, 48px); }
.chip {
  display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; border: 0; background: none; cursor: pointer;
  border-right: 1px solid var(--rule); font-weight: 600; font-size: var(--fs-small); color: var(--ink-2);
  transition: background-color .2s, color .2s;
}
.chip small { font-family: var(--mono); font-size: 11.5px; font-weight: 400; color: var(--muted); }
.chip:hover { background: var(--vellum-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip[aria-pressed="true"] small { color: var(--on-ink-muted); }
.result-line { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 22px 0 clamp(28px, 3vw, 40px); }
@media (max-width: 640px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chip { flex: none; }
}

/* ---------- Contacto: request form ---------- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); gap: clamp(36px, 5vw, 80px); align-items: start; padding-block: clamp(48px, 6vw, 88px) clamp(72px, 9vw, 128px); }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-data { display: grid; border: 1px solid var(--rule-strong); margin-top: 36px; }
.contact-data div { display: grid; grid-template-columns: 120px 1fr; border-top: 1px solid var(--rule); }
.contact-data div:first-child { border-top: 0; }
.contact-data dt { padding: 16px; font-family: var(--mono); font-size: 12px; color: var(--muted); border-right: 1px solid var(--rule); }
.contact-data dd { padding: 14px 16px; font-weight: 600; }
.contact-data a { text-decoration: none; }
.contact-data a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

.request { border: 1px solid var(--rule-strong); background: var(--paper); }
.request-head {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px;
  padding: 18px 20px; border-bottom: 1px solid var(--rule-strong);
}
.request-head h2 { font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 1.5rem; letter-spacing: -0.02em; }
.request-head span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.cells { display: grid; grid-template-columns: 1fr 1fr; }
.cell { position: relative; display: grid; gap: 4px; padding: 12px 16px 10px; border-bottom: 1px solid var(--rule); }
.cell:nth-child(odd):not(.wide) { border-right: 1px solid var(--rule); }
.cell.wide { grid-column: 1 / -1; }
.cell label { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.cell input, .cell select, .cell textarea {
  width: 100%; border: 0; background: transparent; padding: 4px 0; font-size: 1.0625rem; color: var(--ink);
  border-radius: 0; outline: none;
}
.cell textarea { resize: vertical; min-height: 128px; line-height: 1.5; }
.cell select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 7px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 24px; }
.cell::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--green);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
}
.cell:focus-within::after { transform: scaleX(1); }
.cell:focus-within label { color: var(--green-dark); }
.cell input::placeholder, .cell textarea::placeholder { color: #5C6674; }
.cell.has-error::after { transform: scaleX(1); background: var(--red); }
.cell.has-error label { color: var(--red); }
.field-error { font-size: 13px; color: var(--red); display: none; }
.cell.has-error .field-error { display: block; }
.request-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; }
.request-foot p { font-size: 13px; color: var(--muted); max-width: 40ch; }
.request-done { padding: 36px 24px; display: grid; gap: 14px; justify-items: start; }
.request-done h3 { font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 1.75rem; letter-spacing: -0.02em; }
.request-done p { color: var(--ink-2); max-width: 52ch; }
.stamp {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border: 2px solid var(--green);
  color: var(--green-dark); font-family: var(--mono); font-size: 13px; font-weight: 600; transform: rotate(-2deg);
}
@media (max-width: 600px) {
  .cells { grid-template-columns: 1fr; }
  .cell:nth-child(odd):not(.wide) { border-right: 0; }
  .contact-data div { grid-template-columns: 96px 1fr; }
}

/* ---------- Plotter motion ---------- */

.motion-ok .stage .part, .motion-ok .stage-svg { clip-path: inset(0 100% 0 0); }
.motion-ok .stage .balloon { opacity: 0; }
@media (max-width: 700px) { .detail-svg .leader { display: none; } }

.motion-ok [data-plot] > * { clip-path: inset(0 100% 0 0); }
.motion-ok [data-plot].is-plotted > * { clip-path: inset(0 0 0 0); transition: clip-path .9s var(--ease-plot); transition-delay: var(--d, 0s); }
.motion-ok .map-fig .route { stroke-dashoffset: 400; opacity: 0; }
.motion-ok .map-fig.is-plotted .route { opacity: 1; animation: route-draw 2.4s var(--ease-out) forwards; animation-delay: var(--d, .2s); }
@keyframes route-draw { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }
.map-fig .node-ring { transform-box: fill-box; transform-origin: center; }
.motion-ok .map-fig.is-plotted .node-ring { animation: ping 2.8s var(--ease-out) infinite; animation-delay: var(--d, 0s); }
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 70%, 100% { transform: scale(1.9); opacity: 0; } }

::view-transition-old(root) { animation: 260ms ease both vt-out; }
::view-transition-new(root) { animation: 520ms var(--ease-plot) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

@media print {
  .frame, .promo, .site-head, .map-sec, .site-foot { display: none; }
  body { padding: 0; background: #fff; }
}
