/* ─────────────────────────────────────────────────────────────────
   MONIC COMMUNITY — Landing open source
   Paleta azul · Sobria · Enfocada en developers e instituciones
   ───────────────────────────────────────────────────────────────── */

:root {
  /* Paleta azul institucional — desaturada, sobria */
  --c-bg-deep: #FFFFFF;
  --c-bg: #FFFFFF;
  --c-bg-2: #ECF0F6;
  --c-bg-code: #0E1726;
  --c-text: #3D4A5E;
  --c-text-strong: #0E1726;
  /* Mute tuned for ≥4.5:1 on light surfaces (was #7B879B ≈ 3.5:1) */
  --c-text-mute: #5A6578;
  --c-cta: #1E3A8A;
  --c-cta-hover: #1E40AF;
  --c-utility: #2563EB;
  --c-utility-soft: #DBE5FB;
  --c-rule: rgba(14, 23, 38, 0.10);
  --c-rule-strong: rgba(14, 23, 38, 0.20);
  --c-grid: rgba(14, 23, 38, 0.025);
  --c-focus: #2563EB;
  --focus-ring: 0 0 0 2px var(--c-bg), 0 0 0 4px var(--c-focus);

  /* Tipografía */
  --f-display: "Newsreader", "Source Serif Pro", Georgia, serif;
  --f-sans: "Inter Tight", "Söhne", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --f-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: 28px;
  --max-w: 1280px;
  --rule: 1px solid var(--c-rule);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  /* clip avoids sticky/fixed bugs that overflow-x:hidden on body causes */
  overflow-x: clip;
}

html, body {
  background: var(--c-bg-deep);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: clip;
}

::selection {
  background: var(--c-utility-soft);
  color: var(--c-text-strong);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* Focus — visible keyboard only; mouse stays clean */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
}
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.gh-link:focus-visible,
.nav-toggle:focus-visible,
.qs-copy:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.btn-primary:focus-visible {
  box-shadow: 0 0 0 2px var(--c-cta), 0 0 0 4px #93C5FD;
}
.cta-closer .btn-primary:focus-visible {
  box-shadow: 0 0 0 2px #0E1726, 0 0 0 4px #93C5FD;
}
.cta-closer .btn-ghost:focus-visible,
.cta-closer a:focus-visible {
  box-shadow: 0 0 0 2px var(--c-bg-code), 0 0 0 4px #4F8EFB;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 16px;
  background: var(--c-cta);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus {
  top: 12px;
  outline: 2px solid #93C5FD;
  outline-offset: 2px;
}

/* Interactive kinetic grid (canvas) — light surface matching product page */
.kinetic-grid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ───── Topbar ─────
   position:fixed so it ALWAYS follows. The .topbar-surface is what
   visually docks full-bleed, then detaches into a compact floating pill. */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0;
  pointer-events: none;
  transition: padding 0.5s var(--ease-out);
}
.topbar-surface {
  pointer-events: auto;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  background: rgba(244, 246, 250, 0.92);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid transparent;
  border-bottom-color: var(--c-rule);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  transition:
    width 0.5s var(--ease-out),
    max-width 0.5s var(--ease-out),
    border-radius 0.5s var(--ease-out),
    border-color 0.45s var(--ease-out),
    background 0.45s var(--ease-out),
    box-shadow 0.5s var(--ease-out);
}
.topbar.is-scrolled {
  padding: 12px var(--gutter) 0;
}
.topbar.is-scrolled .topbar-surface {
  width: 100%;
  max-width: var(--max-w);
  border-radius: 16px;
  border-color: rgba(14, 23, 38, 0.08);
  border-bottom-color: rgba(14, 23, 38, 0.08);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 14px 36px -14px rgba(14, 23, 38, 0.24),
    0 4px 14px -6px rgba(14, 23, 38, 0.12);
}
.topbar-spacer {
  height: var(--topbar-offset, 64px);
  flex-shrink: 0;
  pointer-events: none;
}
.topbar-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 14px 0;
  transition:
    padding 0.45s var(--ease-out),
    gap 0.45s var(--ease-out);
}
.topbar.is-scrolled .topbar-inner {
  padding: 8px 0;
  gap: 20px;
}
.topbar.is-scrolled .topbar-surface > .shell,
.topbar.is-scrolled .mobile-nav .shell {
  padding-left: max(16px, calc(var(--gutter) - 4px));
  padding-right: max(16px, calc(var(--gutter) - 4px));
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--c-text-strong);
  transition: font-size 0.45s var(--ease-out), gap 0.45s var(--ease-out);
}
.topbar.is-scrolled .brand {
  font-size: 18px;
  gap: 8px;
}
.brand:focus-visible {
  outline-offset: 4px;
}
.brand-mark {
  width: 22px; height: 22px;
  border: 1.5px solid var(--c-text-strong);
  position: relative;
  background: var(--c-utility);
  flex-shrink: 0;
  transition: width 0.45s var(--ease-out), height 0.45s var(--ease-out);
}
.topbar.is-scrolled .brand-mark {
  width: 18px;
  height: 18px;
}
.brand-mark::before {
  content: "";
  position: absolute; inset: 3px;
  background: var(--c-bg);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%);
}
.brand-edition {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-utility);
  border: 1px solid var(--c-utility);
  padding: 3px 7px;
  margin-left: 8px;
  white-space: nowrap;
  transition:
    opacity 0.35s var(--ease-out),
    transform 0.45s var(--ease-out),
    max-width 0.45s var(--ease-out),
    margin 0.45s var(--ease-out),
    padding 0.45s var(--ease-out);
}
.topbar.is-scrolled .brand-edition {
  opacity: 0;
  max-width: 0;
  margin-left: 0;
  padding-left: 0;
  padding-right: 0;
  border-width: 0;
  transform: translateX(-4px);
  overflow: hidden;
  pointer-events: none;
}
.nav {
  display: flex;
  gap: 28px;
  justify-self: center;
  transition: gap 0.45s var(--ease-out);
}
.topbar.is-scrolled .nav {
  gap: 20px;
}
.nav a {
  font-size: 13px;
  color: var(--c-text);
  opacity: 0.85;
  transition: opacity .2s, color .2s, font-size 0.45s var(--ease-out);
  position: relative;
}
.topbar.is-scrolled .nav a {
  font-size: 12px;
}
.nav a:hover { opacity: 1; color: var(--c-utility); }
.nav a[aria-current="true"] {
  opacity: 1;
  color: var(--c-utility);
}
.nav a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--c-utility);
}
.topbar-meta {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--c-text-mute);
}
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--c-rule-strong);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-strong);
  transition: border-color .2s, color .2s, background .2s;
}
.nav-toggle:hover {
  border-color: var(--c-utility);
  color: var(--c-utility);
}
.nav-toggle[aria-expanded="true"] {
  border-color: var(--c-utility);
  color: var(--c-utility);
  background: var(--c-utility-soft);
}
.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 14px;
}
.nav-toggle-bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform .2s var(--ease-out), opacity .2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(4.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-4.5px) rotate(-45deg);
}
.mobile-nav {
  display: none;
  border-top: var(--rule);
  background: var(--c-bg);
}
.topbar.is-scrolled .mobile-nav {
  background: transparent;
}
.mobile-nav.is-open {
  display: block;
}
.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  padding: 8px 0 16px;
}
.mobile-nav a {
  display: block;
  padding: 14px 0;
  font-size: 15px;
  color: var(--c-text-strong);
  border-bottom: 1px solid var(--c-rule);
  transition: color .2s, transform .2s var(--ease-out);
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a:hover,
.mobile-nav a:focus-visible {
  color: var(--c-utility);
  transform: translateX(6px);
}
.gh-link {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--c-rule-strong);
  padding: 8px 12px;
  min-height: 40px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--c-text-strong);
  transition:
    border-color .2s,
    color .2s,
    background .2s,
    padding 0.45s var(--ease-out),
    min-height 0.45s var(--ease-out),
    font-size 0.45s var(--ease-out);
}
.topbar.is-scrolled .gh-link {
  padding: 6px 10px;
  min-height: 34px;
  font-size: 11px;
}
.gh-link:hover {
  border-color: var(--c-utility);
  color: var(--c-utility);
  background: rgba(37, 99, 235, 0.04);
}
.gh-link svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ───── Doc band ───── */
.doc-band {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 32px;
  border-bottom: var(--rule);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-mute);
}
.doc-band > div { padding: 12px 0; }
.doc-band b { color: var(--c-text-strong); font-weight: 500; margin-left: 6px; }

/* ───── HERO ───── */
.hero {
  position: relative;
  padding: 80px 0 80px;
  border-bottom: var(--rule);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: start;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-utility);
  margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--c-utility);
}
.hero h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--c-text-strong);
  text-wrap: balance;
  max-width: 18ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--c-utility);
  font-weight: 400;
}
.hero-sub {
  margin-top: 28px;
  max-width: 54ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--c-text);
}
.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--c-cta);
  color: #fff;
  padding: 16px 24px;
  min-height: 48px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid var(--c-cta);
  transition: background .2s, border-color .2s, transform .15s var(--ease-out);
}
.btn-primary:hover { background: var(--c-cta-hover); border-color: var(--c-cta-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--c-rule-strong);
  color: var(--c-text-strong);
  padding: 16px 22px;
  min-height: 48px;
  font-size: 14px;
  background: transparent;
  transition: border-color .2s, color .2s, background .2s, transform .15s var(--ease-out);
}
.btn-ghost:hover {
  border-color: var(--c-utility);
  color: var(--c-utility);
  background: rgba(37, 99, 235, 0.04);
}
.btn-ghost:active { transform: translateY(1px); }
.btn-ghost svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ───── Terminal card (hero side) ───── */
.term-card {
  border: var(--rule);
  background: var(--c-bg-code);
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: #C2CDE0;
  box-shadow: 0 24px 48px -20px rgba(14, 23, 38, 0.38);
  overflow: hidden;
}
.term-hd {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8B97AD;
}
.term-hd .dots { display: inline-flex; gap: 6px; margin-right: 6px; }
.term-hd .dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
}
.term-hd .term-title { flex: 1; color: #93A0B8; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-hd .term-tag { color: #4F8EFB; flex-shrink: 0; }
.term-body {
  padding: 18px 16px;
  line-height: 1.7;
  min-height: 280px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.term-line { display: block; white-space: pre; }
.term-prompt { color: #4F8EFB; }
.term-cmd { color: #E6ECF7; }
.term-out { color: #8B97AD; }
.term-ok { color: #5CD8A1; }
.term-warn { color: #F5C26B; }
.term-arrow { color: #4F8EFB; }
.term-cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: #4F8EFB;
  vertical-align: -2px;
  animation: termBlink 1s steps(2, end) infinite;
}
@keyframes termBlink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
.term-foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 10px;
  color: #6B7A94;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.term-foot b { color: #93A0B8; font-weight: 500; }

/* ───── Section primitive ───── */
.section {
  padding: 88px 0;
  border-bottom: var(--rule);
  position: relative;
}
.section-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  margin-bottom: 56px;
  align-items: start;
}
.section-num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-mute);
}
.section-num .section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -2px;
  margin-right: 2px;
  color: var(--c-utility);
}
.section-num .section-icon svg {
  width: 13px;
  height: 13px;
  display: block;
}
.section-num b { color: var(--c-utility); font-weight: 500; }
.section-num .nm-title {
  display: block;
  margin-top: 8px;
  color: var(--c-text);
  letter-spacing: 0.06em;
}
.section-title {
  font-family: var(--f-display);
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--c-text-strong);
  font-weight: 400;
  text-wrap: balance;
  max-width: 22ch;
}
.section-title em {
  font-style: normal;
  color: var(--c-utility);
}

/* ───── Quickstart (code blocks) ───── */
.quickstart {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: var(--rule);
  background: var(--c-bg);
}
.qs-step {
  padding: 28px 26px 24px;
  border-left: var(--rule);
  display: flex; flex-direction: column; gap: 14px;
  min-width: 0;
}
.qs-step:first-child { border-left: 0; }
.qs-step-num {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-utility);
}
.qs-step h3 {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--c-text-strong);
  line-height: 1.2;
}
.qs-step p {
  font-size: 13.5px;
  color: var(--c-text);
  line-height: 1.55;
}
.qs-step .inline-code {
  font-family: var(--f-mono);
  font-size: 12px;
  background: var(--c-bg-2);
  padding: 1px 5px;
  color: var(--c-utility);
}
.qs-code {
  background: var(--c-bg-code);
  color: #C2CDE0;
  font-family: var(--f-mono);
  font-size: 12px;
  padding: 14px 16px;
  padding-right: 64px;
  margin-top: auto;
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  line-height: 1.6;
  white-space: pre;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.qs-code .c-comment { color: #6B7A94; }
.qs-code .c-cmd { color: #E6ECF7; }
.qs-code .c-prompt { color: #4F8EFB; }
.qs-code .c-string { color: #5CD8A1; }
.qs-copy {
  position: absolute;
  top: 8px; right: 8px;
  min-height: 28px;
  min-width: 52px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8B97AD;
  border: 1px solid rgba(255,255,255,0.14);
  padding: 5px 8px;
  cursor: pointer;
  background: rgba(14, 23, 38, 0.72);
  transition: color .2s, border-color .2s, background .2s;
  z-index: 1;
}
.qs-copy:hover { color: #4F8EFB; border-color: #4F8EFB; }
.qs-copy.copied { color: #5CD8A1; border-color: #5CD8A1; }
.qs-copy.is-error { color: #F5C26B; border-color: #F5C26B; }

/* ───── Stack badges ───── */
.stack {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: var(--rule);
  background: var(--c-bg);
}
.stack-cell {
  padding: 22px 20px;
  border-left: var(--rule);
  display: flex; flex-direction: column; gap: 6px;
  min-height: 110px;
  min-width: 0;
  transition: background .2s;
}
.stack-cell:first-child { border-left: 0; }
.stack-cell:hover { background: rgba(37, 99, 235, 0.03); }
.stack-cell .lbl {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-mute);
}
.stack-cell .nm {
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--c-text-strong);
  line-height: 1.2;
}
.stack-cell .ver {
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--c-utility);
  margin-top: auto;
}

/* ───── Modules ───── */
.modules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: var(--rule);
  background: var(--c-bg);
}
.module {
  padding: 32px 30px;
  border-left: var(--rule);
  display: flex; flex-direction: column; gap: 12px;
  border-top: var(--rule);
  min-width: 0;
  transition: background .2s;
}
.module:nth-child(1), .module:nth-child(2) { border-top: 0; }
.module:nth-child(odd) { border-left: 0; }
.module:hover { background: rgba(37, 99, 235, 0.025); }
.mod-hd {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.mod-icon {
  width: 38px; height: 38px;
  border: 1.5px solid var(--c-utility);
  background: var(--c-utility-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-utility);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.mod-name {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--c-text-strong);
  min-width: 0;
}
.mod-tag {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  border: 1px solid var(--c-rule-strong);
  padding: 3px 7px;
  flex-shrink: 0;
}
.mod-tag { color: var(--c-utility); border-color: var(--c-utility); }
.module p {
  font-size: 13.5px;
  color: var(--c-text);
  line-height: 1.55;
}
.mod-meta {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--c-rule);
  font-family: var(--f-mono);
  font-size: 10.5px;
}
.mod-meta > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mod-meta span { color: var(--c-text-mute); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; }
.mod-meta b { color: var(--c-text-strong); font-weight: 500; }

/* ───── License banner ───── */
.license {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  border: var(--rule);
  background: var(--c-bg);
  align-items: stretch;
}
.lic-text { padding: 40px 36px; border-right: var(--rule); min-width: 0; }
.lic-text .ey {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-utility);
  margin-bottom: 18px;
}
.lic-text h3 {
  font-family: var(--f-display);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--c-text-strong);
  margin-bottom: 14px;
  text-wrap: balance;
  line-height: 1.12;
}
.lic-text p {
  font-size: 14.5px;
  color: var(--c-text);
  max-width: 54ch;
  line-height: 1.6;
}
.lic-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  margin-top: 22px;
  font-family: var(--f-mono);
  font-size: 12px;
}
.lic-list li {
  display: flex; gap: 8px; align-items: baseline;
  color: var(--c-text);
}
.lic-list li .chk { color: var(--c-utility); font-weight: 600; flex-shrink: 0; }
.lic-card {
  padding: 36px 30px;
  background: var(--c-bg-2);
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--c-text);
  display: flex; flex-direction: column; gap: 14px;
  min-width: 0;
}
.lic-card-hd {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--c-rule);
}
.lic-manifest {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}
.lic-card-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  font-size: 11.5px;
  align-items: baseline;
}
.lic-card-row dt {
  color: var(--c-text-mute);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lic-card-row dd {
  color: var(--c-text-strong);
  font-weight: 500;
  margin: 0;
}
.lic-card-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--c-rule);
  font-size: 10.5px;
  color: var(--c-text-mute);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ───── Roadmap ───── */
.roadmap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: var(--rule);
  background: var(--c-bg);
  position: relative;
}
.rd-col {
  padding: 28px 24px;
  border-left: var(--rule);
  display: flex; flex-direction: column; gap: 14px;
  min-height: 280px;
  min-width: 0;
}
.rd-col:first-child { border-left: 0; }
.rd-col[data-status="active"] {
  background: rgba(37, 99, 235, 0.03);
}
.rd-hd {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--c-rule);
}
.rd-status {
  width: 10px; height: 10px;
  border: 1.5px solid var(--c-rule-strong);
  flex-shrink: 0;
}
.rd-col[data-status="done"] .rd-status { background: var(--c-utility); border-color: var(--c-utility); }
.rd-col[data-status="active"] .rd-status {
  background: var(--c-utility);
  border-color: var(--c-utility);
  box-shadow: 0 0 0 3px var(--c-utility-soft);
  animation: rdPulse 2s ease-in-out infinite;
}
@keyframes rdPulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--c-utility-soft); }
  50% { box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.08); }
}
.rd-period {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  line-height: 1.3;
}
.rd-col[data-status="active"] .rd-period { color: var(--c-utility); }
.rd-ver {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--c-text-strong);
  letter-spacing: -0.02em;
}
.rd-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.rd-list li {
  font-size: 13px;
  color: var(--c-text);
  display: flex; gap: 8px; align-items: baseline;
  line-height: 1.4;
}
.rd-list li::before {
  content: "·";
  color: var(--c-utility);
  font-weight: 700;
  flex-shrink: 0;
}
.rd-col[data-status="future"] .rd-list li { color: var(--c-text-mute); }

/* ───── FAQ ───── */
.faq { border-top: var(--rule); background: var(--c-bg); }
.faq details {
  border-bottom: var(--rule);
  padding: 22px 28px;
}
.faq details:hover {
  background: rgba(37, 99, 235, 0.02);
}
.faq summary {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 20px;
  align-items: baseline;
  cursor: pointer;
  list-style: none;
  font-family: var(--f-display);
  font-size: 20px;
  color: var(--c-text-strong);
  letter-spacing: -0.01em;
  font-weight: 400;
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 4px;
}
.faq summary .num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--c-text-mute);
}
.faq summary .q-text {
  min-width: 0;
}
.faq summary .toggle {
  font-family: var(--f-mono);
  font-size: 16px;
  color: var(--c-utility);
  transition: transform .3s var(--ease-out);
  flex-shrink: 0;
  line-height: 1;
  width: 1.25em;
  text-align: center;
}
.faq details[open] summary .toggle { transform: rotate(45deg); }
.faq-body {
  margin: 16px 0 6px 68px;
  max-width: 68ch;
  font-size: 14px;
  color: var(--c-text);
  line-height: 1.65;
}
.faq-body code {
  font-family: var(--f-mono);
  font-size: 12.5px;
  background: var(--c-bg-2);
  color: var(--c-utility);
  padding: 2px 6px;
  word-break: break-word;
}

/* ───── CTA closer ───── */
.cta-closer {
  background: var(--c-bg-code);
  color: #C2CDE0;
  padding: 80px 0;
  border-bottom: var(--rule);
}
.cta-closer .section-title { color: #fff; max-width: 18ch; }
.cta-closer .section-title em { color: #4F8EFB; }
.cta-closer .section-num { color: #6B7A94; }
.cta-closer .section-num b { color: #4F8EFB; }
.cta-closer .section-num .section-icon { color: #4F8EFB; }
.cta-closer .section-num .nm-title { color: #93A0B8; }
.cta-closer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: end;
}
.cta-closer p {
  font-size: 16px;
  line-height: 1.6;
  color: #93A0B8;
  max-width: 54ch;
  margin-bottom: 28px;
}
.cta-closer .btn-primary {
  background: #4F8EFB;
  border-color: #4F8EFB;
  color: #0E1726;
}
.cta-closer .btn-primary:hover { background: #6FA2FC; border-color: #6FA2FC; }
.cta-closer .btn-ghost {
  border-color: rgba(255,255,255,0.22);
  color: #C2CDE0;
}
.cta-closer .btn-ghost:hover {
  border-color: #4F8EFB;
  color: #4F8EFB;
  background: rgba(79, 142, 251, 0.08);
}

.cta-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.10);
  padding: 1px;
  border: 1px solid rgba(255,255,255,0.10);
}
.cta-stat {
  background: var(--c-bg-code);
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0;
}
.cta-stat .v {
  font-family: var(--f-display);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}
.cta-stat .l {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6B7A94;
}

/* ───── Footer ───── */
.footer {
  padding: 64px 0 28px;
  position: relative;
  z-index: 1;
  background: var(--c-bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: var(--rule);
}
.footer-brand .brand { margin-bottom: 18px; }
.footer-brand p {
  font-size: 13px;
  color: var(--c-text-mute);
  max-width: 32ch;
  line-height: 1.55;
}
.footer-brand .enterprise-link {
  color: var(--c-utility);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.footer-brand .enterprise-link:hover {
  color: var(--c-cta);
}
.footer-col h5 {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  font-weight: 500;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 13.5px;
  color: var(--c-text);
  transition: color .2s;
  display: inline-block;
  padding: 2px 0;
}
.footer-col a:hover { color: var(--c-utility); }
.footer-bot {
  display: flex; justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--c-text-mute);
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-checksum { letter-spacing: 0.1em; }

/* ───── Hero entry animation ───── */
.hero-anim .hero-eyebrow,
.hero-anim h1,
.hero-anim .hero-sub,
.hero-anim .hero-cta,
.hero-anim .term-card {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
.hero-anim.in .hero-eyebrow,
.hero-anim.in h1,
.hero-anim.in .hero-sub,
.hero-anim.in .hero-cta,
.hero-anim.in .term-card { opacity: 1; transform: none; }
.hero-anim.in h1 { transition-delay: .12s; }
.hero-anim.in .hero-sub { transition-delay: .26s; }
.hero-anim.in .hero-cta { transition-delay: .36s; }
.hero-anim.in .term-card { transition-delay: .2s; }

/* ───── Scroll reveals (enabled only with .js-reveal so no-JS stays visible) ─────
   Each section uses a different material language matched to its layout:
   steps · grid cascade · cards · split · metrics draw · timeline · list · CTA · footer
*/
.js-reveal .reveal-sec .section-head {
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.js-reveal .reveal-sec:not(.is-in) .section-head {
  opacity: 0;
  transform: translateY(14px);
}
.js-reveal .reveal-sec.is-in .section-head {
  opacity: 1;
  transform: none;
}

/* § Quickstart — sequential process steps (L → R) */
.js-reveal #quickstart .qs-step {
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.js-reveal #quickstart:not(.is-in) .qs-step {
  opacity: 0;
  transform: translateY(22px);
}
.js-reveal #quickstart.is-in .qs-step { opacity: 1; transform: none; }
.js-reveal #quickstart.is-in .qs-step:nth-child(1) { transition-delay: 0.1s; }
.js-reveal #quickstart.is-in .qs-step:nth-child(2) { transition-delay: 0.22s; }
.js-reveal #quickstart.is-in .qs-step:nth-child(3) { transition-delay: 0.34s; }

/* § Stack — dense badge grid, soft cascade */
.js-reveal #stack .stack-cell {
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.js-reveal #stack:not(.is-in) .stack-cell {
  opacity: 0;
  transform: scale(0.96);
}
.js-reveal #stack.is-in .stack-cell { opacity: 1; transform: none; }
.js-reveal #stack.is-in .stack-cell:nth-child(1) { transition-delay: 0.08s; }
.js-reveal #stack.is-in .stack-cell:nth-child(2) { transition-delay: 0.14s; }
.js-reveal #stack.is-in .stack-cell:nth-child(3) { transition-delay: 0.2s; }
.js-reveal #stack.is-in .stack-cell:nth-child(4) { transition-delay: 0.26s; }
.js-reveal #stack.is-in .stack-cell:nth-child(5) { transition-delay: 0.32s; }
.js-reveal #stack.is-in .stack-cell:nth-child(6) { transition-delay: 0.38s; }

/* § Módulos — 2×2 cards, reading-order rise */
.js-reveal #modulos .module {
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.js-reveal #modulos:not(.is-in) .module {
  opacity: 0;
  transform: translateY(20px);
}
.js-reveal #modulos.is-in .module { opacity: 1; transform: none; }
.js-reveal #modulos.is-in .module:nth-child(1) { transition-delay: 0.1s; }
.js-reveal #modulos.is-in .module:nth-child(2) { transition-delay: 0.2s; }
.js-reveal #modulos.is-in .module:nth-child(3) { transition-delay: 0.3s; }
.js-reveal #modulos.is-in .module:nth-child(4) { transition-delay: 0.4s; }

/* § Licencia — split: text from left, manifesto from right */
.js-reveal #licencia .lic-text,
.js-reveal #licencia .lic-card {
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}
.js-reveal #licencia:not(.is-in) .lic-text {
  opacity: 0;
  transform: translateX(-22px);
}
.js-reveal #licencia:not(.is-in) .lic-card {
  opacity: 0;
  transform: translateX(22px);
}
.js-reveal #licencia.is-in .lic-text {
  opacity: 1;
  transform: none;
  transition-delay: 0.1s;
}
.js-reveal #licencia.is-in .lic-card {
  opacity: 1;
  transform: none;
  transition-delay: 0.22s;
}

/* § Roadmap — timeline unfolds L → R */
.js-reveal #roadmap .rd-col {
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.js-reveal #roadmap:not(.is-in) .rd-col {
  opacity: 0;
  transform: translateX(-16px);
}
.js-reveal #roadmap.is-in .rd-col { opacity: 1; transform: none; }
.js-reveal #roadmap.is-in .rd-col:nth-child(1) { transition-delay: 0.08s; }
.js-reveal #roadmap.is-in .rd-col:nth-child(2) { transition-delay: 0.18s; }
.js-reveal #roadmap.is-in .rd-col:nth-child(3) { transition-delay: 0.28s; }
.js-reveal #roadmap.is-in .rd-col:nth-child(4) { transition-delay: 0.38s; }

/* § FAQ — vertical list cascade */
.js-reveal #docs .faq details {
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.js-reveal #docs:not(.is-in) .faq details {
  opacity: 0;
  transform: translateY(14px);
}
.js-reveal #docs.is-in .faq details { opacity: 1; transform: none; }
.js-reveal #docs.is-in .faq details:nth-child(1) { transition-delay: 0.06s; }
.js-reveal #docs.is-in .faq details:nth-child(2) { transition-delay: 0.12s; }
.js-reveal #docs.is-in .faq details:nth-child(3) { transition-delay: 0.18s; }
.js-reveal #docs.is-in .faq details:nth-child(4) { transition-delay: 0.24s; }
.js-reveal #docs.is-in .faq details:nth-child(5) { transition-delay: 0.3s; }
.js-reveal #docs.is-in .faq details:nth-child(6) { transition-delay: 0.36s; }

/* § CTA closer — copy rises, stats soft-pop */
.js-reveal #descarga .cta-closer-inner > div:first-child {
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.js-reveal #descarga:not(.is-in) .cta-closer-inner > div:first-child {
  opacity: 0;
  transform: translateY(18px);
}
.js-reveal #descarga.is-in .cta-closer-inner > div:first-child {
  opacity: 1;
  transform: none;
  transition-delay: 0.1s;
}
.js-reveal #descarga .cta-stat {
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.js-reveal #descarga:not(.is-in) .cta-stat {
  opacity: 0;
  transform: scale(0.96);
}
.js-reveal #descarga.is-in .cta-stat { opacity: 1; transform: none; }
.js-reveal #descarga.is-in .cta-stat:nth-child(1) { transition-delay: 0.2s; }
.js-reveal #descarga.is-in .cta-stat:nth-child(2) { transition-delay: 0.28s; }
.js-reveal #descarga.is-in .cta-stat:nth-child(3) { transition-delay: 0.36s; }
.js-reveal #descarga.is-in .cta-stat:nth-child(4) { transition-delay: 0.44s; }

/* Footer — quiet fade */
.js-reveal .footer .footer-grid,
.js-reveal .footer .footer-bot {
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.js-reveal .footer:not(.is-in) .footer-grid,
.js-reveal .footer:not(.is-in) .footer-bot {
  opacity: 0;
  transform: translateY(12px);
}
.js-reveal .footer.is-in .footer-grid {
  opacity: 1;
  transform: none;
  transition-delay: 0.05s;
}
.js-reveal .footer.is-in .footer-bot {
  opacity: 1;
  transform: none;
  transition-delay: 0.18s;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-anim *,
  .hero-anim {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .topbar,
  .topbar-surface,
  .topbar-inner,
  .topbar .brand,
  .topbar .brand-mark,
  .topbar .brand-edition,
  .topbar .nav,
  .topbar .nav a,
  .topbar .gh-link {
    transition: none !important;
  }
  .term-cursor,
  .rd-col[data-status="active"] .rd-status {
    animation: none !important;
  }
  .btn-primary,
  .btn-ghost,
  .nav a,
  .mobile-nav a {
    transition: none !important;
  }
  .js-reveal .reveal-sec .section-head,
  .js-reveal .reveal-sec .qs-step,
  .js-reveal .reveal-sec .stack-cell,
  .js-reveal .reveal-sec .module,
  .js-reveal .reveal-sec .lic-text,
  .js-reveal .reveal-sec .lic-card,
  .js-reveal .reveal-sec .rd-col,
  .js-reveal .reveal-sec .faq details,
  .js-reveal .reveal-sec .cta-closer-inner > div:first-child,
  .js-reveal .reveal-sec .cta-stat,
  .js-reveal .footer .footer-grid,
  .js-reveal .footer .footer-bot {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    transition-delay: 0s !important;
  }
}

/* ───── Responsivo ───── */
@media (max-width: 1180px) {
  .stack {
    grid-template-columns: repeat(3, 1fr);
  }
  .stack-cell {
    border-left: var(--rule);
    border-top: var(--rule);
  }
  .stack-cell:nth-child(-n+3) { border-top: 0; }
  .stack-cell:nth-child(3n+1) { border-left: 0; }
  .stack-cell:first-child { border-left: 0; }
  .roadmap {
    grid-template-columns: repeat(2, 1fr);
  }
  .rd-col {
    border-left: var(--rule);
    border-top: var(--rule);
  }
  .rd-col:nth-child(-n+2) { border-top: 0; }
  .rd-col:nth-child(odd) { border-left: 0; }
  .rd-col:first-child { border-left: 0; }
}

@media (max-width: 1024px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .topbar-inner {
    grid-template-columns: 1fr auto;
    gap: 16px;
  }
  .hero-inner,
  .quickstart,
  .modules,
  .license,
  .footer-grid,
  .cta-closer-inner {
    grid-template-columns: 1fr;
  }
  .qs-step,
  .module {
    border-left: 0;
    border-top: var(--rule);
  }
  .qs-step:first-child,
  .module:first-child { border-top: 0; }
  .module:nth-child(odd) { border-left: 0; }
  .module:nth-child(2) { border-top: var(--rule); }
  .lic-text { border-right: 0; border-bottom: var(--rule); }
  .section-head {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 36px;
  }
  .section-title { max-width: none; }
  .hero h1 { max-width: none; }
  .doc-band {
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
  }
  .faq-body { margin-left: 0; }
  .faq summary {
    grid-template-columns: 36px 1fr auto;
    gap: 12px;
    font-size: 18px;
  }
}

@media (max-width: 720px) {
  :root { --gutter: 18px; }
  .hero { padding: 48px 0 56px; }
  .section { padding: 64px 0; }
  .cta-closer { padding: 64px 0; }
  .topbar-meta .gh-link {
    padding: 8px 10px;
    font-size: 0;
    gap: 0;
  }
  .topbar-meta .gh-link svg {
    width: 16px;
    height: 16px;
  }
  .topbar-meta .gh-link span {
    display: none;
  }
  .doc-band {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .doc-band > div {
    padding: 10px 0;
    border-bottom: 1px solid var(--c-rule);
  }
  .doc-band > div:last-child { border-bottom: 0; }
  .hero-sub { font-size: 16px; }
  .hero-cta { gap: 10px; }
  .btn-primary,
  .btn-ghost {
    width: 100%;
  }
  .stack {
    grid-template-columns: 1fr 1fr;
  }
  .stack-cell {
    border-left: var(--rule);
    border-top: var(--rule);
  }
  .stack-cell:nth-child(-n+2) { border-top: 0; }
  .stack-cell:nth-child(odd) { border-left: 0; }
  .stack-cell:first-child { border-left: 0; }
  .roadmap {
    grid-template-columns: 1fr;
  }
  .rd-col {
    border-left: 0;
    border-top: var(--rule);
    min-height: 0;
  }
  .rd-col:first-child { border-top: 0; }
  .lic-list { grid-template-columns: 1fr; }
  .lic-text,
  .lic-card { padding: 28px 22px; }
  .lic-card-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .faq details { padding: 18px 18px; }
  .faq summary {
    grid-template-columns: 1fr auto;
    gap: 12px;
    font-size: 17px;
  }
  .faq summary .num {
    grid-column: 1 / -1;
    margin-bottom: -4px;
  }
  .mod-meta {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .term-line { white-space: pre-wrap; word-break: break-word; }
  .qs-code { white-space: pre-wrap; word-break: break-word; padding-right: 16px; padding-top: 40px; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bot {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 420px) {
  .stack { grid-template-columns: 1fr; }
  .stack-cell {
    border-left: 0 !important;
    border-top: var(--rule);
  }
  .stack-cell:first-child { border-top: 0; }
  .cta-stats { grid-template-columns: 1fr; }
  .brand-edition { display: none; }
}
