/* =========================================
   1. VARIABLES & CONFIGURACIÓN PREMIUM
   ========================================= */
:root {
  --bg-deep: #030305;
  --bg-surface: #0a0a0c;

  --primary: #2563eb;
  --primary-glow: rgba(37, 99, 235, 0.5);
  --accent: #06b6d4;
  --accent-glow: rgba(6, 182, 212, 0.5);

  --text-main: #ffffff;
  --text-muted: #94a3b8;

  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(16px);

  --max-width: 1200px;
  --nav-height: 80px;
  --radius-lg: 24px;
  --radius-md: 16px;

  --font-main: "Outfit", sans-serif;
  --font-tech: "Space Grotesk", sans-serif;
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s ease; }
ul { list-style: none; }

/* =========================================
   2. AMBIENT LIGHTING
   ========================================= */
.ambient-light {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.4;
  animation: pulseLight 10s infinite alternate;
}

.light-1 {
  top: -10%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: var(--primary);
}

.light-2 {
  bottom: 10%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: var(--accent);
  animation-delay: 2s;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* =========================================
   3. UTILIDADES
   ========================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding { padding: 100px 0; }

.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.text-gradient {
  background: linear-gradient(135deg, #60a5fa, #2dd4bf);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-accent { color: var(--accent); }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #fff;
}

.btn-glow:hover {
  box-shadow: 0 0 20px var(--primary-glow), 0 0 40px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}
.btn-ghost:hover {
  border-color: var(--text-main);
  color: var(--text-main);
  background: rgba(255,255,255,0.05);
}

.btn-sm { padding: 8px 20px; font-size: 0.9rem; }

/* =========================================
   4. NAVBAR
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
}

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

.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-tech); }
.logo-symbol {
  font-weight: 700;
  font-size: 1.2rem;
  background: var(--text-main);
  color: var(--bg-deep);
  padding: 4px 8px;
  border-radius: 6px;
}
.logo-text { font-weight: 500; letter-spacing: 1px; }

.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text-main); }

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Focus visible */
.nav-links a:focus-visible,
.menu-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25);
  border-radius: 12px;
}

/* =========================================
   5. HERO
   ========================================= */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  width: 100%;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.3);
  color: #60a5fa;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 10px #60a5fa;
  animation: pulse 2s infinite;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 16px; margin-bottom: 40px; }

/* Mini-trust */
.mini-trust {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-wrap: wrap;
  row-gap: 8px;
}
.tech-icons { display: flex; gap: 12px; font-size: 1.2rem; opacity: 0.7; }
.mini-trust-note {
  width: 100%;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 560px;
  opacity: 0.9;
}

/* Micro guarantee */
.micro-guarantee {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
}
.micro-guarantee strong { color: var(--text-main); }
.micro-guarantee i { color: var(--accent); margin-right: 6px; }

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.glass-card {
  position: absolute;
  background: rgba(20, 20, 25, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 20px;
  border-radius: 16px;
  width: 200px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 15px;
}

.card-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.card-info h4 { font-size: 0.9rem; margin-bottom: 4px; }
.card-info span { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-tech); }

.progress-bar { width: 80px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; }
.progress-bar .fill { width: 70%; height: 100%; background: var(--accent); border-radius: 2px; }

.card-1 { top: 20%; right: 10%; animation: float 6s ease-in-out infinite; }
.card-2 { bottom: 20%; left: 10%; animation: float 7s ease-in-out infinite 1s; }

/* =========================================
   6. SOLUCIONES
   ========================================= */
.section-header { text-align: center; max-width: 600px; margin: 0 auto 60px; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 16px; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; }

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.solution-card {
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.solution-card:hover {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.solution-card .icon-box {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-main);
  margin-bottom: 24px;
  transition: 0.3s;
}

.solution-card:hover .icon-box {
  background: var(--primary);
  color: #fff;
  transform: rotate(5deg);
}

.solution-card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.solution-card p { color: var(--text-muted); margin-bottom: 24px; font-size: 0.95rem; }

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.feature-list i { color: var(--accent); font-size: 0.8rem; }

/* Reveal (si lo usas con JS) */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms ease, transform 600ms ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }

.featured-card {
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.15);
}
.absolute-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--primary);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
}

/* =========================================
   7. PROYECTOS
   ========================================= */
.bg-dimmed { background: rgba(0,0,0,0.2); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.project-item { margin-bottom: 20px; }

.browser-frame {
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  transition: transform 0.4s ease;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  position: relative;
  isolation: isolate;
}
.project-item:hover .browser-frame { transform: translateY(-5px) scale(1.02); }

.browser-header {
  background: #2a2a2a;
  padding: 10px 16px;
  display: flex;
  align-items: center;
}
.dots {
  width: 10px;
  height: 10px;
  background: #ff5f56;
  border-radius: 50%;
  box-shadow: 16px 0 #ffbd2e, 32px 0 #27c93f;
}

.browser-content {
  position: relative;
  overflow: hidden;
}

/* Imagen dentro del marco */
.browser-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* o 'contain' si no quieres recorte */
  display: block;
}

.placeholder-gradient {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-gradient-2 {
  background: linear-gradient(135deg, #312e81, #1e1b4b);
}

.project-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.browser-frame:hover .project-overlay {
  opacity: 1;
  pointer-events: auto;
}

.project-item:hover .project-overlay { opacity: 1; }

.btn-icon {
  width: 50px;
  height: 50px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-size: 1.2rem;
  transform: scale(0.8);
  transition: 0.3s;
}
.btn-icon:hover { transform: scale(1); }

.project-details { margin-top: 20px; }
.project-details h3 { font-size: 1.2rem; margin-bottom: 5px; }
.project-details p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 10px; }

.tags span {
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 6px;
  font-family: var(--font-tech);
}

/* Details técnicos */
.tech-details { margin-top: 10px; }
.tech-details summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tech-details summary:hover { color: var(--text-main); }
.tech-details summary::-webkit-details-marker { display: none; }
.tech-details summary::before {
  content: "▸";
  color: var(--accent);
  display: inline-block;
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}
.tech-details[open] summary::before { transform: rotate(90deg) translateY(-1px); }
.tech-details > div.tags { margin-top: 8px; }

/* CTA Showcase */
.showcase-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, rgba(37,99,235,0.1), rgba(6,182,212,0.1));
  border: 1px solid rgba(37, 99, 235, 0.3);
}
.showcase-cta h3 { margin-bottom: 5px; }
.showcase-cta p { color: var(--text-muted); margin: 0; }

/* =========================================
   8. CONTACTO
   ========================================= */
.contact-wrapper { max-width: 800px; margin: 0 auto; }

.contact-card {
  text-align: center;
  padding: 60px 20px;
  border-radius: var(--radius-lg);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.icon-circle {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
  transition: 0.3s;
}
.contact-item:hover .icon-circle {
  background: var(--accent);
  color: #fff;
  transform: scale(1.1);
}

.social-row { display: flex; justify-content: center; gap: 20px; }
.social-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.social-btn:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

/* Formulario de contacto */
.contact-form {
  margin-top: 22px;
  display: grid;
  gap: 14px;
  text-align: left;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--text-main);
  outline: none;
  transition: 0.25s ease;
  font-family: var(--font-main);
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(148, 163, 184, 0.75);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12), 0 0 20px rgba(6, 182, 212, 0.08);
  background: rgba(255,255,255,0.04);
}

.contact-form .btn {
  width: 100%;
  padding: 14px 20px;
}

.form-note {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}
.form-note strong { color: var(--text-main); }

/* Contacto Express
   Nota: en tu HTML trae class="glass" también. Aquí solo ajustamos layout/hover,
   para evitar "doble vidrio" (backdrop twice). */
.contact-express {
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin-top: 22px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.contact-express:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.express-title {
  margin: 0;
  font-weight: 700;
  color: #fff;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.express-sub {
  margin: 8px 0 20px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: #e4e4e7;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-whatsapp i {
  font-size: 1.1em;
  color: #25D366;
  transition: transform 0.3s ease, color 0.3s ease;
}

.btn-whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
  border-color: #25D366;
  color: #fff;
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.15);
  transform: translateY(-2px);
}

.btn-whatsapp:hover i {
  transform: translateX(3px);
  color: #fff;
}

.express-footnote {
  margin: 18px 0 0 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
}
.express-footnote strong { color: var(--text-muted); font-weight: 500; }

/* =========================================
   9. FOOTER
   ========================================= */
footer {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--glass-border);
}

/* =========================================
   10. ACCESIBILIDAD (add-ons)
   ========================================= */
.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text-main);
  z-index: 2000;
  transition: 0.25s ease;
}
.skip-link:focus {
  top: 16px;
  outline: none;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================
   11. FAQ
   ========================================= */
.faq-block details {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 14px 0;
}
.faq-block details:first-of-type { border-top: none; }

.faq-block summary {
  cursor: pointer;
  color: var(--text-main);
  font-weight: 600;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.faq-block summary::-webkit-details-marker { display: none; }
.faq-block summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-tech);
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.9;
}
.faq-block details[open] summary::after { content: "—"; opacity: 1; }

.faq-block p {
  color: var(--text-muted);
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* =========================================
   12. ANIMACIONES
   ========================================= */
@keyframes pulseLight {
  0% { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.5; transform: scale(1.1); }
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(96, 165, 250, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(96, 165, 250, 0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* =========================================
   13. RESPONSIVE
   ========================================= */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }

  /* Mobile nav dropdown (si tu JS agrega .is-open) */
  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 16px;
    right: 16px;
    padding: 14px;
    border-radius: 18px;
    flex-direction: column;
    gap: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    z-index: 1200;
  }

  .nav-links a {
    padding: 12px 12px;
    border-radius: 12px;
    color: var(--text-main);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
  }

  .nav-links a:active { transform: scale(0.99); }

  .nav-links.is-open { display: flex; animation: navDrop 180ms ease-out; }

  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
    z-index: 1100;
  }
  .nav-overlay.is-open { opacity: 1; pointer-events: auto; }

  @keyframes navDrop {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .hero-container { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-visual { display: none; }

  .showcase-cta { flex-direction: column; gap: 20px; text-align: center; }

  .contact-links { flex-direction: column; gap: 20px; }

  .contact-form .form-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .card-1, .card-2 { animation: none; }
  .reveal { transition: none; transform: none; opacity: 1; }
}

@media (max-width: 640px){
  .projects-grid { grid-template-columns: 1fr; gap: 24px; }
  .browser-content { height: 200px; }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .projects-grid { grid-template-columns: 1fr; gap: 28px; }
  .browser-content { height: 280px; }
  .section-padding { padding: 85px 0; }
  .container { padding: 0 32px; }
}
