/**
 * Adlum Tech - Design System & Layout Styles
 * Arquitectura: CSS Custom Properties + Mobile-First Utility & Layout
 */

/* ==========================================================================
   1. TIPOGRAFÍAS CORPORATIVAS
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

@font-face {
  font-family: 'Sansation';
  src: local('Sansation'), local('Sansation-Regular'),
       url('https://fonts.cdnfonts.com/s/14878/Sansation_Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Sansation';
  src: local('Sansation Bold'), local('Sansation-Bold'),
       url('https://fonts.cdnfonts.com/s/14878/Sansation_Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   2. VARIABLES SEMÁNTICAS (DESIGN TOKENS)
   ========================================================================== */
:root {
  --color-primary: #1b1b4c;
  --color-primary-light: #252563;
  --color-accent: #00a7ff;
  --color-accent-hover: #008cd6;
  --color-white: #ffffff;
  --color-black: #000000;

  --color-bg-body: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-alt: #f1f5f9;
  --color-text-main: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-border-dark: rgba(255, 255, 255, 0.12);

  --font-headings: 'Sansation', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(27, 27, 76, 0.08), 0 2px 4px -2px rgba(27, 27, 76, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(27, 27, 76, 0.1), 0 4px 6px -4px rgba(27, 27, 76, 0.05);

  --max-width: 1200px;
  --transition-fast: 0.2s ease-in-out;
  --transition-default: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --touch-target-min: 48px;
}

/* ==========================================================================
   3. RESET MODERNO & CONFIGURACIÓN BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background-color: var(--color-bg-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  color: var(--color-primary);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* Salto accesible para lectores de pantalla */
.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  background: var(--color-accent);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  z-index: 1000;
  font-weight: 600;
  border-radius: 4px;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: 1rem;
}

/* ==========================================================================
   4. LAYOUT Y CONTENEDORES
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section-padding {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem auto;
}

.section-header .badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* ==========================================================================
   5. BOTONES Y COMPONENTES REUTILIZABLES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-target-min);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-default);
  text-align: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(0, 167, 255, 0.3);
}

.btn-primary:hover, .btn-primary:focus-visible {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 167, 255, 0.45);
}

.btn-outline-white {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover, .btn-outline-white:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
  color: var(--color-white);
}

/* ==========================================================================
   6. HEADER & NAVBAR RESPONSIVE
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  background: rgba(27, 27, 76, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  z-index: 900;
  border-bottom: 1px solid var(--color-border-dark);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-headings);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-white);
}

.brand-logo .dot {
  color: var(--color-accent);
}

.nav-links {
  display: none;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0;
}

.nav-links a:hover {
  color: var(--color-accent);
}

.mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  background: transparent;
  border: none;
  color: var(--color-white);
  cursor: pointer;
}

/* Logotipo corporativo escalable */
.brand-logo-img {
  height: 48px;              /* Altura base optimizada para móvil */
  width: auto;
  max-width: 220px;          /* Evita desbordamiento en teléfonos compactos */
  object-fit: contain;
  display: block;
  transition: transform var(--transition-fast);
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.02);
}

/* Versión del pie de página */
.footer-logo-img {
  height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  margin-bottom: 1rem;
}

/* Ampliación de presencia visual en pantallas de escritorio */
@media (min-width: 768px) {
  .nav-bar {
    height: 80px;            /* Ampliamos levemente la barra para dar aire */
  }
  .brand-logo-img {
    height: 54px;            /* Mayor escala visual en escritorio */
    max-width: 260px;
  }
}

/* ==========================================================================
   7. HERO SECTION (TÉCNICA & IMPACTO)
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0d0d2b 100%);
  color: var(--color-white);
  padding: 5rem 0 6rem 0;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 167, 255, 0.15) 0%, rgba(27, 27, 76, 0) 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(0, 167, 255, 0.12);
  border: 1px solid rgba(0, 167, 255, 0.3);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero h1 {
  color: var(--color-white);
  font-size: 2.5rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.25rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ==========================================================================
   8. SERVICIOS (GRID TÉCNICO DESACOPLADO)
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

.card-service {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-default), border-color var(--transition-default), box-shadow var(--transition-default);
}

.card-service:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  width: 52px;
  height: 52px;
  background: rgba(0, 167, 255, 0.1);
  color: var(--color-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card-service h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.card-service p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.service-specs {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  list-style: none;
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 500;
}

.service-specs li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

/* ==========================================================================
   9. METODOLOGÍA DE INGENIERÍA (PASOS)
   ========================================================================== */
.process-section {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.step-card {
  position: relative;
  padding: 1.75rem;
  background: var(--color-bg-body);
  border-radius: 8px;
  border-left: 4px solid var(--color-accent);
}

.step-num {
  font-family: var(--font-headings);
  font-size: 2rem;
  font-weight: 700;
  color: rgba(27, 27, 76, 0.15);
  margin-bottom: 0.5rem;
}

.step-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   10. FORMULARIO DE CONTACTO & CIBERSEGURIDAD
   ========================================================================== */
.contact-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.contact-info h3 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.contact-direct {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: rgba(27, 27, 76, 0.05);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  min-height: 46px;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-main);
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 167, 255, 0.15);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Campo Honeypot Oculto (Antispam) */
.form-hp {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  height: 0;
  width: 0;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.form-checkbox input {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
}

/* ==========================================================================
   11. FOOTER CORPORATIVO
   ========================================================================== */
.footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.75);
  padding: 4rem 0 2rem 0;
  border-top: 1px solid var(--color-border-dark);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer h4 {
  color: var(--color-white);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-dark);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
  font-size: 0.85rem;
}

/* ==========================================================================
   12. MEDIA QUERIES (DESKTOP ENHANCEMENT)
   ========================================================================== */
@media (min-width: 768px) {
  .hero-actions {
    flex-direction: row;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .process-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .contact-container {
    grid-template-columns: 1fr 1.2fr;
    padding: 3rem;
  }
  .footer-top {
    grid-template-columns: 2fr 1fr 1fr;
  }
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }
  .mobile-toggle {
    display: none;
  }
  .hero h1 {
    font-size: 3.25rem;
  }
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   13. VENTANA MODAL LEGAL ACCESIBLE (WCAG 2.1)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 35, 0.75);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-card {
  background: var(--color-surface);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-bg-body);
}

.modal-header h3 {
  font-size: 1.2rem;
  color: var(--color-primary);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.modal-close:hover {
  color: var(--color-primary);
}

.modal-tabs {
  display: flex;
  background: var(--color-bg-body);
  border-bottom: 1px solid var(--color-border);
}

.tab-btn {
  flex: 1;
  padding: 0.75rem 0.5rem;
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  background: var(--color-surface);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  font-size: 0.92rem;
  color: var(--color-text-main);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content h4 {
  font-size: 1rem;
  margin: 1rem 0 0.5rem 0;
}

.tab-content h4:first-child {
  margin-top: 0;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  background: var(--color-bg-body);
}

body.modal-locked {
  overflow: hidden;
}