/* ==========================================================================
   LINK — landing del proyecto open source
   Estilos principales (CSS sin dependencias). Sirve a / (inglés) y a /es/.
   ========================================================================== */

/* ---------------------------------------------------------
   Variables y Tokens de Diseño
   --------------------------------------------------------- */
:root {
  /* Marca Link */
  --brand-blue-light: #0098f0;
  --brand-blue: #0068d8;
  --brand-blue-dark: #0050c0;
  --brand-teal-light: #10b8b8;
  --brand-teal: #00a8a8;
  --brand-teal-dark: #0898a0;
  --brand-ink: #002040;

  /* Gradientes de marca */
  --gradient-primary: linear-gradient(135deg, #0098f0 0%, #0068d8 50%, #0050c0 100%);
  --gradient-teal: linear-gradient(135deg, #10b8b8 0%, #00a8a8 50%, #0898a0 100%);
  --gradient-mixed: linear-gradient(135deg, #0098f0 0%, #00a8a8 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 248, 252, 0.8) 100%);

  /* Tema Claro (Por Defecto o data-theme="light") */
  --bg-primary: #ffffff;
  --bg-secondary: #f4f7fc;
  --bg-tertiary: #e9eef5;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);

  --text-primary: #0a1420;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-inverse: #ffffff;

  --border-light: rgba(0, 32, 64, 0.08);
  --border-medium: rgba(0, 32, 64, 0.16);
  --border-glow: rgba(0, 104, 216, 0.25);

  --shadow-sm: 0 2px 4px rgba(0, 32, 64, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(0, 32, 64, 0.08), 0 8px 10px -6px rgba(0, 32, 64, 0.04);
  --shadow-lg: 0 20px 35px -10px rgba(0, 32, 64, 0.12), 0 12px 16px -8px rgba(0, 32, 64, 0.06);
  --shadow-glow: 0 0 35px rgba(0, 152, 240, 0.2);

  --chat-pattern: url("../assets/chat-pattern-light.svg");
  --chat-bg: #f3f6fa;
  --bubble-incoming: #ffffff;
  --bubble-outgoing: #0068d8;
  --bubble-outgoing-text: #ffffff;

  /* Tipografías */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Baloo 2', var(--font-sans);

  /* Transiciones y Bordes */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  --transition-fast: 150ms ease;
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------------------------------------------------------
   Modo Oscuro (data-theme="dark")
   --------------------------------------------------------- */
[data-theme="dark"] {
  --bg-primary: #060b11;
  --bg-secondary: #0a1420;
  --bg-tertiary: #0f1d2e;
  --bg-surface: #0c1827;
  --bg-surface-elevated: #112136;
  --bg-glass: rgba(10, 20, 32, 0.85);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #060b11;

  --border-light: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-glow: rgba(0, 152, 240, 0.4);

  --gradient-card: linear-gradient(180deg, rgba(17, 33, 54, 0.8) 0%, rgba(12, 24, 39, 0.7) 100%);

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 30px -5px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 45px -10px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 45px rgba(0, 152, 240, 0.25);

  --chat-pattern: url("../assets/chat-pattern-dark.svg");
  --chat-bg: #09121c;
  --bubble-incoming: #142438;
  --bubble-outgoing: #0068d8;
  --bubble-outgoing-text: #ffffff;
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  color-scheme: light dark;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Fondo decorativo con luces y rejilla sutil */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 152, 240, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 35%, rgba(16, 184, 184, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 85%, rgba(0, 80, 192, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* Enlace de accesibilidad para saltar al contenido principal */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--brand-blue);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--brand-teal-light);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img, svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, button, select, textarea {
  font: inherit;
}

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

/* Contenedores */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section {
  padding-block: 5.5rem;
  position: relative;
}

/* ---------------------------------------------------------
   Cabecera y Navegación (Header)
   --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  border-bottom-color: var(--border-medium);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text-primary);
}

.brand-logo-img {
  height: 38px;
  width: auto;
}

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

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding-block: 0.5rem;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: var(--brand-blue);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-mixed);
  border-radius: var(--radius-full);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Botón de alternar tema */
.theme-toggle-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.theme-toggle-btn .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle-btn .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle-btn .icon-moon {
  display: block;
}

/* Botones genéricos de acción */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 104, 216, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 104, 216, 0.45);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--brand-blue);
  transform: translateY(-2px);
}

.btn-teal {
  background: var(--gradient-teal);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 168, 168, 0.3);
}

.btn-teal:hover {
  box-shadow: 0 6px 20px rgba(0, 168, 168, 0.45);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
}

/* Botón menú móvil */
.mobile-toggle-btn {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------
   Sección Hero
   --------------------------------------------------------- */
.hero {
  padding-top: 4.5rem;
  padding-bottom: 5.5rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(0, 152, 240, 0.1);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-blue-light);
  margin-bottom: 1.5rem;
}

.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: var(--brand-teal);
  box-shadow: 0 0 10px var(--brand-teal);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-title .text-gradient {
  background: var(--gradient-mixed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-features-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  list-style: none;
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-feature-item svg {
  color: var(--brand-teal);
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   Ilustración estática de la app en el hero
   --------------------------------------------------------- */
.hero-mockup-wrapper {
  position: relative;
}

.hero-mockup-wrapper::before {
  content: "";
  position: absolute;
  inset: -20px;
  background: var(--gradient-mixed);
  opacity: 0.15;
  filter: blur(40px);
  border-radius: var(--radius-xl);
  z-index: 0;
}

.app-mockup {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 540px;
}

/* Barra superior del mockup */
.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-light);
}

.mockup-dots {
  display: flex;
  gap: 6px;
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

.mockup-dot.red { background-color: #ff5f56; }
.mockup-dot.yellow { background-color: #ffbd2e; }
.mockup-dot.green { background-color: #27c93f; }

.mockup-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mockup-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Barra lateral del chat */
.mockup-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
}

.sidebar-search {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-search-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mockup-chat-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.8rem;
}

.chat-item.active {
  background: var(--bg-tertiary);
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  position: relative;
  flex-shrink: 0;
}

.chat-avatar.teal {
  background: var(--gradient-teal);
}

.chat-info {
  flex: 1;
  min-width: 0;
}

.chat-name {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-time {
  font-size: 0.65rem;
  color: var(--text-tertiary);
}

.chat-preview {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
}

.unread-badge {
  background: var(--brand-teal);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  margin-left: 4px;
}

/* Área principal de conversación */
.mockup-main-chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background-color: var(--chat-bg);
  background-image: var(--chat-pattern);
  background-repeat: repeat;
  background-size: 380px;
  position: relative;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-light);
  z-index: 2;
}

.chat-header-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn-sm {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

/* Hilo de mensajes: anclado abajo como un chat real; lo que no entra se
   recorta por arriba (la ilustración no tiene scroll) */
.message-stream {
  flex: 1;
  min-height: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.75rem;
  overflow: hidden;
}

.message-bubble {
  max-width: 80%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.message-incoming {
  align-self: flex-start;
  background: var(--bubble-incoming);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 4px;
}

.message-outgoing {
  align-self: flex-end;
  background: var(--bubble-outgoing);
  color: var(--bubble-outgoing-text);
  border-bottom-right-radius: 4px;
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  font-size: 0.65rem;
  margin-top: 0.25rem;
  opacity: 0.8;
}

/* Reacciones */
.reaction-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 2px 6px;
  font-size: 0.7rem;
  margin-top: 0.3rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Reproductor de nota de voz */
.voice-note-player {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.2rem 0;
}

.voice-play-btn {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.voice-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
  flex: 1;
}

.wave-bar {
  width: 3px;
  background: var(--brand-blue-light);
  border-radius: 2px;
  height: 10px;
}

.wave-bar:nth-child(2) { height: 14px; animation-delay: 0.1s; }
.wave-bar:nth-child(3) { height: 18px; animation-delay: 0.3s; }
.wave-bar:nth-child(4) { height: 8px; animation-delay: 0.15s; }
.wave-bar:nth-child(5) { height: 16px; animation-delay: 0.4s; }
.wave-bar:nth-child(6) { height: 10px; animation-delay: 0.2s; }
.wave-bar:nth-child(7) { height: 19px; animation-delay: 0.5s; }
.wave-bar:nth-child(8) { height: 12px; animation-delay: 0.25s; }

/* Encuesta en la ilustración */
.mockup-poll {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  margin-top: 0.3rem;
  width: 100%;
}

.poll-question {
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.poll-option-row {
  position: relative;
  background: var(--bg-secondary);
  border-radius: 4px;
  padding: 0.3rem 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  display: flex;
  justify-content: space-between;
  overflow: hidden;
}

.poll-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(0, 152, 240, 0.2);
  border-radius: 4px;
  z-index: 0;
  transition: width 0.4s ease;
}

.poll-text {
  position: relative;
  z-index: 1;
}

/* Barra inferior de entrada */
.mockup-chat-input-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-light);
}

.chat-input-field {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.85rem;
  font-size: 0.78rem;
  color: var(--text-primary);
  outline: none;
}

.chat-send-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------------------------------------------------
   Sección de Características (Features)
   --------------------------------------------------------- */
.section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-teal);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.feature-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-mixed);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

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

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(0, 104, 216, 0.1);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon-wrapper.teal {
  background: rgba(0, 168, 168, 0.1);
  color: var(--brand-teal);
}

.feature-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.feature-card-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex: 1;
}

.feature-card-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* ---------------------------------------------------------
   Tarjetas de arquitectura (reutilizan el estilo de tarjeta con ícono)
   --------------------------------------------------------- */
.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.security-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 1.25rem;
}

.security-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(0, 152, 240, 0.1);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.security-card-body h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.security-card-body p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ---------------------------------------------------------
   Acordeón de Preguntas Frecuentes (FAQ con <details>)
   --------------------------------------------------------- */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 840px;
  margin-inline: auto;
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
  overflow: hidden;
}

.faq-item[open] {
  border-color: var(--border-glow);
}

.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  color: var(--text-primary);
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-icon-arrow {
  transition: transform var(--transition-normal);
  color: var(--brand-blue);
  flex-shrink: 0;
}

.faq-item[open] .faq-icon-arrow {
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------------------------------------------------------
   Banner Final Call to Action
   --------------------------------------------------------- */
.cta-banner-card {
  background: var(--gradient-primary);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 4.5rem 3rem;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 104, 216, 0.4);
  position: relative;
  overflow: hidden;
}

.cta-banner-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--chat-pattern);
  opacity: 0.08;
  pointer-events: none;
}

.cta-banner-title {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

.cta-banner-subtitle {
  font-size: 1.2rem;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  opacity: 0.95;
}

.cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.btn-white {
  background: #ffffff;
  color: var(--brand-ink);
  font-weight: 700;
}

.btn-white:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-ghost-white {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost-white:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: #ffffff;
  transform: translateY(-2px);
}

/* ---------------------------------------------------------
   Pie de Página (Footer)
   --------------------------------------------------------- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding-top: 4.5rem;
  padding-bottom: 2.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  margin-top: 1rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-heading {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a:hover {
  color: var(--brand-blue);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

/* ---------------------------------------------------------
   Cabecera: selector de idioma y botón de GitHub
   --------------------------------------------------------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  min-width: 42px;
  padding: 0 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.lang-switch:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  background: var(--bg-tertiary);
}

/* ---------------------------------------------------------
   Enlaces dentro del texto
   --------------------------------------------------------- */
.inline-link,
.card-link {
  color: var(--brand-blue);
}

[data-theme="dark"] .inline-link,
[data-theme="dark"] .card-link {
  color: var(--brand-blue-light);
}

.inline-link {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.card-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.card-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.security-card-body code,
.install-notes code,
.faq-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--bg-tertiary);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* ---------------------------------------------------------
   Detalles de la ilustración del hero
   --------------------------------------------------------- */
.mockup-caption {
  position: relative;
  z-index: 1;
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.chat-header-meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.message-author {
  display: block;
  font-size: 0.75rem;
  color: var(--brand-teal);
  margin-bottom: 2px;
}

.message-wide {
  width: 100%;
  max-width: 90%;
}

.voice-duration {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.poll-count {
  font-weight: 700;
}

.mockup-chat-input-bar .chat-input-field {
  color: var(--text-tertiary);
}

/* ---------------------------------------------------------
   Franja de tecnologías
   --------------------------------------------------------- */
.stack-strip {
  padding-block: 2rem;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}

.stack-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.stack-item {
  padding: 0.4rem 0.95rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---------------------------------------------------------
   Diagrama de arquitectura (HTML, no imagen: se adapta al tema
   y al ancho, y el texto sigue siendo legible en el móvil)
   --------------------------------------------------------- */
.arch-diagram {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(90px, 0.75fr) minmax(0, 1fr) minmax(70px, 0.5fr) minmax(0, 1fr);
  grid-template-areas:
    "client l1 server l2 db"
    "v1     .  v2     .  ."
    "peer   .  storage . .";
  align-items: center;
  margin-bottom: 3rem;
}

.arch-client  { grid-area: client; }
.arch-server  { grid-area: server; }
.arch-db      { grid-area: db; }
.arch-peer    { grid-area: peer; }
.arch-storage { grid-area: storage; }
.arch-l1      { grid-area: l1; }
.arch-l2      { grid-area: l2; }
.arch-v1      { grid-area: v1; }
.arch-v2      { grid-area: v2; }

.arch-node {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.arch-server {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.arch-node strong {
  font-size: 1rem;
  color: var(--text-primary);
}

.arch-node span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.arch-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.25rem;
}

.arch-link::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: var(--gradient-mixed);
  opacity: 0.6;
}

.arch-link-v {
  min-height: 3.5rem;
}

.arch-link-v::before {
  left: 50%;
  right: auto;
  top: 0;
  bottom: 0;
  width: 2px;
  height: auto;
  transform: translateX(-50%);
}

.arch-link span {
  position: relative;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: var(--text-secondary);
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
}

/* ---------------------------------------------------------
   Instalación
   --------------------------------------------------------- */
.install-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.install-grid > * {
  min-width: 0;
}

/* El bloque de terminal es oscuro en los dos temas */
.code-block {
  background: #0a1420;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
}

.code-block pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #e2e8f0;
}

.code-comment {
  color: #7c8ba1;
}

.install-notes {
  color: var(--text-secondary);
}

.install-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.25rem 0 1.75rem;
}

.install-list li {
  position: relative;
  padding-left: 1.1rem;
}

.install-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--brand-teal);
}

.install-list strong {
  color: var(--text-primary);
}

/* ---------------------------------------------------------
   Estado del proyecto
   --------------------------------------------------------- */
.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.status-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-top: 3px solid var(--brand-blue);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.status-done   { border-top-color: #10b981; }
.status-limits { border-top-color: #f59e0b; }
.status-next   { border-top-color: var(--brand-blue); }

.status-card h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.status-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.status-list li {
  position: relative;
  padding-left: 1.6rem;
}

.status-list li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}

/* Los símbolos son decorativos: el título de cada tarjeta ya dice qué lista es */
.status-done li::before   { content: "✓"; content: "✓" / ""; color: #10b981; }
.status-limits li::before { content: "!"; content: "!" / ""; color: #f59e0b; }
.status-next li::before   { content: "→"; content: "→" / ""; color: var(--brand-blue); }
[data-theme="dark"] .status-next li::before { color: var(--brand-blue-light); }

.status-note {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-tertiary);
}

/* ---------------------------------------------------------
   Media Queries & Responsividad
   --------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-mockup-wrapper {
    max-width: 600px;
    margin-inline: auto;
    width: 100%;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .security-grid {
    grid-template-columns: 1fr;
  }

  .install-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  /* En el móvil el diagrama pasa a un árbol vertical */
  .arch-diagram {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "peer    peer"
      "v1      v1"
      "client  client"
      "l1      l1"
      "server  server"
      "l2      v2"
      "db      storage";
    column-gap: 0.75rem;
  }

  .arch-l1,
  .arch-l2 {
    min-height: 3.5rem;
  }

  .arch-l1::before,
  .arch-l2::before {
    left: 50%;
    right: auto;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
    transform: translateX(-50%);
  }

  .mockup-body {
    grid-template-columns: 1fr;
  }

  .mockup-sidebar {
    display: none; /* En pantallas pequeñas se enfoca en el chat */
  }

  .nav-menu {
    position: fixed;
    top: 4.5rem;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-medium);
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    box-shadow: var(--shadow-lg);
    display: none;
  }

  .nav-menu.open {
    display: flex;
  }

  .mobile-toggle-btn {
    display: flex;
  }

  .hero-features-list {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner-card {
    padding: 3rem 1.5rem;
  }

  .cta-banner-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 1rem;
  }

  .nav-actions {
    gap: 0.5rem;
  }

  /* Solo el ícono de GitHub en la cabecera; el texto sigue en el hero */
  .nav-github span {
    display: none;
  }

  .nav-github {
    padding: 0.5rem 0.7rem;
  }

  .security-card {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
