/* ============================================
   GENETSIS IT - Portal de Servicios Centrales
   Premium CSS Design System
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Navy base */
  --navy-deep: #1a1a2e;
  --navy-mid: #16213e;
  --navy-light: #1b2a4a;

  /* Corporate red */
  --red: #da291c;
  --red-hover: #b8221a;

  /* Sky blue */
  --blue-sky: #38bdf8;
  --blue-accent: #0ea5e9;

  /* Gold */
  --gold: #c9a84c;
  --gold-light: #e0c97a;

  /* Neutrals */
  --white: #ffffff;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(201, 168, 76, 0.18);
  --glass-blur: 18px;

  /* Shadows */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-glow-gold: 0 0 25px rgba(201, 168, 76, 0.25);
  --shadow-glow-red: 0 0 20px rgba(218, 41, 28, 0.3);

  /* Transitions */
  --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--navy-deep);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ---------- Animated Gradient Background ---------- */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    135deg,
    #1a1a2e 0%,
    #16213e 25%,
    #1b2a4a 50%,
    #1a1a2e 75%,
    #21203a 100%
  );
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  25% { background-position: 50% 0%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 100%; }
  100% { background-position: 0% 50%; }
}

/* Gold accent overlay */
.bg-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 20% 80%,
    rgba(201, 168, 76, 0.04) 0%,
    transparent 50%
  ),
  radial-gradient(
    ellipse at 80% 20%,
    rgba(56, 189, 248, 0.03) 0%,
    transparent 50%
  );
  pointer-events: none;
}

/* ---------- Particles Container ---------- */
#tsparticles {
  position: fixed;
  inset: 0;
  z-index: 1;
}

/* ---------- Cursor Glow ---------- */
.cursor-glow {
  position: fixed;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(56, 189, 248, 0.07) 0%,
    rgba(201, 168, 76, 0.03) 40%,
    transparent 70%
  );
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 2;
  transition: opacity 0.3s ease;
  will-change: left, top;
}

/* ---------- Main Content ---------- */
.main-content {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.header {
  text-align: center;
  padding-top: 60px;
  margin-bottom: 60px;
}

/* ---------- Logo 3D Glassmorphism ---------- */
.logo-scene {
  perspective: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 36px;
}

.logo-glass {
  position: relative;
  padding: 22px 44px;
  border-radius: 20px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.03) 50%,
    rgba(201, 168, 76, 0.05) 100%
  );
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  transform-style: preserve-3d;
  animation: logoFloat 6s ease-in-out infinite;
  cursor: pointer;
  transition: box-shadow 0.4s ease;
  will-change: transform;
}

.logo-glass:hover {
  box-shadow:
    0 15px 50px rgba(0, 0, 0, 0.45),
    0 0 30px rgba(201, 168, 76, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

/* Floating keyframes */
@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0px) rotateX(2deg) rotateY(-1deg);
  }
  33% {
    transform: translateY(-8px) rotateX(-1deg) rotateY(2deg);
  }
  66% {
    transform: translateY(-4px) rotateX(1deg) rotateY(-2deg);
  }
}

/* Animated light sweep / shine */
.logo-glass__shine {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.logo-glass__shine::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 30%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 70%,
    transparent 100%
  );
  transform: skewX(-20deg);
  animation: lightSweep 5s ease-in-out infinite;
}

@keyframes lightSweep {
  0%, 100% { left: -60%; }
  50% { left: 120%; }
}

/* Edge glow lines */
.logo-glass__edge {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.logo-glass__edge--top {
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.5), rgba(56, 189, 248, 0.3), transparent);
  animation: edgePulse 4s ease-in-out infinite;
}

.logo-glass__edge--bottom {
  bottom: 0;
  left: 30%;
  right: 30%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.3), rgba(201, 168, 76, 0.4), transparent);
  animation: edgePulse 4s ease-in-out infinite 2s;
}

.logo-glass__edge--left {
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(201, 168, 76, 0.35), transparent);
  animation: edgePulse 4s ease-in-out infinite 1s;
}

.logo-glass__edge--right {
  right: 0;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(56, 189, 248, 0.3), transparent);
  animation: edgePulse 4s ease-in-out infinite 3s;
}

@keyframes edgePulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Background radial glow behind the glass */
.logo-glass__glow {
  position: absolute;
  inset: -20px;
  border-radius: 30px;
  background: radial-gradient(
    ellipse at center,
    rgba(201, 168, 76, 0.08) 0%,
    rgba(56, 189, 248, 0.04) 40%,
    transparent 70%
  );
  z-index: -1;
  pointer-events: none;
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Dynamic shadow below the glass card */
.logo-shadow {
  width: 180px;
  height: 12px;
  margin-top: 12px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.35) 0%, transparent 70%);
  animation: shadowFloat 6s ease-in-out infinite;
  filter: blur(4px);
}

@keyframes shadowFloat {
  0%, 100% { transform: scaleX(1); opacity: 0.6; }
  33% { transform: scaleX(0.8); opacity: 0.35; }
  66% { transform: scaleX(0.9); opacity: 0.5; }
}

/* Logo text inside glass */
.logo-glass__content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
  user-select: none;
  transform: translateZ(30px);
}

.logo-g {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 0 4px 18px rgba(218, 41, 28, 0.35);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.logo-glass:hover .logo-g {
  box-shadow: 0 4px 25px rgba(218, 41, 28, 0.5);
  transform: scale(1.06);
}

.logo-text {
  font-family: 'Inter', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 40%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.15));
  animation: textGlow 4s ease-in-out infinite alternate;
}

@keyframes textGlow {
  0% { filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.1)); }
  100% { filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.25)); }
}

.logo-it {
  font-family: 'Inter', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  margin-left: -2px;
  background: linear-gradient(135deg, var(--red) 0%, #ff4d4d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(218, 41, 28, 0.2));
}

.header-title {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-title .accent-dot {
  color: var(--gold);
}

.header-subtitle {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--gray-400);
  letter-spacing: 0.03em;
}

/* Decorative line under header */
.header-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--blue-sky));
  border-radius: 2px;
  margin: 24px auto 0;
  opacity: 0.7;
}

/* ---------- Services Grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1100px;
  width: 100%;
  margin-bottom: 80px;
}

/* ---------- Service Card ---------- */
.service-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 44px 32px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: 
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transform-style: preserve-3d;
}

/* Shine overlay */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    transparent
  );
  transform: skewX(-25deg);
  transition: left 0.7s ease;
  pointer-events: none;
}

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

.service-card:hover {
  border-color: rgba(201, 168, 76, 0.45);
  box-shadow: var(--shadow-card), var(--shadow-glow-gold);
}

/* Card icon container */
.card-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(14, 165, 233, 0.06));
  border: 1px solid rgba(56, 189, 248, 0.15);
  transition: 
    background var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.service-card:hover .card-icon {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.1));
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateZ(20px) scale(1.05);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  transition: color var(--transition-fast);
  transform: translateZ(15px);
}

.card-description {
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--gray-400);
  line-height: 1.6;
  margin-bottom: 28px;
  flex-grow: 1;
  transform: translateZ(10px);
}

/* Card button */
.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: 
    background var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
  cursor: pointer;
  border: none;
  transform: translateZ(10px);
}

.card-btn--primary {
  background: linear-gradient(135deg, var(--red), #e03a2e);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(218, 41, 28, 0.25);
}

.card-btn--primary:hover {
  background: linear-gradient(135deg, #e03a2e, var(--red));
  box-shadow: var(--shadow-glow-red);
  transform: translateZ(10px) translateY(-2px);
}

.card-btn--primary:active {
  transform: translateZ(10px) translateY(0);
}

/* Arrow icon in button */
.card-btn .btn-arrow {
  transition: transform var(--transition-fast);
  font-size: 1.1em;
}

.card-btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* ---------- Disabled Card ---------- */
.service-card--disabled {
  opacity: 0.55;
  pointer-events: none;
  filter: grayscale(0.3);
}

.service-card--disabled .card-icon {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.1), rgba(100, 116, 139, 0.05));
  border-color: rgba(148, 163, 184, 0.12);
}

.service-card--disabled .card-btn {
  background: rgba(148, 163, 184, 0.15);
  color: var(--gray-500);
  cursor: not-allowed;
  box-shadow: none;
}

/* Badge */
.card-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-badge--dev {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.3);
}

.card-badge--active {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.card-badge--vpn {
  position: absolute;
  top: 18px;
  left: 18px;
  right: auto;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(56, 189, 248, 0.1);
  color: var(--blue-sky);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* ---------- FadeUp Animation ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(35px);
  transition: 
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up.visible.disabled-visible {
  opacity: 0.55;
}

/* Stagger delays */
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.25s; }
.fade-up-delay-3 { transition-delay: 0.4s; }
.fade-up-delay-4 { transition-delay: 0.55s; }
.fade-up-delay-5 { transition-delay: 0.7s; }
.fade-up-delay-6 { transition-delay: 0.85s; }

/* ---------- Footer ---------- */
.footer {
  margin-top: auto;
  padding: 32px 24px 28px;
  text-align: center;
  width: 100%;
}

.footer-text {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--gray-500);
  letter-spacing: 0.02em;
}

.footer-divider {
  width: 50px;
  height: 1px;
  background: rgba(201, 168, 76, 0.2);
  margin: 0 auto 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 720px;
  }

  .header-title {
    font-size: 2.1rem;
  }
}

@media (max-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 420px;
  }

  .header {
    padding-top: 40px;
    margin-bottom: 40px;
  }

  .header-title {
    font-size: 1.7rem;
  }

  .header-subtitle {
    font-size: 0.95rem;
  }

  .service-card {
    padding: 36px 24px 28px;
  }

  .card-icon {
    width: 68px;
    height: 68px;
    font-size: 1.9rem;
  }

  .cursor-glow {
    display: none;
  }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Selection ---------- */
::selection {
  background: rgba(201, 168, 76, 0.3);
  color: var(--white);
}

/* Focus styles */
.card-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
