/* InerCAD · sitio web — mismos tokens que la aplicación (blackstone #212529 / whiteout #E9ECEF) */
:root {
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", ui-monospace, Consolas, monospace;
  --math: "IBM Plex Serif", Cambria, "Times New Roman", serif;
  --maxw: 1120px;
  --radius: 14px;
  color-scheme: dark;
}
:root, :root[data-resolved="dark"] {
  --bg: #212529;            /* blackstone */
  --bg-deep: #1a1d20;
  --surface: #2a2f34;
  --surface-2: #343a40;
  --line: #3a4046;
  --line-2: #495057;
  --text: #e9ecef;          /* whiteout */
  --muted: #adb5bd;
  --faint: #868e96;
  --accent: #e9ecef;
  --accent-ink: #212529;
  --grid: rgba(233, 236, 239, 0.055);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 2px 0 rgba(255, 255, 255, 0.04) inset;
  --ok: #4cd18f;
  --warn: #f2b84b;
}
:root[data-resolved="light"] {
  color-scheme: light;
  --bg: #e9ecef;            /* whiteout */
  --bg-deep: #dee2e6;
  --surface: #dee2e6;
  --surface-2: #d3d8dd;
  --line: #c9cfd5;
  --line-2: #adb5bd;
  --text: #212529;          /* blackstone */
  --muted: #495057;
  --faint: #6c757d;
  --accent: #212529;
  --accent-ink: #e9ecef;
  --grid: rgba(33, 37, 41, 0.07);
  --shadow: 0 30px 70px rgba(33, 37, 41, 0.25), 0 2px 0 rgba(255, 255, 255, 0.4) inset;
  --ok: #2b8a3e;
  --warn: #a8690a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.65 var(--font); letter-spacing: .004em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--maxw), 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }
.mono { font-family: var(--mono); }
.math { font-family: var(--math); font-style: italic; }
sub, sup { line-height: 0; }

/* ---------- Cabecera ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo-word { display: block; height: 22px; aspect-ratio: 1100 / 246; background: var(--text); flex: none;
  -webkit-mask: url(../assets/logo/wordmark.png) center / contain no-repeat; mask: url(../assets/logo/wordmark.png) center / contain no-repeat; }
.nav ul { display: flex; gap: 6px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav ul a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 15px; }
.nav ul a:hover { color: var(--text); background: var(--surface); }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 10px; cursor: pointer; }
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 19px; height: 19px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px; border-radius: 11px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: 500 16px/1 var(--font); letter-spacing: .01em; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { background: var(--surface); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.07); background: var(--accent); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn svg { width: 19px; height: 19px; flex: none; }

/* ---------- Portada ---------- */
.hero { position: relative; padding: 76px 0 40px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 36px 36px; -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 25%, transparent 75%); mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 25%, transparent 75%); }
.hero-copy { text-align: center; max-width: 820px; margin: 0 auto; }
.lockup { display: block; height: clamp(70px, 11vw, 112px); aspect-ratio: 1696 / 587; margin: 0 auto 30px; background: var(--text);
  -webkit-mask: url(../assets/logo/lockup.png) center / contain no-repeat; mask: url(../assets/logo/lockup.png) center / contain no-repeat; }
.eyebrow { font-size: 12.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 0 0 14px; }
h1, h2, .lead { text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5vw, 3.55rem); line-height: 1.1; font-weight: 300; letter-spacing: -.022em; margin: 0 0 22px; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.15; font-weight: 300; letter-spacing: -.018em; margin: 0 0 16px; }
h3 { font-size: 1.12rem; font-weight: 500; letter-spacing: -.004em; margin: 0 0 8px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); line-height: 1.6; margin: 0 auto 32px; max-width: 680px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 16px; }
.hero-meta { color: var(--faint); font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; }
.hero-meta span::before { content: "·"; margin-right: 18px; color: var(--line-2); }
.hero-meta span:first-child::before { display: none; }

.shot { margin: 0; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--bg-deep); box-shadow: var(--shadow); }
.shot img { width: 100%; }
.shot-bar { display: flex; gap: 7px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.shot-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.hero-shot { margin-top: 52px; }

/* ---------- Secciones ---------- */
section { padding: 96px 0; }
.sec-head { max-width: 680px; margin-bottom: 48px; }
.sec-head p { color: var(--muted); margin: 0; }
.alt { background: var(--bg-deep); border-block: 1px solid var(--line); }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 24px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.card .ico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); margin-bottom: 18px; }
.card .ico svg { width: 22px; height: 22px; stroke: var(--text); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: s; }
.steps li { list-style: none; position: relative; padding-top: 58px; }
.steps li::before { counter-increment: s; content: counter(s, decimal-leading-zero); position: absolute; top: 0; left: 0; font: 300 2.6rem/1 var(--mono); color: var(--line-2); letter-spacing: -.04em; }
.steps p { color: var(--muted); margin: 0; font-size: 16px; }
.steps ul { padding: 0; margin: 0; }

.spot { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; margin-bottom: 96px; }
.spot:last-child { margin-bottom: 0; }
.spot.flip { grid-template-columns: 7fr 5fr; }
.spot.flip .spot-copy { order: 2; }
.spot-copy p { color: var(--muted); }
.spot-copy ul { margin: 18px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 15.5px; }
.spot-copy li { padding: 5px 0 5px 22px; position: relative; }
.spot-copy li::before { content: ""; position: absolute; left: 0; top: 15px; width: 10px; height: 1.5px; background: var(--text); }

/* ---------- Precisión ---------- */
.prec { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 15.5px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.cmp caption { text-align: left; padding: 0 0 12px; color: var(--muted); font-size: 14.5px; caption-side: top; }
table.cmp th, table.cmp td { padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--line); }
table.cmp th:first-child, table.cmp td:first-child { text-align: left; }
table.cmp th { color: var(--faint); font-weight: 500; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; }
table.cmp td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
table.cmp td:first-child { font-family: var(--font); }
table.cmp tr:last-child td { border-bottom: 0; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.fact { border-top: 1px solid var(--line-2); padding-top: 14px; }
.fact b { display: block; font: 300 2.3rem/1.05 var(--mono); letter-spacing: -.04em; }
.fact span { color: var(--muted); font-size: 14.5px; line-height: 1.45; display: block; margin-top: 4px; }

/* ---------- Descargas ---------- */
.dl { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 18px; }
.dl .card { display: flex; flex-direction: column; gap: 14px; }
.dl .card.main { border-color: var(--line-2); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.dl h3 { margin: 0; font-size: 1.25rem; font-weight: 400; }
.dl .tag { align-self: flex-start; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); border-radius: 6px; padding: 3px 9px; }
.dl .meta { color: var(--faint); font-size: 14px; }
.dl .btn { margin-top: auto; }
.sha { font: 400 12.5px/1.4 var(--mono); color: var(--faint); word-break: break-all; border: 1px dashed var(--line-2); border-radius: 8px; padding: 8px 10px; display: flex; gap: 10px; align-items: flex-start; }
.sha button { all: unset; cursor: pointer; color: var(--text); text-decoration: underline; text-underline-offset: 3px; flex: none; font-family: var(--font); font-size: 12.5px; }
.note { display: flex; gap: 14px; margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); color: var(--muted); font-size: 15.5px; }
.note svg { width: 22px; height: 22px; flex: none; stroke: var(--warn); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.note.ok svg { stroke: var(--ok); }
.note a { color: var(--text); }
.reqs { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 22px; color: var(--faint); font-size: 14.5px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
details { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font-size: 1.08rem; font-weight: 400; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font: 300 1.7rem/1 var(--mono); color: var(--faint); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p, details ul { margin: 0 0 22px; color: var(--muted); max-width: 70ch; }
details ul { padding-left: 20px; }

/* ---------- Pie ---------- */
footer { border-top: 1px solid var(--line); padding: 48px 0 56px; color: var(--faint); font-size: 14.5px; background: var(--bg-deep); }
.foot { display: flex; flex-wrap: wrap; gap: 28px 56px; justify-content: space-between; align-items: flex-start; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot h4 { margin: 0 0 12px; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.foot a { text-decoration: none; color: var(--muted); }
.foot a:hover { color: var(--text); text-decoration: underline; }
.legal { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* ---------- Guía ---------- */
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; padding: 56px 0 96px; }
.toc { position: sticky; top: 92px; align-self: start; font-size: 15px; max-height: calc(100vh - 120px); overflow: auto; }
.toc h4 { margin: 0 0 12px; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.toc a { display: block; padding: 6px 0 6px 14px; border-left: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a.on { color: var(--text); border-left-color: var(--text); }
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 14px; }
.prose h2 { margin-top: 64px; padding-top: 8px; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.prose h3 { margin-top: 34px; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); font-weight: 500; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--text); }
.prose pre { font-family: var(--mono); font-size: .9em; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin: 14px 0; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
kbd { font-family: var(--mono); font-size: .84em; background: var(--surface); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; color: var(--text); white-space: nowrap; }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15.5px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--faint); font-weight: 500; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; }
.prose td:first-child { white-space: nowrap; }
.callout { border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--radius); padding: 16px 20px; margin: 22px 0; color: var(--muted); }
.callout b { color: var(--text); font-weight: 500; }
.prose .shot { margin: 26px 0; }
.formula { font-family: var(--math); font-style: italic; font-size: 1.12em; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin: 14px 0; overflow-x: auto; }

/* ---------- 404 ---------- */
.nf { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.nf .big { font: 300 clamp(5rem, 16vw, 9rem)/1 var(--mono); letter-spacing: -.06em; color: var(--line-2); }

/* ---------- Aparición suave ---------- */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } .btn { transition: none; } }

/* ---------- Adaptación ---------- */
@media (max-width: 980px) {
  .grid3, .steps, .dl { grid-template-columns: 1fr; }
  .spot, .spot.flip { grid-template-columns: 1fr; gap: 28px; margin-bottom: 72px; }
  .spot.flip .spot-copy { order: 0; }
  .prec { grid-template-columns: 1fr; gap: 36px; }
  .doc { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--surface); }
  section { padding: 72px 0; }
  .nav ul { display: none; }
  .nav-actions { margin-left: auto; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { width: min(var(--maxw), 100% - 32px); }
  .hero { padding-top: 48px; }
  .facts { grid-template-columns: 1fr; }
  .nav .btn { display: none; }
  .btn { width: 100%; }
  .cta .btn { width: 100%; }
}
