/* =============================================================================
   OSTP @echoShift — mainStyles.css v2.0
   Propósito: Estilos base para páginas DIM (01-08)
   Convenciones: BEM, CSS Variables, Mobile-First, prefers-reduced-motion
   ============================================================================= */

:root {
  /* Paleta OSTP */
  --ostp-bg: #06060a;
  --ostp-bg-alt: #0a0a12;
  --ostp-cyan: #00f0ff;
  --ostp-cyan-dim: rgba(0, 240, 255, 0.12);
  --ostp-purple: #7b2eda;
  --ostp-purple-dim: rgba(123, 46, 218, 0.15);
  --ostp-text: #e8e8f0;
  --ostp-text-muted: #a0a0b8;
  --ostp-border: rgba(255, 255, 255, 0.08);
  --ostp-border-hover: rgba(0, 240, 255, 0.35);
  
  /* Tipografía */
  --font-sans: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'Consolas', 'Monaco', monospace;
  
  /* Espaciado */
  --sp-xs: 0.25rem;
  --sp-sm: 0.5rem;
  --sp-md: 1rem;
  --sp-lg: 2rem;
  --sp-xl: 4rem;
  
  /* Bordes y radios */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  /* Transiciones */
  --ease-out: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 150ms ease;
  --transition-base: 300ms var(--ease-out);
}

/* ===== BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--ostp-bg);
  color: var(--ostp-text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* ===== VIDEO DE FONDO ===== */
.dim-hero-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.28;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.dim-hero-video + .fallback-img {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  background: linear-gradient(135deg, var(--ostp-bg) 0%, var(--ostp-bg-alt) 100%);
}

.dim-hero-video:not([src]) + .fallback-img,
.dim-hero-video.error + .fallback-img {
  display: block;
}

/* Overlay degradado para legibilidad */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(6, 6, 10, 0.95) 0%,
    rgba(6, 6, 10, 0.85) 35%,
    transparent 100%
  );
  z-index: -1;
  pointer-events: none;
}

/* ===== HEADER GLOBAL ===== */
.global-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 6, 10, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ostp-border);
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.global-header.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

#OFICIAL-LOGO {
  width: 32px;
  height: 32px;
  cursor: pointer;
  filter: drop-shadow(0 0 8px var(--ostp-cyan-dim));
  transition: filter var(--transition-fast);
}

#OFICIAL-LOGO:hover {
  filter: drop-shadow(0 0 16px var(--ostp-cyan));
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.dim-card-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--sp-xl) var(--sp-lg) var(--sp-lg);
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Badge de sistema */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: var(--sp-xs) var(--sp-sm);
  background: var(--ostp-purple);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 20px;
  margin-bottom: var(--sp-md);
  width: fit-content;
}

/* Título con efecto glitch */
.dim-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ostp-cyan);
  position: relative;
  margin-bottom: var(--sp-sm);
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.dim-title.glitch::before,
.dim-title.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.dim-title.glitch::before {
  color: var(--ostp-purple);
  animation: glitch-offset-1 2.5s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  opacity: 0.8;
}

.dim-title.glitch::after {
  color: var(--ostp-cyan);
  animation: glitch-offset-2 3s infinite linear alternate-reverse;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  opacity: 0.8;
}

@keyframes glitch-offset-1 {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
}

@keyframes glitch-offset-2 {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(2px, -2px); }
  40% { transform: translate(-2px, 2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(-2px, -2px); }
}

.dim-subtitle {
  font-size: 1.1rem;
  color: var(--ostp-text-muted);
  margin-bottom: var(--sp-lg);
  max-width: 60ch;
}

/* ===== GRID DE CONTENIDO ===== */
.dim-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}

.dim-section {
  background: var(--ostp-bg-alt);
  border: 1px solid var(--ostp-border);
  border-radius: var(--radius-md);
  padding: var(--sp-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.dim-section:hover {
  border-color: var(--ostp-border-hover);
  box-shadow: 0 8px 32px var(--ostp-cyan-dim);
}

.dim-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ostp-cyan);
  margin-bottom: var(--sp-sm);
}

.dim-description {
  font-size: 1rem;
  color: var(--ostp-text);
  line-height: 1.7;
}

/* Lista de features */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  font-size: 0.95rem;
  color: var(--ostp-text);
}

.feature-check {
  color: var(--ostp-cyan);
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Pricing & Delivery */
.dim-section--highlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-md);
}

.pricing-box,
.delivery-box {
  text-align: center;
  padding: var(--sp-md);
  background: var(--ostp-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--ostp-border);
}

.pricing-label,
.delivery-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ostp-text-muted);
  margin-bottom: var(--sp-xs);
}

.pricing-amount {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ostp-cyan);
}

.delivery-time {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ostp-text);
}

/* Guarantee */
.guarantee-box {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  padding: var(--sp-md);
  background: linear-gradient(135deg, var(--ostp-purple-dim), transparent);
  border-radius: var(--radius-sm);
  border: 1px solid var(--ostp-border);
}

.guarantee-icon {
  font-size: 1.2rem;
  color: var(--ostp-cyan);
  font-weight: bold;
}

.guarantee-text {
  font-size: 0.9rem;
  color: var(--ostp-text);
  line-height: 1.5;
}

/* ===== CTA PRINCIPAL ===== */
.dim-cta-wrapper {
  text-align: center;
  margin: var(--sp-lg) 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 0 24px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: transparent;
  color: var(--ostp-cyan);
  border: 2px solid var(--ostp-cyan);
  box-shadow: 0 0 0 0 var(--ostp-cyan-dim);
}

.btn--primary:hover {
  background: var(--ostp-cyan);
  color: var(--ostp-bg);
  box-shadow: 0 0 32px var(--ostp-cyan-dim);
  transform: translateY(-2px);
}

.cta-hint {
  margin-top: var(--sp-sm);
  font-size: 0.85rem;
  color: var(--ostp-text-muted);
}

.cta-hint strong {
  color: var(--ostp-cyan);
  font-family: var(--font-mono);
}

/* ===== TAGS / HASHTAGS ===== */
.dim-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
  justify-content: center;
  margin-top: var(--sp-lg);
}

.tag {
  font-size: 0.75rem;
  color: var(--ostp-text-muted);
  background: var(--ostp-border);
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: 20px;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.tag:hover {
  color: var(--ostp-cyan);
  background: var(--ostp-cyan-dim);
}

/* ===== NAVEGACIÓN CONTEXTUAL ===== */
.dim-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(6, 6, 10, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--ostp-border);
}

.nav-link {
  font-size: 0.85rem;
  color: var(--ostp-text-muted);
  text-decoration: none;
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-link:hover {
  color: var(--ostp-cyan);
  background: var(--ostp-cyan-dim);
}

.nav-link--next {
  color: var(--ostp-cyan);
  font-weight: 600;
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .dim-title.glitch::before,
  .dim-title.glitch::after {
    display: none;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .dim-content-grid {
    grid-template-columns: 1fr;
  }
  
  .dim-section--highlight {
    grid-template-columns: 1fr;
  }
  
  .dim-nav {
    flex-direction: column;
    gap: var(--sp-sm);
    align-items: center;
  }
  
  .global-header {
    padding: var(--sp-sm) var(--sp-md);
  }
  
  #OFICIAL-LOGO {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .dim-card-container {
    padding: var(--sp-lg) var(--sp-md) var(--sp-lg);
  }
  
  .dim-title {
    font-size: 2.2rem;
  }
  
  .btn--primary {
    width: 100%;
    justify-content: center;
  }
}
/* ===== CONTAINER GLOBAL (requerido por navbar) ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}