/* ==========================================================================
   UltrasoundAssist — Sistema visual limpio (tema oscuro clínico)
   ========================================================================== */

:root {
  /* Fondo y superficies */
  --bg-main: #0a0e17;
  --surface-1: rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.045);
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.14);

  /* Texto */
  --text-main: #f1f5f9;
  --text-muted: #a4b0c0;
  --text-subtle: #7b8798;

  /* Acento único + estados de aviso */
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --accent-border: rgba(56, 189, 248, 0.35);
  --warn: #f59e0b;
  --danger: #f43f5e;
  --ok: #10b981;

  /* Fuentes */
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radios */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-card: 0 20px 40px -24px rgba(0, 0, 0, 0.7);
  --nav-h: 68px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  font-size: 16px;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  background-color: var(--bg-main);
  background-image: radial-gradient(900px 500px at 50% -8%, rgba(56, 189, 248, 0.07), transparent 70%);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   Navegación
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.navbar.scrolled { border-bottom-color: var(--hairline); background: rgba(10, 14, 23, 0.94); }

.nav-container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-title { font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; color: #fff; }
.badge-connect {
  font-size: 0.62rem; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 1px 6px; border-radius: 5px;
  margin-left: 4px; letter-spacing: 0.05em;
}
.logo-subtitle { font-size: 0.7rem; color: var(--text-subtle); }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  font-size: 0.9rem; font-weight: 500; color: var(--text-muted);
  padding: 8px 12px; border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover { color: var(--text-main); background: var(--surface-2); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-cta-mobile { display: none; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--hairline-strong);
  background: transparent; border-radius: var(--radius-sm);
  cursor: pointer; padding: 11px 10px;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--text-main); border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
  position: fixed; inset: var(--nav-h) 0 0 0;
  background: rgba(0, 0, 0, 0.5); z-index: 90;
}

/* ==========================================================================
   Botones y enlaces
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem;
  padding: 13px 22px; min-height: 46px;
  border-radius: var(--radius-md); border: 1px solid transparent;
  cursor: pointer; text-align: center;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary {
  background: var(--accent); color: #04222f;
  box-shadow: 0 10px 24px -10px rgba(56, 189, 248, 0.6);
}
.btn-primary:hover { background: #5cc8f9; transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--text-main); border-color: var(--hairline-strong);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 9px 15px; min-height: 40px; font-size: 0.85rem; }
.btn-panic {
  background: rgba(244, 63, 94, 0.14); color: #fecdd3; border-color: rgba(244, 63, 94, 0.4);
}
.btn-panic:hover { background: rgba(244, 63, 94, 0.28); color: #fff; }
.full-width { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.95rem; color: var(--text-muted);
  transition: color 0.2s ease, gap 0.2s ease;
}
.link-arrow:hover { color: var(--accent); gap: 12px; }
.link-arrow svg { transition: transform 0.2s ease; }
.link-arrow:hover svg { transform: translateX(2px); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero-section { padding: 64px 0 84px; }
.hero-container { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 9999px;
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  font-size: 0.78rem; font-weight: 600; color: var(--accent); margin-bottom: 24px;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.hero-title {
  font-family: var(--font-heading); font-size: 3rem; font-weight: 800;
  line-height: 1.12; letter-spacing: -0.03em; margin-bottom: 20px;
}
.gradient-text {
  display: block;
  background: linear-gradient(120deg, #7dd3fc 0%, #38bdf8 45%, #34d399 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-lead { font-size: 1.08rem; color: var(--text-muted); max-width: 56ch; margin-bottom: 32px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px; margin-bottom: 36px;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.hero-stat { padding: 18px 0; }
.hero-stat + .hero-stat { border-left: 1px solid var(--hairline); padding-left: 20px; }
.stat-val {
  display: block; font-family: var(--font-heading); font-size: 1.4rem;
  font-weight: 800; color: var(--accent); letter-spacing: -0.02em;
}
.stat-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; }

.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

/* Mockup */
.hero-mockup-wrapper { position: relative; }
.mockup-frame {
  background: #0c111d; border: 1px solid var(--hairline);
  border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: var(--shadow-card);
}
.mockup-header {
  background: rgba(15, 23, 42, 0.85); padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--hairline);
}
.device-dots { display: flex; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }
.terminal-title { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--text-subtle); }
.badge-status-live {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; color: var(--ok);
  background: rgba(16, 185, 129, 0.14); padding: 3px 8px; border-radius: 5px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: pulse-ring 1.8s infinite; }

.live-canvas-container {
  position: relative; background: #000; width: 100%; aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
#heroMiniCanvas { width: 100%; height: 100%; display: block; }

.mockup-watermark {
  position: absolute; top: 12px; left: 12px; right: 12px;
  display: flex; justify-content: space-between; pointer-events: none;
}
.tag-live, .tag-specs {
  font-family: var(--font-mono); font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.7); padding: 2px 8px; border-radius: 5px;
  border: 1px solid var(--hairline);
}
.tag-live { color: var(--accent); }
.tag-specs { color: var(--text-muted); }

.mockup-privacy-shield {
  position: absolute; inset: 0; background: rgba(10, 16, 30, 0.95);
  backdrop-filter: blur(6px); display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 24px; z-index: 10;
}
.mockup-privacy-shield h3 { font-family: var(--font-heading); font-size: 1.1rem; color: var(--warn); margin: 12px 0 6px; }
.mockup-privacy-shield p { font-size: 0.84rem; color: var(--text-muted); max-width: 320px; }

.mockup-control-bar {
  background: rgba(15, 23, 42, 0.7); padding: 12px 16px;
  display: flex; align-items: center; gap: 20px;
  border-top: 1px solid var(--hairline);
}
.control-item { display: flex; flex-direction: column; font-size: 0.74rem; }
.control-item .label { color: var(--text-subtle); }
.control-item .val { color: var(--text-main); font-weight: 600; }
.mockup-control-bar .btn { margin-left: auto; }

/* ==========================================================================
   Secciones
   ========================================================================== */
.section { padding: 100px 0; }

.section-header { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-tag {
  display: block; font-family: var(--font-mono); font-size: 0.76rem; font-weight: 600;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 14px;
}
.section-title {
  font-family: var(--font-heading); font-size: 2.25rem; font-weight: 800;
  line-height: 1.22; letter-spacing: -0.025em; margin-bottom: 16px;
}
.section-subtitle { font-size: 1rem; color: var(--text-muted); max-width: 62ch; margin: 0 auto; }

.section-cta { margin-top: 44px; text-align: center; }

/* ==========================================================================
   Demostración
   ========================================================================== */
.demo-controls-bar {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; margin-bottom: 24px;
}
.control-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.control-label { font-size: 0.8rem; color: var(--text-subtle); font-weight: 500; }

.btn-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--hairline);
  color: var(--text-muted); font-family: var(--font-heading); font-size: 0.82rem; font-weight: 600;
  padding: 9px 14px; min-height: 40px; border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.18s ease;
}
.btn-toggle:hover { color: #fff; border-color: var(--hairline-strong); }
.btn-toggle.active { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }
.btn-toggle.btn-action { color: var(--warn); border-color: rgba(245, 158, 11, 0.28); }
.btn-toggle.btn-action:hover { color: #fff; }
.btn-toggle.btn-action.active { background: rgba(245, 158, 11, 0.18); border-color: var(--warn); color: var(--warn); }

.telemetry-pill {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted);
  background: var(--surface-2); padding: 7px 14px; border-radius: 9999px;
  border: 1px solid var(--hairline); display: flex; align-items: center; gap: 8px;
}
.telemetry-pill strong { color: var(--accent); }
.telemetry-sep { color: rgba(255, 255, 255, 0.2); }
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.sync-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sync-panel {
  background: #0c111d; border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); overflow: hidden;
}
.panel-header {
  padding: 12px 18px; background: rgba(15, 23, 42, 0.7);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--hairline);
}
.panel-title-badge {
  font-family: var(--font-heading); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.04em; padding: 4px 10px; border-radius: 6px;
}
.panel-title-badge.source { background: var(--surface-2); color: #cbd5e1; }
.panel-title-badge.receiver { background: var(--accent-soft); color: var(--accent); }
.panel-source-info { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-subtle); }

.canvas-wrap { position: relative; background: #000; aspect-ratio: 16 / 10; width: 100%; }
.canvas-wrap canvas { width: 100%; height: 100%; display: block; }

.source-tag-overlay, .receiver-tag-overlay { position: absolute; bottom: 10px; right: 10px; }
.badge-source, .badge-receiver { font-family: var(--font-mono); font-size: 0.7rem; padding: 3px 8px; border-radius: 5px; background: rgba(0, 0, 0, 0.8); border: 1px solid var(--hairline); }
.badge-source { color: #cbd5e1; }
.badge-receiver { color: var(--ok); border-color: rgba(16, 185, 129, 0.4); }

.panel-footer {
  padding: 10px 16px; background: rgba(15, 23, 42, 0.45);
  font-size: 0.76rem; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; color: var(--text-subtle); border-top: 1px solid var(--hairline);
}
.status-indicator-raw { color: var(--text-muted); font-family: var(--font-mono); }
.status-indicator-sec { color: var(--ok); font-family: var(--font-mono); }

.worklist-overlay {
  position: absolute; inset: 0; background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(4px); padding: 20px; display: flex;
  align-items: center; justify-content: center; z-index: 5;
}
.worklist-box { width: 100%; background: #0a0f1c; border: 1px solid rgba(244, 63, 94, 0.4); border-radius: var(--radius-md); padding: 16px; }
.wl-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--danger); font-weight: 700;
  border-bottom: 1px solid rgba(244, 63, 94, 0.2); padding-bottom: 8px; margin-bottom: 10px;
}
.wl-close { cursor: pointer; color: var(--text-muted); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--hairline-strong); }
.wl-close:hover { color: #fff; border-color: var(--danger); }
.wl-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; text-align: left; }
.wl-table th { color: var(--text-subtle); padding: 6px 8px; border-bottom: 1px solid var(--hairline); }
.wl-table td { padding: 6px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); color: var(--text-muted); }
.wl-table tr.hl td { color: #fff; background: rgba(244, 63, 94, 0.1); }
.wl-warning { margin-top: 10px; font-size: 0.7rem; color: #f87171; background: rgba(244, 63, 94, 0.1); padding: 6px 10px; border-radius: 5px; }

.freeze-alert-banner {
  position: absolute; top: 16px; left: 16px; right: 16px;
  background: rgba(245, 158, 11, 0.95); color: #000; padding: 10px 16px;
  border-radius: var(--radius-sm); display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 800; font-size: 0.76rem;
  letter-spacing: 0.02em; z-index: 10;
}

.receiver-privacy-shield {
  position: absolute; inset: 0; background: rgba(10, 14, 23, 0.96);
  backdrop-filter: blur(8px); display: flex; align-items: center;
  justify-content: center; padding: 24px; text-align: center; z-index: 6;
}
.shield-dialog { max-width: 380px; }
.shield-icon-wrap {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
}
.shield-dialog h3 { font-family: var(--font-heading); font-size: 1.15rem; margin-bottom: 8px; }
.shield-dialog p { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 16px; }
.shield-badges { display: flex; flex-direction: column; gap: 6px; }
.badge-sub {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent);
  background: var(--accent-soft); padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--accent-border);
}

/* ==========================================================================
   Privacy Guard
   ========================================================================== */
.state-machine-box {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-xl); padding: 28px; margin-bottom: 48px;
}
.sm-header {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 28px; border-bottom: 1px solid var(--hairline); padding-bottom: 16px;
}
.sm-title { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.04em; }
.current-state-pill {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted);
  background: var(--surface-2); padding: 6px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--hairline); white-space: nowrap;
}
.current-state-pill strong { color: var(--ok); }

.states-flow-diagram {
  display: flex; align-items: stretch; gap: 12px;
  overflow-x: auto; padding-bottom: 10px;
}
.state-node {
  flex: 1; min-width: 180px; background: var(--surface-2);
  border: 1px solid var(--hairline); border-radius: var(--radius-md);
  padding: 18px 16px; text-align: center; transition: all 0.25s ease;
}
.state-node.active-node { background: rgba(16, 185, 129, 0.1); border-color: var(--ok); }
.state-node.active-node-danger { background: rgba(244, 63, 94, 0.1); border-color: var(--danger); }
.state-node.active-node-warning { background: rgba(245, 158, 11, 0.1); border-color: var(--warn); }
.node-icon { font-size: 1.5rem; margin-bottom: 6px; }
.node-name { font-family: var(--font-heading); font-weight: 800; font-size: 0.95rem; letter-spacing: 0.04em; color: #fff; margin-bottom: 6px; }
.node-desc { font-size: 0.76rem; color: var(--text-muted); margin-bottom: 10px; }
.node-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 0.64rem;
  padding: 3px 8px; border-radius: 5px; background: var(--surface-2);
  color: var(--text-subtle); border: 1px solid var(--hairline);
}
.flow-arrow { display: flex; align-items: center; color: rgba(255, 255, 255, 0.2); font-size: 1.1rem; }

.sm-interactive-controls {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--hairline);
}
.ctrl-legend { font-size: 0.8rem; color: var(--text-subtle); margin-right: auto; }

.cards-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 24px; transition: border-color 0.25s ease, background 0.25s ease;
}
.feature-card:hover { background: var(--surface-2); border-color: var(--accent-border); }
.card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card-icon.blue { background: var(--accent-soft); color: var(--accent); }
.card-icon.red { background: rgba(244, 63, 94, 0.14); color: var(--danger); }
.card-icon.teal { background: rgba(16, 185, 129, 0.14); color: var(--ok); }
.card-icon.yellow { background: rgba(245, 158, 11, 0.14); color: var(--warn); }
.card-title { font-family: var(--font-heading); font-size: 1.03rem; font-weight: 700; margin-bottom: 10px; color: #fff; }
.card-text { font-size: 0.87rem; color: var(--text-muted); }

/* ==========================================================================
   Casos de uso + CTA band
   ========================================================================== */
.cards-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.use-case-card {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 30px 26px; display: flex; flex-direction: column;
}
.uc-badge {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; display: inline-block;
}
.use-case-card h3 { font-family: var(--font-heading); font-size: 1.2rem; margin-bottom: 14px; }
.uc-desc { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 24px; }
.uc-benefits {
  margin-top: auto; display: flex; flex-direction: column; gap: 8px;
  font-size: 0.83rem; color: var(--text-main);
  border-top: 1px solid var(--hairline); padding-top: 16px;
}

.cta-band { padding: 0 0 100px; }
.cta-band-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(56, 189, 248, 0.12), rgba(16, 185, 129, 0.08));
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-xl); padding: 40px 44px;
}
.cta-band-inner h2 { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; margin-bottom: 8px; }
.cta-band-inner p { color: var(--text-muted); max-width: 60ch; }

/* ==========================================================================
   Tabs (detalles técnicos)
   ========================================================================== */
.tabs {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
  padding: 6px; margin-bottom: 32px;
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: 9999px; width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto;
}
.tab-btn {
  font-family: var(--font-heading); font-size: 0.88rem; font-weight: 600;
  color: var(--text-muted); background: transparent; border: none;
  padding: 10px 20px; min-height: 44px; border-radius: 9999px; cursor: pointer;
  transition: all 0.2s ease; white-space: nowrap;
}
.tab-btn:hover { color: var(--text-main); }
.tab-btn.active { background: var(--accent); color: #04222f; }

.tab-panel { display: none; animation: fade-in 0.3s ease; }
.tab-panel.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.identity-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.info-card {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 28px;
}
.id-badge {
  display: inline-block; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); padding: 3px 8px; border-radius: 5px; margin-bottom: 14px;
}
.info-card h3 { font-family: var(--font-heading); font-size: 1.15rem; margin-bottom: 16px; }
.info-list { list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 0.88rem; color: var(--text-muted); }
.info-list strong { color: var(--text-main); }

/* Tabla compatibilidad */
.table-card { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--radius-xl); overflow: hidden; }
.table-responsive { overflow-x: auto; }
.compat-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.88rem; }
.compat-table th {
  background: var(--surface-2); padding: 16px 20px; font-family: var(--font-heading);
  font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-subtle); border-bottom: 1px solid var(--hairline); white-space: nowrap;
}
.compat-table td { padding: 16px 20px; border-bottom: 1px solid var(--hairline); color: var(--text-muted); }
.compat-table tr:last-child td { border-bottom: none; }
.compat-table tr:hover td { background: var(--surface-1); }
.compat-table strong { color: #fff; }
.status-badge { display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; white-space: nowrap; }
.status-badge.valid { background: rgba(16, 185, 129, 0.14); color: var(--ok); border: 1px solid rgba(16, 185, 129, 0.35); }
.status-badge.tested { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); }
.status-badge.note { background: rgba(245, 158, 11, 0.14); color: var(--warn); border: 1px solid rgba(245, 158, 11, 0.35); }
.table-footer-legend { padding: 14px 20px; background: var(--surface-2); font-size: 0.78rem; color: var(--text-subtle); border-top: 1px solid var(--hairline); }

/* Arquitectura */
.arch-box { background: var(--surface-1); border: 1px solid var(--hairline); border-radius: var(--radius-xl); padding: 36px 30px; }
.arch-diagram { display: flex; align-items: stretch; gap: 12px; margin-bottom: 40px; overflow-x: auto; padding-bottom: 12px; }
.diagram-step {
  flex: 1; min-width: 165px; background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: var(--radius-md); padding: 22px 18px; text-align: center;
}
.diagram-step.highlight { background: var(--accent-soft); border-color: var(--accent-border); }
.step-num { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); margin-bottom: 4px; }
.step-icon { font-size: 1.7rem; margin-bottom: 8px; }
.diagram-step h4 { font-family: var(--font-heading); font-size: 0.98rem; margin-bottom: 6px; }
.diagram-step p { font-size: 0.76rem; color: var(--text-muted); }
.diagram-connector { display: flex; align-items: center; font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); }

.arch-specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; border-top: 1px solid var(--hairline); padding-top: 28px; }
.spec-col h4 { font-family: var(--font-heading); font-size: 1.02rem; margin-bottom: 14px; color: var(--accent); }
.spec-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 0.87rem; color: var(--text-muted); }
.spec-col li { padding-left: 16px; position: relative; }
.spec-col li::before { content: "•"; color: var(--accent); position: absolute; left: 0; }

/* Regulación */
.regulatory-box { background: var(--surface-1); border: 1px solid var(--accent-border); border-radius: var(--radius-xl); padding: 36px 32px; }
.reg-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--hairline); padding-bottom: 18px; }
.reg-icon { font-size: 2rem; }
.reg-header h3 { font-family: var(--font-heading); font-size: 1.25rem; margin-bottom: 2px; }
.reg-subtitle { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); }
.reg-body { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 24px; }
.reg-col h4 { font-family: var(--font-heading); font-size: 1rem; margin-bottom: 8px; color: #fff; }
.reg-col p { font-size: 0.88rem; color: var(--text-muted); }
.reg-footer { background: var(--surface-2); padding: 14px 18px; border-radius: var(--radius-md); font-size: 0.8rem; color: var(--text-subtle); border: 1px solid var(--hairline); }

/* ==========================================================================
   Precios
   ========================================================================== */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.pricing-card {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-xl); padding: 34px 28px; display: flex; flex-direction: column;
  position: relative; transition: border-color 0.25s ease, transform 0.25s ease;
}
.pricing-card:hover { border-color: var(--accent-border); transform: translateY(-3px); }
.pricing-card.featured { background: linear-gradient(180deg, rgba(56, 189, 248, 0.08), var(--surface-1)); border-color: var(--accent-border); }
.featured-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #04222f; font-family: var(--font-mono);
  font-size: 0.68rem; font-weight: 700; padding: 4px 12px; border-radius: 9999px; letter-spacing: 0.06em;
}
.card-head { border-bottom: 1px solid var(--hairline); padding-bottom: 24px; margin-bottom: 24px; }
.card-head h3 { font-family: var(--font-heading); font-size: 1.3rem; margin-bottom: 6px; }
.p-desc { font-size: 0.84rem; color: var(--text-muted); min-height: 40px; }
.price-wrap { margin-top: 16px; }
.price-val { font-family: var(--font-heading); font-size: 2.1rem; font-weight: 800; color: #fff; }
.price-period { font-size: 0.8rem; color: var(--text-subtle); margin-left: 6px; }
.p-maintenance {
  margin-top: 14px; font-family: var(--font-mono); font-size: 0.82rem;
  color: var(--accent); font-weight: 600;
}
.p-maintenance span { color: var(--text-subtle); font-family: var(--font-body); font-weight: 400; }
.p-features { list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 0.86rem; color: var(--text-muted); margin-bottom: 32px; flex: 1; }
.pricing-note {
  margin-top: 28px; text-align: center; font-size: 0.82rem; color: var(--text-subtle);
  max-width: 720px; margin-left: auto; margin-right: auto;
}
.pricing-note strong { color: var(--text-main); }

/* ==========================================================================
   Formulario
   ========================================================================== */
.form-wrapper {
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-xl); padding: 48px;
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 48px;
}
.form-intro h2 { font-family: var(--font-heading); font-size: 1.9rem; line-height: 1.25; margin-bottom: 16px; }
.form-intro p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 30px; }
.contact-highlights { display: flex; flex-direction: column; gap: 20px; }
.ch-item { display: flex; gap: 14px; align-items: flex-start; }
.ch-icon { font-size: 1.35rem; }
.ch-item strong { display: block; font-size: 0.9rem; margin-bottom: 2px; color: #fff; }
.ch-item p { font-size: 0.8rem; color: var(--text-subtle); margin: 0; }

.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); }
.form-group input, .form-group select, .form-group textarea {
  background: rgba(15, 23, 42, 0.7); border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md); padding: 12px 14px; color: #fff;
  font-family: var(--font-body); font-size: 0.9rem; outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}
.form-checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 0.78rem; color: var(--text-subtle); margin: 6px 0 12px; }
.form-checkbox input { margin-top: 3px; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-card {
  background: #111a2b; border: 1px solid var(--accent-border); border-radius: var(--radius-xl);
  padding: 36px 32px; max-width: 460px; text-align: center; box-shadow: var(--shadow-card);
}
.modal-icon { font-size: 2.6rem; margin-bottom: 12px; }
.modal-card h3 { font-family: var(--font-heading); font-size: 1.3rem; margin-bottom: 10px; }
.modal-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 24px; }

/* Footer */
.footer { border-top: 1px solid var(--hairline); padding: 60px 0 40px; background: #080c14; font-size: 0.84rem; }
.footer-container { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; margin-bottom: 20px; }
.footer-logo { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-desc { color: var(--text-subtle); }
.footer-col h4 { font-family: var(--font-heading); font-size: 0.86rem; font-weight: 700; color: #fff; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--text-muted); transition: color 0.2s ease; }
.footer-col a:hover { color: var(--accent); }
.footer-legal { color: var(--text-subtle); }

/* CTA fija móvil */
.mobile-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(10, 14, 23, 0.94); backdrop-filter: blur(12px);
  border-top: 1px solid var(--hairline);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  :root { --nav-h: 64px; }
  .hero-container { grid-template-columns: 1fr; gap: 44px; }
  .sync-grid { grid-template-columns: 1fr; }
  .cards-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .identity-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .form-wrapper { grid-template-columns: 1fr; padding: 36px; }
  .footer-container { grid-template-columns: 1fr 1fr; }

  /* Nav móvil */
  .nav-toggle { display: flex; }
  .nav-cta-desktop { display: none; }
  .nav-links {
    position: fixed; top: var(--nav-h); right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #0b111c; border-bottom: 1px solid var(--hairline);
    padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto; z-index: 95;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-link { font-size: 1rem; padding: 14px 12px; min-height: 48px; }
  .nav-cta-mobile { display: inline-flex; margin-top: 8px; }
}

@media (max-width: 768px) {
  .section { padding: 68px 0; }
  .hero-section { padding: 44px 0 60px; }
  .hero-title { font-size: 2.1rem; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stat + .hero-stat { border-left: none; border-top: 1px solid var(--hairline); padding-left: 0; }
  .hero-stat { padding: 14px 0; }
  .hero-actions { gap: 16px; }
  .section-title { font-size: 1.8rem; }
  .cards-grid-3 { grid-template-columns: 1fr; }
  .reg-body { grid-template-columns: 1fr; }
  .arch-specs-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .cta-band-inner { padding: 32px 26px; }
  .form-wrapper { padding: 26px; }
  .mockup-control-bar { flex-wrap: wrap; gap: 12px; }

  /* Diagrama de arquitectura en vertical */
  .arch-diagram { flex-direction: column; align-items: stretch; }
  .diagram-step { min-width: 0; }
  .diagram-connector { justify-content: center; transform: rotate(90deg); }

  /* Flujo de privacidad en vertical */
  .states-flow-diagram { flex-direction: column; }
  .state-node { min-width: 0; }
  .flow-arrow { justify-content: center; transform: rotate(90deg); }

  /* Tabs en scroll horizontal */
  .tabs { border-radius: var(--radius-lg); justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; width: 100%; }
  .tab-btn { flex-shrink: 0; }

  /* CTA fija móvil */
  .mobile-cta { display: block; }
  body { padding-bottom: 74px; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .hero-title { font-size: 1.85rem; }
  .section-title { font-size: 1.6rem; }
  .logo-subtitle { display: none; }
  .state-machine-box { padding: 20px; }
  .arch-box, .regulatory-box { padding: 24px 22px; }
  .sm-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ==========================================================================
   Estilos específicos Fase 1: Pasos, Máscara fija y Botones Tablet
   ========================================================================== */
.step-card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  position: relative;
  transition: all 0.25s ease;
}
.step-card:hover {
  background: var(--surface-2);
  border-color: var(--accent-border);
  transform: translateY(-2px);
}
.step-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-border);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.step-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}
.step-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Máscara de cabecera fija continua en la tablet */
.header-mask-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: #000000;
  border-bottom: 1px solid rgba(244, 63, 94, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.mask-bar {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: #f87171;
  letter-spacing: 0.04em;
  background: rgba(244, 63, 94, 0.15);
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px dashed rgba(244, 63, 94, 0.5);
}

@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr !important; }
  .faq-grid { grid-template-columns: 1fr !important; }
}

