/* ==========================================================================
   ASOCAMCOESRE - Design System & Modern CSS
   Optimizado para Cloudflare Pages | Alto rendimiento y estética premium
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables & Temas (Light / Dark)
   -------------------------------------------------------------------------- */
:root {
  /* Paleta Base: Tierra, Bosque y Sol */
  --hue-primary: 152;   /* Verde Esmeralda Campesino */
  --hue-accent: 38;     /* Ámbar / Maíz Solar */

  /* Colores Modo Claro */
  --bg-body: #f8faf9;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.75);
  --border-subtle: rgba(15, 60, 35, 0.08);
  --border-focus: #16a34a;

  --text-main: #13241b;
  --text-muted: #4b6354;
  --text-subtle: #6b8274;

  --primary-50: #f0fdf4;
  --primary-100: #dcfce7;
  --primary-500: #16a34a;
  --primary-600: #15803d;
  --primary-700: #166534;
  --primary-gradient: linear-gradient(135deg, #15803d 0%, #16a34a 50%, #059669 100%);

  --accent-400: #fbbf24;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

  /* Sombras Naturales Multicapa */
  --shadow-sm: 0 2px 4px rgba(19, 36, 27, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(19, 36, 27, 0.08), 0 2px 6px -1px rgba(19, 36, 27, 0.04);
  --shadow-lg: 0 20px 40px -8px rgba(19, 36, 27, 0.12), 0 4px 12px -2px rgba(19, 36, 27, 0.06);
  --shadow-glass: 0 10px 30px 0 rgba(19, 36, 27, 0.07);

  /* Espaciado & Radio */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transición */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-body: #0b1410;
  --bg-surface: #121e18;
  --bg-surface-elevated: #182820;
  --bg-card: rgba(18, 30, 24, 0.85);
  --bg-glass: rgba(18, 30, 24, 0.8);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #22c55e;

  --text-main: #edf5f0;
  --text-muted: #94ad9d;
  --text-subtle: #6c8576;

  --primary-50: #062414;
  --primary-100: #0d3822;
  --primary-500: #22c55e;
  --primary-600: #16a34a;
  --primary-700: #15803d;
  --primary-gradient: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #10b981 100%);

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 40px -8px rgba(0, 0, 0, 0.5);
  --shadow-glass: 0 10px 30px 0 rgba(0, 0, 0, 0.45);
}

/* --------------------------------------------------------------------------
   2. Reset & Tipografía Fluida
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

img, svg {
  display: block;
  max-width: 100%;
}

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

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

/* --------------------------------------------------------------------------
   3. Utilidades & Layout
   -------------------------------------------------------------------------- */
.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.badge-glow {
  background: var(--primary-50);
  color: var(--primary-600);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 0 15px rgba(22, 163, 74, 0.12);
}

[data-theme="dark"] .badge-glow {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.2);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-600);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Botones con Micro-Interacciones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  user-select: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.38);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--primary-500);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--primary-50);
  color: var(--primary-600);
  border-color: var(--primary-500);
}

/* --------------------------------------------------------------------------
   4. Header & Navegación Glassmorphism
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 10px rgba(22, 163, 74, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-weight: 800;
  color: var(--text-main);
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  position: relative;
  padding-block: 0.25rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-600);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
  color: #4ade80;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-500);
  transition: width var(--transition-fast);
}

.nav-link:hover::after {
  width: 100%;
}

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

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-main);
}

/* --------------------------------------------------------------------------
   5. Hero Section con Mesh Gradient
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

/* Fondo dinámico sutil */
.hero-bg-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(320px, 80vw, 850px);
  height: clamp(320px, 60vw, 600px);
  background: radial-gradient(circle, rgba(22, 163, 74, 0.12) 0%, rgba(245, 158, 11, 0.08) 50%, transparent 70%);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.4rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

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

.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 54ch;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* Tarjeta interactiva en el Hero */
.hero-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glass);
}

.card-header-tag {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.pulse-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-600);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-500);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.hero-card-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-main);
}

.hero-card-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.card-stat-item .num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-600);
  display: block;
}

[data-theme="dark"] .card-stat-item .num {
  color: #4ade80;
}

.card-stat-item .label {
  font-size: 0.78rem;
  color: var(--text-subtle);
}

/* --------------------------------------------------------------------------
   6. Métricas Counters Bar (Animadas con IntersectionObserver)
   -------------------------------------------------------------------------- */
.metrics-section {
  padding-block: 2.5rem;
  background: var(--bg-surface);
  border-block: 1px solid var(--border-subtle);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metric-number {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.metric-number span.accent {
  color: var(--primary-500);
}

.metric-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   7. Pilares & Enfoque (Cards)
   -------------------------------------------------------------------------- */
.section {
  padding-block: clamp(4rem, 7vw, 6rem);
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin-inline: auto;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header .badge {
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
  color: var(--text-main);
}

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

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.pillar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.pillar-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-500);
  box-shadow: var(--shadow-md);
}

.pillar-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-50);
  color: var(--primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: background var(--transition-fast), color var(--transition-fast);
}

[data-theme="dark"] .pillar-icon {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.pillar-card:hover .pillar-icon {
  background: var(--primary-gradient);
  color: #ffffff;
}

.pillar-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-main);
}

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

/* --------------------------------------------------------------------------
   8. Simulador de Proyección / Impacto Reactivo
   -------------------------------------------------------------------------- */
.simulator-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  max-width: 960px;
  margin-inline: auto;
}

.sim-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.slider-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1rem;
}

.slider-value-display {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-600);
}

[data-theme="dark"] .slider-value-display {
  color: #4ade80;
}

/* Estilización personalizada del Input Range */
input[type="range"].sim-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--border-subtle);
  outline: none;
  transition: background var(--transition-fast);
}

input[type="range"].sim-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-600);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.4);
  border: 2px solid #ffffff;
  transition: transform var(--transition-fast);
}

input[type="range"].sim-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.preset-btn {
  padding: 0.45rem 0.95rem;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-btn.active, .preset-btn:hover {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}

/* Resultados reactivos del simulador */
.sim-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.sim-result-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  text-align: center;
  transition: transform var(--transition-fast);
}

.sim-result-card:hover {
  transform: translateY(-2px);
}

.sim-result-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.sim-result-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  display: block;
}

.sim-result-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   9. Proyectos / Iniciativas con Filtros Reactivos
   -------------------------------------------------------------------------- */
.filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn.active {
  background: var(--text-main);
  color: var(--bg-surface);
  border-color: var(--text-main);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity 0.3s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.project-card.hidden {
  display: none;
}

.project-img-box {
  width: 100%;
  height: 190px;
  position: relative;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  overflow: hidden;
}

.project-img-box svg {
  width: 56px;
  height: 56px;
  opacity: 0.7;
}

.project-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.project-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 0.75rem;
}

.project-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-600);
}

[data-theme="dark"] .project-category {
  color: #4ade80;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.project-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --------------------------------------------------------------------------
   10. Formulario de Contacto & Participación Seguro (Modo Demo)
   -------------------------------------------------------------------------- */
.contact-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.contact-card {
  max-width: 680px;
  margin-inline: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3rem);
  box-shadow: var(--shadow-md);
  position: relative;
}

.safety-banner {
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.safety-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: left;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-body);
  color: var(--text-main);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* --------------------------------------------------------------------------
   11. Drawer / Modal Demostrativo de Calidad Web & Cloudflare Pages
   -------------------------------------------------------------------------- */
.tech-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.tech-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.tech-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  padding: 2.2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tech-modal-overlay.active .tech-modal {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-block: 1.5rem;
}

.tech-card {
  background: var(--bg-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
}

.tech-card-score {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-600);
  line-height: 1;
  margin-bottom: 0.35rem;
}

[data-theme="dark"] .tech-card-score {
  color: #4ade80;
}

.tech-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.tech-card-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   12. Toast Notification
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--primary-500);
  border-radius: var(--radius-md);
  padding: 1rem 1.4rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  pointer-events: auto;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   13. Footer & Legal
   -------------------------------------------------------------------------- */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-block: 3.5rem 2rem;
}

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

.footer-copy {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
  max-width: 42ch;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
}

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

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary-600);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.badge-cf {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   14. Responsividad & Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-copy {
    align-items: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-links.mobile-active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
  }
  .mobile-toggle {
    display: block;
  }
  .tech-grid {
    grid-template-columns: 1fr;
  }
}

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