/* ==========================================================================
   Nearcity — hoja de estilos (v3)
   Estética: esquinas redondeadas, botones tipo píldora, secciones rosadas,
   tarjetas con icono y bloques oscuros. Tipografía del sitio: Roboto
   (Fredoka solo aparece en el logotipo, como SVG).
   Índice:
   01. Fuente           02. Variables         03. Base
   04. Utilidades       05. Botones           06. Cabecera e idiomas
   07. Pie              08. Propuestas de imagen
   09. Inicio y figura animada                10. Tarjetas, visor y herramientas
   11. Proyecto         12. Equipo            13. Blog y artículo
   14. Contacto y legal 15. Movimiento reducido
   ========================================================================== */

/* 01. Fuente ------------------------------------------------------------ */
@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* 02. Variables --------------------------------------------------------- */
:root {
  --ink: #1e1e1e;
  --ink-2: #3a3335;
  --muted: #62585a;
  --line: #e8e0e2;
  --line-strong: #d6cacd;
  --paper: #ffffff;
  --blush: #f7eff1;
  --blush-2: #f0e3e6;
  --red: #cf113f;
  --red-dark: #a20d31;
  --red-soft: #fbe6eb;
  --blue: #2f73ad;
  --purple: #6b4fa0;

  --font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --serif-math: "Cambria Math", "STIX Two Math", "Latin Modern Math", "Times New Roman", serif;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(30, 30, 30, .04), 0 8px 24px rgba(30, 30, 30, .06);
  --shadow-lg: 0 2px 4px rgba(30, 30, 30, .05), 0 20px 48px rgba(30, 30, 30, .10);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 9vw, 112px);
  --header-h: 72px;
}

/* 03. Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink-2); font-family: var(--font); font-size: 17px; line-height: 1.65; overflow-x: clip; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
strong, b { font-weight: 600; color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--font); color: var(--ink); line-height: 1.12; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.25rem; letter-spacing: -.01em; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 1000; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; color: #fff; }

/* 04. Utilidades -------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 800px; }
.section { padding: var(--section) 0; }
.section--blush { background: var(--blush); }
.section--tight { padding: calc(var(--section) * .6) 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }
.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { max-width: 760px; margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 991px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--blush); color: var(--ink-2); font-size: .85rem; line-height: 1.3; border: 1px solid transparent; }
.chip--outline { background: #fff; border-color: var(--line-strong); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: var(--blush-2); color: var(--muted); }

.page-head { padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 5vw, 56px); position: relative; isolation: isolate; }
.page-head h1 { max-width: 20ch; }
/* Trama sutil generada con CSS (sustituye a la textura de la web anterior) */
.pattern-bg { position: relative; isolation: isolate; }
.pattern-bg::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(var(--blush-2) 1.2px, transparent 1.3px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000 0%, transparent 90%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 90%); }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span[aria-hidden] { margin: 0 8px; }

/* 05. Botones ----------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent; font: 500 1rem/1 var(--font); text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; color: #fff; }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: .92rem; }
.btn[disabled] { background: var(--blush-2); color: var(--muted); cursor: not-allowed; }
.btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; text-decoration: none; color: var(--ink); }
.link-arrow i { transition: transform .2s; color: var(--red); }
.link-arrow:hover { color: var(--red); }
.link-arrow:hover i { transform: translateX(4px); }

/* 06. Cabecera e idiomas ------------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.brand img { height: 32px; width: auto; }
.nav { display: flex; align-items: center; gap: 12px; }
.nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__list a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .98rem; transition: background-color .2s, color .2s; }
.nav__list a:hover { background: var(--blush); color: var(--ink); }
.nav__list a[aria-current="page"] { color: var(--red); background: var(--red-soft); }
.lang { display: flex; gap: 2px; list-style: none; margin: 0; padding: 3px; background: var(--blush); border-radius: 999px; font-size: .8rem; }
.lang a { display: block; padding: 4px 9px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current="true"] { background: #fff; color: var(--red); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; position: relative; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, top .25s; content: ""; }
.nav-toggle span { top: 21px; }
.nav-toggle span::before { left: 0; top: -7px; }
.nav-toggle span::after { left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 12px; padding: 16px var(--gutter) 24px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; }
  .nav__list a { padding: 12px 14px; font-size: 1.05rem; }
  .nav .btn { width: 100%; }
  .lang { align-self: flex-start; }
}

/* 07. Pie --------------------------------------------------------------- */
.site-footer { background: var(--ink); color: #cfc8ca; padding: 72px 0 28px; font-size: .95rem; }
.site-footer a { color: #cfc8ca; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr; gap: 40px; }
.footer-brand img { height: 32px; width: auto; margin-bottom: 18px; }
.footer-brand p { max-width: 36ch; color: #a99fa2; }
.site-footer h2 { font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 16px; letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-contact li { display: flex; gap: 10px; }
.footer-contact i { color: var(--red); margin-top: 5px; width: 16px; flex: none; }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid #3a3335; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: #8f8588; font-size: .88rem; }
.footer-bottom ul { display: flex; gap: 20px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--red); color: #fff; cursor: pointer; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--red-dark); }

/* 08. Propuestas de imagen ---------------------------------------------- */
.ph { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-height: 240px; padding: 28px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: repeating-linear-gradient(135deg, #fbf8f9 0 12px, #f6eff1 12px 24px); color: var(--muted); font-size: .93rem; line-height: 1.55; }
.ph__tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.ph__tag i { color: var(--red); }
.ph p { margin: 0; max-width: 60ch; }
.ph .spec { font-family: var(--mono); font-size: .78rem; }
.ph--wide { aspect-ratio: 16 / 9; min-height: 0; }

/* 09. Inicio y figura animada ------------------------------------------- */
.hero { padding: clamp(40px, 6vw, 88px) 0 clamp(56px, 8vw, 104px); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lede { margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { margin-inline: auto; }
  .hero__actions { justify-content: center; }
}
/* Figura conceptual animada (no interactiva): círculo con anillos de tiempo
   y tres sectores (a pie, bicicleta, metro) que crecen de 5 a 30 minutos. */
.orbit { position: relative; width: 100%; max-width: 500px; aspect-ratio: 1; justify-self: center; margin: 0; }
.orbit__disc { position: absolute; inset: 7%; border-radius: 50%; background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; }
.orbit__disc svg { width: 100%; height: 100%; }
.orbit__ring { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.orbit__ring circle { fill: none; stroke: var(--red); stroke-width: .5; stroke-dasharray: 1.5 2.5; transform-origin: center; animation: spin 90s linear infinite; }
.orbit .wedge { transform-origin: 200px 200px; transition: transform 1.1s cubic-bezier(.3,.7,.2,1); }
.orbit .tlabel { transition: opacity .4s; }
.orbit__tag { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; background: #fff; border-radius: 999px; box-shadow: var(--shadow); font-size: .9rem; font-weight: 500; color: var(--ink); white-space: nowrap; }
.orbit__tag i { width: 14px; text-align: center; }
.orbit__tag--walk { top: 8%; left: -2%; } .orbit__tag--walk i { color: var(--red); }
.orbit__tag--bike { top: 44%; right: -4%; } .orbit__tag--bike i { color: var(--blue); }
.orbit__tag--metro { bottom: 9%; left: 2%; } .orbit__tag--metro i { color: var(--purple); }
.orbit__time { position: absolute; bottom: 0; right: 6%; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: .95rem; box-shadow: var(--shadow); display: inline-flex; gap: 8px; align-items: center; min-width: 92px; justify-content: center; }
.orbit__time i { color: var(--red); }
.orbit figcaption { position: absolute; left: 0; right: 0; bottom: -46px; text-align: center; font-size: .82rem; color: var(--muted); }
@media (max-width: 900px) { .orbit { max-width: 380px; margin-bottom: 40px; } .orbit__tag--walk { left: 0; } .orbit__tag--bike { right: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* 10. Tarjetas, visor y herramientas ------------------------------------ */
.card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.card--link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--red-soft); color: var(--red); font-size: 1.25rem; margin-bottom: 22px; transition: background-color .25s, color .25s; flex: none; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin-bottom: 20px; }
.card .stretched::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card--link:hover .card__icon { background: var(--red); color: #fff; }
.card--link:hover .link-arrow { color: var(--red); }
.card--link:hover .link-arrow i { transform: translateX(4px); }

.demo { display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.browser { border-radius: calc(var(--radius) + 4px); overflow: hidden; background: #fff; box-shadow: var(--shadow-lg); }
.browser__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.browser__bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--blush-2); }
.browser__bar span:first-child { background: var(--red); opacity: .7; }
.browser__bar code { margin-left: 10px; flex: 1; background: var(--blush); border-radius: 999px; padding: 3px 12px; font: .8rem/1.6 var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser .ph { border: 0; border-radius: 0; }
.demo-steps { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; counter-reset: s; }
.demo-steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: center; }
.demo-steps li::before { content: counter(s); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--red); font-weight: 700; box-shadow: var(--shadow); }
@media (max-width: 900px) { .demo { grid-template-columns: 1fr; } }

.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
@media (max-width: 991px) { .tools { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; } }
.tool { display: flex; flex-direction: column; background: #fff; border-radius: calc(var(--radius) + 4px); padding: 28px; box-shadow: var(--shadow); }
.tool__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tool h3 { margin-bottom: 8px; }
.tool > p { color: var(--muted); }
.tool--soon { background: rgba(255,255,255,.6); box-shadow: none; border: 1.5px dashed var(--line-strong); }
.tool--soon .card__icon { background: var(--blush-2); color: var(--muted); }
.tool__body { margin-top: auto; display: grid; gap: 14px; padding-top: 8px; }
.tool fieldset { border: 0; padding: 0; margin: 0; }
.tool legend { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; padding: 0; }
.seg { display: flex; padding: 4px; gap: 2px; background: var(--blush); border-radius: 999px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px 6px; border-radius: 999px; font: 500 .92rem/1.2 var(--font); color: var(--ink-2); cursor: pointer; transition: background-color .2s, color .2s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--red); color: #fff; }
.tool select { width: 100%; padding: 11px 16px; border: 1.5px solid var(--line-strong); border-radius: 12px; font: 400 .95rem var(--font); color: var(--ink); background: #fff; }
.scenario { font-size: .9rem; color: var(--muted); margin: 0; }
.scenario b { color: var(--ink); }
.tool-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tool-links a { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 12px; background: var(--blush); text-decoration: none; color: var(--ink); font-weight: 500; transition: background-color .2s, color .2s; }
.tool-links a:hover { background: var(--red); color: #fff; }
.tool-links a:hover i { color: #fff; }
.tool-links a span { flex: 1; }
.tool-links a i:first-child { color: var(--red); width: 18px; }
.tool-links a i:last-child { font-size: .8em; color: var(--muted); }

.pub-card { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: clamp(24px, 4vw, 36px); background: #fff; border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow); }
.pub-card .card__icon { margin: 0; width: 60px; height: 60px; font-size: 1.4rem; }
.pub-card .t { display: block; font-size: 1.2rem; font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.35; margin-bottom: 6px; }
.pub-card .t:hover { color: var(--red); }
.pub-card .m { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .pub-card { grid-template-columns: 1fr; } }

.cta-band { background: var(--ink); color: #fff; border-radius: calc(var(--radius) + 8px); padding: clamp(32px, 5vw, 56px); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band p { color: #cfc8ca; margin: 0; }

/* 11. Proyecto ---------------------------------------------------------- */
.abstract { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .abstract { grid-template-columns: 1fr; } }
.abstract__text { font-size: 1.1rem; }
.keywords { margin-top: 18px; }
.keywords > span { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.rq { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.rq h2 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: 16px; }
.rq ol { list-style: none; padding: 0; margin: 0; counter-reset: rq; display: grid; gap: 16px; }
.rq li { counter-increment: rq; display: grid; grid-template-columns: 40px 1fr; gap: 10px; line-height: 1.5; }
.rq li::before { content: counter(rq); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-weight: 700; font-size: .9rem; }

.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.doc > * { min-width: 0; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: .93rem; }
.toc p { font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc ol a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc ol a:hover { color: var(--ink); }
.toc ol a.is-active { color: var(--red); border-left-color: var(--red); font-weight: 500; }
.toc .btn { margin-top: 24px; width: 100%; }
@media (max-width: 991px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { position: sticky; top: var(--header-h); z-index: 20; margin: 0 calc(var(--gutter) * -1); padding: 10px var(--gutter); background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .toc p, .toc .btn { display: none; }
  .toc ol { display: flex; gap: 6px; overflow-x: auto; border: 0; scrollbar-width: none; }
  .toc ol::-webkit-scrollbar { display: none; }
  .toc ol a { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; margin: 0; }
  .toc ol a.is-active { border-color: var(--red); background: var(--red-soft); }
}
.doc-section { padding-bottom: clamp(48px, 6vw, 72px); margin-bottom: clamp(48px, 6vw, 72px); border-bottom: 1px solid var(--line); }
.doc-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.doc-section > h2 { display: flex; gap: 16px; align-items: baseline; }
.doc-section > h2 .num { font: 600 .95rem/1 var(--mono); color: var(--red); flex: none; transform: translateY(-4px); }
.doc-section h3 { margin-top: 1.8em; }
.prose { max-width: 70ch; }
.cite-inline { font-size: .92em; color: var(--muted); }
.figure { margin: 32px 0; }
.figure figcaption { font-size: .9rem; color: var(--muted); margin-top: 12px; max-width: 72ch; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.split .figure { margin: 0; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.chart { background: var(--blush); border-radius: var(--radius); padding: clamp(16px, 3vw, 28px); }
.equation { margin: 24px 0; padding: 22px clamp(16px, 3vw, 30px); border-left: 4px solid var(--red); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow); overflow-x: auto; }
.equation__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-width: max-content; }
.equation__row + .equation__row { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.equation math { font-family: var(--serif-math); font-size: 1.3rem; color: var(--ink); }
.equation__tag { font: 500 .9rem/1 var(--mono); color: var(--muted); }
.vars { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 24px 0; font-size: .97rem; }
.vars dt { font-family: var(--serif-math); font-style: italic; font-size: 1.08rem; color: var(--red); text-align: right; min-width: 48px; }
.vars dd { margin: 0; }
.note { display: flex; gap: 14px; padding: 16px 20px; border-radius: var(--radius-sm); background: #e8f0f8; color: #1f4a70; font-size: .95rem; margin: 20px 0; }
.note i { margin-top: 4px; }
.note p { margin: 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin-top: 20px; }
.data-table caption { caption-side: bottom; text-align: left; font-size: .88rem; color: var(--muted); padding-top: 12px; }
.data-table th, .data-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table thead th { font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 2px solid var(--ink); }
.data-table td:first-child { font-weight: 500; color: var(--ink); }
.table-wrap { overflow-x: auto; }
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.matrix .ok { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--red-soft); color: var(--red); font-size: .8rem; }
.matrix .mode { display: inline-flex; gap: 10px; align-items: center; font-weight: 500; }
.matrix .mode i { width: 18px; color: var(--red); }
.steps { list-style: none; padding: 0; margin: 28px 0 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 20px; position: relative; padding-bottom: 26px; }
.steps li::before { content: counter(step, decimal-leading-zero); width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 1.5px solid var(--line-strong); font-weight: 700; color: var(--red); position: relative; z-index: 1; }
.steps li::after { content: ""; position: absolute; left: 27px; top: 56px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { margin: 12px 0 6px; font-size: 1.12rem; }
.steps p { margin: 0; color: var(--muted); }
.pubs { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 14px; }
.pubs li { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.pubs .t { display: block; font-weight: 600; color: var(--ink); margin-bottom: 4px; line-height: 1.4; text-decoration: none; }
.pubs .t:hover { color: var(--red); }
.pubs .m { font-size: .93rem; color: var(--muted); }
.cite { position: relative; margin-top: 14px; }
.cite pre { margin: 0; padding: 20px; padding-right: 110px; background: var(--ink); color: #f3eaec; border-radius: var(--radius-sm); font: .84rem/1.6 var(--mono); overflow-x: auto; white-space: pre; }
.cite .btn { position: absolute; top: 12px; right: 12px; min-height: 34px; padding: 0 14px; font-size: .85rem; background: #3a3335; color: #fff; }
.cite .btn:hover { background: var(--red); }

/* 12. Equipo ------------------------------------------------------------ */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter button { border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2); border-radius: 999px; padding: 8px 16px; font: 500 .92rem/1.2 var(--font); cursor: pointer; transition: all .2s; }
.filter button:hover { border-color: var(--ink); }
.filter button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter button .count { opacity: .6; margin-left: 4px; }
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .people { grid-template-columns: 1fr; } }
.person { display: grid; grid-template-columns: 120px 1fr; gap: 22px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); align-items: start; transition: box-shadow .25s; }
.person:hover { box-shadow: var(--shadow-lg); }
.person[hidden] { display: none; }
.avatar { width: 120px; aspect-ratio: 1; border-radius: 14px; background: var(--blush-2); color: var(--red); display: grid; place-items: center; font-size: 2rem; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person h3 { margin: 2px 0 2px; font-size: 1.15rem; }
.person .role { color: var(--red); font-size: .93rem; font-weight: 500; margin-bottom: 4px; }
.person .aff { font-size: .88rem; color: var(--muted); margin-bottom: 10px; line-height: 1.45; }
.person p { font-size: .94rem; margin-bottom: 8px; }
@media (max-width: 480px) { .person { grid-template-columns: 80px 1fr; gap: 16px; padding: 18px; } .avatar { width: 80px; font-size: 1.4rem; } }
.profile-links { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 10px 0 0; }
.profile-links a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--blush); color: var(--ink-2); text-decoration: none; font-size: .82rem; font-weight: 500; }
.profile-links a:hover { background: var(--red); color: #fff; }
.lines { counter-reset: line; }
.lines > div { background: #fff; border-radius: var(--radius); padding: 24px; }
.lines > div::before { counter-increment: line; content: counter(line, decimal-leading-zero); display: block; font: 600 .9rem/1 var(--mono); color: var(--red); margin-bottom: 14px; }
.lines h3 { font-size: 1.1rem; }
.lines p { margin: 0; font-size: .95rem; color: var(--muted); }
.partners { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.partner { display: grid; place-items: center; min-height: 96px; padding: 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--muted); font-size: .9rem; text-align: center; background: #fff; }
@media (max-width: 760px) { .partners { grid-template-columns: repeat(2, 1fr); } }

/* 13. Blog y artículo --------------------------------------------------- */
.blog-tools { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.blog-tools .filter { margin: 0; }
.blog-search { position: relative; flex: 0 1 260px; }
.blog-search input { width: 100%; height: 42px; padding: 0 16px 0 40px; border: 1px solid var(--line-strong); border-radius: 999px; font: 400 .95rem var(--font); background: #fff; color: var(--ink); }
.blog-search input:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.blog-search i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; }
@media (max-width: 640px) { .blog-search { flex-basis: 100%; } }
.posts { list-style: none; margin: 0; padding: 0; }
.post { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 32px; padding: 36px 0; border-bottom: 1px solid var(--line); position: relative; }
.post[hidden] { display: none; }
.post time { font: .88rem/1.7 var(--mono); color: var(--muted); }
.post__cat { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--red); display: block; margin-bottom: 8px; }
.post h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin: 0 0 10px; }
.post h2 a { color: var(--ink); text-decoration: none; background: linear-gradient(var(--red), var(--red)) 0 100% / 0 2px no-repeat; transition: background-size .3s; }
.post h2 a::after { content: ""; position: absolute; inset: 0; }
.post:hover h2 a { background-size: 100% 2px; }
.post p { margin: 0; color: var(--muted); }
.post__read { font-size: .88rem; color: var(--muted); white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.post__read i { color: var(--red); transition: transform .2s; }
.post:hover .post__read i { transform: translateX(4px); }
.ph-text { color: var(--muted); font-style: italic; }
@media (max-width: 760px) { .post { grid-template-columns: 1fr; gap: 6px; padding: 28px 0; } .post__read { display: none; } }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--red); z-index: 200; }
.article-head { padding: clamp(40px, 6vw, 80px) 0 32px; }
.article-head .meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: .9rem; color: var(--muted); margin-bottom: 20px; }
.article-head .meta .post__cat { margin: 0; }
.article-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); }
.byline { display: flex; align-items: center; gap: 14px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.byline .avatar { width: 48px; border-radius: 50%; font-size: 1rem; }
.byline b { display: block; font-weight: 500; }
.byline span { font-size: .9rem; color: var(--muted); }
.article { font-size: 1.12rem; line-height: 1.8; }
.article h2 { font-size: 1.7rem; margin: 2em 0 .6em; }
.article blockquote { margin: 2em 0; padding: 4px 0 4px 28px; border-left: 3px solid var(--red); font-size: 1.3rem; font-weight: 500; color: var(--ink); }
.article-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; padding: 28px 0; margin-top: 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share { display: flex; align-items: center; gap: 8px; }
.share > span { font-size: .9rem; color: var(--muted); margin-right: 4px; }
.share a, .share button { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2); cursor: pointer; text-decoration: none; font-size: .95rem; transition: all .2s; }
.share a:hover, .share button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.pager a { display: block; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-weight: 500; }
.pager a:hover { border-color: var(--red); }
.pager small { display: block; color: var(--muted); font-weight: 400; margin-bottom: 4px; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: .92rem; opacity: 0; visibility: hidden; transition: all .25s; z-index: 300; }
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* 14. Contacto y legal -------------------------------------------------- */
.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact-cards { display: grid; gap: 16px; }
.contact-card { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.contact-card .card__icon { margin: 0; width: 48px; height: 48px; }
.contact-card h2 { font-size: 1.05rem; margin: 2px 0 4px; letter-spacing: 0; }
.contact-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.map-embed { margin-top: 16px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--blush); }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.form { background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 500; color: var(--ink); font-size: .95rem; margin-bottom: 8px; }
.req { color: var(--red); }
.opt { color: var(--muted); font-weight: 400; font-size: .85rem; }
.field input, .field select, .field textarea { width: 100%; padding: 13px 16px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fff; font: 400 1rem var(--font); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 160px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2362585a' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.field .err { display: none; color: var(--red-dark); font-size: .85rem; margin: 6px 0 0; }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-color: var(--red); }
.field.is-invalid .err { display: block; }
.counter { float: right; font-weight: 400; font-size: .82rem; color: var(--muted); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .93rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red); flex: none; }
.check.is-invalid { color: var(--red-dark); }
.hp { position: absolute !important; left: -9999px !important; }
.form-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 24px; }
.form-status { flex: 1 1 240px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: .95rem; }
.form-status:empty { display: none; }
.form-status.is-ok { background: #e6f5ec; color: #145c32; }
.form-status.is-error { background: var(--red-soft); color: var(--red-dark); }
.form-status.is-pending { background: var(--blush); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: none; }
[aria-busy="true"] .spinner { display: inline-block; }
.legal h2 { font-size: 1.4rem; margin-top: 2em; }
.placeholder { background: #fff6d6; padding: 0 4px; border-radius: 4px; }

/* 15. Movimiento reducido ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Ajustes móviles: tarjetas compactas con icono a la izquierda */
@media (max-width: 640px) {
  .card--link { display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; padding: 20px; }
  .card--link .card__icon { grid-row: span 3; margin: 0; width: 48px; height: 48px; font-size: 1.1rem; }
  .card--link p { margin-bottom: 10px; }
  .orbit { margin-bottom: 8px; }
}

/* ==========================================================================
   v4 — Ajustes de portada, proyecto y equipo
   ========================================================================== */
/* Vídeo destacado del visor */
.demo-video { max-width: 1040px; margin: 0 auto; }
.browser--lg { box-shadow: 0 30px 70px rgba(30, 30, 30, .16); }
.ph--video { position: relative; aspect-ratio: 16 / 9; min-height: 0; align-items: center; text-align: center; justify-content: center; gap: 10px; }
.ph--video p { max-width: 52ch; }
.ph--video .play { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-size: 1.8rem; box-shadow: 0 10px 30px rgba(207, 17, 63, .35); margin-bottom: 10px; padding-left: 6px; }
.demo-steps--row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 36px 0 32px; }
.demo-steps--row li { align-items: start; }
@media (max-width: 760px) { .demo-steps--row { grid-template-columns: 1fr; } .ph--video .play { width: 64px; height: 64px; font-size: 1.3rem; } .ph--video p, .ph--video .spec { display: none; } }

/* Publicaciones de referencia (varias) */
.pub-list { display: grid; gap: 16px; max-width: 1040px; margin: 0 auto; }
.pub-card span.t { display: block; font-size: 1.2rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
span.btn[aria-disabled="true"] { opacity: .5; cursor: default; }

/* Proyecto: apartados pendientes y subapartados */
.pending { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 18px 20px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm); color: var(--muted); font-style: italic; background: #fcfafa; max-width: 70ch; }
.pending::before { content: "\f303"; font: var(--fa-font-solid); font-style: normal; color: var(--red); }
.pending-inline { color: var(--muted); font-style: italic; }
.subsection { margin-top: 36px; padding-top: 28px; border-top: 1px dashed var(--line); }
.subsection h3 { display: flex; gap: 12px; align-items: baseline; font-size: 1.3rem; margin: 0 0 16px; }
.subsection h3 .num { font: 600 .9rem/1 var(--mono); color: var(--red); }
.toc ol ol { border-left: 0; margin: 2px 0 6px; padding-left: 14px; }
.toc ol ol a { padding-top: 4px; padding-bottom: 4px; font-size: .9rem; }
@media (max-width: 991px) { .toc ol ol { display: contents; } .toc ol li { display: contents; } }

/* Equipo: fichas sin imagen en filas de tres */
.team-title { margin-bottom: 28px; }
.people { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 991px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .people { grid-template-columns: 1fr; } }
.person { display: flex; flex-direction: column; padding: 26px; }
.person h3 { font-size: 1.2rem; margin: 0 0 4px; }
.person p:not(.role):not(.aff) { color: var(--ink-2); flex: 1; }
.person--collab { border: 0; border-left: 4px solid var(--red); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.icon-links { display: flex; gap: 8px; list-style: none; margin: 16px 0 0; padding: 0; }
.icon-links a { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--blush); color: var(--ink-2); text-decoration: none; font-size: 1.05rem; transition: background-color .2s, color .2s; }
.icon-links a:hover { background: var(--red); color: #fff; }
.person--collab .icon-links a { background: var(--blush); }
.person .role { margin: 0 0 6px; }
.person .aff { margin: 0 0 14px; }
.demo-player { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; background: #fff; }
/* 30. Metodología en cuatro pasos (features.html) ------------------------ */
.method { padding-top: 0; }
.method__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 40px); }
.method__fig { margin: 0; display: flex; align-items: center; justify-content: center; height: 250px; }
.method__fig img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.method__fig--pair { gap: 14px; }
.method__fig--pair img { max-height: 100%; }
.method__pipeline { display: block; width: 100%; height: auto; margin: 18px 0 26px; color: var(--ink); }
.method__pipeline text { font-family: var(--font); font-size: 15px; fill: var(--ink-2); }
.method-step__num { display: none; }
.method-step h3 { font-size: 1.3rem; margin: 0 0 6px; }
.method-step .inputs { font-size: .92rem; color: var(--muted); margin: 0 0 14px; }
.method-step p { font-size: .97rem; color: var(--ink-2); margin: 0 0 10px; }
.method var { font-family: var(--serif-math); font-style: italic; color: var(--red); }
.method var sub { font-size: .72em; }
.method-step .equation { margin: 12px 0 0; padding: 12px 14px; background: var(--blush); border-radius: var(--radius-sm); font-size: .95rem; }
.method-step .equation__row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.method-step .equation__row + .equation__row { margin-top: 8px; }
.method-step .equation b { color: var(--red); font-size: .82rem; font-weight: 600; }
.method-step .equation math { font-size: 1.05rem; margin: 0; text-align: left; }
.method-legend { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 14px 0 0; padding: 0; list-style: none; }
.method-legend li { font-size: .78rem; line-height: 1.2; text-align: center; color: var(--ink-2); }
.method-legend li::before { content: ""; display: block; height: 12px; margin-bottom: 6px; background: var(--c); }
.method__credits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 40px); margin-top: 28px; font-size: .88rem; color: var(--muted); }
.method__credits p { margin: 0; grid-column: span 2; }
.method__credits a { color: var(--blue); }
.method__pipeline { grid-column: 1 / -1; }
@media (max-width: 991px) {
  .method__grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .method__pipeline { display: none; }
  .method__fig { height: 200px; margin-top: 28px; }
  .method__fig.m1 { order: 1; } .method-step.m1 { order: 2; }
  .method__fig.m2 { order: 3; } .method-step.m2 { order: 4; }
  .method__fig.m3 { order: 5; } .method-step.m3 { order: 6; }
  .method__fig.m4 { order: 7; } .method-step.m4 { order: 8; }
  .method-step__num { display: inline-grid; place-items: center; width: 28px; height: 28px; margin: 16px 0 8px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 600; font-size: .9rem; }
  .method__credits { grid-template-columns: 1fr; row-gap: 6px; max-width: 560px; margin-inline: auto; }
  .method__credits p { grid-column: auto; }
}

/* 31. Caso de estudio, trabajo futuro y publicaciones (features.html) ---- */
.case__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.case__map { margin: 0; display: grid; grid-template-columns: minmax(0, 417fr) minmax(0, 300fr); }
.case__map img { width: 100%; height: auto; display: block; mix-blend-mode: multiply; }
.case__labels { position: relative; list-style: none; margin: 0; padding: 0; }
.case__labels li { position: absolute; left: 6px; transform: translateY(-50%); font-size: .9rem; line-height: 1.25; color: var(--ink-2); }
.case__labels li.sea { left: -40%; font-style: italic; color: var(--muted); transform: translateY(-50%) rotate(-62deg); transform-origin: left center; white-space: nowrap; font-size: .82rem; }
.case__map figcaption, .case__study figcaption.map-name { grid-column: 1 / -1; margin-top: 14px; font-weight: 700; font-size: 1.2rem; color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 0 0 28px; }
.stats div { margin: 0; }
.stats dt { order: 2; font-size: .92rem; color: var(--muted); line-height: 1.3; }
.stats dd { order: 1; white-space: nowrap; margin: 0 0 6px; font-size: clamp(1.35rem, 2.2vw, 1.8rem); font-weight: 700; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats div { display: flex; flex-direction: column; }
.case__flat { font-size: 1.05rem; color: var(--ink-2); margin-bottom: 36px; }
.case__flat b { color: var(--red); }
.case h3 { font-size: 1.45rem; margin: 0 0 18px; }
.measure-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px 4px; }
.measure { border-collapse: separate; border-spacing: 5px; width: 100%; min-width: 560px; table-layout: fixed; }
.measure th { font-weight: 600; font-size: .95rem; color: var(--ink); text-align: left; white-space: nowrap; }
.measure thead tr:first-child th { padding-bottom: 2px; }
.measure thead th i { color: var(--muted); margin-right: 8px; font-size: 1.15rem; }
.measure thead tr + tr th { font-weight: 400; font-size: .78rem; color: var(--muted); text-align: center; }
.measure tbody th { padding-right: 8px; }
.measure col.c-lab { width: 128px; }
.measure col.c-gap { width: 6px; }
.measure tbody th i { width: 22px; color: var(--muted); margin-right: 8px; text-align: center; }
.measure td { height: 34px; border-radius: 6px; background: #eeedf0; cursor: pointer; transition: background-color .15s; }
.measure td:hover, .measure td:focus-visible { background: var(--red-soft); outline: none; }
.measure td.is-on { background: var(--red); }
.measure .gap { background: none; cursor: default; }
.measure-note { margin: 14px 0 0; font-size: .97rem; color: var(--ink-2); }
.measure-note b:first-child { color: var(--ink); }
.measure-note .hl { color: var(--red); font-weight: 600; }
.case__sources { margin-top: 26px; font-size: .82rem; color: var(--muted); }
.case__study { margin-top: clamp(56px, 8vw, 96px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 5fr) minmax(0, 2fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.case__study > figure { margin: 0; }
.case__study > figure img { width: 100%; height: auto; display: block; mix-blend-mode: multiply; }
.case__study .kicker { color: var(--red); font-weight: 600; margin: 0 0 8px; }
.case__study h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.15; margin: 0 0 14px; }
.case__study .scope { color: var(--muted); margin: 0 0 26px; }
.case__study h4 { font-size: 1.2rem; margin: 0 0 10px; }
.numlist { list-style: none; counter-reset: n; margin: 0 0 24px; padding: 0; }
.numlist li { counter-increment: n; position: relative; padding-left: 26px; margin-bottom: 10px; font-size: 1.02rem; color: var(--ink-2); }
.numlist li::before { content: counter(n); position: absolute; left: 0; top: 0; color: var(--red); font-weight: 700; }
.paper { margin: 0; }
.paper a.thumb { display: block; border: 1px solid var(--line); box-shadow: var(--shadow); }
.paper img { width: 100%; height: auto; display: block; }
.paper figcaption { margin-top: 12px; font-size: .85rem; color: var(--muted); line-height: 1.45; }
.paper figcaption a { color: var(--blue); }
.future { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.future p { font-size: 1.05rem; color: var(--ink-2); }
.cities { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.city { padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.city i { color: var(--red); font-size: 1.3rem; }
.city h3 { margin: 10px 0 4px; font-size: 1.2rem; }
.city p { margin: 0; font-size: .88rem; color: var(--muted); }
.refs > * { max-width: 900px; }
@media (max-width: 991px) {
  .case__grid, .future { grid-template-columns: 1fr; }
  .case__map { max-width: 520px; }
  .case__study { grid-template-columns: 1fr; }
  .paper { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; }
  .paper figcaption { margin-top: 0; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .case__labels li { font-size: .78rem; }
  .cities { grid-template-columns: 1fr; }
}

/* Tarjetas de equipo alineadas por filas (subgrid) */
@supports (grid-template-rows: subgrid) {
  .people .person { display: grid; grid-template-columns: minmax(0, 1fr); grid-row: span 5; grid-template-rows: subgrid; row-gap: 0; }
  .people { row-gap: 0; }
  .people .person { margin-bottom: 24px; }
  .people .person > .icon-links { align-self: end; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cite + .cite { margin-top: 14px; }
.pubs li { background: #fff; }
.case__grid > *, .case__study > *, .future > * { min-width: 0; }
