/* ===== BASE & RESET ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

section { contain: layout style paint; }
img, svg { display: block; max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .animated { opacity: 1; transform: none; }
  .equalizer-bar { animation: none; }
}

body {
  font-family: 'Inter', 'Roboto', sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  overflow-x: hidden;
  cursor: none;
}

@media (max-width: 768px) {
  body { cursor: auto; }
}

::selection { background: rgba(255, 0, 0, 0.3); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 1px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ff0000; border-radius: 1px; }

/* ===== CUSTOM CURSOR ===== */
.cursor {
  width: 20px;
  height: 20px;
  border: 1px solid #ff0000;
  border-radius: 50%;
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 9999;
  transition: width 0.3s, height 0.3s, background 0.3s, border-color 0.3s, opacity 0.2s;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor.hover {
  width: 50px;
  height: 50px;
  background: rgba(255, 0, 0, 0.1);
  border-color: #ff0000;
}
.cursor-dot {
  width: 4px;
  height: 4px;
  background: #ff0000;
  border-radius: 50%;
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s;
}
@media (max-width: 768px) {
  .cursor, .cursor-dot { display: none; }
}

/* ===== GLOBAL BACKGROUND ===== */
.global-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: url('https://marus.fm/img/bgkit.jpg') no-repeat center center / cover;
  opacity: 0.4;
  filter: grayscale(100%) blur(1px);
  z-index: -2;
  pointer-events: none;
}
.global-bg-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.55);
  z-index: -1;
  pointer-events: none;
}

/* ===== HERO CSS BACKGROUND (replaces WebGL) ===== */
#webglCanvas { display: none; }
.hero-canvas-css {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 0, 0, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(145, 0, 0, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 20%, rgba(255, 0, 0, 0.08) 0%, transparent 40%);
  background-size: 200% 200%, 200% 200%, 150% 150%;
  animation: heroGradient 20s ease-in-out infinite;
  will-change: background-position;
}
@keyframes heroGradient {
  0%, 100% { background-position: 0% 50%, 100% 50%, 50% 0%; }
  50% { background-position: 100% 50%, 0% 50%, 50% 100%; }
}

/* ===== HERO FM LINE ===== */
.hero-fm {
  white-space: nowrap;
  animation: letterSpacingHero 1.5s ease 0.8s both;
}
@keyframes letterSpacingHero {
  from { letter-spacing: 0.8em; opacity: 0; }
  to { letter-spacing: 0.15em; opacity: 1; }
}
@media (max-width: 640px) {
  .hero-fm {
    font-size: 1rem;
    animation-name: letterSpacingHeroMobile;
  }
  @keyframes letterSpacingHeroMobile {
    from { letter-spacing: 0.4em; opacity: 0; }
    to { letter-spacing: 0.08em; opacity: 1; }
  }
}

/* ===== PARTICLE BACKGROUNDS ===== */
.bg-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== SCROLL REVEAL ===== */
.animated {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.animated.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== GOLD/RED GRADIENT TEXT ===== */
.gold-text {
  background: linear-gradient(135deg, #ff0000 0%, #ff0000 30%, #ff0000 50%, #910000 70%, #ff0000 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.041);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  transition: left 0.8s ease;
  z-index: -1;
}
.glass-card:hover::before { left: 100%; }
.glass-card:hover {
  border-color: rgba(255, 0, 0, 0.25);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4), 0 0 60px rgba(255, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ===== GLOW BORDER ===== */
.glow-border {
  position: relative;
  overflow: hidden;
}
.glow-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.4), rgba(255, 255, 255, 0.05), rgba(255, 0, 0, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ===== ICONS ===== */
.icon-svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-svg.fill { fill: currentColor; stroke: none; }

/* ===== EQUALIZER ===== */
.equalizer-bar {
  animation: equalizer 1.2s ease-in-out infinite;
}
.equalizer-bar:nth-child(1) { animation-delay: 0s; }
.equalizer-bar:nth-child(2) { animation-delay: 0.15s; }
.equalizer-bar:nth-child(3) { animation-delay: 0.3s; }
.equalizer-bar:nth-child(4) { animation-delay: 0.45s; }
.equalizer-bar:nth-child(5) { animation-delay: 0.2s; }
.equalizer-bar:nth-child(6) { animation-delay: 0.35s; }
.equalizer-bar:nth-child(7) { animation-delay: 0.1s; }
.equalizer-bar:nth-child(8) { animation-delay: 0.5s; }
.equalizer-bar:nth-child(9) { animation-delay: 0.25s; }

/* ===== SCROLL INDICATOR ===== */
.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, #ff0000, transparent);
  animation: scrollDown 2.5s ease-in-out infinite;
}

/* ===== CONCEPT ICON BOX ===== */
.concept-icon-box {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
  flex-shrink: 0;
}
.concept-icon-box .icon-svg { width: 22px; height: 22px; }

/* ===== BAR CHART ===== */
.bar-track {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.6), #ff0000, #ff0000);
  border-radius: 5px;
  width: 0;
  transition: width 1.8s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
  border-radius: 0 5px 5px 0;
}

/* ===== COVERAGE ===== */
.coverage-tag {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.coverage-tag::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.coverage-tag:hover::before { opacity: 1; }
.coverage-tag.active {
  border-color: rgba(255, 0, 0, 0.5);
  background: rgba(255, 0, 0, 0.06);
  color: #ff0000;
}

/* Population Tooltip */
.pop-tooltip {
  position: absolute;
  z-index: 100;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: 16px;
  padding: 0.8rem 1.2rem;
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.05em;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 0, 0, 0.08);
  white-space: nowrap;
  text-transform: none;
}
.pop-tooltip.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ===== MAP ===== */
.map-container { position: relative; }
.leaflet-container { background: #0f0f0f !important; }
.leaflet-popup-content-wrapper {
  background: rgba(10, 10, 10, 0.96) !important;
  border: 1px solid rgba(255, 0, 0, 0.25) !important;
  border-radius: 14px !important;
  color: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px);
  padding: 0.8rem 1.2rem !important;
  font-family: 'Inter', 'Roboto', sans-serif;
  font-weight: 300;
  font-size: 0.85rem;
}
.leaflet-popup-tip {
  background: rgba(10, 10, 10, 0.96) !important;
  border: 1px solid rgba(255, 0, 0, 0.25) !important;
}
.leaflet-popup-content { margin: 0 !important; line-height: 1.5; }
.leaflet-control-zoom a {
  background: rgba(10, 10, 10, 0.9) !important;
  color: #ff0000 !important;
  border-color: rgba(255, 0, 0, 0.2) !important;
  transition: all 0.3s ease;
}
.leaflet-control-zoom a:hover {
  background: rgba(255, 0, 0, 0.1) !important;
  border-color: rgba(255, 0, 0, 0.4) !important;
}
.map-marker-circle {
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.65);
  border: 1.5px solid #ff0000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', 'Roboto', sans-serif;
  font-weight: 300;
  text-align: center;
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.4), inset 0 0 8px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}
.map-marker-circle:hover {
  background: rgba(255, 0, 0, 0.9);
  box-shadow: 0 0 22px rgba(255, 0, 0, 0.7);
  transform: scale(1.15);
}
.map-cluster-circle {
  border-radius: 50%;
  background: rgba(145, 0, 0, 0.85);
  border: 1px solid #ff0000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', 'Roboto', sans-serif;
  font-weight: 300;
  text-align: center;
  transition: all 0.3s ease;
}
.map-cluster-circle:hover {
  transform: scale(1.08);
  background: rgba(255, 0, 0, 0.95);
}

/* ===== CHART ===== */
.chart-svg { overflow: visible; }
.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 1;
}
.chart-axis-text {
  fill: rgba(255, 255, 255, 0.5);
  font-family: 'Inter', 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 300;
  text-anchor: middle;
}
.chart-area-fill {
  opacity: 0;
  transition: opacity 2s ease 0.5s;
}
.chart-area-fill.visible { opacity: 1; }
.chart-smooth-line {
  fill: none;
  stroke: #ff0000;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.35));
  stroke-dasharray: 3000;
  stroke-dashoffset: 3000;
  transition: stroke-dashoffset 2.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.chart-smooth-line.drawn { stroke-dashoffset: 0 !important; }
.chart-peak-line {
  stroke: rgba(255, 0, 0, 0.15);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0;
  transition: opacity 1s ease 1.5s;
}
.chart-peak-line.visible { opacity: 1; }
.chart-peak-label {
  fill: #ff0000;
  font-family: 'Inter', 'Roboto', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-anchor: middle;
  opacity: 0;
  transition: opacity 1s ease 2s;
}
.chart-peak-label.visible { opacity: 1; }
.chart-data-point {
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.chart-data-point.visible { opacity: 1; }
.chart-data-point-circle {
  fill: #0a0a0a;
  stroke: #ff0000;
  stroke-width: 2;
  transition: all 0.3s ease;
}
.chart-data-point.peak .chart-data-point-circle {
  fill: #ff0000;
  stroke: #ff0000;
  stroke-width: 3;
  filter: drop-shadow(0 0 12px rgba(255, 0, 0, 0.5));
}
.chart-data-point:hover .chart-data-point-circle {
  r: 7;
  filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.6));
}
.chart-value-label {
  fill: rgba(255, 255, 255, 0.65);
  font-family: 'Inter', 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 300;
  text-anchor: middle;
  opacity: 0;
  transition: all 0.6s ease;
}
.chart-value-label.visible { opacity: 1; }
.chart-value-label.peak {
  fill: #ff0000;
  font-size: 30px;
  font-weight: 300;
}
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(10, 10, 10, 0.96);
  border: 1px solid rgba(255, 0, 0, 0.25);
  border-radius: 14px;
  padding: 1rem 1.3rem;
  font-size: 0.8rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1;
  backdrop-filter: blur(20px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
  transform: translateY(5px);
  text-transform: none;
}
.chart-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===== MEDIASCOPE ===== */
.ms-lead-card {
  position: relative;
  overflow: hidden;
}
.ms-lead-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
  transition: left 0.8s ease;
  z-index: -1;
}
.ms-lead-card:hover::before { left: 100%; }
.ms-lead-card {
  transition: border-color 0.6s ease, box-shadow 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.ms-lead-card:hover {
  border-color: rgba(255, 0, 0, 0.4);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4), 0 0 60px rgba(255, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-6px);
}
.ms-data-value {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.ms-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.5), #ff0000);
  border-radius: 4px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ms-progress-fill.current {
  background: linear-gradient(90deg, #ff0000, #ff0000);
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.3);
}

/* ===== PROGRAMS ===== */
.programs-grid.active { display: grid; }
.program-tab { transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.program-tab.active {
  background: rgba(255, 0, 0, 0.06);
  border-color: rgba(255, 0, 0, 0.4);
  color: #ff0000;
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.program-card { transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.program-card:hover {
  border-color: rgba(255, 0, 0, 0.25);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4), 0 0 60px rgba(255, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.program-icon-wrap { transition: all 0.5s ease; }
.program-card:hover .program-icon-wrap {
  border-color: rgba(255, 0, 0, 0.3);
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.08);
  transform: scale(1.08);
}

/* ===== CONTACT ===== */
.contact-email::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: #ff0000;
  transition: all 0.4s ease;
  transform: translateX(-50%);
}
.contact-email:hover::after { width: 100%; }

/* ===== KEYFRAMES ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(80px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
@keyframes borderGlow {
  0%, 100% { border-color: rgba(255, 0, 0, 0.1); box-shadow: 0 0 20px rgba(255, 0, 0, 0.02); }
  50% { border-color: rgba(255, 0, 0, 0.3); box-shadow: 0 0 40px rgba(255, 0, 0, 0.06); }
}
@keyframes letterSpacing {
  from { letter-spacing: 1em; opacity: 0; }
  to { letter-spacing: 0.15em; opacity: 1; }
}
@keyframes equalizer {
  0%, 100% { height: 20%; }
  50% { height: 100%; }
}
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes scrollDown {
  0% { top: -100%; }
  100% { top: 100%; }
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
  .glass-card, .hero-badge, .pop-tooltip, .chart-tooltip {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .hero-canvas-css { animation-duration: 30s; opacity: 0.4; }
  .chart-peak-label { font-size: 13px; letter-spacing: 0.2em; }
  .chart-axis-text { font-size: 12px; }
  .chart-value-label { font-size: 11px; fill: rgba(255, 255, 255, 0.85); }
  .chart-value-label.peak { font-size: 18px; }
}
@media (max-width: 600px) {
  .chart-peak-label { font-size: 25px; letter-spacing: 0.15em; }
}
