/* ============================================================
   Labsys Tecnología SpA — Custom CSS
   Glassmorphism + OLED Dark + Futuristic effects
   UI/UX Pro Max: Dark Mode OLED + Cyberpunk/Tech style
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── Design Tokens ── */
:root {
  --bg-void:        #000000;
  --bg-base:        #050510;
  --bg-deep:        #0A0E27;
  --bg-surface:     #0F1535;

  /* Accent per sector */
  --cyan-glow:      #00D4FF;
  --emerald-glow:   #00FF94;
  --amber-glow:     #FFB347;

  /* Brand */
  --indigo:         #6366F1;
  --violet:         #8B5CF6;
  --cta:            #F97316;

  /* Glass */
  --glass-bg:       rgba(255, 255, 255, 0.04);
  --glass-border:   rgba(255, 255, 255, 0.08);
  --glass-hover:    rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-heading:   'Space Grotesk', system-ui, sans-serif;
  --font-body:      'DM Sans', system-ui, sans-serif;

  /* Motion */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-expo:   cubic-bezier(0.7, 0, 0.84, 0);
}

/* ── Base Reset ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-void);
  color: #E8EAF6;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb {
  background: var(--indigo);
  border-radius: 3px;
}

/* ============================================================
   BACKGROUND EFFECTS
   ============================================================ */

/* Animated mesh gradient background */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99,102,241,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(139,92,246,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 90%, rgba(0,212,255,0.06) 0%, transparent 60%),
    linear-gradient(180deg, #000000 0%, #050510 30%, #0A0E1F 70%, #000000 100%);
  pointer-events: none;
}

/* Subtle grid overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(99,102,241,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,102,241,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Noise texture overlay */
.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
}

/* ============================================================
   GLASSMORPHISM COMPONENTS
   ============================================================ */

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.glass-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  transition: transform 250ms var(--ease-out-expo),
              box-shadow 250ms var(--ease-out-expo),
              border-color 250ms ease,
              background 250ms ease;
}

.glass-card:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.04) 100%);
  transform: translateY(-4px);
}

/* Sector-specific card glow on hover */
.card-tech:hover {
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.08), 0 20px 60px rgba(0,0,0,0.4);
}
.card-edu:hover {
  border-color: rgba(0, 255, 148, 0.35);
  box-shadow: 0 0 40px rgba(0, 255, 148, 0.08), 0 20px 60px rgba(0,0,0,0.4);
}
.card-industry:hover {
  border-color: rgba(255, 179, 71, 0.35);
  box-shadow: 0 0 40px rgba(255, 179, 71, 0.08), 0 20px 60px rgba(0,0,0,0.4);
}

/* ============================================================
   GRADIENT TEXT
   ============================================================ */

.gradient-text {
  background: linear-gradient(135deg, #A5B4FC 0%, #818CF8 40%, #C4B5FD 70%, #E879F9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-cyan {
  background: linear-gradient(135deg, #00D4FF 0%, #0099FF 50%, #6366F1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-emerald {
  background: linear-gradient(135deg, #00FF94 0%, #00C9A7 50%, #0099FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-amber {
  background: linear-gradient(135deg, #FFB347 0%, #FF8C00 50%, #FF6347 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   SECTOR ICON BADGES
   ============================================================ */

.sector-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  flex-shrink: 0;
}

.sector-icon-tech {
  background: linear-gradient(135deg, rgba(0,212,255,0.15) 0%, rgba(0,212,255,0.05) 100%);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--cyan-glow);
}
.sector-icon-edu {
  background: linear-gradient(135deg, rgba(0,255,148,0.15) 0%, rgba(0,255,148,0.05) 100%);
  border: 1px solid rgba(0,255,148,0.2);
  color: var(--emerald-glow);
}
.sector-icon-industry {
  background: linear-gradient(135deg, rgba(255,179,71,0.15) 0%, rgba(255,179,71,0.05) 100%);
  border: 1px solid rgba(255,179,71,0.2);
  color: var(--amber-glow);
}

/* ============================================================
   ACCENT BADGES / TAGS
   ============================================================ */

.badge-tech {
  background: rgba(0, 212, 255, 0.10);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: #67E8F9;
}
.badge-edu {
  background: rgba(0, 255, 148, 0.10);
  border: 1px solid rgba(0, 255, 148, 0.25);
  color: #6EE7B7;
}
.badge-industry {
  background: rgba(255, 179, 71, 0.10);
  border: 1px solid rgba(255, 179, 71, 0.25);
  color: #FCD34D;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 1200px;
  z-index: 50;
  border-radius: 16px;
  transition: background 300ms ease, box-shadow 300ms ease;
}

.navbar.scrolled {
  background: rgba(5, 5, 16, 0.90) !important;
  backdrop-filter: blur(32px) !important;
  -webkit-backdrop-filter: blur(32px) !important;
  box-shadow: 0 4px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  transition: opacity 200ms ease, transform 200ms var(--ease-out-expo), box-shadow 200ms ease;
  box-shadow: 0 0 0 0 rgba(99,102,241,0);
}
.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99,102,241,0.35);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-cta {
  background: linear-gradient(135deg, #F97316 0%, #EF4444 100%);
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 200ms ease, transform 200ms var(--ease-out-expo), box-shadow 200ms ease;
}
.btn-cta:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(249,115,22,0.40);
}

.btn-ghost {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: #C4C9F0;
  font-family: var(--font-heading);
  font-weight: 500;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: white;
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, transparent 70%);
  top: -100px; left: -150px;
}
.hero-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.14) 0%, transparent 70%);
  top: 50px; right: -100px;
}
.hero-orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(0,212,255,0.08) 0%, transparent 70%);
  bottom: 0; left: 50%;
  transform: translateX(-50%);
}

/* Animated border glow */
.glow-border {
  position: relative;
}
.glow-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(99,102,241,0.6), rgba(139,92,246,0.3), rgba(0,212,255,0.4));
  z-index: -1;
  opacity: 0;
  transition: opacity 300ms ease;
}
.glow-border:hover::before { opacity: 1; }

/* Typing cursor */
.cursor-blink {
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ============================================================
   ANIMATIONS — Entrance
   ============================================================ */

.animate-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-out-expo), transform 600ms var(--ease-out-expo);
}
.animate-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade-in {
  opacity: 0;
  transition: opacity 500ms ease;
}
.animate-fade-in.visible { opacity: 1; }

/* Staggered delay utilities */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }
.delay-600 { transition-delay: 600ms; }
.delay-700 { transition-delay: 700ms; }
.delay-800 { transition-delay: 800ms; }

/* Float animation for hero elements */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}
.animate-float { animation: float 5s ease-in-out infinite; }
.animate-float-slow { animation: float 7s ease-in-out infinite; }
.animate-float-delayed { animation: float 6s ease-in-out 1.5s infinite; }

/* Pulse glow */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(99,102,241,0.2); }
  50%       { box-shadow: 0 0 40px rgba(99,102,241,0.5), 0 0 80px rgba(99,102,241,0.15); }
}
.animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }

/* Stats counter */
@keyframes count-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   STATS BAR
   ============================================================ */

.stat-divider {
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.12), transparent);
  height: 40px;
}

/* ============================================================
   PRODUCT CARDS — Sub-product items
   ============================================================ */

.sub-product {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 200ms ease, border-color 200ms ease;
  cursor: pointer;
}
.sub-product:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
}
.sub-product-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================================
   FEATURE GRID
   ============================================================ */

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  transition: background 200ms ease, border-color 200ms ease, transform 200ms var(--ease-out-expo);
}
.feature-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(99,102,241,0.2);
  transform: translateY(-2px);
}
.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.08));
  border: 1px solid rgba(99,102,241,0.2);
  color: #A5B4FC;
  flex-shrink: 0;
}

/* ============================================================
   CTA SECTION
   ============================================================ */

.cta-section {
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(99,102,241,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(139,92,246,0.10) 0%, transparent 60%);
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer-link {
  color: #6B7280;
  transition: color 200ms ease;
  text-decoration: none;
}
.footer-link:hover { color: #A5B4FC; }

/* ============================================================
   SCROLLING MARQUEE
   ============================================================ */

.marquee-wrapper {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 48px;
  animation: marquee 30s linear infinite;
  width: max-content;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track:hover { animation-play-state: paused; }

/* ============================================================
   FOCUS STATES (Accessibility)
   ============================================================ */

:focus-visible {
  outline: 2px solid #6366F1;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   LOGO PILL — Animated conic-gradient border
   Borde giratorio con glow inteligente
   ============================================================ */

.logo-pill {
  position: relative;
  border-radius: 16px;
  padding: 2px;           /* grosor del borde */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  overflow: hidden;
  cursor: pointer;
  transition: transform 250ms var(--ease-out-expo);
}

/* Borde conic-gradient giratorio */
.logo-pill::before {
  content: '';
  position: absolute;
  width: 220%;
  height: 220%;
  top: -60%;
  left: -60%;
  background: conic-gradient(
    from 0deg,
    #00D4FF   0deg,
    #6366F1   72deg,
    #8B5CF6  144deg,
    #00D4FF  216deg,
    #EC4899  288deg,
    #00D4FF  360deg
  );
  animation: logo-border-spin 4s linear infinite;
  z-index: -2;
}

/* Relleno interior oscuro */
.logo-pill::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 14px;
  background: rgba(3, 6, 20, 0.96);
  z-index: -1;
}

/* Glow pulsante detrás del pill */
.logo-pill-glow {
  position: absolute;
  inset: -8px;
  border-radius: 22px;
  background: radial-gradient(ellipse, rgba(0,212,255,0.12) 0%, transparent 70%);
  animation: logo-glow-pulse 3s ease-in-out infinite;
  pointer-events: none;
  z-index: -3;
}

.logo-pill:hover {
  transform: scale(1.02);
}
.logo-pill:hover::before {
  animation-duration: 2s; /* más rápido al hover */
}

@keyframes logo-border-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes logo-glow-pulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
    background: radial-gradient(ellipse, rgba(0,212,255,0.22) 0%, rgba(99,102,241,0.08) 50%, transparent 70%);
  }
}

/* Shimmer scan-line effect */
.logo-pill-inner {
  position: relative;
  padding: 6px 14px;
  overflow: hidden;
  border-radius: 13px;
}
.logo-pill-inner::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 60%;
  height: 300%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,0.06) 50%,
    transparent 60%
  );
  animation: logo-shimmer 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes logo-shimmer {
  0%   { transform: translateX(-100%) translateY(-50%); }
  40%  { transform: translateX(400%) translateY(50%); }
  100% { transform: translateX(400%) translateY(50%); }
}

/* ============================================================
   TECH BACKGROUND — Circuit board + Electronics symbols
   Fondo 3D tenue: PCB, nodos, binario, componentes
   ============================================================ */

#circuit-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 1;
}

/* Floating electronic symbol SVGs */
.tech-symbol {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  color: rgba(0, 212, 255, 0.12);
  animation: tech-symbol-float 20s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes tech-symbol-float {
  0%   { opacity: 0;    transform: translateY(0px)   rotate(0deg)   scale(0.9); }
  10%  { opacity: 1; }
  50%  { opacity: 0.7;  transform: translateY(-25px) rotate(5deg)   scale(1.05); }
  90%  { opacity: 0.8; }
  100% { opacity: 0;    transform: translateY(-50px) rotate(-3deg)  scale(0.9); }
}

/* Binary rain column */
.binary-col {
  position: fixed;
  top: 0;
  font-family: 'Space Grotesk', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(0, 212, 255, 0.07);
  line-height: 1.8;
  white-space: pre;
  pointer-events: none;
  z-index: 0;
  animation: binary-fall linear infinite;
  user-select: none;
}

@keyframes binary-fall {
  from { transform: translateY(-100%); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.8; }
  to   { transform: translateY(110vh); opacity: 0; }
}

/* ============================================================
   ADMIN SIDEBAR — Logo pill compact
   ============================================================ */

.logo-pill-admin {
  position: relative;
  border-radius: 14px;
  padding: 2px;
  display: block;
  isolation: isolate;
  overflow: hidden;
}
.logo-pill-admin::before {
  content: '';
  position: absolute;
  width: 220%;
  height: 220%;
  top: -60%;
  left: -60%;
  background: conic-gradient(
    from 0deg,
    #00D4FF 0deg, #6366F1 120deg, #8B5CF6 240deg, #00D4FF 360deg
  );
  animation: logo-border-spin 5s linear infinite;
  z-index: -2;
}
.logo-pill-admin::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 12px;
  background: rgba(3, 6, 20, 0.97);
  z-index: -1;
}
