/*
 * revenosystems.com — neutro y de ingeniería (§8).
 * Un neutro oscuro, un neutro claro y un acento único: el #3C5069 de la ficha de identidad.
 * Sin degradados, sin sombras decorativas, sin animaciones, sin webfonts.
 */

:root {
  --ink: #111827;          /* neutro oscuro */
  --ink-muted: #4b5563;
  --paper: #ffffff;        /* neutro claro */
  --surface: #f4f6f8;
  --border: #d5dbe3;
  --field-border: #8a94a3; /* 3:1 sobre blanco, el mínimo para bordes de controles */
  --accent: #3c5069;       /* primario de la ficha; 8,2:1 sobre blanco */
  --accent-strong: #2f3f54;
  --on-accent: #ffffff;
  --error: #b42318;
  --error-bg: #fef3f2;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --radius: 6px;
  --wrap: 68rem;
  --gutter: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (min-width: 48rem) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--font);
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; margin: 0 0 1rem; }
h3 { font-size: 1.125rem; margin: 0 0 0.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 { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 30; background: var(--paper); padding: 0.5rem 0.75rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ── header ──
 * Mobile: dos filas (logo + idioma / nav), con el wordmark (mínimo 130 px de la ficha).
 * Desktop: una fila, con el lockup horizontal (mínimo 290 px). Sin JS. */
.site-header { border-bottom: 1px solid var(--border); background: var(--paper); }
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "brand lang" "nav nav";
  align-items: center;
  gap: 0.75rem 1rem;
  padding-top: 1rem;
  padding-bottom: 0.75rem;
}
.brand { grid-area: brand; display: inline-flex; padding: 6px 0; justify-self: start; }
.logo { display: block; height: auto; }
.logo-wordmark { width: 136px; }
.logo-lockup { display: none; width: 300px; }
.site-nav { grid-area: nav; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-nav a, .lang-switch a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .lang-switch a:hover { color: var(--accent); text-decoration: underline; }
.lang-switch { grid-area: lang; font-size: 0.875rem; color: var(--ink-muted); }
.lang-switch a { display: inline-block; padding: 0.25rem 0.125rem; }
.lang-switch a[aria-current] { color: var(--accent); font-weight: 700; text-decoration: underline; }

@media (min-width: 60rem) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav lang";
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }
  .logo-lockup { display: block; }
  .logo-wordmark { display: none; }
  .site-nav { justify-content: flex-end; margin-right: 1.5rem; }
}

/* ── botones ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.625rem 1.25rem;
  border: 1px solid var(--accent); border-radius: var(--radius);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { background: var(--paper); color: var(--accent); }
.btn-secondary:hover { background: var(--surface); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }

/* ── secciones ── */
.hero { padding: 3.5rem 0 3rem; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); line-height: 1.12; margin: 0 0 1rem; max-width: 20ch; }
.lead { font-size: 1.1875rem; color: var(--ink-muted); max-width: 60ch; margin: 0 0 1.75rem; }
.section { padding: 3.5rem 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-tight { padding-top: 0; }
.page-head { padding-bottom: 1.5rem; }
.page-head h1 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); margin: 0 0 0.75rem; }
.prose { max-width: 72ch; margin: 0 0 1rem; }
.fine { font-size: 0.875rem; color: var(--ink-muted); max-width: 72ch; }

/* ── products ── */
.product-card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.product-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
.product-head h3 { font-size: 1.375rem; margin: 0; }
.status {
  margin: 0; padding: 0.125rem 0.625rem;
  border: 1px solid var(--accent); border-radius: 999px;
  font-size: 0.875rem; font-weight: 600; color: var(--accent);
}
.product-description { max-width: 72ch; margin: 0; }
.shots { display: grid; gap: 1rem; margin: 1.25rem 0; }
.shots figure { margin: 0; }
.shots img { width: 100%; border: 1px solid var(--border); border-radius: 4px; background: #0d1117; }
.shots figcaption { margin-top: 0.375rem; font-size: 0.875rem; color: var(--ink-muted); }
@media (min-width: 48rem) { .shots { grid-template-columns: repeat(3, 1fr); } }
.product-card > p:last-child { margin-bottom: 0; }
.product-link { font-weight: 600; }
.more-products { margin: 1.25rem 0 0; color: var(--ink-muted); }

/* ── enterprise ── */
.paths p { max-width: 72ch; }
.path-title { color: var(--ink); }
.no-custom { margin: 1.25rem 0 0; }

/* ── about ── */
.about-grid { display: grid; gap: 2rem; margin-top: 2rem; }
@media (min-width: 48rem) { .about-grid { grid-template-columns: 1fr 1fr; } }
.entity-lines { list-style: none; margin: 0; padding: 0; }
.entity-lines li { padding: 0.375rem 0; border-bottom: 1px solid var(--border); }
.entity-lines li:first-child { font-weight: 600; }
.founder-card { display: flex; gap: 1rem; align-items: flex-start; }
.monogram {
  flex: none; display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; letter-spacing: 0.04em;
}
.founder-photo { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.founder-name { margin: 0; font-weight: 600; }
.founder-role { margin: 0 0 0.5rem; color: var(--ink-muted); }
.founder-bio { margin: 0; }

/* ── formularios ── */
.form { display: grid; gap: 1rem; max-width: 40rem; margin: 1.5rem 0; }
.field { display: grid; gap: 0.375rem; }
.field label { font-weight: 600; }
.optional { font-weight: 400; color: var(--ink-muted); }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 0.625rem 0.75rem;
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--field-border); border-radius: 4px;
}
textarea { resize: vertical; }
.field-check { grid-template-columns: auto 1fr; align-items: start; gap: 0.625rem; }
.field-check input { width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0.2rem 0 0; }
.field-check label { font-weight: 400; }
.cf-turnstile { min-height: 65px; }
.form-status { margin: 0; padding: 0.75rem 1rem; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); }
.form-status[data-state="error"] { border-color: var(--error); color: var(--error); background: var(--error-bg); }
.form-status[data-state="success"] { border-color: var(--ok); color: var(--ok); background: var(--ok-bg); }
.form button[type="submit"] { justify-self: start; }
.form-noscript { margin: 0; }
.forms-off { max-width: 72ch; }
.forms-off-list { margin: 0 0 1rem; padding-left: 1.25rem; }
.contact-direct { margin: 1.5rem 0 0; }

/* ── legales ── */
.legal h1 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); margin: 0 0 0.25rem; }
.legal-meta { margin: 0 0 2rem; font-size: 0.875rem; color: var(--ink-muted); }
.legal h2 { font-size: 1.25rem; margin: 2.25rem 0 0.75rem; }
.legal p, .legal ul, .legal .table-scroll { max-width: 72ch; }
.legal li { margin: 0.25rem 0; }
.table-scroll { overflow-x: auto; margin: 1rem 0; }
.legal table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
.legal th, .legal td { border: 1px solid var(--border); padding: 0.5rem 0.625rem; text-align: left; vertical-align: top; }
.legal th { background: var(--surface); }
.legal-note { padding: 0.75rem 1rem; border-left: 3px solid var(--accent); background: var(--surface); }

/* ── 404 ── */
.not-found-es { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* ── footer ── */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0 2.5rem; font-size: 0.9375rem; color: var(--ink-muted); }
.footer-lines p { margin: 0.25rem 0; }

/* ── banner de consentimiento: barra inferior, no bloquea el contenido ── */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 0.875rem 0; background: var(--paper); border-top: 1px solid var(--border); }
.consent-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.consent p { margin: 0; max-width: 62ch; font-size: 0.9375rem; }
.consent-actions { display: flex; gap: 0.5rem; }
