/* Layout: instrumento de laboratorio. Hero con osciloscopio (ruido -> pulsos delta-sigma), franja de sigla, rejilla de servicios, proceso en 4 pasos, contacto. */
:root {
  --paper: #F3F5F7;
  --panel: #FFFFFF;
  --ink: #0F1B2D;
  --muted: #56657A;
  --line: #D5DCE4;
  --signal: #E4572E;
  --signal-soft: #FBE3DB;
  --noise: #8FA3BA;
  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0B1320; --panel: #111C2D; --ink: #E7EDF4; --muted: #9AAABD;
    --line: #22324A; --signal: #FF7A52; --signal-soft: #3A1E17; --noise: #4F6682;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0B1320; --panel: #111C2D; --ink: #E7EDF4; --muted: #9AAABD;
  --line: #22324A; --signal: #FF7A52; --signal-soft: #3A1E17; --noise: #4F6682;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; }
.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
h1, h2, h3 { font-family: var(--font-display); font-stretch: 112%; margin: 0; line-height: 1.08; text-wrap: balance; }
p { margin: 0; }
a { color: var(--signal); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--font-mono); }
.label { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex-shrink: 0; }
.brand b { font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: 18px; letter-spacing: .06em; }
.nav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; font-size: 15px; }
.nav ul a { color: var(--muted); text-decoration: none; }
.nav ul a:hover { color: var(--ink); }
.cta-sm { background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; font-size: 14px; padding: 9px 15px; border-radius: 6px; white-space: nowrap; }
@media (max-width: 800px) { .nav ul { display: none; } }

/* Hero */
.hero { padding-block: 64px 48px; }
.hero h1 { font-size: clamp(38px, 6.4vw, 76px); font-weight: 800; letter-spacing: -0.02em; max-width: 14ch; margin-top: 14px; }
.hero h1 span { color: var(--signal); }
.hero .lede { margin-top: 22px; font-size: 19px; color: var(--muted); max-width: 60ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; padding: 13px 20px; border-radius: 8px; text-decoration: none; border: 1.5px solid var(--ink); }
.btn-primary { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn-ghost { color: var(--ink); }

.scope { margin-top: 44px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.scope-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.scope-head b { color: var(--signal); font-weight: 500; }
.scope svg { display: block; width: 100%; height: auto; }
.scope-foot { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); font-size: 14.5px; }
.scope-foot div { padding: 14px 18px; min-width: 0; }
.scope-foot div + div { border-left: 1px solid var(--line); }
.scope-foot strong { display: block; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
.scope-foot .n strong { color: var(--muted); }
.scope-foot .s strong { color: var(--signal); }
.scope-foot p { color: var(--muted); margin-top: 4px; }
@media (max-width: 600px) { .scope-foot { grid-template-columns: 1fr; } .scope-foot div + div { border-left: 0; border-top: 1px solid var(--line); } }

/* Sigla */
.acro { padding-block: 40px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.acro-row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.acro-cell { min-width: 0; }
.acro-cell .l { font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: clamp(30px, 5vw, 54px); line-height: 1; }
.acro-cell:nth-child(4) .l, .acro-cell:nth-child(7) .l { color: var(--signal); }
.acro-cell .es { font-size: 13.5px; margin-top: 10px; overflow-wrap: anywhere; }
.acro-cell .en { font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); overflow-wrap: anywhere; }
.acro-note { margin-top: 22px; color: var(--muted); font-size: 15px; max-width: 72ch; }
@media (max-width: 720px) { .acro-row { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 22px; } }

/* Secciones */
section.block { padding-block: 72px; }
.head { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; align-items: end; margin-bottom: 36px; }
.head h2 { font-size: clamp(28px, 3.8vw, 44px); font-weight: 800; margin-top: 8px; }
.head p { color: var(--muted); max-width: 60ch; }
@media (max-width: 760px) { .head { grid-template-columns: 1fr; gap: 12px; } }

.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.svc { background: var(--panel); padding: 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.svc h3 { font-size: 20px; font-weight: 800; }
.svc .q { font-family: var(--font-mono); font-size: 13.5px; color: var(--signal); }
.svc p { color: var(--muted); font-size: 15.5px; }
.svc.featured { background: var(--signal-soft); }
.svc.featured .tag { align-self: flex-start; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--signal); color: var(--ink); padding: 2px 8px; border-radius: 4px; }
@media (max-width: 900px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .services { grid-template-columns: 1fr; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.steps li { border-top: 2px solid var(--ink); padding-top: 16px; min-width: 0; counter-increment: step; }
.steps li::before { content: "0" counter(step); font-family: var(--font-mono); font-size: 13px; color: var(--signal); }
.steps h3 { font-size: 19px; font-weight: 800; margin-top: 8px; }
.steps p { color: var(--muted); font-size: 15.5px; margin-top: 8px; }
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip { font-family: var(--font-mono); font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }

.studies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.study { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.study .status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.study .status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.study h3 { font-size: 20px; font-weight: 800; }
.study p { color: var(--muted); font-size: 15.5px; }
.study .src { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); }
@media (max-width: 900px) { .studies { grid-template-columns: 1fr; } }

.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.about > div { min-width: 0; }
.about h3 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.about p { color: var(--muted); }
.about p + p { margin-top: 12px; }
.about strong { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; gap: 28px; } }

.contact { background: var(--ink); color: var(--paper); border-radius: 14px; padding: 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.contact > * { min-width: 0; }
.contact h2 { font-size: clamp(28px, 3.8vw, 42px); }
.contact p { opacity: .8; margin-top: 12px; }
.clist { display: grid; gap: 12px; }
.citem { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid color-mix(in srgb, var(--paper) 25%, transparent); border-radius: 8px; padding: 12px 14px; }
.citem div { min-width: 0; }
.citem .label { color: color-mix(in srgb, var(--paper) 65%, transparent); }
.citem .val { font-family: var(--font-mono); font-size: 15px; overflow-wrap: anywhere; user-select: all; }
.citem .val.pending { color: var(--signal); }
.copy { background: transparent; color: var(--paper); border: 1px solid color-mix(in srgb, var(--paper) 40%, transparent); border-radius: 6px; padding: 6px 10px; font: 500 13px var(--font-body); cursor: pointer; flex-shrink: 0; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; padding: 28px 22px; } }

footer { padding-block: 32px 48px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* ---- Sitio multipágina ---- */
.nav ul a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.crumbs { font-family: var(--font-mono); font-size: 13px; color: var(--muted); padding-top: 28px; }
.crumbs a { color: var(--muted); }
.page-hero { padding-block: 40px 32px; }
.page-hero h1 { font-size: clamp(34px, 5vw, 58px); font-weight: 800; letter-spacing: -0.02em; margin-top: 12px; max-width: 18ch; }
.page-hero .lede { margin-top: 18px; font-size: 18.5px; color: var(--muted); max-width: 62ch; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter { font: 500 14px var(--font-body); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter .n { font-family: var(--font-mono); font-size: 12px; opacity: .7; margin-left: 6px; }
a.study { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.study:hover { border-color: var(--signal); transform: translateY(-2px); }
.study .sector { font-family: var(--font-mono); font-size: 12px; color: var(--signal); }
.study .more { font-weight: 600; color: var(--ink); font-size: 15px; }
.empty { border: 1px dashed var(--line); border-radius: 12px; padding: 28px; color: var(--muted); }
.empty a { font-weight: 600; }
.subscribe { margin-top: 56px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; }
.subscribe > * { min-width: 0; }
.subscribe h2 { font-size: 24px; font-weight: 800; }
.subscribe p { color: var(--muted); margin-top: 8px; font-size: 15.5px; }
.subscribe form { display: flex; gap: 8px; flex-wrap: wrap; }
.subscribe input { flex: 1 1 200px; min-width: 0; font: 400 16px var(--font-body); padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }
.subscribe button { font: 600 16px var(--font-body); padding: 12px 18px; border-radius: 8px; border: 0; background: var(--signal); color: #fff; cursor: pointer; }
.subscribe .note { font-size: 13.5px; margin-top: 10px; }
@media (max-width: 760px) { .subscribe { grid-template-columns: 1fr; } }
.article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-bottom: 72px; }
.article h2 { font-size: 26px; font-weight: 800; margin-top: 40px; margin-bottom: 12px; }
.article h2:first-child { margin-top: 0; }
.article p, .article li { color: var(--ink); max-width: 66ch; }
.article p + p { margin-top: 12px; }
.article ol, .article ul { padding-left: 22px; margin: 0; display: grid; gap: 8px; }
.pending-box { border: 1px dashed var(--signal); background: var(--signal-soft); border-radius: 12px; padding: 20px 22px; }
.pending-box strong { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--signal); display: block; margin-bottom: 6px; }
.map-slot { aspect-ratio: 16 / 7; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); display: grid; place-items: center; color: var(--muted); font-family: var(--font-mono); font-size: 13.5px; text-align: center; padding: 20px; }
.aside { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); align-self: start; display: grid; gap: 16px; }
.aside .card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.aside .card p { font-size: 15px; color: var(--muted); margin-top: 6px; }
.aside dl { margin: 0; display: grid; gap: 10px; font-size: 14.5px; }
.aside dt { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.aside dd { margin: 0; }
.aside .btn { width: 100%; justify-content: center; margin-top: 12px; }
.sources-list a { overflow-wrap: anywhere; }
@media (max-width: 900px) { .article { grid-template-columns: 1fr; } .aside { position: static; } }
