/* Foruster — landing (product site). Source Sans 3 + accessible contrast */

:root {
  --lp-bg: #f1f5f9;
  --lp-surface: #ffffff;
  --lp-ink: #0f172a;
  --lp-muted: #475569;
  --lp-border: #e2e8f0;
  --lp-accent: #0369a1;
  --lp-accent-dark: #0c4a6e;
  --lp-accent-soft: #e0f2fe;
  --lp-focus: #0369a1;
  --lp-hero-bg: linear-gradient(145deg, #0c1929 0%, #132f4a 42%, #0e4a6e 100%);
  --lp-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 12px 32px -8px rgba(15, 23, 42, 0.12);
  --lp-radius: 12px;
  --lp-radius-sm: 8px;
  --font: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Márgenes laterales mínimos: el contenido usa casi todo el ancho */
  --lp-gutter: clamp(0.75rem, 1.5vw, 1.25rem);
  --lp-shell: min(118rem, calc(100vw - 2 * var(--lp-gutter)));
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

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

body.lp {
  margin: 0;
  font-family: var(--font);
  line-height: 1.65;
  color: var(--lp-ink);
  background: var(--lp-bg);
  font-size: 1.0625rem;
}

/* Un solo idioma visible: castellano O inglés */
html.lp-lang-es [data-lp-lang="en"],
html.lp-lang-en [data-lp-lang="es"] {
  display: none !important;
}

.lp-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lp a:focus-visible,
.lp button:focus-visible {
  outline: 3px solid var(--lp-focus);
  outline-offset: 3px;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100px;
  z-index: 10000;
  padding: 0.65rem 1rem;
  background: var(--lp-surface);
  color: var(--lp-ink);
  border: 2px solid var(--lp-focus);
  border-radius: var(--lp-radius-sm);
  font-weight: 600;
  text-decoration: none;
  font-family: var(--font);
}

.skip-link:focus {
  top: 0.75rem;
}

/* ---- Header ---- */
.lp-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--lp-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.lp-header__inner {
  width: var(--lp-shell);
  max-width: 100%;
  margin: 0 auto;
  padding: 0.85rem var(--lp-gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.lp-header__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1.25rem;
}

.lp-lang-switch {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid var(--lp-border);
  background: var(--lp-surface);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.lp-lang-btn {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border: none;
  background: transparent;
  color: var(--lp-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lp-lang-btn:hover {
  color: var(--lp-accent-dark);
  background: var(--lp-accent-soft);
}

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

.lp-lang-btn[aria-pressed="true"]:hover {
  background: var(--lp-accent-dark);
  color: #fff;
}

.lp-lang-btn:focus-visible {
  outline: 3px solid var(--lp-focus);
  outline-offset: 2px;
  z-index: 1;
}

.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--lp-ink);
  text-decoration: none;
}

.lp-brand__mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--lp-radius-sm);
  background: linear-gradient(135deg, var(--lp-accent) 0%, #0891b2 100%);
  box-shadow: 0 2px 8px rgba(3, 105, 161, 0.35);
}

.lp-brand:hover {
  color: var(--lp-accent);
}

.lp-brand:hover .lp-brand__mark {
  filter: brightness(1.05);
}

.lp-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.2rem;
  align-items: center;
  font-size: 1rem;
}

.lp-nav a {
  color: var(--lp-accent-dark);
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.lp-nav a:hover {
  background: var(--lp-accent-soft);
  color: var(--lp-accent);
}

/* ---- Main: ancho útil máximo, sin bandas vacías exageradas ---- */
.lp-main {
  width: var(--lp-shell);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--lp-gutter) 3.5rem;
}

@media (min-width: 768px) {
  .lp-main {
    padding-bottom: 4rem;
  }
}

/* ---- Hero (dark band) ---- */
.lp-hero-wrap {
  margin: 0 0 2.5rem;
  width: 100%;
}

@media (min-width: 768px) {
  .lp-hero-wrap {
    margin-bottom: 3rem;
  }
}

.lp-hero {
  position: relative;
  background: var(--lp-hero-bg);
  color: #f8fafc;
  border-radius: var(--lp-radius);
  padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1.25rem, 2.5vw, 2rem) 1.75rem;
  overflow: hidden;
  box-shadow: var(--lp-shadow);
}

.lp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 80%, rgba(56, 189, 248, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 35%);
  pointer-events: none;
}

.lp-hero > * {
  position: relative;
  z-index: 1;
}

.lp-hero__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.75);
}

.lp-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lp-hero__lead {
  margin: 0 0 1rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.2rem);
  line-height: 1.65;
  color: rgba(248, 250, 252, 0.92);
  max-width: 100%;
}

.lp-hero__lead strong {
  color: #fff;
  font-weight: 700;
}

.lp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

@media (prefers-reduced-motion: reduce) {
  .lp-btn {
    transition: none;
  }
}

.lp-btn--on-dark {
  background: #fff;
  color: var(--lp-accent-dark) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.lp-btn--on-dark:hover {
  background: #f0f9ff;
  transform: translateY(-1px);
}

.lp-btn--ghost-dark {
  background: transparent;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.45);
}

.lp-btn--ghost-dark:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.lp-hero__slint {
  margin: 1.75rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.lp-hero__slint img {
  display: inline-block;
  vertical-align: middle;
  opacity: 0.95;
}

/* ---- Sections ---- */
.lp-section {
  margin-bottom: 2.75rem;
}

.lp-section--surface {
  background: var(--lp-surface);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  padding: clamp(1.75rem, 2.5vw, 2.5rem) clamp(1.25rem, 2vw, 2rem);
  box-shadow: var(--lp-shadow);
}

@media (min-width: 640px) {
  .lp-section--surface {
    padding: clamp(2rem, 2.5vw, 2.75rem) clamp(1.5rem, 2.5vw, 2.5rem);
  }
}

/* Documentación: bloque oscuro, contraste alto, sensación sólida */
.lp-section--docs {
  background: linear-gradient(165deg, #0f172a 0%, #1e293b 55%, #172554 100%);
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: var(--lp-radius);
  padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1.25rem, 2.5vw, 2rem);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.lp-section--docs .lp-section__eyebrow {
  color: #38bdf8;
}

.lp-section--docs .lp-section__title {
  color: #f8fafc;
}

.lp-section--docs .lp-section__intro {
  color: #cbd5e1;
  max-width: none;
}

.lp-section--docs .lp-section__intro a {
  color: #7dd3fc;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.lp-section--docs .lp-section__intro a:hover {
  color: #bae6fd;
}

.lp-section__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lp-accent);
}

.lp-section__title {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--lp-ink);
}

.lp-section__intro {
  margin: 0 0 0.85rem;
  color: var(--lp-muted);
  font-size: 1.0625rem;
  max-width: none;
}

.lp-section__intro:last-of-type {
  margin-bottom: 1.5rem;
}

.lp-section__lang-hint {
  margin: 1.25rem 0 0;
  font-size: 1rem;
}

.lp-section__lang-hint a {
  color: var(--lp-accent);
  font-weight: 600;
}

.lp-version {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  background: var(--lp-accent-soft);
  color: var(--lp-accent-dark);
  border-radius: 6px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---- Banners ---- */
.lp-banner {
  padding: 1rem 1.15rem;
  border-radius: var(--lp-radius-sm);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.lp-banner--loading {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #78350f;
}

.lp-banner--warn {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1e3a5f;
}

.lp-banner--warn p {
  margin: 0 0 0.75rem;
}

.lp-banner--warn p:last-child {
  margin-bottom: 0;
}

#download-fallback[hidden] {
  display: none !important;
}

/* ---- Download groups ---- */
.download-group {
  margin-bottom: 2.25rem;
  width: 100%;
}

.download-group:last-child {
  margin-bottom: 0;
}

.download-group__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.download-group__icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--lp-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lp-accent-soft);
  color: var(--lp-accent-dark);
}

.download-group--win .download-group__icon {
  background: #dbeafe;
  color: #1d4ed8;
}

.download-group--linux .download-group__icon {
  background: #fef3c7;
  color: #b45309;
}

.download-group--meta .download-group__icon {
  background: #ecfccb;
  color: #3f6212;
}

.download-group--other .download-group__icon {
  background: #f1f5f9;
  color: var(--lp-muted);
}

.download-group__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--lp-ink);
  line-height: 1.25;
}

.download-group__sub {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  color: var(--lp-muted);
  font-weight: 600;
}

.download-grid {
  display: grid;
  gap: 1.15rem;
}

/* auto-fit: las tarjetas crecen y rellenan la fila (auto-fill deja columnas vacías) */
@media (min-width: 640px) {
  .download-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }
}

@media (min-width: 1100px) {
  .download-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

.download-card {
  background: var(--lp-bg);
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius-sm);
  padding: 1.15rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.download-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.download-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--lp-ink);
}

.download-card__file {
  margin: 0;
  font-size: 0.8125rem;
  color: #0f172a;
  word-break: break-all;
  font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  line-height: 1.45;
  padding: 0.55rem 0.65rem;
  background: #f8fafc;
  border: 1px solid #94a3b8;
  border-radius: 6px;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 0.65rem 1rem;
  background: var(--lp-accent);
  color: #fff !important;
  font-weight: 700;
  font-family: var(--font);
  font-size: 1rem;
  text-decoration: none !important;
  border-radius: var(--lp-radius-sm);
  text-align: center;
  border: 2px solid transparent;
  transition: background 0.15s ease, transform 0.1s ease;
}

.button-primary:hover {
  background: var(--lp-accent-dark);
  color: #fff !important;
}

@media (prefers-reduced-motion: reduce) {
  .button-primary {
    transition: none;
  }
}

/* ---- Doc grid (dentro de .lp-section--docs) ---- */
.lp-section--docs .lp-doc-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 520px) {
  .lp-section--docs .lp-doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .lp-section--docs .lp-doc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .lp-section--docs .lp-doc-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.lp-section--docs .lp-doc-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.35rem 1.25rem;
  min-height: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #475569;
  border-radius: var(--lp-radius-sm);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.lp-section--docs .lp-doc-card:hover {
  border-color: #38bdf8;
  background: rgba(30, 41, 59, 0.95);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .lp-section--docs .lp-doc-card:hover {
    transform: none;
  }
}

.lp-section--docs .lp-doc-card:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 3px;
}

.lp-section--docs .lp-doc-card__label {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.lp-section--docs .lp-doc-card__desc {
  font-size: 0.98rem;
  color: #94a3b8;
  line-height: 1.55;
  flex: 1;
}

.lp-section--docs .lp-doc-card__more {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #38bdf8;
}

/* ---- Footer ---- */
.lp-footer {
  margin-top: 2.5rem;
  padding: 2rem 1.5rem;
  background: var(--lp-ink);
  color: #cbd5e1;
  border-radius: var(--lp-radius);
}

.lp-footer__inner {
  width: var(--lp-shell);
  max-width: 100%;
  margin: 0 auto;
}

.lp-footer p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.65;
}

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

.lp-footer a {
  color: #7dd3fc;
  font-weight: 600;
}

.lp-footer a:hover {
  color: #bae6fd;
}

.lp-footer strong {
  color: #f1f5f9;
}
