/* focampo.com — caso · plantilla común
   Identidad: Inter o pila de sistema, dorado #8B6914 / #D4A843, grises slate.
   Sin fuentes ni recursos externos. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-soft: #f9fafb;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --text: #111827;
  --text-soft: #374151;
  --muted: #4b5563;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --accent: #8b6914;
  --accent-strong: #6f5510;
  --accent-soft: #fbf3e0;
  --accent-contrast: #ffffff;
  --focus: #6f5510;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.05), 0 12px 32px rgba(17, 24, 39, 0.05);
  --real-bg: #ecfdf5;
  --real-text: #065f46;
  --real-line: #a7f3d0;
  --sim-bg: #fffbeb;
  --sim-text: #78350f;
  --sim-line: #fde68a;
  --est-bg: #eff6ff;
  --est-text: #1e3a8a;
  --est-line: #bfdbfe;
  --radius: 14px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --bg-soft: #0f172a;
    --surface: #111c2f;
    --surface-2: #16233a;
    --text: #f1f5f9;
    --text-soft: #cbd5e1;
    --muted: #a7b0be;
    --line: #243247;
    --line-strong: #334155;
    --accent: #d4a843;
    --accent-strong: #e5c06a;
    --accent-soft: #231b08;
    --accent-contrast: #0b1220;
    --focus: #e5c06a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.25);
    --real-bg: #052e22;
    --real-text: #6ee7b7;
    --real-line: #065f46;
    --sim-bg: #3b2a05;
    --sim-text: #fcd34d;
    --sim-line: #78350f;
    --est-bg: #172554;
    --est-text: #93c5fd;
    --est-line: #1e3a8a;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Inter var", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  margin-bottom: 0.6rem;
  font-size: clamp(2.35rem, 6vw, 4rem);
  font-weight: 700;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
}

h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
  font-weight: 650;
}

p,
li {
  overflow-wrap: anywhere;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

::selection {
  background: var(--accent);
  color: var(--accent-contrast);
}

img,
svg {
  max-width: 100%;
}

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
  min-width: 0;
}

.wrap-narrow {
  width: min(760px, calc(100% - 2.5rem));
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 50;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
}

.skip-link:focus {
  top: 0;
}

/* ── Header ─────────────────────────────────────────── */

.site-header {
  border-top: 4px solid var(--accent);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1200px 320px at 82% -40%, var(--accent-soft), transparent 70%),
    var(--bg);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.9rem 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.25rem;
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.15rem;
  background: var(--surface);
}

.lang-btn {
  min-width: 48px;
  min-height: 44px;
  padding: 0.35rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.lang-btn[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-contrast);
}

.lang-sep {
  color: var(--line-strong);
  font-size: 0.8rem;
}

.hero {
  padding: 2.5rem 0 3rem;
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.title-row h1 {
  margin-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tagline {
  max-width: 26ch;
  margin-bottom: 0;
  color: var(--text);
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  line-height: 1.4;
  font-weight: 500;
  text-wrap: balance;
}

/* ── Sections ───────────────────────────────────────── */

.section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--line);
}

.section:last-of-type {
  border-bottom: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
}

.section-index {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.section h2 {
  margin-bottom: 0;
}

.lede {
  max-width: 68ch;
  color: var(--text-soft);
  font-size: 1.12rem;
}

.lede strong {
  color: var(--text);
}

/* ── Steps ──────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.85rem;
  font-weight: 700;
}

.step h3 {
  margin-bottom: 0.4rem;
}

.step p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.diagram {
  margin: 1.5rem 0 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram svg.diagram-wide {
  display: block;
}

.diagram svg.diagram-narrow {
  display: none;
}

@media (max-width: 760px) {
  .diagram svg.diagram-wide {
    display: none;
  }

  .diagram svg.diagram-narrow {
    display: block;
  }
}

.diagram figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ── Evidence ───────────────────────────────────────── */

.evidence {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.evidence-item {
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 0.65rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.chip-real {
  color: var(--real-text);
  background: var(--real-bg);
  border-color: var(--real-line);
}

.chip-sim {
  color: var(--sim-text);
  background: var(--sim-bg);
  border-color: var(--sim-line);
}

.chip-est {
  color: var(--est-text);
  background: var(--est-bg);
  border-color: var(--est-line);
}

.evidence-item p {
  margin-bottom: 0.4rem;
}

.evidence-item p:last-child {
  margin-bottom: 0;
}

.source {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.source a {
  color: var(--muted);
}

.notice {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--sim-line);
  border-radius: 10px;
  background: var(--sim-bg);
  color: var(--sim-text);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ── Related chips ──────────────────────────────────── */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 600;
}

/* ── CTA ────────────────────────────────────────────── */

.cta-box {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.cta-box .lede {
  margin-bottom: 1.5rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}

.btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-contrast);
}

/* ── Footer ─────────────────────────────────────────── */

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.site-footer a {
  color: var(--text-soft);
}

.powered {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

/* ── Long-form technical detail (Remesas) ───────────── */

.detalle-header {
  border-top: 4px solid var(--accent);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.detalle-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 0;
}

.detalle-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.detalle-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
}

.detalle-layout > * {
  min-width: 0;
}

.prose {
  min-width: 0;
}

.detalle-nav {
  position: sticky;
  top: 1rem;
  align-self: start;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.detalle-nav p {
  margin-bottom: 0.6rem;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.detalle-nav ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.detalle-nav li {
  margin-bottom: 0.35rem;
}

.detalle-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--text-soft);
  text-decoration: none;
}

.detalle-nav a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.prose {
  max-width: 76ch;
}

.prose h2 {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.prose h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin-top: 1.6rem;
}

.prose p,
.prose li {
  color: var(--text-soft);
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose code {
  padding: 0.1rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 0.82rem;
  line-height: 1.5;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.prose table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.prose th,
.prose td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 700;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.callout {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--bg-soft);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 900px) {
  .detalle-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .detalle-nav {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .steps {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 2.75rem 0;
  }

  .hero {
    padding: 1.75rem 0 2.25rem;
  }
}

@media (max-width: 420px) {
  .wrap,
  .wrap-narrow {
    width: calc(100% - 2rem);
  }

  .btn,
  .cta-actions .btn {
    width: 100%;
  }

  .title-row {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media print {
  .lang-toggle,
  .skip-link,
  .diagram {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 11pt;
  }

  .section {
    break-inside: avoid;
  }
}
