/* Apacheta Sistemas — escala visual compartida por el sitio y las notas. */
:root {
  color-scheme: light;
  --bg: #f5f3ec;
  --bg-2: #eeece3;
  --surface: #fbfaf6;
  --line: #d7d9cd;
  --text: #263a30;
  --muted: #58655d;
  --accent: #85502e;
  --accent-ink: #fffaf1;
  --ok: #357057;
  --bad: #9f4937;
  --hill: #d8ddd0;
  --hill-far: #d8ddd0;
  --hill-near: #bbc7b6;
  --font: 'Avenir Next', Avenir, 'Segoe UI', Helvetica, Arial, sans-serif;
  --max: 1200px;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 4px; }
button { font: inherit; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 40px; }
.wrap > *, .grid > *, .problem > *, .anat > *, .panel-grid > *, .about > *, .faq-layout > * { min-width: 0; }
h1, h2, h3, p { margin: 0 0 18px; }
h1, h2, h3 { font-family: var(--font); font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(38px, 4.2vw, 60px); line-height: 1.12; letter-spacing: -.045em; }
h2 { font-size: clamp(28px, 3vw, 38px); line-height: 1.22; letter-spacing: -.035em; max-width: 30ch; }
h3 { font-size: 21px; line-height: 1.35; letter-spacing: -.025em; }
p { max-width: 70ch; }
.muted, figcaption { color: var(--muted); }
.eyebrow { color: var(--accent); font-size: 12px; line-height: 1.5; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 16px; }
.nav { position: sticky; top: 0; z-index: 20; background: rgba(245,243,236,.97); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav .wrap { height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 23px; line-height: 1.2; font-weight: 600; letter-spacing: -.04em; white-space: nowrap; }
.brand svg { width: 30px; height: 34px; flex: none; }
.nav nav { display: flex; gap: 24px; align-items: center; }
.nav nav a { text-decoration: none; font-size: 13px; }
.nav nav a:hover { color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 13px 20px; border: 1px solid var(--text); border-radius: 5px; font-size: 13px; font-weight: 500; text-decoration: none; transition: background .2s, color .2s; }
.btn.primary { color: var(--bg); background: var(--text); }
.btn:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.nav .btn { padding: 9px 16px; }
.menu-toggle { display: none; color: var(--text); background: none; border: 1px solid var(--line); border-radius: 5px; padding: 8px 12px; }
.skip { position: absolute; left: 20px; top: -100px; z-index: 40; background: var(--bg); padding: 12px; }
.skip:focus { top: 10px; }
section { padding: 80px 0; border-bottom: 1px solid var(--line); }
section.alt { background: var(--bg-2); }
.head { margin-bottom: 36px; max-width: 850px; }
.head p { margin-bottom: 0; }
.hero { padding: 64px 0 0; }
.hero .grid { display: grid; grid-template-columns: 1.13fr .87fr; gap: 56px; align-items: center; }
.hero h1 em { color: var(--accent); font-style: normal; font-weight: inherit; }
.hero .lead { max-width: 58ch; color: var(--muted); margin-top: 24px; font-size: 16px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
figure { margin: 0; }
figcaption { font-size: 12px; line-height: 1.6; margin-top: 12px; }
.technical-render { display: block; width: 100%; height: auto; max-width: 100%; background: #f2ece2; }
.hero-art { width: 100%; }
.render-hero .technical-render { height: 400px; object-fit: contain; border: 1px solid #e7e2d7; border-radius: var(--radius); }
.render-hero figcaption { margin: 12px 2px 0; font-size: 12px; }
.territory { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 44px; padding: 23px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.territory span:first-child { color: var(--accent); }
.problem, .anat, .panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.problem h2 { max-width: 24ch; }
.problem p:last-child { margin-bottom: 0; }
.problem b { font-weight: 500; }
.panelbox { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sv { width: 100%; height: auto; display: block; }
.sv text { fill: var(--muted); font-family: var(--font); font-size: 13px; }
.sv .tb { fill: var(--text); font-weight: 600; }
.sv .ln { stroke: var(--muted); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sv .ln-l { stroke: var(--line); fill: none; stroke-width: 1.4; }
.sv .ac { stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sv .acf { fill: var(--accent); }
.sv .acf-s { fill: color-mix(in srgb, var(--accent) 15%, transparent); }
.sv .sf { fill: var(--surface); stroke: var(--line); stroke-width: 1.4; }
.sv .bf { fill: var(--bg-2); stroke: var(--line); stroke-width: 1.4; }
.sv .okf { fill: var(--ok); }
.sv .badf { fill: var(--bad); }
.sv .dash, .sv .flow { stroke-dasharray: 5 6; }
/* Comparación legible: el texto conserva su tamaño en todos los anchos. */
.data-comparison { padding: 28px; }
.data-comparison .chart-heading { margin-bottom: 24px; font-size: 15px; font-weight: 600; }
.timeline + .timeline { margin-top: 26px; }
.timeline-title { display: block; margin-bottom: 10px; font-size: 14px; font-weight: 500; }
.timeline-track { display: grid; grid-template-columns: 1fr 1.15fr 1fr; min-height: 38px; overflow: hidden; border-radius: 4px; background: #e4e8df; }
.timeline-track span { display: flex; justify-content: center; align-items: center; padding: 7px 4px; font-size: 12px; font-weight: 500; }
.timeline-track .connected { background: #dce7de; }
.timeline-track .missing { background: #f0dcd5; color: #7b3829; }
.timeline-track .buffered { background: #e9ddcd; color: #704322; }
.timeline-note { display: block; color: var(--muted); font-size: 12px; margin-top: 8px; }
.data-comparison figcaption { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 24px; }
.flow4, .steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.fs, .step { padding: 24px 0 0; border-top: 1px solid var(--line); }
.ico { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 22px; padding: 14px; color: var(--accent); background: #e9e8dd; border-radius: 8px; }
.ico svg { width: 100%; height: auto; }
.fs p, .step p { font-size: 15px; color: var(--muted); margin-bottom: 0; }
.fs h3, .step h3 { font-size: 19px; }
.anat { grid-template-columns: .9fr 1.1fr; }
.render-station { padding: 0; background: transparent; border: none; }
.render-station .technical-render { height: 400px; object-fit: contain; border: 1px solid #e1dfd3; border-radius: var(--radius); }
.anat ul { list-style: none; padding: 0; margin: 0; }
.anat li { display: flex; gap: 16px; border-bottom: 1px solid var(--line); padding: 17px 0; font-size: 15px; color: var(--muted); }
.anat li:first-child { padding-top: 0; }
.anat li b { display: block; color: var(--text); font-size: 19px; font-weight: 600; margin-bottom: 3px; }
.anat li i { width: 5px; height: 5px; background: var(--accent); margin-top: 12px; flex: none; }
.cards, .projects, .links3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.card { min-width: 0; display: flex; flex-direction: column; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.card .art { padding: 0; margin-bottom: 22px; }
.render-card .technical-render { aspect-ratio: 3/2; object-fit: contain; border: 1px solid #e7e2d7; border-radius: 8px; }
.render-card figcaption { font-size: 11px; margin-top: 9px; }
.card h3 { font-size: 22px; margin-bottom: 14px; }
.card p, .card ul, .lk p { font-size: 15px; color: var(--muted); }
.card ul { padding-left: 19px; margin: auto 0 0; }
.card li + li { margin-top: 5px; }
.card a { font-size: 14px; font-weight: 500; }
.card p:last-child { margin-bottom: 0; }
.projects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.projects .card { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.projects .card p { margin-bottom: 18px; }
.projects .card p:last-child { margin-bottom: 0; }
.tag { display: inline-block; margin: 0 5px 14px 0; padding: 3px 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.live-t { color: var(--ok); }
.wip { color: var(--accent); }
.lk { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lk svg { display: block; width: 100%; height: 96px; padding: 10px 0; margin-bottom: 22px; background: var(--bg); border-radius: 6px; }
.lk .when { color: var(--accent); font-size: 12px; font-weight: 500; margin-bottom: 7px; }
.lk h3 { font-size: 23px; margin-bottom: 12px; }
.lk p { margin-bottom: 0; }
.panel-grid { grid-template-columns: 1.2fr .8fr; gap: 32px; }
.dash { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.dash-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 28px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.kpi small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.kpi b { font-size: 29px; font-weight: 500; line-height: 1.3; letter-spacing: -.04em; white-space: nowrap; }
.kpi b span { font-size: 11px; margin-left: 3px; letter-spacing: 0; font-weight: 400; }
.dash .sv { height: 180px !important; }
.dash-note { font-size: 12px; color: var(--muted); margin-top: 20px; }
.alerts { padding: 0; margin: 0; list-style: none; }
.alerts li { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; font-size: 15px; }
.alerts small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.dot { width: 7px; height: 7px; margin-top: 10px; border-radius: 50%; flex: none; }
.value-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.value-list > div { border-top: 1px solid var(--line); padding-top: 22px; }
.value-list span { font-size: 12px; font-weight: 500; color: var(--accent); }
.value-list h3 { margin-top: 18px; }
.value-list p { font-size: 15px; color: var(--muted); margin-bottom: 0; }
.steps { counter-reset: step; }
.step::before { counter-increment: step; content: '0' counter(step); display: block; margin-bottom: 22px; color: var(--accent); font-size: 15px; font-weight: 500; }
.recurring { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.recurring b { font-weight: 600; color: var(--text); }
.note-feature { align-items: stretch; }
.note-feature .card { padding: 28px; }
.note-feature h3 { font-size: 23px; }
.about { display: grid; grid-template-columns: .7fr 1.3fr; gap: 48px; align-items: center; }
.photo { display: block; width: 100%; max-width: 340px; height: 360px; object-fit: cover; object-position: center; filter: saturate(.75); border-radius: var(--radius); }
.about h2 { max-width: 28ch; }
.about h3 { font-size: 18px; font-weight: 500; }
.about p { font-size: 15px; color: var(--muted); }
.facts { margin-top: 22px; }
.faq-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; }
.faq-layout h2 { max-width: 20ch; }
details { border-top: 1px solid var(--line); padding: 20px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
summary { list-style: none; display: flex; justify-content: space-between; gap: 24px; cursor: pointer; font-size: 16px; font-weight: 500; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 20px; color: var(--accent); flex: none; }
details[open] summary::after { content: '−'; }
details p { font-size: 15px; color: var(--muted); margin: 16px 20px 0 0; }
.contact { --bg: #263a30; --text: #f5f3ec; --muted: #cbd2c7; --line: #536257; --accent: #e3b883; background: var(--bg) !important; color: var(--text); }
.contact h2 { font-size: clamp(30px, 3.4vw, 44px); max-width: 26ch; }
.contact .head { max-width: 780px; margin-bottom: 0; }
.contact .btn.primary { color: var(--bg); background: var(--text); }
.contact .btn:not(.primary) { color: var(--text); border-color: var(--line); }
.contact-lines { margin-top: 28px; font-size: 13px; color: var(--muted); }
footer { padding: 26px 0; font-size: 12px; color: var(--muted); }
footer .wrap { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 18px; }
.footer-brand { font-size: 20px; font-weight: 600; text-decoration: none; letter-spacing: -.035em; }
/* Notas: comparten familia, colores, navegación y escala con la portada. */
.bar { border-bottom: 1px solid var(--line); }
.bar .in { max-width: var(--max); margin: 0 auto; padding: 24px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.bar a { color: var(--text); font-size: 22px; font-weight: 600; letter-spacing: -.035em; text-decoration: none; }
.bar .back { color: var(--muted); font-size: 14px; font-weight: 400; letter-spacing: 0; }
.technical-article > article { max-width: 860px; padding: 64px 40px 80px; margin: 0 auto; }
.technical-article h1 { font-size: clamp(32px, 3.8vw, 46px); line-height: 1.18; }
.technical-article h2 { font-size: 27px; margin-top: 44px; max-width: none; }
.technical-article h3 { margin-top: 30px; }
.technical-article p, .technical-article li { line-height: 1.8; }
.technical-article li + li { margin-top: 8px; }
.technical-article .lead { color: var(--muted); font-size: 18px; }
.meta { color: var(--muted); font-size: 13px; margin: 20px 0 32px; }
.technical-article a { color: var(--accent); }
.technical-article .bar a { color: var(--text); }
.technical-article .bar .back { color: var(--muted); }
.technical-article code { background: var(--bg-2); padding: 2px 5px; border-radius: 3px; }
.formula { font: 14px/1.9 ui-monospace, Menlo, Consolas, monospace; overflow-x: auto; padding: 22px; margin: 26px 0; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; }
.table-scroll { overflow-x: auto; margin: 26px 0; border: 1px solid var(--line); border-radius: 6px; }
.technical-article table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: 14px; }
.technical-article th, .technical-article td { padding: 13px 15px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.technical-article th { background: var(--bg-2); font-size: 13px; font-weight: 600; }
.technical-article td { color: var(--muted); }
.technical-article td:first-child { color: var(--text); font-weight: 500; }
.technical-article tr:last-child td { border-bottom: 0; }
.technical-article figure { background: var(--surface); padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); margin: 28px 0; }
.callout { background: var(--bg-2); border-left: 3px solid var(--accent); border-radius: 4px; padding: 20px 24px; margin: 26px 0; font-size: 15px; }
.callout b { color: var(--accent); }
.technical-article .cta { display: block; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 40px; }
.technical-article .cta .btn { background: var(--text); color: var(--bg); margin-top: 4px; }
.byline { display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); margin-top: 36px; padding-top: 24px; color: var(--muted); font-size: 14px; }
.byline img { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; }
.byline b { display: block; color: var(--text); font-weight: 600; }
@media (max-width: 1050px) {
  .wrap { padding: 0 28px; }
  .nav nav { gap: 15px; }
  .nav nav a { font-size: 12px; }
  .brand { font-size: 21px; }
  .hero .grid { gap: 32px; }
  .render-hero .technical-render, .render-station .technical-render { height: 360px; }
  .problem, .anat, .about, .faq-layout { gap: 32px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .cards, .links3 { gap: 20px; }
  .card h3 { font-size: 20px; }
}
@media (max-width: 800px) {
  .nav .wrap { height: 72px; }
  .menu-toggle { display: block; }
  .nav nav { display: none; position: absolute; top: 72px; left: 0; right: 0; padding: 24px 28px; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 20px; }
  .nav nav[data-open] { display: flex; }
  .nav nav a { font-size: 15px; }
  .hero .grid, .problem, .anat, .panel-grid, .about, .faq-layout { grid-template-columns: 1fr; }
  .hero .grid { gap: 32px; }
  .hero h1 { max-width: 18ch; }
  .hero .lead { max-width: 65ch; }
  .hero-art { max-width: 600px; }
  .render-hero .technical-render { height: 340px; }
  .territory { margin-top: 32px; }
  .flow4, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .cards, .links3 { grid-template-columns: 1fr; gap: 28px; }
  .cards .card { display: grid; grid-template-columns: .8fr 1.2fr; column-gap: 28px; }
  .cards .art { grid-column: 1; grid-row: 1 / 4; }
  .cards .card > h3, .cards .card > p, .cards .card > ul { grid-column: 2; }
  .cards .card ul { margin-top: 0; }
  .render-card .technical-render { height: 200px; object-fit: contain; }
  .lk { display: grid; grid-template-columns: 140px 1fr; column-gap: 26px; }
  .lk svg { grid-column: 1; grid-row: 1 / 4; margin-bottom: 0; height: 110px; align-self: center; }
  .lk .when, .lk h3, .lk p { grid-column: 2; }
  .panel-grid { gap: 28px; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .photo { height: 320px; max-width: 320px; }
  .bar .in { padding: 22px 28px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 22px; }
  section { padding: 56px 0; }
  .head { margin-bottom: 28px; }
  .hero { padding: 40px 0 0; }
  h1 { font-size: 38px; }
  h2 { font-size: 28px; }
  .hero h1 { max-width: 18ch; }
  .hero .lead { font-size: 15px; margin-top: 20px; }
  .hero-art { max-width: 100%; }
  .render-hero .technical-render { height: 300px; }
  .territory { gap: 8px 18px; padding: 20px 0; font-size: 11px; }
  .eyebrow { font-size: 11px; }
  .problem, .anat, .about, .faq-layout { gap: 28px; }
  .panelbox, .data-comparison, .dash { padding: 20px; }
  .timeline-track { grid-template-columns: 1fr 1.25fr 1fr; }
  .timeline-track span { font-size: 11px; padding: 8px 3px; }
  .render-station .technical-render { height: 320px; }
  .cards .card { display: flex; }
  .card .art { margin-bottom: 20px; }
  .render-card .technical-render { height: auto; max-height: 230px; }
  .cards .card ul { margin-top: 0; }
  .card h3 { font-size: 22px; }
  .projects { grid-template-columns: 1fr; gap: 20px; }
  .projects .card, .note-feature .card { padding: 22px; }
  .lk { grid-template-columns: 96px 1fr; gap: 0 20px; padding: 20px; }
  .lk svg { height: 96px; }
  .lk h3 { font-size: 21px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .dash-top { margin-bottom: 22px; }
  .dash .sv { height: 160px !important; }
  .value-list { grid-template-columns: 1fr; gap: 24px; }
  .value-list h3 { margin-top: 12px; }
  .photo { width: 100%; max-width: 100%; height: 300px; object-position: 50% 40%; }
  .contact h2 { font-size: 32px; }
  footer .wrap { align-items: flex-start; flex-direction: column; gap: 12px; }
  .bar .in { padding: 20px 22px; gap: 18px; flex-wrap: wrap; }
  .bar a { font-size: 20px; }
  .bar .back { font-size: 13px; }
  .technical-article > article { padding: 40px 22px 56px; }
  .technical-article h1 { font-size: 32px; }
  .technical-article h2 { font-size: 24px; margin-top: 36px; }
  .technical-article .lead { font-size: 17px; }
  .technical-article th, .technical-article td { min-width: 120px; padding: 11px 13px; }
  .technical-article figure { padding: 16px; }
  .formula { padding: 16px; font-size: 12px; }
  .callout { padding: 18px; }
}
@media (max-width: 380px) {
  .brand { font-size: 19px; gap: 8px; }
  .brand svg { width: 26px; }
  h1 { font-size: 35px; }
  .btn { font-size: 12px; padding: 12px 16px; }
  .flow4, .steps { grid-template-columns: 1fr; }
  .timeline-track span { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* Idioma: visible junto al menú, sin desplazar los enlaces en pantallas pequeñas. */
.nav-controls { display: flex; align-items: center; gap: 10px; order: 3; flex: none; }
.nav nav { order: 2; margin-left: auto; }
.language-switch { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 38px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); font-size: 12px; font-weight: 600; text-decoration: none; }
.language-switch:hover { color: var(--accent); border-color: var(--accent); }
.article-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.bar .language-switch { font-size: 12px; letter-spacing: 0; }
@media (max-width: 960px) {
  .nav .wrap { height: 72px; gap: 16px; }
  .nav-controls { margin-left: auto; }
  .menu-toggle { display: block; }
  .nav nav { display: none; position: absolute; top: 72px; left: 0; right: 0; margin: 0; padding: 24px 28px; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 20px; }
  .nav nav[data-open] { display: flex; }
  .nav nav a { font-size: 15px; }
}
