﻿*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 60px;
  scroll-snap-type: y proximity;
}
body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: #0A0D0F;
  color: #FCFCFC;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

/* ── TOKENS ────────────────────── */
:root {
  --ink:     #0A0D0F;
  --dark:    #131619;
  --surface: #1A1D20;
  --raised:  #22262A;
  --mid:     #454750;
  --muted:   #8A8E94;
  --subtle:  #C4C8CD;
  --white:   #FCFCFC;
  --cyan:    #07A3F2;
  --cyan-lt: #40B2F0;
  --cyan-dk: #0968AE;
  --green:   #22C55E;
  --amber:   #F59E0B;
  --red:     #EF4444;
  --border:  rgba(255,255,255,0.08);
  --ease:    cubic-bezier(0.16,1,0.3,1);
  --wrap: 1160px;
  --section-y: 96px;
  --section-y-tablet: 84px;
  --section-y-mobile: 72px;
  --content-narrow: 720px;
  --app-vh: 100svh;
  --section-vh: 100svh;
}

/* ── LAYOUT ────────────────────── */
.wrap { width: min(var(--wrap), calc(100% - 48px)); margin: 0 auto; }
.hero,
.section,
.cta-section {
  min-height: var(--section-vh);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  scroll-snap-align: start;
  scroll-margin-top: 60px;
}

/* ── NAV ────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 60px; display: flex; align-items: center;
  background: rgba(10,13,15,0.9); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 32px; height: 28px;
  object-fit: cover;
  border: 1px solid rgba(7,163,242,0.35);
  border-radius: 6px;
  box-shadow: inset 0 0 18px rgba(7,163,242,0.08);
}
.logo-text {
  font: 600 14px/1 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
  color: var(--white);
}
.logo-text span:first-child,
.logo-text span:last-child { color: var(--cyan); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font: 400 13px/1 'Space Grotesk', sans-serif; color: var(--muted); transition: color 150ms; }
.nav-links a:hover { color: var(--white); }
.nav-cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cyan); color: #fff; border: none; border-radius: 7px;
  padding: 8px 16px; font: 500 13px/1 'Space Grotesk', sans-serif; cursor: pointer;
  transition: background 150ms var(--ease);
}
.nav-cta:hover { background: #1A96CD; }

/* ── HERO ───────────────────────── */
.hero {
  padding: 100px 0 64px; text-align: center; position: relative;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero::before,
#confianza::before,
#proceso::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 56% 48% at 50% 38%, rgba(7,163,242,0.09) 0%, transparent 70%);
}

/* terminal blink */
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 12px; border-radius: 9999px;
  background: rgba(7,163,242,0.1); border: 1px solid rgba(7,163,242,0.2);
  font: 500 11px/1 'JetBrains Mono', monospace; color: var(--cyan);
  margin-bottom: 28px; letter-spacing: 0.04em;
}
.hero-eyebrow-dot { width: 5px; height: 5px; background: var(--cyan); border-radius: 50%; animation: blink 2s step-end infinite; }

.hero h1 {
  font: 700 clamp(42px,6vw,72px)/1.05 'Space Grotesk', sans-serif;
  letter-spacing: -0.035em; max-width: 780px; margin: 0 auto 22px;
  min-height: 2.2em;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--cyan); }

.hero-sub {
  font: 400 18px/1.65 'Space Grotesk', sans-serif;
  color: var(--muted); max-width: 520px; margin: 0 auto 36px;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 64px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--cyan); color: #fff; border: none; border-radius: 8px;
  padding: 12px 24px; font: 500 14px/1 'Space Grotesk', sans-serif; cursor: pointer;
  transition: all 200ms var(--ease);
}
.btn-primary:hover { background: #1A96CD; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(7,163,242,0.28); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.14); border-radius: 8px;
  padding: 12px 20px; font: 500 14px/1 'Space Grotesk', sans-serif; cursor: pointer;
  transition: all 200ms var(--ease);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.28); }

/* stats bar */
.hero-stats { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.stat { padding: 18px 36px; border-right: 1px solid var(--border); text-align: center; background: var(--surface); }
.stat:last-child { border-right: none; }
.stat-num { font: 700 28px/1 'Space Grotesk', sans-serif; color: var(--white); letter-spacing: -0.03em; }
.stat-num span { color: var(--cyan); }
.stat-lbl { font: 400 12px/1 'Space Grotesk', sans-serif; color: var(--muted); margin-top: 5px; }

/* ── SECTION BASE ───────────────── */
.section { padding: var(--section-y) 0; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 11px/1 'JetBrains Mono', monospace; color: var(--cyan);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px;
}
.section-eyebrow::before { content: '//'; opacity: 0.5; }
.section-eyebrow-centered { justify-content: center; }
h2.section-title {
  font: 700 clamp(30px,4vw,44px)/1.1 'Space Grotesk', sans-serif;
  letter-spacing: -0.025em; margin-bottom: 14px;
}
.section-lead { font: 400 17px/1.6 'Space Grotesk', sans-serif; color: var(--muted); max-width: 480px; }

/* ── PILLAR 1: CONTROL ──────────── */
.control-section { background: #0E1114; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }

/* dashboard mockup */
.dashboard {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  height: 308px;
  min-height: 308px;
}
.dash-header {
  background: var(--raised); border-bottom: 1px solid var(--border);
  padding: 12px 16px; display: flex; align-items: center; gap: 12px;
}
.dash-dots { display: flex; gap: 5px; }
.dash-dots span { width: 9px; height: 9px; border-radius: 50%; }
.dash-dot-red { background: #EF4444; }
.dash-dot-amber { background: #F59E0B; }
.dash-dot-green { background: #22C55E; }
.dash-title { font: 500 12px/1 'JetBrains Mono', monospace; color: var(--muted); }
.dash-live { font: 500 11px/1 'Space Grotesk', sans-serif; color: var(--green); margin-left: auto; display: flex; align-items: center; gap: 5px; }
.live-dot { width: 5px; height: 5px; background: var(--green); border-radius: 50%; animation: blink 1.5s step-end infinite; }
.dash-body {
  position: relative;
  height: calc(100% - 42px);
  padding: 20px;
  overflow: hidden;
}
.dash-body::before,
.dash-body::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 34px;
  pointer-events: none;
  z-index: 2;
}
.dash-body::before {
  top: 0;
  background: linear-gradient(180deg, var(--surface), rgba(26,29,32,0));
}
.dash-body::after {
  bottom: 0;
  background: linear-gradient(0deg, var(--surface), rgba(26,29,32,0));
}

#terminal-output {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  scroll-behavior: smooth;
  color: var(--muted);
  font: 400 13px/1.8 'JetBrains Mono', monospace;
}

/* mini chart */
.chart-label { font: 500 10px/1 'JetBrains Mono', monospace; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.chart-svg { width: 100%; height: 80px; }

/* metrics */
.dash-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 16px; }
.dash-metric {
  background: var(--ink); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px; transition: border-color 200ms;
}
.dash-metric:hover { border-color: rgba(7,163,242,0.25); }
.dm-value { font: 700 20px/1 'Space Grotesk', sans-serif; color: var(--cyan); letter-spacing: -0.02em; }
.dm-label { font: 400 10px/1 'Space Grotesk', sans-serif; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }

/* control copy */
.control-copy h2 { max-width: 400px; }
.control-copy .section-lead { margin-bottom: 28px; }
.fact-list { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.fact {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.fact-icon { width: 28px; height: 28px; background: rgba(7,163,242,0.12); border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fact-text { font: 400 13px/1.5 'Space Grotesk', sans-serif; color: var(--subtle); }
.fact-text strong { color: var(--white); font-weight: 600; }

/* ── CAROUSEL ────────────────────── */
.carousel-outer {
  position: relative;
  width: 100%;
  padding: clamp(24px, 4svh, 40px) 0 clamp(24px, 4svh, 48px);
  overflow: hidden;
  user-select: none;
}
.carousel-track-wrap {
  overflow: visible;
  padding: 12px 0;
}
.carousel-track {
  display: flex;
  gap: 24px;
  transition: transform 700ms cubic-bezier(0.16,1,0.3,1);
  will-change: transform;
  padding: 0 50vw;
  cursor: grab;
  touch-action: pan-y;
}
.carousel-track.dragging {
  transition: none;
  cursor: grabbing;
}
.carousel-card {
  width: min(680px, 76vw);
  min-width: min(680px, 76vw);
  max-width: min(680px, 76vw);
  flex-shrink: 0;
  overflow: visible;
  transition: transform 500ms var(--ease), opacity 500ms var(--ease), border-color 500ms var(--ease), box-shadow 500ms var(--ease);
  opacity: 0.55;
  transform: scale(0.96);
}
.carousel-card.active {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(7,163,242,0.22);
  box-shadow: 0 0 40px rgba(7,163,242,0.07);
}
/* Progress bar */
.carousel-progress-wrap {
  width: min(680px, 76vw);
  margin: 20px auto 0;
  height: 2px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
}
.carousel-progress-bar {
  height: 100%;
  background: var(--cyan);
  border-radius: 2px;
  width: 0%;
  opacity: 0.7;
}

.cases-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 52px; }
.case-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 28px; display: flex; flex-direction: column; gap: 18px;
  transition: border-color 250ms var(--ease), transform 250ms var(--ease);
}
.case-card:hover { border-color: rgba(7,163,242,0.2); transform: translateY(-2px); }
.case-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.case-badge {
  font: 500 11px/1 'Space Grotesk', sans-serif; padding: 3px 9px; border-radius: 4px;
  background: rgba(34,197,94,0.12); color: var(--green); border: 1px solid rgba(34,197,94,0.18);
  flex-shrink: 0;
}
.case-badge-info {
  background: rgba(7,163,242,0.1);
  color: var(--cyan);
  border-color: rgba(7,163,242,0.2);
}
.case-industry { font: 600 11px/1 'JetBrains Mono', monospace; color: var(--muted); }
.case-title { font: 700 19px/1.25 'Space Grotesk', sans-serif; color: var(--white); }
.case-desc { font: 400 14px/1.6 'Space Grotesk', sans-serif; color: var(--muted); }

/* before / after */
.ba-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ba-col { background: var(--ink); border-radius: 8px; padding: 14px; }
.ba-label { font: 600 10px/1 'Space Grotesk', sans-serif; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.ba-label.before-lbl { color: var(--amber); }
.ba-label.after-lbl { color: var(--green); }
.ba-item { font: 400 12px/1.5 'Space Grotesk', sans-serif; color: var(--muted); margin-bottom: 5px; display: flex; gap: 6px; }
.ba-item.after-item { color: var(--subtle); }
.ba-check { color: var(--green); flex-shrink: 0; }
.ba-cross { color: var(--amber); flex-shrink: 0; }

.case-result {
  padding: 12px 14px; border-radius: 8px;
  background: rgba(7,163,242,0.07); border-left: 2px solid var(--cyan);
  font: 400 13px/1.5 'Space Grotesk', sans-serif; color: var(--subtle);
}
.case-result strong { color: var(--cyan); }

.case-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.case-tag {
  font: 400 11px/1 'JetBrains Mono', monospace; padding: 4px 8px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 4px; color: var(--muted);
}

/* ── PILLAR 3: LIBERTAD ─────────── */
.libertad-section { background: #0E1114; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.libertad-section > .wrap {
  display: flex;
  flex-direction: column;
}
.libertad-grid {
  position: relative;
  display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 52px;
  --system-progress: 0;
}
.libertad-grid::before {
  content: '';
  position: absolute;
  left: 16%;
  right: 16%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(7,163,242,0.16), rgba(34,197,94,0.18), transparent);
  transform: translateY(-50%) scaleX(var(--system-progress));
  transform-origin: left;
  transition: transform 620ms var(--ease);
  pointer-events: none;
}
.libertad-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 26px; display: flex; flex-direction: column; gap: 14px;
  transition: border-color 640ms var(--ease), box-shadow 640ms var(--ease), transform 640ms var(--ease), background 640ms var(--ease);
  z-index: 1;
}
.libertad-card:hover { border-color: rgba(7,163,242,0.2); }
.libertad-card::after {
  content: '✓';
  position: absolute;
  top: 18px;
  right: 18px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.24);
  color: var(--green);
  font: 700 13px/1 'JetBrains Mono', monospace;
  opacity: 0.12;
  transform: scale(0.78);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease), border-color 600ms var(--ease), background 600ms var(--ease);
}
.libertad-card.is-active {
  border-color: rgba(34,197,94,0.34);
  background: linear-gradient(180deg, rgba(34,197,94,0.055), rgba(26,29,32,0.98));
  box-shadow: 0 0 28px rgba(34,197,94,0.08);
  transform: translateY(-2px);
}
.libertad-card.is-active::after {
  opacity: 1;
  transform: scale(1);
}
.lib-num { font: 700 40px/1 'Space Grotesk', sans-serif; color: rgba(7,163,242,0.18); letter-spacing: -0.04em; }
.libertad-card.is-active .lib-num { color: rgba(34,197,94,0.28); }
.lib-title { font: 600 16px/1.3 'Space Grotesk', sans-serif; color: var(--white); }
.lib-desc { font: 400 14px/1.6 'Space Grotesk', sans-serif; color: var(--muted); }

/* ── PROCESS ────────────────────── */
#confianza,
.section#proceso {
  position: relative;
  overflow: hidden;
}
#confianza > .wrap,
#confianza > .carousel-outer,
.section#proceso > .wrap { position: relative; z-index: 1; }
.process-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-top: 52px; }
.process-step { background: var(--surface); padding: 26px; }
.ps-num { font: 700 32px/1 'JetBrains Mono', monospace; color: rgba(7,163,242,0.2); margin-bottom: 14px; }
.ps-title { font: 600 15px/1.3 'Space Grotesk', sans-serif; color: var(--white); margin-bottom: 8px; }
.ps-desc { font: 400 13px/1.55 'Space Grotesk', sans-serif; color: var(--muted); }

/* ── CTA ────────────────────────── */
.cta-section {
  --cta-glow-x: 50%;
  --cta-glow-y: 92%;
  padding: 100px 0; text-align: center; position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 38% 62% at var(--cta-glow-x) var(--cta-glow-y), rgba(7,163,242,0.16) 0%, rgba(9,104,174,0.08) 42%, transparent 74%),
    linear-gradient(180deg, #0A0D0F 0%, #07131C 50%, #0A0D0F 100%);
}
.cta-section::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 28% 46% at calc(var(--cta-glow-x) - 10%) calc(var(--cta-glow-y) + 1%), rgba(64,178,240,0.13), transparent 70%),
    radial-gradient(ellipse 32% 52% at calc(var(--cta-glow-x) + 12%) calc(var(--cta-glow-y) + 4%), rgba(9,104,174,0.17), transparent 72%);
}
.cta-section::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(rgba(106,172,218,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106,172,218,0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(10,13,15,0.64) 0%, rgba(7,28,42,0.34) 34%, rgba(7,19,28,0.08) 68%, rgba(7,19,28,0) 100%);
  background-size: 26px 26px, 26px 26px, 100% 100%;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,0.74) 38%, rgba(0,0,0,0.2) 72%, transparent 100%);
  opacity: 0.64;
}
.cta-section > .wrap { position: relative; z-index: 1; }
.cta-section h2 { font: 700 clamp(32px,5vw,52px)/1.1 'Space Grotesk', sans-serif; letter-spacing: -0.03em; max-width: 600px; margin: 0 auto 16px; }
.cta-section p { font: 400 17px/1.65 'Space Grotesk', sans-serif; color: var(--muted); margin-bottom: 8px; }
.cta-note { font: 400 13px/1 'Space Grotesk', sans-serif; color: var(--mid); margin-bottom: 36px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; position: relative; }
.cta-primary { font-size: 15px; padding: 14px 28px; }
.contact-email {
  margin-top: 16px;
  font: 400 12px/1 'JetBrains Mono', monospace;
  color: var(--mid);
}

/* ── FOOTER ─────────────────────── */
footer {
  border-top: 1px solid var(--border); padding: 32px 0;
  scroll-snap-align: start;
  scroll-margin-top: 60px;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-logo { display: flex; align-items: center; gap: 9px; }
.footer-logo-mark {
  width: 26px; height: 22px;
  object-fit: cover;
  border: 1px solid rgba(7,163,242,0.3);
  border-radius: 5px;
}
.footer-logo-text { font: 500 12px/1 'JetBrains Mono', monospace; }
.footer-logo-text span:first-child,
.footer-logo-text span:last-child { color: var(--cyan); }
.footer-copy { font: 400 12px/1 'Space Grotesk', sans-serif; color: var(--mid); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font: 400 12px/1 'Space Grotesk', sans-serif; color: var(--mid); transition: color 150ms; }
.footer-links a:hover { color: var(--muted); }


.icon-sm { width: 16px; height: 16px; flex-shrink: 0; }
.cursor { display: inline-block; width: 3px; height: 0.85em; background: var(--cyan); margin-left: 3px; vertical-align: middle; animation: blink 1s step-end infinite; }

/* ── WAVE CANVAS ───────────────── */
.wave-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.hero,
#confianza,
#proceso { position: relative; cursor: default; }
.hero > .wrap { position: relative; z-index: 1; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

@media (max-width: 1024px) {
  .wrap { width: min(100% - 56px, 860px); }
  .section { padding: var(--section-y-tablet) 0; }
  .section-eyebrow,
  h2.section-title,
  .section-lead {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  .section-lead { max-width: 620px; }
  .control-grid {
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
    gap: 44px;
  }
  .dashboard {
    width: 100%;
    max-width: 720px;
    margin-inline: auto;
  }
  .control-copy {
    max-width: 720px;
    margin-inline: auto;
    text-align: center;
  }
  .control-copy h2 { max-width: 640px; margin-inline: auto; }
  .fact-list {
    max-width: 640px;
    margin-inline: auto;
  }
  .fact { text-align: left; }
  .libertad-grid {
    grid-template-columns: minmax(0, 680px);
    justify-content: center;
    gap: 16px;
  }
  .libertad-grid::before {
    left: 28px;
    right: auto;
    top: 38px;
    bottom: 38px;
    width: 1px;
    height: auto;
    transform: scaleY(var(--system-progress));
    transform-origin: top;
    background: linear-gradient(180deg, transparent, rgba(7,163,242,0.16), rgba(34,197,94,0.18), transparent);
  }
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 760px;
    margin-inline: auto;
  }
  .carousel-card {
    width: min(620px, 82vw);
    min-width: min(620px, 82vw);
    max-width: min(620px, 82vw);
  }
  .carousel-progress-wrap { width: min(620px, 82vw); }
  .case-card {
    padding: 22px;
    gap: 14px;
  }
  .case-desc { font-size: 13px; line-height: 1.55; }
  .ba-col { padding: 12px; }
  .ba-item { font-size: 11px; line-height: 1.42; }
}

@media (max-width: 900px) {
  nav { height: auto; min-height: 60px; }
  .nav-inner { gap: 16px; padding: 10px 0; }
  .nav-links { display: none; }
  .hero {
    min-height: 100svh;
    padding: 104px 0 56px;
  }
  .hero h1 { font-size: clamp(36px, 11vw, 52px); min-height: auto !important; }
  .hero-stats {
    width: min(100%, 560px);
    flex-direction: column;
    margin-inline: auto;
  }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .stat:last-child { border-bottom: none; }
  .footer-inner {
    align-items: center;
    flex-direction: column;
    gap: 18px;
    text-align: center;
  }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 640px) {
  :root {
    --section-vh: var(--app-vh, 100dvh);
    --section-y-mobile: 42px;
  }
  html {
    scroll-padding-top: 0;
    scroll-snap-type: y mandatory;
  }
  .hero,
  .section,
  .cta-section {
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  .footer-section {
    scroll-snap-align: end;
    scroll-snap-stop: normal;
  }
  .wrap { width: min(100% - 32px, 560px); }
  .logo-text { font-size: 12px; }
  .nav-inner { justify-content: space-between; }
  .nav-cta {
    display: none;
  }
  .hero { padding: 74px 0 24px; }
  .hero-eyebrow {
    margin-bottom: 14px;
    padding: 4px 10px;
    font-size: 10px;
  }
  .hero h1 {
    font-size: clamp(25px, 6.8vw, 28px);
    max-width: 340px;
    margin-bottom: 14px;
    text-wrap: wrap;
    overflow-wrap: normal;
  }
  .hero-sub {
    max-width: 100%;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.45;
  }
  .hero-eyebrow { justify-content: center; max-width: 100%; text-align: center; white-space: normal; line-height: 1.4; }
  .hero-actions,
  .cta-actions {
    width: 100%;
    flex-direction: column;
    gap: 9px;
  }
  .hero-actions { margin-bottom: 22px; }
  .btn-primary,
  .btn-ghost {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 13px;
  }
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: 430px;
  }
  .stat {
    padding: 10px 8px;
    border-right: 1px solid var(--border);
    border-bottom: 0;
  }
  .stat:last-child { border-right: none; }
  .stat-num { font-size: 21px; }
  .stat-lbl {
    font-size: 9.5px;
    line-height: 1.2;
    margin-top: 4px;
  }
  .section { padding: var(--section-y-mobile) 0; }
  h2.section-title {
    font-size: clamp(25px, 7vw, 32px);
    line-height: 1.06;
    margin-bottom: 10px;
  }
  .section-eyebrow { margin-bottom: 10px; }
  .section-lead {
    font-size: 13px;
    line-height: 1.45;
  }
  .control-section.section {
    padding: clamp(28px, 4.8svh, 38px) 0;
  }
  .control-grid {
    gap: clamp(16px, 3svh, 24px);
  }
  .dashboard {
    height: clamp(204px, 32svh, 236px);
    min-height: clamp(204px, 32svh, 236px);
  }
  .dash-header { padding: 9px 12px; }
  .dash-body { padding: 12px; }
  #terminal-output {
    font-size: 10.75px !important;
    line-height: 1.58;
  }
  .control-copy h2 {
    max-width: 390px;
  }
  .control-copy .section-lead {
    margin-bottom: 0;
  }
  .fact-list {
    gap: 8px;
    margin-top: 14px;
  }
  .fact {
    gap: 9px;
    padding: 10px 11px;
    border-radius: 8px;
  }
  .fact-icon {
    width: 22px;
    height: 22px;
  }
  .fact-text {
    font-size: 11px;
    line-height: 1.34;
  }
  #confianza.section {
    padding: clamp(28px, 4.5svh, 38px) 0;
  }
  #confianza .carousel-outer {
    padding: 14px 0 18px;
  }
  #confianza .carousel-track-wrap {
    padding: 8px 0;
  }
  #confianza .carousel-progress-wrap {
    margin-top: 12px;
  }
  #servicios.section {
    padding: clamp(28px, 5svh, 44px) 0;
  }
  #servicios h2.section-title {
    font-size: clamp(26px, 7vw, 32px);
    line-height: 1.04;
    margin-bottom: 10px;
  }
  #servicios .section-eyebrow {
    margin-bottom: 10px;
  }
  #servicios .section-lead {
    max-width: 390px;
    font-size: 13px;
    line-height: 1.45;
  }
  .libertad-grid,
  .process-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .fact { max-width: 100%; }
  .libertad-card,
  .process-step,
  .case-card {
    width: 100%;
    max-width: 430px;
    margin-inline: auto;
  }
  .libertad-grid::before { left: 20px; }
  #servicios .libertad-grid {
    max-width: 430px;
    gap: 10px;
    margin-top: clamp(20px, 3.5svh, 28px);
  }
  #servicios .libertad-grid::before {
    left: 16px;
    top: 24px;
    bottom: 24px;
  }
  #servicios .libertad-card {
    padding: 12px 36px 12px 14px;
    gap: 6px;
    border-radius: 10px;
  }
  #servicios .libertad-card::after {
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
  #servicios .lib-num {
    font-size: 25px;
  }
  #servicios .lib-title {
    font-size: 14px;
    line-height: 1.2;
  }
  #servicios .lib-desc {
    font-size: 11.25px;
    line-height: 1.34;
  }
  .libertad-grid::before { transition-duration: 760ms; }
  .libertad-card {
    transition-duration: 820ms;
  }
  .libertad-card::after {
    transition-duration: 760ms;
  }
  .process-grid {
    max-width: 430px;
    border-radius: 12px;
  }
  #proceso.section {
    padding: clamp(30px, 5svh, 44px) 0;
  }
  #proceso .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: clamp(18px, 3svh, 24px);
  }
  #proceso .process-step {
    padding: 12px;
  }
  #proceso .ps-num {
    font-size: 22px;
    margin-bottom: 8px;
  }
  #proceso .ps-title {
    font-size: 12.5px;
    line-height: 1.22;
    margin-bottom: 6px;
  }
  #proceso .ps-desc {
    font-size: 10.5px;
    line-height: 1.35;
  }
  .carousel-track {
    gap: 16px;
    padding-inline: 50vw;
  }
  .carousel-card {
    width: min(92vw, 430px);
    min-width: min(92vw, 430px);
    max-width: min(92vw, 430px);
    overflow: visible;
  }
  .carousel-progress-wrap { width: min(92vw, 430px); }
  .ba-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-card { padding: 14px; gap: 9px; }
  .case-top { flex-direction: column; }
  .case-industry { font-size: 9px; line-height: 1.35; }
  .case-title { font-size: 16px; }
  .case-desc { font-size: 11.5px; line-height: 1.38; }
  .ba-grid { gap: 7px; }
  .ba-col { padding: 8px; }
  .ba-label { margin-bottom: 6px; font-size: 8.5px; }
  .ba-item { font-size: 9.5px; line-height: 1.28; margin-bottom: 3px; gap: 4px; }
  .case-result { padding: 9px 10px; font-size: 11.5px; line-height: 1.34; }
  .case-tags { gap: 4px; }
  .case-tag { font-size: 9px; padding: 3px 5px; }
  .dashboard { border-radius: 12px; }
  .cta-section { padding: clamp(36px, 7svh, 56px) 0; }
  .cta-section::after {
    background-size: 32px 32px, 32px 32px, 100% 100%;
  }
  .cta-section h2 {
    max-width: 360px;
    font-size: clamp(28px, 8vw, 36px);
    margin-bottom: 12px;
  }
  .cta-section p {
    font-size: 13px;
    line-height: 1.45;
  }
  .cta-note {
    margin-bottom: 22px;
  }
  .contact-email {
    margin-top: 18px;
    font-size: 11px;
  }
  .footer-links { gap: 14px; }
  .footer-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 0 calc(42px + env(safe-area-inset-bottom));
    background: #0A0D0F;
  }
  .footer-section .footer-inner {
    gap: 16px;
  }
}

@media (max-width: 380px) {
  .ba-grid { grid-template-columns: 1fr; }
  .case-card { padding: 13px; gap: 8px; }
  .ba-col { padding: 7px 8px; }
  .ba-item { font-size: 9px; line-height: 1.22; }
}

@media (max-width: 640px) and (max-height: 740px) {
  .hero {
    padding: 68px 0 18px;
  }
  .hero-eyebrow {
    margin-bottom: 10px;
    font-size: 9px;
  }
  .hero h1 {
    font-size: clamp(23px, 6.3vw, 26px);
    margin-bottom: 10px;
  }
  .hero-sub {
    margin-bottom: 12px;
    font-size: 12.5px;
  }
  .hero-actions {
    margin-bottom: 16px;
    gap: 7px;
  }
  .btn-primary,
  .btn-ghost {
    padding: 9px 14px;
    font-size: 12px;
  }
  .stat {
    padding: 8px 6px;
  }
  .stat-num {
    font-size: 18px;
  }
  .stat-lbl {
    font-size: 8.5px;
  }
  .control-section.section,
  #confianza.section,
  #proceso.section {
    padding: 22px 0;
  }
  h2.section-title {
    font-size: clamp(23px, 6.4vw, 28px);
  }
  .section-lead {
    font-size: 12px;
    line-height: 1.36;
  }
  .dashboard {
    height: clamp(178px, 29svh, 208px);
    min-height: clamp(178px, 29svh, 208px);
  }
  #terminal-output {
    font-size: 10px !important;
    line-height: 1.5;
  }
  .control-grid {
    gap: 14px;
  }
  .fact-list {
    gap: 6px;
    margin-top: 10px;
  }
  .fact {
    padding: 8px 9px;
  }
  .fact-text {
    font-size: 10px;
    line-height: 1.26;
  }
  #confianza .carousel-outer {
    padding: 10px 0 14px;
  }
  .case-card {
    padding: 11px;
    gap: 7px;
  }
  .case-title {
    font-size: 14px;
  }
  .case-desc,
  .case-result {
    font-size: 10.25px;
    line-height: 1.26;
  }
  .ba-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ba-col {
    padding: 6px;
  }
  .ba-item {
    font-size: 8.5px;
    line-height: 1.16;
  }
  .case-tag {
    font-size: 8px;
    padding: 2px 4px;
  }
  #servicios.section {
    padding: 24px 0;
  }
  #servicios h2.section-title {
    font-size: clamp(24px, 6.4vw, 28px);
  }
  #servicios .section-lead {
    font-size: 12.25px;
    line-height: 1.38;
  }
  #servicios .libertad-grid {
    gap: 8px;
    margin-top: 18px;
  }
  #servicios .libertad-card {
    padding: 10px 34px 10px 12px;
    gap: 5px;
  }
  #servicios .lib-num {
    font-size: 22px;
  }
  #servicios .lib-title {
    font-size: 13px;
  }
  #servicios .lib-desc {
    font-size: 10.5px;
    line-height: 1.26;
  }
  #proceso .process-grid {
    margin-top: 16px;
  }
  #proceso .process-step {
    padding: 10px;
  }
  #proceso .ps-num {
    font-size: 19px;
    margin-bottom: 6px;
  }
  #proceso .ps-title {
    font-size: 11.5px;
  }
  #proceso .ps-desc {
    font-size: 9.5px;
    line-height: 1.26;
  }
  .cta-section {
    padding: 28px 0;
  }
  .cta-section h2 {
    font-size: clamp(25px, 7vw, 31px);
  }
  .cta-section p {
    font-size: 12px;
  }
  .cta-note {
    margin-bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .wave-canvas { display: none; }
}
