/* --- CSSN COMBAT: ELITE TACTICAL HUB v5.3 --- */

:root {
  --combat-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --color-indigo: #6366f1;
  --color-cyan: #06b6d4;
  --color-emerald: #10b981;
  --color-amber: #f59e0b;
  --color-violet: #8b5cf6;
  --color-rose: #f43f5e;
  
  --glass-stroke: rgba(255, 255, 255, 0.08);
  --glass-surface: rgba(15, 23, 42, 0.45);
}

/* --- HERO: 100x CINEMATIC ENGINE --- */

#hero-sector {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #020617;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero-bg-wrapper {
  pointer-events: none;
  overflow: hidden;
}

.hero-video-mask {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Unified Media Container: Visibility Upgrade */
.hero-media-container {
  position: absolute;
  inset: 0;
  opacity: 0.36; /* Increased visibility from 0.28 */
  filter: grayscale(0.5) contrast(1.1) brightness(1) blur(1px); /* Softened filters for better definition */
  transition: opacity 1.5s var(--combat-ease);
  background: #020617;
}

.hero-image-fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.77vh;
  transform: translate(-50%, -50%) scale(1.15);
  object-fit: cover;
  z-index: 1;
}

.hero-video-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 ratio */
  min-height: 100vh;
  min-width: 177.77vh; /* 16:9 ratio */
  transform: translate(-50%, -50%) scale(1.15); /* Crop edges for cinematic feel */
  z-index: 2;
  background: transparent;
}

/* ATMOSPHERICS */
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: radial-gradient(circle, transparent 30%, rgba(2, 6, 23, 0.6) 70%, #020617 100%);
}

.hero-noise {
  position: absolute;
  inset: 0;
  z-index: 6;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.04;
  mix-blend-mode: overlay;
}

.hero-bottom-shroud {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  z-index: 7;
  background: linear-gradient(to top, #020617 0%, transparent 100%);
}

/* SHEEN SWEEP SYSTEM */
.hero-sheen-sweep {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow: hidden;
}

.hero-sheen-sweep::after {
  content: '';
  position: absolute;
  top: 0;
  left: -200%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 45%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.05) 55%,
    transparent 100%
  );
  transform: skewX(-30deg);
  transition: none;
}

.sheen-pulse .hero-sheen-sweep::after {
  animation: sweep-action 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sweep-action {
  from { left: -200%; }
  to { left: 200%; }
}

/* TYPOGRAPHY GLISTEN */
.combat-home .combat-heading span.glisten-text {
  position: relative;
  background: linear-gradient(to bottom, #818cf8, #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
}

.combat-home .sheen-pulse .combat-heading span.glisten-text::after {
  content: 'COMBAT.';
  position: absolute;
  inset: 0;
  color: white;
  opacity: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,0.8) 50%, transparent 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: glisten-text-fx 1.2s ease-out forwards;
}

@keyframes glisten-text-fx {
  0% { background-position: 100% 0; opacity: 0; }
  20% { opacity: 0.6; }
  100% { background-position: -100% 0; opacity: 0; }
}

/* --- NETWORK HIERARCHY CARDS --- */

.combat-home #hub-grid .hub-route-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(165deg, var(--glass-surface) 0%, rgba(2, 6, 23, 0.8) 100%) !important;
  border: 1px solid var(--glass-stroke) !important;
  border-radius: 2.25rem;
  padding: 3.5rem 2.75rem;
  transition: all 0.8s var(--combat-ease);
  display: flex;
  flex-direction: column;
  height: 100%;
  backdrop-filter: blur(20px) saturate(1.4);
  z-index: 1;
  box-shadow: 
    0 20px 60px -20px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
}

.combat-home #hub-grid .hub-route-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)%23noise'%3E%3C/rect%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  z-index: -1;
}

.combat-home #hub-grid .hub-route-card::after {
  content: '';
  position: absolute;
  inset: 1.5rem;
  pointer-events: none;
  border: 1px solid var(--card-accent);
  opacity: 0.1;
  mask-image: radial-gradient(circle at center, transparent 65%, black 100%);
  clip-path: polygon(
    0 0, 15px 0, 15px 1px, 1px 1px, 1px 15px, 0 15px,
    calc(100% - 15px) 0, 100% 0, 100% 15px, calc(100% - 1px) 15px, calc(100% - 1px) 1px, calc(100% - 15px) 1px,
    0 calc(100% - 15px), 1px calc(100% - 15px), 1px calc(100% - 1px), 15px calc(100% - 1px), 15px 100%, 0 100%,
    calc(100% - 15px) 100%, 100% 100%, 100% calc(100% - 15px), calc(100% - 1px) calc(100% - 15px), calc(100% - 1px) calc(100% - 1px), calc(100% - 15px) calc(100% - 1px)
  );
  transition: all 0.6s var(--combat-ease);
  z-index: 2;
}

.combat-home #hub-grid .hub-route-card[data-accent="indigo"] { --card-accent: var(--color-indigo); --card-glow: rgba(99, 102, 241, 0.3); }
.combat-home #hub-grid .hub-route-card[data-accent="cyan"] { --card-accent: var(--color-cyan); --card-glow: rgba(6, 182, 212, 0.3); }
.combat-home #hub-grid .hub-route-card[data-accent="emerald"] { --card-accent: var(--color-emerald); --card-glow: rgba(16, 185, 129, 0.3); }
.combat-home #hub-grid .hub-route-card[data-accent="amber"] { --card-accent: var(--color-amber); --card-glow: rgba(245, 158, 11, 0.3); }
.combat-home #hub-grid .hub-route-card[data-accent="violet"] { --card-accent: var(--color-violet); --card-glow: rgba(139, 92, 246, 0.3); }
.combat-home #hub-grid .hub-route-card[data-accent="rose"] { --card-accent: var(--color-rose); --card-glow: rgba(244, 63, 94, 0.3); }

.combat-home #hub-grid .hub-route-card h3 {
  font-size: 2.25rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.05em;
  font-style: italic;
  text-transform: uppercase;
  line-height: 0.95;
  transition: transform 0.5s var(--combat-ease);
}

.combat-home #hub-grid .hub-route-card p {
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.5;
  font-style: italic;
  opacity: 0.85;
  transition: color 0.4s ease;
}

.combat-home #hub-grid .hub-route-card .icon-box {
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--card-accent);
  margin-bottom: 2.5rem;
  transition: all 0.5s var(--combat-ease);
  filter: drop-shadow(0 0 10px var(--card-glow));
}

.combat-home #hub-grid .hub-route-card .route-tag {
  color: var(--card-accent);
  font-weight: 950;
  font-size: 9px;
  letter-spacing: 0.4em;
  opacity: 0.6;
  margin-top: auto;
  padding-top: 2rem;
}

.combat-home #hub-grid .hub-route-card .route-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--card-accent);
  border-radius: 50%;
  margin-right: 1rem;
  vertical-align: middle;
  box-shadow: 0 0 12px var(--card-accent);
  animation: beacon-ping 3s infinite;
}

@keyframes beacon-ping {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.6); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

/* --- HOVER ACTIVATION --- */

.combat-home #hub-grid .hub-route-card:hover {
  transform: translateY(-16px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.2) !important;
  background: linear-gradient(165deg, rgba(30, 41, 59, 0.6) 0%, rgba(2, 6, 23, 0.95) 100%) !important;
  box-shadow: 
    0 60px 120px -30px rgba(0, 0, 0, 0.9), 
    0 0 40px -10px var(--card-glow);
}

.combat-home #hub-grid .hub-route-card:hover::after {
  opacity: 0.6;
  inset: 1.25rem;
}

.combat-home #hub-grid .hub-route-card:hover h3 {
  color: #fff;
  transform: translateX(8px);
  text-shadow: 0 0 25px var(--card-glow);
}

.combat-home #hub-grid .hub-route-card:hover .icon-box {
  background: var(--card-accent);
  color: #fff !important;
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 0 30px var(--card-glow);
}

/* --- RESPONSIVE --- */
@media (max-width: 820px) {
  #hero-sector { min-height: 50vh; }
  .combat-home #hub-grid .hub-route-card {
    padding: 2.75rem 2rem;
    border-radius: 1.75rem;
  }
  .hero-video-frame, .hero-image-fallback { scale: 1.65; } /* Reduced from 2.0 for tablets */
  .hero-media-container { opacity: 0.32; } /* Mobile visibility upgrade */
  .hero-sheen-sweep { display: none; } /* Reduce overhead on mobile */
}

@media (max-width: 480px) {
  .hero-video-frame, .hero-image-fallback { 
    scale: 1.05; 
    min-width: 130vh; /* Show more width/less crop while keeping full area coverage */
  }
}

@media (prefers-reduced-motion: reduce) {
  #hero-sector, .hub-route-card, .combat-home .core-protocol__card {
    animation: none !important;
    transition: opacity 0.4s ease !important;
    transform: none !important;
  }
  .hero-sheen-sweep::after { display: none; }
}