/* — ACode Solutions — styles.css — */

/* ── VARIABLES & RESET ── */
:root {
  --bg-deep: #06070A;
  --bg-primary: #0B0C10;
  --bg-elevated: #111318;
  --bg-card: #14161C;
  --bg-card-hover: #1A1C24;
  --border-subtle: rgba(255,255,255,0.06);
  --border-medium: rgba(255,255,255,0.10);
  --border-accent: rgba(0,227,160,0.25);
  --text-hero: #F0F1F3;
  --text-primary: #C8CAD0;
  --text-secondary: #7D8190;
  --text-muted: #4A4E5A;
  --accent: #00E3A0;
  --accent-bright: #00FFB4;
  --accent-dim: rgba(0,227,160,0.08);
  --accent-glow: rgba(0,227,160,0.15);
  --accent-cyan: #00D4E8;
  --error: #FF5F5F;
  --warning: #FFAA2E;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--border-medium) transparent; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* — ANIMATIONS — */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse-line {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* — NAVIGATION — */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 4vw, 4rem);
  background: rgba(6, 7, 10, 0.85);
  backdrop-filter: blur(24px) saturate(1.3);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-hero);
}

.nav-logo-img {
  height: 32px;
  width: auto;
  filter: brightness(1.1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--text-hero); }

.nav-cta {
  padding: 0.5rem 1.2rem;
  background: var(--accent);
  color: var(--bg-deep) !important;
  border-radius: 6px;
  font-weight: 600 !important;
  font-size: 0.8rem !important;
  transition: all 0.3s var(--ease-out) !important;
}

.nav-cta:hover {
  background: var(--accent-bright) !important;
  transform: translateY(-1px);
}

nav.nav-scrolled {
  border-bottom-color: rgba(255,255,255,0.08);
}

/* — HERO — */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px clamp(1.5rem, 4vw, 4rem) 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(0,227,160,0.05) 0%, transparent 65%);
  pointer-events: none;
}

.hero-content {
  max-width: 750px;
  animation: fadeUp 1s var(--ease-out) both;
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 2rem;
  background: var(--accent-dim);
}

.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-line 2s ease-in-out infinite;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  line-height: 1.08;
  color: var(--text-hero);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 580px;
  margin: 0 auto 2.5rem;
}

.hero-sub strong {
  color: var(--text-primary);
  font-weight: 500;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

/* Buttons (shared) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  background: var(--accent);
  color: var(--bg-deep);
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,227,160,0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
  transform: translateY(-2px);
}

/* Hero modules strip */
.hero-modules {
  margin-top: 3.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  animation: fadeIn 1s var(--ease-out) 0.5s both;
}

.hero-module-tag {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-elevated);
  transition: all 0.3s;
}

.hero-module-tag:hover {
  border-color: var(--border-accent);
  color: var(--accent);
}

/* — SECTION SHARED STYLES — */
section {
  padding: clamp(4rem, 8vw, 8rem) clamp(1.5rem, 4vw, 4rem);
  position: relative;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--text-muted);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  color: var(--text-hero);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

/* — DIAGNOSTICO — PAIN POINTS — */
.diagnostico {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.diagnostico-header { margin-bottom: 4rem; }

.diagnostico-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

.diag-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2rem 1.8rem;
  position: relative;
  transition: all 0.4s var(--ease-out);
  overflow: hidden;
}

.diag-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--error);
  opacity: 0.6;
  transition: opacity 0.3s;
}

.diag-card:hover {
  border-color: rgba(255,95,95,0.2);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

.diag-card:hover::before { opacity: 1; }

.diag-error-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--error);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.2rem;
  opacity: 0.8;
}

.diag-error-tag::before { content: '●'; font-size: 0.5rem; }

.diag-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text-hero);
  margin-bottom: 1rem;
  line-height: 1.25;
}

.diag-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.diag-text strong { color: var(--text-primary); font-weight: 500; }

/* — SOLUCIONES — BENTO GRID — */
.soluciones { background: var(--bg-deep); }
.soluciones-header { margin-bottom: 4rem; }

.bento-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 2.2rem 2rem;
  position: relative;
  transition: all 0.4s var(--ease-out);
  overflow: hidden;
}

.bento-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
}

.bento-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60%;
  background: linear-gradient(180deg, transparent, var(--accent-dim));
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.bento-card:hover::after { opacity: 1; }

.bento-card.large { grid-row: span 2; }

.bento-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
}

.bento-card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-hero);
  margin-bottom: 0.8rem;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.bento-card-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.75;
  position: relative;
  z-index: 1;
}

.bento-card-text strong { color: var(--text-primary); font-weight: 500; }

/* Trazabilidad flow */
.traza-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}

.traza-step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.traza-step:hover { border-color: var(--accent); color: var(--accent); }

.traza-arrow {
  color: var(--text-muted);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
}

/* — ECOSISTEMA — LOGO WALL — */
.ecosistema {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}

.eco-header {
  margin-bottom: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eco-header .section-subtitle { text-align: center; }

.logo-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.4s var(--ease-out);
  cursor: default;
}

.logo-item:hover {
  color: var(--text-hero);
  border-color: var(--border-accent);
  background: var(--bg-elevated);
  transform: translateY(-3px);
}

/* — CASOS DE ÉXITO — */
.casos { background: var(--bg-deep); }
.casos-header { margin-bottom: 4rem; }

.casos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.caso-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 2.2rem 2rem;
  transition: all 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
}

.caso-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
}

.caso-industry {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}

.caso-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-hero);
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

.caso-location {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.caso-phases {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
}

.caso-phase { display: flex; gap: 0.8rem; }

.caso-phase-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: 70px;
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.caso-phase-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.caso-result {
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-subtle);
}

.caso-metric {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.caso-metric::before { content: '↗'; font-size: 1rem; }

.caso-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.caso-tag {
  padding: 0.25rem 0.6rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}

/* — CONTRIBUCIONES TÉCNICAS — */
.contribuciones {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.contribuciones-header { margin-bottom: 3rem; }

.contrib-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
}

.contrib-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  padding: 1.5rem 1.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: all 0.3s var(--ease-out);
  align-items: start;
}

.contrib-item:hover {
  border-color: var(--border-accent);
  transform: translateX(4px);
}

.contrib-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  padding-top: 0.1rem;
}

.contrib-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* — PROCESO — TIMELINE — */
.proceso { background: var(--bg-deep); }
.proceso-header { margin-bottom: 4rem; }

.timeline {
  position: relative;
  max-width: 900px;
  overflow-x: auto;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-medium) transparent;
}

.timeline-track {
  display: flex;
  gap: 0;
  position: relative;
  min-width: max-content;
  padding: 1rem 0;
}

.timeline-track::before {
  content: '';
  position: absolute;
  top: 38px;
  left: 24px;
  right: 24px;
  height: 2px;
  background: var(--border-subtle);
}

.timeline-track::after {
  content: '';
  position: absolute;
  top: 37px;
  left: 24px;
  right: 24px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 200% 100%;
  animation: shimmer 4s linear infinite;
  opacity: 0.3;
  border-radius: 2px;
}

.tl-item {
  flex: 0 0 170px;
  position: relative;
  padding: 0 0.5rem;
}

.tl-node {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--text-muted);
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 2;
  transition: all 0.4s var(--ease-out);
  cursor: default;
}

.tl-item:hover .tl-node {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 12px rgba(0,227,160,0.4);
  transform: scale(1.3);
}

.tl-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 0.5rem;
}

.tl-item:hover .tl-label { color: var(--accent); }

.tl-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-hero);
  text-align: center;
  margin-bottom: 0.4rem;
}

.tl-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.55;
  text-align: center;
}

.tl-item:hover .tl-desc { color: var(--text-secondary); }

/* — FLUJO DE INFORMACIÓN — */
.flujo {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.flujo-header { margin-bottom: 3rem; }

.arch-diagram {
  max-width: 700px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2.5rem;
}

.arch-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.8rem;
}

.arch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.arch-node {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: all 0.3s var(--ease-out);
}

.arch-node:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.arch-node-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.arch-node-icon.sales { background: rgba(99,102,241,0.15); color: #818CF8; }
.arch-node-icon.stock { background: rgba(245,158,11,0.15); color: #FBBF24; }
.arch-node-icon.billing { background: rgba(16,185,129,0.15); color: #34D399; }
.arch-node-icon.data { background: rgba(0,212,232,0.15); color: var(--accent-cyan); }
.arch-node-icon.compras { background: rgba(168,85,247,0.15); color: #C084FC; }
.arch-node-icon.mfg { background: rgba(251,146,60,0.15); color: #FB923C; }
.arch-node-icon.cobro { background: rgba(52,211,153,0.15); color: #6EE7B7; }

.arch-node-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
}

.arch-node-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.arch-connector {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0;
}

.arch-connector-line {
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.3;
  position: relative;
}

.arch-connector-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-card);
  padding: 0.15rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--accent);
  border: 1px solid var(--border-accent);
  border-radius: 4px;
  white-space: nowrap;
}

.arch-result {
  grid-column: span 2;
  margin-top: 0.5rem;
  padding: 0.8rem 1rem;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  text-align: center;
}

.arch-result-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

/* — CONTACTO — */
.contacto {
  background: var(--bg-deep);
  text-align: center;
  padding-bottom: 4rem;
}

.contacto-content {
  max-width: 560px;
  margin: 0 auto;
}

.contacto .section-title { margin-bottom: 1rem; }
.contacto .section-subtitle { margin: 0 auto 2.5rem; text-align: center; }

.contacto-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s var(--ease-out);
}

.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

/* — FOOTER — */
footer {
  padding: 2rem clamp(1.5rem, 4vw, 4rem);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-deep);
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.footer-links { display: flex; gap: 1.5rem; }

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--text-secondary); }

/* — HAMBURGER MENU (Mobile) — */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1002;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
  transform-origin: center;
}

.nav-hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile overlay - slide from right */
.nav-links.mobile-open {
  display: flex !important;
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  height: 100dvh;
  left: auto;
  width: 280px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  padding: 80px 2rem 2rem;
  background: var(--bg-primary);
  border-left: 1px solid var(--border-subtle);
  z-index: 1001;
  transform: translateX(0);
  animation: slideInRight 0.3s var(--ease-out) both;
  overflow-y: auto;
  box-sizing: border-box;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.nav-links.mobile-open li {
  width: 100%;
  list-style: none;
}

.nav-links.mobile-open a {
  display: block;
  width: 100%;
  padding: 0.9rem 0;
  font-size: 1rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-links.mobile-open .nav-cta {
  display: inline-flex;
  margin-top: 1.5rem;
  font-size: 0.9rem !important;
  padding: 0.7rem 1.5rem;
  border-bottom: none;
}

/* Backdrop behind sidebar */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
  animation: fadeIn 0.2s var(--ease-out) both;
}

.nav-backdrop.active {
  display: block;
}

/* — RESPONSIVE — */
@media (max-width: 1024px) {
  .diagnostico-grid { grid-template-columns: 1fr; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card.large { grid-row: span 1; }
  .casos-grid { grid-template-columns: 1fr; }
  .contrib-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .arch-grid { grid-template-columns: 1fr; }
  .arch-grid .arch-connector { grid-column: span 1; }
  .arch-result { grid-column: span 1; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .hero h1 { font-size: 2.2rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-secondary { justify-content: center; }
  .hero-modules { gap: 0.35rem; }
  .hero-module-tag { font-size: 0.58rem; padding: 0.25rem 0.5rem; }
  .logo-wall { gap: 0.6rem; }
  .logo-item { padding: 0.8rem 1.2rem; font-size: 0.7rem; }
  .contacto-links { flex-direction: column; align-items: center; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
  .tl-item { flex: 0 0 140px; }
}

/* — LANGUAGE SWITCHER — */

/* Wrapper en nav desktop */
.lang-switcher-li {
  display: flex;
  align-items: center;
  list-style: none;
}

/* El widget en sí */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  padding: 3px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.lang-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.lang-btn--active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Selector visible junto al hamburguesa (mobile) */
.nav-right {
  display: none;
  align-items: center;
  gap: 12px;
}

.lang-switcher--topbar {
  /* mismos estilos base, sin override necesario */
}

/* ── Breakpoints — alineados con el 640px del sitio ── */

/* Mobile: ocultar selector del nav-links (que está oculto), mostrar nav-right */
@media (max-width: 640px) {
  .lang-switcher-li {
    display: none !important;
  }

  .nav-right {
    display: flex;
  }
}
