/* Rowan Analytics · web comercial
 * Mismo modelo que la web de Rowan ERP (ancho y limpio: fondo blanco, bordes finos, tarjetas bento muy
 * redondeadas, titulares grandes con la segunda mitad en color) con la identidad de Analytics: tinta #0E0E13,
 * oro #E4B56B y bronce #B97D36. El oro no se lee sobre blanco (1,9:1): solo va como relleno (botón, barras) o
 * sobre tinta. Para texto pequeño, --accent-text (5,9:1); el bronce, en titulares grandes (3,5:1).
 * Tipos: Inter Tight (titulares) + Inter (texto) + JetBrains Mono (etiquetas), servidas en local.
 * Syne solo dentro del logotipo. Las demos (/distribucion, /hotel…) tienen su propio CSS y no usan este. */

@font-face { font-family: "Inter Tight"; src: url("/static/fonts/inter-tight-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Syne"; src: url("/static/fonts/syne-latin-wght-normal.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --paper: #ffffff;
  --paper-2: #ffffff;
  --surface: #ffffff;
  --rule: #e9e8e4;
  --rule-strong: #d9d7d1;
  --neutral: #a29f97;
  --muted: #6b6d7a;
  --ink: #0e0e13;
  --ink-2: #3f4150;

  --gold: #e4b56b;
  --bronze: #b97d36;
  --accent-text: #8a5a1f;
  --accent-tint: #fbf3e6;
  --jade: #2f8066;
  --jade-tint: #e8f3ee;
  --rust: #a8402f;
  --rust-tint: #fbece9;

  --f-display: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.375rem;
  --text-display: clamp(2.6rem, 4.4vw + 1rem, 5rem);
  --text-section: clamp(2rem, 2.3vw + 1rem, 3.1rem);

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgb(14 14 19 / 0.04);
  --shadow-float: 0 24px 60px -24px rgb(14 14 19 / 0.2);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --page-max: 80rem;
  --page-gutter: clamp(1.25rem, 4vw, 3rem);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px); }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
}
p { margin: 0; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; }
.tnum { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* — Estructura — */
.section { max-width: var(--page-max); margin: 0 auto; padding: var(--space-3xl) var(--page-gutter); }
.section--tight { padding-top: var(--space-2xl); }
.band { background: var(--paper-2); border-block: 1px solid var(--rule); }
.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 var(--space-md);
}
.section-head { margin-bottom: var(--space-xl); max-width: 60rem; }
.section-head p:not(.eyebrow) { max-width: 46rem; }
.section-head h2 { font-size: var(--text-section); margin-bottom: var(--space-md); }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: var(--text-md); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-lg); flex-wrap: wrap; }
.section-head--row > div { max-width: 46rem; }
.muted { color: var(--neutral); }
.accent { color: var(--bronze); }

/* — Tarjetas y piezas — */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: var(--text-sm);
  color: var(--ink-2);
  white-space: nowrap;
  text-decoration: none;
}
a.chip { transition: border-color 150ms, color 150ms; }
a.chip:hover { border-color: var(--bronze); color: var(--accent-text); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.15em 0.6em;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge--ok { background: var(--jade-tint); color: var(--jade); }
.badge--warn { background: var(--rust-tint); color: var(--rust); }
.badge--gold { background: var(--accent-tint); color: var(--accent-text); }
.mono-label {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.dot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-sm); }
.dot-list li { position: relative; padding-left: var(--space-lg); color: var(--ink-2); font-size: var(--text-sm); }
.dot-list li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 6px; height: 6px; border-radius: 2px; background: var(--gold);
}

/* Capturas reales de la app: marco fino, sin cromo de navegador falso. */
.shot {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  box-shadow: var(--shadow-card);
}
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption {
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--f-mono);
  font-size: var(--text-xs);
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--rule);
}

/* — Botones — */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms var(--ease-out), border-color 200ms var(--ease-out), color 200ms, transform 100ms var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn--lg { min-height: 54px; padding: 0.9rem 1.9rem; font-size: var(--text-base); }
.btn--dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--dark:hover { background: #2a2b33; transform: translateY(-1.5px); }
.btn--gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn--gold:hover { background: #d9a655; transform: translateY(-1.5px); }
.btn--outline { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); }
.btn--outline:hover { border-color: var(--ink); transform: translateY(-1.5px); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.28); }
.btn--ghost-light:hover { border-color: #fff; }

/* — Aparición al hacer scroll (site.js añade .sr-ready al <html> y .is-in a cada .sr visible) — */
.sr-ready .sr { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: calc(var(--sr-i, 0) * 70ms); }
.sr-ready .sr.is-in { opacity: 1; transform: none; }

/* — Animaciones: .anim se pausa fuera de pantalla; con "reducir movimiento" se congela en su 0 % legible — */
.anim.is-paused, .anim.is-paused * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .anim, .anim * { animation-play-state: paused !important; } }

/* ================= Navegación ================= */
.snav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: var(--nav-h);
  background: rgb(255 255 255 / 0.9);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 220ms var(--ease-out);
}
.snav.is-scrolled { box-shadow: 0 12px 32px -28px rgb(14 14 19 / 0.3); }
.snav__inner {
  max-width: calc(var(--page-max) + 8rem);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-lg);
}
.snav__brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.snav__brand svg { height: 26px; width: auto; }
.snav__links { display: flex; align-items: center; gap: 0.25rem; }
.snav__link {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 150ms, background-color 150ms;
}
.snav__link:hover { color: var(--ink); background: #f4f4f2; }
.snav__link[aria-current="page"] { color: var(--ink); font-weight: 600; }
.snav__right { justify-self: end; display: flex; align-items: center; gap: var(--space-sm); }
.snav__toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 11px; }
.snav__toggle span { display: block; height: 2px; margin: 4px 0; background: var(--ink); border-radius: 2px; }
.snav__sheet {
  position: fixed;
  inset: var(--nav-h) 0 auto;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: var(--space-md) var(--page-gutter) var(--space-lg);
  display: grid;
  gap: 0.25rem;
  box-shadow: var(--shadow-float);
}
.snav__sheet[hidden] { display: none; }
.snav__sheet a:not(.btn) { padding: 0.8rem 0; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--rule); }
.snav__sheet .btn { margin-top: var(--space-md); }
@media (max-width: 64rem) {
  .snav__inner { grid-template-columns: 1fr auto; }
  .snav__links, .snav__right .btn--outline { display: none; }
  .snav__toggle { display: block; }
}
@media (max-width: 30rem) { .snav__right .btn { display: none; } }

/* ================= Pie ================= */
.sfoot { background: var(--ink); color: #c9c7c0; margin-top: var(--space-3xl); }
.sfoot__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-2xl) var(--page-gutter) var(--space-xl);
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--space-xl);
}
.sfoot__brand svg { height: 28px; width: auto; color: #f2efe8; }
.sfoot__lead { margin-top: var(--space-md); font-size: var(--text-sm); max-width: 22rem; line-height: 1.6; }
.sfoot__contact { margin-top: var(--space-md); font-size: var(--text-sm); }
.sfoot a { color: #f2efe8; text-decoration: none; }
.sfoot a:hover { color: var(--gold); }
.sfoot h2 { font-family: var(--f-mono); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: var(--space-md); }
.sfoot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; font-size: var(--text-sm); }
.sfoot__cols-2 { columns: 2; column-gap: var(--space-lg); }
.sfoot__cols-2 li { break-inside: avoid; margin-bottom: 0.45rem; }
.sfoot__bar {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-lg) var(--page-gutter);
  border-top: 1px solid #262a37;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
  font-size: var(--text-xs);
  color: #8b8da3;
}
.sfoot__bar nav { display: flex; flex-wrap: wrap; gap: var(--space-lg); }
.sfoot__bar a { color: #8b8da3; }
@media (max-width: 56rem) { .sfoot__inner { grid-template-columns: 1fr 1fr; } .sfoot__inner > :first-child { grid-column: 1 / -1; } }
@media (max-width: 30rem) { .sfoot__inner { grid-template-columns: 1fr; } }

/* ================= Llamada final (tinta + oro) ================= */
.cta-dark {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--ink);
  color: #f2efe8;
  padding: clamp(2.5rem, 5vw, 4.5rem);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}
.cta-dark::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 34rem;
  height: 34rem;
  background: radial-gradient(circle, rgb(228 181 107 / 0.22), transparent 65%);
  pointer-events: none;
}
.cta-dark h2 { color: #fff; font-size: var(--text-section); }
.cta-dark h2 .accent { color: var(--gold); }
.cta-dark p { color: #c9c7c0; margin-top: var(--space-md); font-size: var(--text-md); }
.cta-dark__actions { position: relative; display: flex; flex-wrap: wrap; gap: var(--space-md); justify-content: flex-end; }
@media (max-width: 52rem) { .cta-dark { grid-template-columns: 1fr; } .cta-dark__actions { justify-content: flex-start; } }

/* ================= FAQ ================= */
.faq { display: grid; gap: var(--space-sm); max-width: 56rem; }
.faq details { border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-lg);
  display: flex;
  justify-content: space-between;
  gap: var(--space-lg);
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: var(--text-md); font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.faq summary::after {
  content: "+";
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--ink-2);
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 var(--space-lg) var(--space-lg); color: var(--ink-2); }
.faq details > div a { color: var(--accent-text); }

/* Texto al lado del titular en las cabeceras en fila. */
.section-head__aside { max-width: 26rem; color: var(--muted); font-size: var(--text-md); }

/* FAQ en dos columnas: cabecera fija a la izquierda. */
.faq-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: var(--space-2xl); align-items: start; }
.faq-layout .section-head { position: sticky; top: calc(var(--nav-h) + var(--space-xl)); }
.faq-layout .section-head a { color: var(--accent-text); }
@media (max-width: 56rem) { .faq-layout { grid-template-columns: 1fr; gap: 0; } .faq-layout .section-head { position: static; } }

/* Pestañas en píldora (selector de sector en portada y precios). */
.stage__tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.45rem 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  font: 500 var(--text-sm) / 1.2 var(--f-body);
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 150ms, border-color 150ms, color 150ms;
}
.stage__tab::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot); opacity: 0.45; transition: opacity 150ms; }
.stage__tab:hover { background: #f4f4f2; color: var(--ink); }
.stage__tab[aria-selected="true"] { background: var(--surface); border-color: var(--rule-strong); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-card); }
.stage__tab[aria-selected="true"]::before { opacity: 1; }
.stage__guide { font-size: var(--text-sm); font-weight: 500; color: var(--accent-text); text-underline-offset: 3px; }
@keyframes panel-in { from { opacity: 0.35; } to { opacity: 1; } }
