/* =========================================================
   G5 Stylesheet
   Organización por secciones + pequeños fixes de accesibilidad
   ========================================================= */

/* 1) RESET & VARIABLES ----------------------------------- */
:root {
  /* Marca / colores */
  --color-primary: #1F6FEB;
  --color-accent: #00C2FF;
  --color-dark: #0A0A0A;
  --color-light: #F5F7FA;
  --color-white: #FFFFFF;
  --color-gray: #6c757d;
  --color-success: #28a745;
  --color-error: #dc3545;

  /* Paleta extendida (skin G4/G5) */
  --brand: #4F46E5;
  --brand2: #06B6D4;
  --success: #10B981;
  --neutral-900: #0F172A;
  --neutral-700: #334155;
  --neutral-400: #94A3B8;
  --neutral-100: #F1F5F9;

  /* Tipografía / layout */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container-width: 1140px;
  --border-radius: 8px;
  --transition-speed: 0.3s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--color-dark);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* === Skip Link (Accesibilidad) === */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 8px 16px;
  z-index: 1000;
  text-decoration: none;
  border-radius: 4px;
  transition: top 0.3s ease, background 0.3s ease;
}
.skip-link:focus {
  top: 10px; /* aparece visible al tabular */
}

/* Versión Dark Mode */
.dark .skip-link {
  background: var(--brand2);   /* turquesa de tu paleta */
  color: var(--neutral-900);   /* texto oscuro para contraste */
}
.dark .skip-link:focus {
  background: var(--brand);    /* violeta más fuerte al foco */
  color: var(--neutral-100);
}

/* 2) UTILIDADES & ACCESIBILIDAD --------------------------- */
.container { max-width: var(--container-width); margin-inline: auto; padding: 0 1rem; }
.section { padding: 4rem 0; }
.section--light, .section--alt { background-color: var(--color-light); }

.section__title { font-size: 2.5rem; font-weight: 700; text-align: center; margin-bottom: 3rem; }
.subtitle { font-size: 1.25rem; color: var(--color-gray); max-width: 600px; margin: 0 auto 2rem; }
.section__title + .subtitle { margin-top: -2.5rem; }
.dark .section--light,
.dark .section--alt {
  background: #0b1220; /* ~ slate-950 */
}

/* Tarjetas */
.dark .service-card {
  background: #111827;            /* slate-900 */
  border-color: #1f2937;          /* slate-800 */
  color: #e5e7eb;                 /* texto base */
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.dark .service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(0,0,0,.45);
}

/* Títulos y copys dentro de la tarjeta */
.dark .service-card h3 {
  color: #f3f4f6;                 /* un poco más claro para título */
}
.dark .service-card p {
  color: #cbd5e1;                 /* slate-300 para copy */
}

/* Ajuste de la grilla (por si algún reset tocó opacidad/contraste) */
.dark .services__grid {
  filter: none;
  opacity: 1;
}

/* Badges sobre fondo oscuro */
.dark .badge {
  background: rgba(255,255,255,.06);
  color: #cbd5e1;
  border: 1px solid rgba(255,255,255,.08);
}

/* Título/subtítulo de la sección Servicios */
.dark .section__title {
  color: #f8fafc;
}
.dark .subtitle {
  color: #94a3b8;
}
.button {
  display: inline-block; padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius); text-decoration: none; font-weight: 600;
  transition: all var(--transition-speed) ease; border: 2px solid transparent; cursor: pointer;
}
.button--primary { background-color: var(--color-primary); color: var(--color-white); }
.button--primary:hover, .button--primary:focus-visible {
  background-color: #1a5bb8; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(31,111,235,.3);
}
.button--secondary { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.button--secondary:hover, .button--secondary:focus-visible { background: var(--color-primary); color: var(--color-white); }
.button--small { padding: .5rem 1rem; font-size: .9rem; }

/* Visually-hidden para accesibilidad (usada en footer .sr) */
.sr {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Focus visible global */
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

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

/* 3) HEADER & NAVEGACIÓN --------------------------------- */
.header { position: sticky; top: 0; z-index: 1000; background: #fff; border-bottom: 1px solid #e9ecef; }
.nav { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.nav__logo img { display: block; height: 30px; }

.nav__menu { list-style: none; display: none; gap: .25rem; } /* móvil: oculto */
.nav__menu a {
  text-decoration: none; color: var(--color-dark); font-weight: 600;
  padding: .5rem 1rem; border-radius: 8px;
  transition: background var(--transition-speed), color var(--transition-speed);
}
.nav__menu a:hover, .nav__menu a:focus-visible { color: var(--color-primary); background: #f5f7fa; }

.nav__lang-switcher { display: flex; gap: .5rem; }
.nav__lang-switcher button {
  background: none; border: 1px solid var(--color-gray); color: var(--color-gray);
  cursor: pointer; padding: .25rem .5rem; border-radius: 4px; font-weight: 600; transition: all var(--transition-speed);
}
.nav__lang-switcher button.active,
.nav__lang-switcher button[aria-pressed="true"] {
  background: var(--color-primary); color: var(--color-white); border-color: var(--color-primary);
}

.nav__mobile-toggle {
  display: inline-flex; gap: 4px; flex-direction: column; justify-content: center;
  width: 44px; height: 38px; background: #fff; border: 1px solid #e9ecef; border-radius: 8px;
}
.nav__mobile-toggle span { display: block; height: 2px; background: #111; width: 22px; margin: 0 auto; border-radius: 2px; }

/* 4) HERO -------------------------------------------------- */
.hero { padding-top: 2rem; padding-bottom: 4rem; }
.hero__content {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 2rem;
  min-height: calc(100vh - 80px);
}
.hero__text { display: flex; flex-direction: column; gap: 1.5rem; }
.hero h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: .25rem; }
.hero .subtitle { font-size: 1.25rem; margin-bottom: 1rem; }
.hero__bullets { list-style: '✓ '; padding-left: 1.5rem; margin-bottom: 1rem; }
.hero__bullets li { margin-bottom: .5rem; }
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero full width + fondo sólido (sin recortes) */
/* === HERO BASE === */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, #f9fafb, #eef2f7); /* LIGHT por defecto */
}

/* base para símbolos */
.hero::before,
.hero::after,
.hero .decor1,
.hero .decor2,
.hero .decor3 {
  content: '';
  position: absolute;
  font-weight: 800;
  font-size: 100px;
  pointer-events: none;
  user-select: none;
  animation: floaty 18s ease-in-out infinite;
  color: rgba(0, 0, 0, 0.05); /* LIGHT: gris muy suave */
}

/* cada símbolo */
.hero::before {
  content: "{}";
  top: 8%;
  left: 5%;
  transform: rotate(-10deg);
  animation-delay: 0s;
}
.hero::after {
  content: "<>";
  top: 20%;
  right: 8%;
  font-size: 120px;
  transform: rotate(5deg);
  animation-delay: 3s;
}
.hero .decor1 {
  content: "[]";
  bottom: 12%;
  left: 12%;
  font-size: 90px;
  transform: rotate(-5deg);
  animation-delay: 6s;
}
.hero .decor2 {
  content: "::";
  bottom: 18%;
  right: 18%;
  font-size: 140px;
  transform: rotate(15deg);
  animation-delay: 9s;
}
.hero .decor3 {
  content: ";";
  top: 40%;
  left: 40%;
  font-size: 80px;
  transform: rotate(-20deg);
  animation-delay: 12s;
}

/* Animación flotante */
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-15px) rotate(calc(var(--r, 0deg) + 5deg)); }
}

/* === DARK MODE === */
.dark .hero {
  background: linear-gradient(180deg, #0f172a, #1e293b); /* fondo oscuro elegante */
}

.dark .hero::before,
.dark .hero::after,
.dark .hero .decor1,
.dark .hero .decor2,
.dark .hero .decor3 {
  color: rgba(255, 255, 255, 0.05); /* símbolos claros y suaves */
}

/* Animación suave de flotación */
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(var(--r,0deg)); }
  50% { transform: translateY(-15px) rotate(calc(var(--r,0deg) + 5deg)); }
}





/* 5) TRUST BADGES ----------------------------------------- */
.trust-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; padding-bottom: 4rem; }
.badge { background: var(--color-light); color: var(--color-gray); padding: .5rem 1rem; border-radius: 20px; font-size: .9rem; font-weight: 500; }

/* 6) SERVICES --------------------------------------------- */
.services__grid { 
  display: grid; 
  gap: 1.5rem; 
  grid-template-columns: 1fr; 
}

.service-card {
  position: relative;
  overflow: hidden;
  background: var(--color-white); 
  border: 1px solid #e9ecef; 
  border-radius: var(--border-radius);
  padding: 2rem; 
  text-align: center; 
  transition: all var(--transition-speed) ease;
  box-shadow: 0 8px 20px rgba(0,0,0,.07);
}

/* Línea de luz azul que recorre el borde superior */
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #3b82f6, transparent);
  transition: left 0.9s cubic-bezier(0.3, 1, 0.7, 1);
}

.service-card:hover::before {
  left: 100%;
}

/* Hover general */
.service-card:hover {
  transform: translateY(-5px);
  border-color: #3b82f6;
  box-shadow: 0 8px 25px rgba(59,130,246,.35);
}

.service-card h3 { 
  font-size: 1.25rem; 
  margin-bottom: .5rem; 
}

.services__note { 
  text-align: center; 
  margin-top: 2rem; 
  color: var(--color-gray); 
}


/* 7) TECHNOLOGIES ----------------------------------------- */
.tech__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.tech__item {
  display: flex; align-items: center; gap: .5rem; background: var(--color-white);
  padding: .5rem 1rem; border-radius: var(--border-radius); border: 1px solid #e0e0e0; font-weight: 500;
}
.tech__item img { height: 24px; width: 24px; }
.tech__note { text-align: center; margin-top: 2rem; color: var(--color-gray); }
/* === Dark mode === */
.dark .tech__item {
  background: #111827;              /* fondo oscuro */
  border-color: #1f2937;            /* borde más oscuro */
  color: #f1f5f9;                   /* texto claro */
}

.dark .tech__item img {
  filter: brightness(0) invert(1);  /* invierte logos oscuros para que se vean en fondo oscuro */
}

.dark .tech__note {
  color: #94a3b8;                   /* gris claro para nota */
}
/* 8) PORTFOLIO -------------------------------------------- */
.portfolio__filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 2rem;
}
.filter-btn, .copy-link-btn {
  background: transparent; border: 1px solid #ccc; padding: .5rem 1rem;
  border-radius: 20px; cursor: pointer; transition: all var(--transition-speed);
}
.filter-btn.active, .filter-btn:hover { background: var(--color-primary); color: var(--color-white); border-color: var(--color-primary); }
.copy-link-btn { border-color: var(--color-accent); color: var(--color-accent); }
.copy-link-btn:hover { background: var(--color-accent); color: var(--color-white); }

.portfolio__grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.portfolio-card {
  background: var(--color-white); border-radius: var(--border-radius); overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,.05); border: 1px solid #e9ecef;
  display: none; /* JS la muestra/oculta por inline style o clase opcional */
}
.portfolio-card.show { display: block; }
.portfolio-card__image { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.portfolio-card__content { padding: 1.5rem; }
.portfolio-card h3 { font-size: 1.25rem; }
.portfolio-card__sector { font-size: .9rem; color: var(--color-gray); margin-bottom: 1rem; display: block; }
.portfolio-card__results { list-style: '✓ '; padding-left: 1.2rem; margin-bottom: 1rem; }
.portfolio-card__stack { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; font-size: .8rem; }
.portfolio-card__stack span { background: var(--color-light); padding: .25rem .5rem; border-radius: 4px; }
.portfolio-card .button { font-size: .9rem; }

/* === Dark mode === */
/* Fondo de sección (si usas .section--light en otros casos) */
.dark #work.section { background: #0b1220; }

/* Tarjetas */
.dark .portfolio-card {
  background: #111827;             /* slate-900 */
  border-color: #1f2937;           /* slate-800 */
  color: #e5e7eb;                  /* texto base */
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}
.dark .portfolio-card__image {
  filter: none;                     /* no invertimos imágenes */
}
.dark .portfolio-card h3 { color: #f3f4f6; }       /* título */
.dark .portfolio-card__sector { color: #94a3b8; }  /* sector */
.dark .portfolio-card__results { color: #cbd5e1; } /* bullets */
.dark .portfolio-card__stack span {
  background: rgba(255,255,255,.06);
  color: #cbd5e1;
  border: 1px solid rgba(255,255,255,.08);
}

/* Botón dentro de la card */
.dark .portfolio-card .button.button--secondary {
  border-color: #3b82f6;           /* azul brand */
  color: #bfdbfe;
  background: transparent;
}
.dark .portfolio-card .button.button--secondary:hover,
.dark .portfolio-card .button.button--secondary:focus-visible {
  background: #3b82f6;
  color: #fff;
}

/* Filtros (chips) */
.dark .portfolio__filters .filter-btn {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid #334155;
}
.dark .portfolio__filters .filter-btn:hover {
  border-color: #3b82f6;
  color: #e5e7eb;
}
.dark .portfolio__filters .filter-btn.active {
  background: #2563eb;             /* azul más intenso */
  color: #fff;
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .35);
}

/* Botón "Copiar enlace" */
.dark .portfolio__filters .copy-link-btn {
  border-color: #06b6d4;           /* brand2 turquesa */
  color: #a5f3fc;
  background: transparent;
}
.dark .portfolio__filters .copy-link-btn:hover,
.dark .portfolio__filters .copy-link-btn:focus-visible {
  background: #06b6d4;
  color: #0b1220;
  box-shadow: 0 4px 12px rgba(6, 182, 212, .35);
}

/* Título y tipografías de la sección */
.dark #work .section__title { color: #f8fafc; }
.dark #work .subtitle { color: #94a3b8; }
/* 9) PROCESS ------------------------------------------------ */
.process__timeline { position: relative; max-width: 800px; margin: 0 auto; }
.process__timeline::after {
  content: ''; position: absolute; width: 2px; background: var(--color-primary);
  top: 0; bottom: 0; left: 20px;
}
.process__item { padding: 1rem 1rem 1rem 60px; position: relative; }
.process__item::before {
  content: attr(data-step); position: absolute; left: 0; top: 1rem;
  width: 40px; height: 40px; border-radius: 50%; background: var(--color-primary);
  color: var(--color-white); display: grid; place-items: center; font-weight: 700; z-index: 1;
}
.process__item h3 { color: var(--color-primary); }

/* 10) TESTIMONIALS ---------------------------------------- */
.testimonials__grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.testimonial-card { background: var(--color-light); padding: 2rem; border-radius: var(--border-radius); border-left: 5px solid var(--color-accent); }
.testimonial-card blockquote { margin: 0 0 1rem; font-style: italic; }
.testimonial-card cite { font-weight: 600; font-style: normal; }
.testimonial-card cite span { display: block; font-weight: 400; color: var(--color-gray); font-size: .9rem; }
/* === dark mode === */
.dark .testimonials__grid { filter: none; opacity: 1; }

.dark .testimonial-card {
  background: #111827;            /* slate-900 */
  border: 1px solid #1f2937;      /* slate-800 */
  border-left-color: #06b6d4;     /* turquesa brand2 para el acento */
  color: #e5e7eb;                 /* texto base */
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

.dark .testimonial-card blockquote {
  color: #cbd5e1;                 /* cuerpo de la cita */
  font-style: italic;
}

.dark .testimonial-card cite {
  color: #f3f4f6;                 /* nombre */
  font-style: normal;
}
.dark .testimonial-card cite span {
  color: #94a3b8;                 /* cargo/empresa */
}

/* Opcional: hover sutil para dar feedback */
@media (hover:hover) {
  .dark .testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(0,0,0,.45);
  }
}

/* Título de la sección */
.dark #testimonials .section__title { color: #f8fafc; }

/* 11) FAQS ------------------------------------------------- */
.faqs__container { max-width: 800px; }
.faqs__list details { background: var(--color-white); border: 1px solid #e9ecef; border-radius: var(--border-radius); margin-bottom: 1rem; }
.faqs__list summary { padding: 1rem; font-weight: 600; cursor: pointer; list-style: none; position: relative; }
.faqs__list summary::-webkit-details-marker { display: none; }
.faqs__list summary::after { content: '+'; position: absolute; right: 1rem; font-size: 1.5rem; color: var(--color-primary); }
.faqs__list details[open] summary::after { content: '−'; }
.faqs__list div { padding: 0 1rem 1rem; border-top: 1px solid #e9ecef; }

/* dark mode */
.dark .faqs__list details {
  background: #111827;              /* slate-900 */
  border: 1px solid #1f2937;        /* slate-800 */
  border-radius: var(--border-radius);
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}

.dark .faqs__list summary {
  color: #e5e7eb;                   /* texto pregunta */
  background: transparent;
}

.dark .faqs__list summary::after {
  color: #60a5fa;                   /* + (azul claro) */
}

.dark .faqs__list details[open] summary::after {
  color: #3b82f6;                   /* − (azul más intenso) */
}

.dark .faqs__list div {
  border-top: 1px solid #1f2937;
  color: #cbd5e1;                   /* respuesta */
}

/* Accesibilidad: foco visible en summary */
.dark .faqs__list summary:focus-visible {
  outline: 3px solid #06b6d4;
  outline-offset: 2px;
  border-radius: calc(var(--border-radius) - 2px);
}

/* Título de la sección */
.dark #faqs .section__title { color: #f8fafc; }

/* 12) CONTACT --------------------------------------------- */
.contact__container { max-width: 700px; text-align: center; }
.contact__form { display: flex; flex-direction: column; gap: 1rem; text-align: left; margin-top: 2rem; }
.form-group { display: flex; flex-direction: column; }
.form-group label { margin-bottom: .5rem; font-weight: 500; }
.form-group input, .form-group textarea {
  padding: .75rem; border: 1px solid #ccc; border-radius: var(--border-radius);
  font-family: var(--font-family); font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(31,111,235,.25);
}
.error-message { color: var(--color-error); font-size: .9rem; margin-top: .25rem; }
.honeypot { display: none; }
#form-status { margin-top: 1rem; font-weight: 600; }
#form-status.success { color: var(--color-success); }
#form-status.error { color: var(--color-error); }

/* === dark mode === */
.dark .contact__container { color: #e5e7eb; }
.dark .contact__container .subtitle { color: #94a3b8; }

.dark .form-group label { color: #e5e7eb; }

.dark .form-group input,
.dark .form-group textarea {
  background: #0f172a;           /* slate-950 */
  color: #e5e7eb;
  border: 1px solid #334155;     /* slate-700 */
}
.dark .form-group input::placeholder,
.dark .form-group textarea::placeholder {
  color: #64748b;                /* slate-500 */
}

.dark .form-group input:focus,
.dark .form-group textarea:focus {
  border-color: #3b82f6;         /* blue-600 */
  box-shadow: 0 0 0 2px rgba(59,130,246,.35);
  outline: none;
}

/* Estados de mensaje */
.dark #form-status.success { color: #34d399; } /* emerald-400 */
.dark #form-status.error   { color: #f87171; } /* red-400 */

/* Botón primario coherente en dark */
.dark .button--primary {
  background: #2563eb;           /* blue-600 */
  color: #fff;
  border-color: transparent;
}
.dark .button--primary:hover,
.dark .button--primary:focus-visible {
  background: #1d4ed8;           /* blue-700 */
  box-shadow: 0 6px 18px rgba(37,99,235,.45);
}

/* Chrome/Edge autofill (para que no “amarillee” sobre fondo dark) */
.dark .form-group input:-webkit-autofill,
.dark .form-group textarea:-webkit-autofill {
  -webkit-text-fill-color: #e5e7eb;
  box-shadow: 0 0 0 30px #0f172a inset !important;
  caret-color: #e5e7eb;
}
.dark .form-group input:-webkit-autofill:focus,
.dark .form-group textarea:-webkit-autofill:focus {
  box-shadow: 0 0 0 30px #0b1220 inset, 0 0 0 2px rgba(59,130,246,.35) !important;
}

/* 13) FOOTER (G5) ----------------------------------------- */
.footer { background: #f1f5f9; color: #1f2937; padding: 3rem 0 2rem; }
.footer__top {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem; align-items: flex-start; padding-bottom: 1.5rem; border-bottom: 1px solid #e5e7eb;
}
.footer__logo, .nav__logo {
  text-decoration: none; color: var(--color-primary); font-weight: 800; font-size: 1.5rem;
  display: inline-flex; align-items: center; gap: .5rem;
}
.brand-icon { font-weight: 900; color: var(--color-accent); }
.footer__brand p { color: #64748b; margin-top: .5rem; max-width: 36ch; }

.footer__contact h4, .footer__social h4 { margin-bottom: .5rem; }
.footer__contact p { display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem; }
.footer__contact a { color: inherit; text-decoration: none; }
.footer__contact a:hover { text-decoration: underline; }
.ico { width: 18px; height: 18px; fill: #64748b; }

.footer__social .social-links { display: flex; gap: .75rem; font-size: 1.35rem; }
.footer__social a { text-decoration: none; color: #64748b; }
.footer__social a:hover { color: var(--color-primary); }

.footer__bottom {
  padding-top: 1rem; display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap; color: #64748b;
}
.footer__links a { color: #64748b; text-decoration: none; }
.footer__links a:hover { text-decoration: underline; color: var(--color-primary); }
.footer__col-title,
.footer__contact h4,
.footer__social h4 {
  margin-bottom: .5rem;
  font-weight: 700;
}

.footer__contact p,
.footer__social a {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: .25rem 0;
}

.footer__contact a,
.footer__social a {
  text-decoration: none;
  color: #64748b;
}

.footer__contact a:hover,
.footer__social a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Forzar los links sociales en columna compacta */
.social-links--stack {
  display: block;   /* ya no flex */
}

.social-links--stack a {
  display: block;   /* cada link en su propia línea */
  margin: .25rem 0; /* mismo espaciado que Company */
  font-size: 1rem;
}

.ico {
  width: 18px;
  height: 18px;
  fill: #64748b;
}

/* === dark mode === */
.dark .footer {
  background: #0b1220;              /* fondo oscuro */
  color: #e5e7eb;                   /* texto base */
  border-top: 1px solid #1f2937;
}

.dark .footer__brand p {
  color: #94a3b8;                   /* tagline */
}

.dark .footer__contact h4,
.dark .footer__social h4 {
  color: #f1f5f9;
}

.dark .footer__contact p,
.dark .footer__contact a {
  color: #cbd5e1;
}
.dark .footer__contact a:hover {
  color: #fff;
  text-decoration: underline;
}

.dark .ico {
  fill: #cbd5e1;
}

.dark .footer__social a {
  color: #cbd5e1;
}
.dark .footer__social a:hover {
  color: #3b82f6;                   /* azul brand */
}

.dark .footer__bottom {
  color: #94a3b8;
  border-top: 1px solid #1f2937;
}

.dark .footer__links a {
  color: #94a3b8;
}
.dark .footer__links a:hover {
  color: #3b82f6;
  text-decoration: underline;
}
.dark .footer__contact a,
.dark .footer__social a {
  color: #cbd5e1;
}

.dark .footer__contact a:hover,
.dark .footer__social a:hover {
  color: #3b82f6;
}
.dark .ico {
  fill: #cbd5e1;
}
/* 14) SKIN G4 APLICADA AL HEADER (compat G5) -------------- */
/* Mantengo .g3-header porque tu index.html la usa. */
.dark body { background-color: var(--neutral-900); color: var(--neutral-100); }
.g3-header {
  position: sticky; top: 0; inset-inline: 0; z-index: 1000;
  backdrop-filter: blur(10px); background: rgba(255,255,255,.85);
  border-bottom: 1px solid rgba(15,23,42,.06);
}
.dark .g3-header { background: rgba(15,23,42,.75); border-color: rgba(255,255,255,.1); }

.g3-header .brand { color: var(--brand); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; }
.g3-header .brand-icon { color: var(--brand2); font-size: 1.1rem; }

.g3-header .nav a, .g3-header nav a {
  display: inline-block; padding: .5rem .75rem; border-radius: .5rem; font-weight: 600; color: inherit; text-decoration: none;
}
.g3-header .nav a:hover, .g3-header nav a:hover { color: var(--brand); }
.g3-header .nav .btn-primary { background: var(--brand); color: #fff; font-weight: 700; }
.g3-header .nav .btn-primary:hover { filter: brightness(.95); }
.g3-header .btn-outline { padding: .45rem .7rem; border-radius: .5rem; border: 1px solid rgba(15,23,42,.15); background: transparent; font-weight: 600; }
.dark .g3-header .btn-outline { border-color: rgba(255,255,255,.25); color: #fff; }

.g3-header a[aria-current="true"] { color: var(--brand); }

/* 15) COMPONENTES VARIOS ---------------------------------- */
/* Ventana de código (Hero) */
.hero__visual { display: flex; justify-content: flex-end; align-items: center; }
.code-window {
  width: 100%; max-width: 520px; background: #1e293b; border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0,0,0,.35); overflow: hidden; position: relative; isolation: isolate;
  border: 1px solid rgba(255,255,255,0.06);
}
.code-window__topbar {
  height: 38px; background: #0f172a; display: flex; align-items: center; gap: 8px; padding: 0 12px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot--red { background: #ff5f57; } .dot--yellow { background: #ffbd2e; } .dot--green { background: #28ca42; }

.code-window__content {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "JetBrains Mono", monospace;
  font-size: 14px; line-height: 1.6; color: #e2e8f0;
  background: #1e293b; padding: 16px; min-height: 220px;
  white-space: pre-wrap; word-break: break-word; tab-size: 2;
}
.kw { color: #ff79c6; } .fn { color: #8be9fd; } .str { color: #f1fa8c; } .com { color: #94a3b8; }

.cursor { display: inline-block; margin-left: 2px; animation: sc-blink 1s step-start infinite; }
@keyframes sc-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* Botón “Back to top” */
.to-top {
  position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px;
  border-radius: 999px; border: none; background: var(--color-primary); color: white;
  box-shadow: 0 10px 20px rgba(0,0,0,.2); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s, transform .25s, visibility .25s; z-index: 1200;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* 16) RESPONSIVE ------------------------------------------ */
/* Menú móvil desplegable */
@media (max-width: 767px) {
  .nav { position: relative; }
  .nav__menu {
    display: none; flex-direction: column; gap: .5rem;
    position: absolute; right: 1rem; top: 64px;
    background: #fff; border: 1px solid #e9ecef; border-radius: 12px;
    padding: 1rem; box-shadow: 0 8px 20px rgba(0,0,0,.08); z-index: 1000;
  }
  .nav__menu a { padding: .5rem .75rem; border-radius: 6px; }
  .nav__menu a:hover, .nav__menu a:focus-visible { background: #f5f7fa; }
}

@media (max-width: 1024px) {
  .hero__content { grid-template-columns: 1fr; text-align: center; }
  .hero__visual { justify-content: center; margin-top: 1rem; }
  .code-window { max-width: 520px; }
}

@media (max-width: 900px) {
  .footer__top { grid-template-columns: 1fr; }
}

@media (min-width: 768px) {
  /* Desktop: mostrar menú, ocultar hamburguesa */
  .nav__menu { display: flex; }
  .nav__mobile-toggle { display: none; }
}

@media (min-width: 1024px) {
  .services__grid { grid-template-columns: repeat(3, 1fr); }
  .portfolio__grid { grid-template-columns: repeat(3, 1fr); }
  .process__timeline::after { left: 50%; transform: translateX(-50%); }
  .process__item { width: 50%; }
  .process__item:nth-child(odd) { padding: 1rem 60px 1rem 1rem; text-align: right; margin-left: auto; }
  .process__item:nth-child(odd)::before { right: 0; left: auto; }
  .process__item:nth-child(even) { padding: 1rem 1rem 1rem 60px; }
  .process__item:nth-child(even)::before { left: 0; }
}
/* === G5 Header controls (language select + theme) === */
.nav__controls { display: flex; align-items: center; gap: .5rem; }

/* Select de idioma */
.nav__lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: .4rem .75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  line-height: 1;
}
.nav__lang-select:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
.dark .nav__lang-select {
  background: #0b1220;
  color: #e2e8f0;
  border-color: #334155;
}

/* Botón de tema (bombillo) */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 36px;
  border: 1px solid #cbd5e1; border-radius: 8px;
  background: #fff; cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.theme-toggle:hover { transform: translateY(-1px); }
.dark .theme-toggle { background: #0b1220; border-color: #334155; color: #e2e8f0; }

/* Icono del bombillo un pelín grande */
.theme-toggle .theme-icon { font-size: 18px; line-height: 1; }

/* Alineación de controles en móviles si hace falta */
@media (max-width: 480px){
  .nav__controls { gap: .4rem; }
  .nav__lang-select { height: 36px; }
}
/* === Modals === */
.modal {
  position: fixed; inset: 0; display: none;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); z-index: 2000;
  padding: 1.5rem;
}
.modal[aria-hidden="false"] { display: flex; }

.modal__dialog {
  background: #fff; color: #0f172a;
  width: min(900px, 100%); max-height: 85vh;
  border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.35);
  overflow: hidden; display: grid; grid-template-rows: auto 1fr;
  animation: modal-pop .2s ease-out;
}
@keyframes modal-pop { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid #e5e7eb;
}
.modal__content {
  padding: 1rem 1.25rem; overflow: auto;
}
.modal__content h3 { margin-top: 1rem; }
.modal__content hr { margin: 1.25rem 0; }

.modal__close {
  position: absolute; top: .5rem; right: .75rem;
  background: transparent; border: 0; font-size: 28px; line-height: 1;
  cursor: pointer; color: #64748b;
}
.modal__close:hover { color: #0f172a; }

.open-new, .link-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid #cbd5e1;
  background: #fff; color: #0f172a; text-decoration: none; font-weight: 700;
}
.open-new:hover, .link-icon:hover { background: #f1f5f9; }

/* Dark mode */
.dark .modal { background: rgba(0,0,0,.7); }
.dark .modal__dialog { background: #0b1220; color: #e5e7eb; border: 1px solid #1f2937; }
.dark .modal__header { border-color: #1f2937; }
.dark .modal__close { color: #94a3b8; }
.dark .modal__close:hover { color: #e5e7eb; }
.dark .open-new, .dark .link-icon {
  background: #0b1220; color: #e5e7eb; border-color: #334155;
}
.dark .open-new:hover, .dark .link-icon:hover {
  background: #111827;
}
/* =========================
   MODAL — DARK THEME POLISH
   ========================= */
:root {
  /* si ya tienes tokens, puedes omitir o ajustar */
  --dm-bg:        #020617; /* slate-950 */
  --dm-surface:   #0b1220; /* custom deep */
  --dm-panel:     #0f172a; /* slate-900 */
  --dm-text:      #e5e7eb; /* slate-200 */
  --dm-muted:     #94a3b8; /* slate-400 */
  --dm-border:    #1f2937; /* slate-800 */
  --dm-accent:    #3b82f6; /* blue-600 */
  --dm-accent-2:  #60a5fa; /* blue-400 */
}

/* backdrop un poco más denso y con blur sutil */
.dark .modal {
  background: rgba(2, 6, 23, .82);
  backdrop-filter: blur(2px);
}

/* panel principal */
.dark .modal__dialog {
  background: var(--dm-panel);
  color: var(--dm-text);
  border: 1px solid var(--dm-border);
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}

/* header con banda ligeramente más clara y sticky para scroll largo */
.dark .modal__header {
  position: sticky; top: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(148,163,184,.12), transparent);
  border-bottom: 1px solid var(--dm-border);
}
.dark .modal__header h2 {
  color: var(--dm-text);
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}

/* cuerpo del modal */
.dark .modal__content { color: var(--dm-text); }
.dark .modal__content h3 { color: #f8fafc; }
.dark .modal__content h4 { color: #e2e8f0; }
.dark .modal__content p,
.dark .modal__content li { color: var(--dm-muted); }

/* enlaces */
.dark .modal__content a {
  color: var(--dm-accent-2);
  text-decoration: underline;
  text-decoration-color: rgba(96,165,250,.5);
}
.dark .modal__content a:hover {
  color: #93c5fd;
  text-decoration-color: rgba(147,197,253,.85);
}

/* botones (cerrar y abrir en nueva pestaña) */
.dark .modal__close,
.dark .open-new,
.dark .link-icon {
  background: var(--dm-surface);
  color: var(--dm-text);
  border: 1px solid var(--dm-border);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.04);
}
.dark .modal__close:hover,
.dark .open-new:hover,
.dark .link-icon:hover {
  background: #111827; /* slate-900+ */
  border-color: #334155;
}
.dark .modal__close:focus-visible,
.dark .open-new:focus-visible,
.dark .link-icon:focus-visible {
  outline: 2px solid var(--dm-accent);
  outline-offset: 2px;
  border-color: var(--dm-accent);
}

/* scrollbar del contenido (solo WebKit, otros usan por defecto) */
.dark .modal__content::-webkit-scrollbar {
  width: 12px;
}
.dark .modal__content::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--dm-border), #0b203e);
  border-radius: 8px;
  border: 3px solid var(--dm-panel);
}
.dark .modal__content::-webkit-scrollbar-track {
  background: var(--dm-panel);
}

/* selección de texto */
.dark .modal__content ::selection {
  background: rgba(59,130,246,.35);
  color: #fff;
}

/* soporte opcional por preferencia del SO */
@media (prefers-color-scheme: dark) {
  body:not(.dark) .modal { background: rgba(2,6,23,.78); }
  body:not(.dark) .modal__dialog { background: var(--dm-panel); color: var(--dm-text); }
}
