/* ==========================================================================
   fiber-experience.css — Aligned to Main Site Design System
   ========================================================================== */

/* Inherit main site design tokens + fiber-specific extras */
:root {
    /* === Main Site Tokens (mirrored) === */
    --bg-base:              #070a0e;
    --hero-bg:              #0a0f24;
    --bg-surface:           #0f1319;
    --bg-surface-2:         #0e1c24;
    --bg-surface-hover:     #141a22;
    --bg-surface-glass:     rgba(7, 10, 14, 0.85);
    --primary:              #417890;
    --primary-rgb:          65, 120, 144;
    --primary-glow:         rgba(65, 120, 144, 0.12);
    --primary-glow-strong:  rgba(65, 120, 144, 0.4);
    --primary-border:       rgba(255, 255, 255, 0.04);
    --primary-border-hover: rgba(65, 120, 144, 0.35);
    --primary-light:        #5a9db5;
    --text-primary:         #e8edf2;
    --text-secondary:       #8a9bb0;
    --text-muted:           #5a6e85;
    --font-family:          'Outfit', sans-serif;
    --transition-fast:      0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-normal:    0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow:      0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --card-shadow:          0 4px 20px rgba(0, 0, 0, 0.2);
    --card-shadow-hover:    0 12px 36px rgba(0, 0, 0, 0.4);

    /* === Fiber-specific extras === */
    --copper:               #c87941;
    --copper-light:         #e8a060;
    --copper-glow:          rgba(200, 121, 65, 0.4);
    --status-green:         #22c55e;
    --status-red:           #ef4444;
    --status-yellow:        #f59e0b;
    --border-subtle:        rgba(65, 120, 144, 0.2);
    --border-faint:         rgba(255, 255, 255, 0.06);
    --surface-tinted:       rgba(65, 120, 144, 0.08);
    --radius:               8px;  /* match main site card radius */
    --radius-lg:            12px;
}

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

html { scroll-behavior: smooth; font-size: 16px; background-color: var(--bg-base); }

body {
    font-family: var(--font-family);
    background-color: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.lock-scroll { overflow: hidden; }

::selection { background: var(--primary); color: #fff; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
    background: #17202c;
    border-radius: 4px;
    border: 2px solid var(--bg-base);
    transition: var(--transition-fast);
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    line-height: 1.25;
}

a { color: inherit; text-decoration: none; transition: var(--transition-fast); }
p { color: var(--text-secondary); font-weight: 300; }

/* ── Container ──────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Section ────────────────────────────────────────────────────────────── */
section {
    padding: 8rem 0;
    position: relative;
    z-index: 2;
    background-color: var(--bg-base);
}

section:nth-child(even) { background-color: #080c11; }

/* ── Section Header ─────────────────────────────────────────────────────── */
.section-header {
    text-align: left;
    margin-bottom: 4rem;
    max-width: 600px;
}

.section-header .subtitle {
    font-size: 0.725rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    display: block;
    margin-bottom: 0.5rem;
}

.section-header .title {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.section-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.8rem 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-family);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    border: 1px solid transparent;
    z-index: 2;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: #4f8ca8;
    border-color: #4f8ca8;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(65, 120, 144, 0.25);
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition-normal);
}

.card:hover {
    border-color: var(--primary-border-hover);
    background: var(--bg-surface-hover);
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

/* ── Preloader ──────────────────────────────────────────────────────────── */
#preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100dvh;
    background: var(--bg-base);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.85, 0, 0.15, 1),
                opacity   0.3s cubic-bezier(0.85, 0, 0.15, 1);}

#preloader.loaded {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.preloader-content::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(65, 120, 144, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(10px);
}

.preloader-logo {
    width: 150px;
    opacity: 0;
    transform: scale(0.96);
    animation: logoEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.preloader-bar-wrap {
    width: 180px;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin-top: 2rem;
    overflow: hidden;
}

.preloader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(65, 120, 144, 0.6);
    transition: width 0.15s ease-out;
}

.preloader-label {
    margin-top: 0.75rem;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0;
    animation: logoEnter 0.4s 0.3s ease forwards;
}

@keyframes logoEnter {
    to { opacity: 1; transform: scale(1); }
}

/* ── Scroll Reveal ──────────────────────────────────────────────────────── */
.reveal { opacity: 0; }
.reveal-slide-up,
.reveal-slide-left,
.reveal-slide-right { will-change: transform, opacity; }
.reveal-active { will-change: auto; }.reveal-active { opacity: 1 !important; transform: translate3d(0,0,0) scale(1) !important; }
.reveal-slide-up {
    transform: translate3d(0, 35px, 0);
    transition: transform var(--transition-slow), opacity var(--transition-slow);
}
.reveal-slide-left {
    transform: translate3d(45px, 0, 0);
    transition: transform var(--transition-slow), opacity var(--transition-slow);
}
.reveal-slide-right {
    transform: translate3d(-45px, 0, 0);
    transition: transform var(--transition-slow), opacity var(--transition-slow);
}

/* ── Header (Identical to main site) ───────────────────────────────────── */
header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    padding: 1.5rem 0;
    transition: padding var(--transition-normal);
    pointer-events: none;
}

header.scrolled { padding: 0.85rem 0; }

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 19, 25, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    padding: 0.6rem 2rem;
    margin: 0 auto;
    width: calc(100% - 3rem);
    max-width: 1100px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-normal);
    pointer-events: auto;
}

header.scrolled .header-container {
    background: rgba(15, 19, 25, 0.6);
    border-color: rgba(65, 120, 144, 0.25);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 20px rgba(65,120,144,0.05);
    padding: 0.5rem 2rem;
}

.logo { display: flex; align-items: center; transition: all var(--transition-normal); }
.logo img { height: 38px; width: auto; object-fit: contain; transition: var(--transition-normal); }
header.scrolled .logo img { height: 30px; }

.nav-desktop { display: flex; align-items: center; gap: 2.2rem; }

.nav-link {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    position: relative;
    padding: 0.35rem 0;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 1px;
    background: var(--primary);
    transition: var(--transition-normal);
}

.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Mobile Hamburger */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 38px; height: 38px;
    position: relative;
    z-index: 1010;
}

.menu-toggle span {
    display: block;
    position: absolute;
    height: 1.5px; width: 20px;
    background: var(--text-primary);
    left: 9px;
    transition: transform var(--transition-normal),
                background var(--transition-normal),
                opacity var(--transition-normal);
}

.menu-toggle span:nth-child(1) { top: 13px; }
.menu-toggle span:nth-child(2) { top: 19px; }
.menu-toggle span:nth-child(3) { top: 25px; }

.menu-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg);  background: var(--primary); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); background: var(--primary); }

/* Mobile Drawer */
.nav-mobile {
    position: fixed;
    top: 0; right: -100%;
    width: 100%; max-width: 300px;
    height: 100vh;
    background: rgba(15, 19, 25, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255,255,255,0.02);
    padding: 6.5rem 2.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 1005;
    transition: right 0.5s cubic-bezier(0.16,1,0.3,1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}

.nav-mobile.open { right: 0; }
.nav-mobile .nav-link { font-size: 1.1rem; padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.02); }

.mobile-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(7,10,14,0.5);
    backdrop-filter: blur(4px);
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.mobile-overlay.active { opacity: 1; pointer-events: all; }

/* ── Hero Section ───────────────────────────────────────────────────────── */
#hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: clamp(100px, 18vh, 180px) 0 clamp(60px, 8vh, 100px) 0;
    overflow: hidden;
    background-color: var(--hero-bg);
    z-index: 1;
}
.hero-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
    /* Connector Visuals */

.connector-card {
    width: min(32vw, 420px);
    min-width: 280px;
    padding: 16px 18px 12px;
    border: 1px solid var(--border-faint);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
    box-shadow: 0 24px 70px rgba(0,0,0,.32);
    backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
}

.connector-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 20%, rgba(255,255,255,.08), transparent 58%);
    opacity: .9;
}

.connector-label {
    position: relative;
    z-index: 2;
    width: max-content;
    max-width: 100%;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(6,12,16,.74);
    border: 1px solid var(--border-subtle);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    gap: 1rem;         
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    max-width: 800px;
}

.hero-tag {
    font-size: 0.725rem;
    font-weight: 500;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-tinted);
}

.hero-title {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 0;
}

.hero-title span {
    background: linear-gradient(135deg, var(--text-primary) 20%, var(--primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 560px;
    line-height: 1.6;
    margin: 0;
}

.hero-buttons { display: flex; justify-content: center; gap: 1rem; }

.hero-stats {
    display: flex;
    flex-wrap: wrap;          /* ADD THIS */
    gap: clamp(1rem, 3vw, 3rem);
    margin-top: 0.5rem;
    padding-top: 1rem;
    justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.04);
    width: 100%;
}

.hero-stat { text-align: center; }
.hero-stat-num {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.hero-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 4px;
}
/* Connector Visuals */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}

.hero-connector-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px; /* Slight increase to give the dramatic badge breathing room */
  width: 100%;
  max-width: 640px;
  margin: 16px auto 0;
}

.vs-particles {
  position: absolute;
  inset: -40px;
  width: calc(100% + 80px);
  height: calc(100% + 80px);
  pointer-events: none;
  z-index: 0;
}

.connector-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 28px 24px;  /* reduced from 28px 32px 32px */  min-width: 220px;
  flex: 1;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgba(8, 15, 26, 0.75);
  position: relative;
  overflow: hidden;
  z-index: 1;
  border-radius: 24px;
  animation: cardFloat 4s ease-in-out infinite;
}

.connector-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.07), transparent 65%);
  pointer-events: none;
}

.connector-card-fiber {
  border: 1px solid rgba(116, 214, 241, 0.35);
  box-shadow:
    0 12px 40px rgba(8, 15, 26, 0.5),
    0 0 40px rgba(116, 214, 241, 0.12),
    0 0 100px rgba(116, 214, 241, 0.05),
    inset 0 0 20px rgba(116, 214, 241, 0.05);
  animation-delay: 0s;
}

.connector-card-ethernet {
  border: 1px solid rgba(255, 165, 80, 0.35);
  box-shadow:
    0 12px 40px rgba(8, 15, 26, 0.5),
    0 0 40px rgba(255, 165, 80, 0.12),
    0 0 100px rgba(255, 165, 80, 0.05),
    inset 0 0 20px rgba(255, 165, 80, 0.05);
  animation-delay: 2s;
}

/* HIGHLY DRAMATIC & POLISHED VS BADGE */
.vs-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* Deep glossy metallic surface */
  background: linear-gradient(135deg, rgba(28, 43, 65, 0.95) 0%, rgba(6, 12, 22, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: #ffffff;
  text-transform: uppercase;
  z-index: 3;
  flex-shrink: 0;
  position: relative;
  margin: 0 -28px;
  animation: vsDramaticPulse 3s ease-in-out infinite;
  
  /* Dual-glow split box shadows blending Blue + Amber */
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -2px 6px rgba(0, 0, 0, 0.6),
    -10px 0 25px rgba(116, 214, 241, 0.25),  /* Fiber Blue Glow */
     10px 0 25px rgba(255, 165, 80, 0.25),   /* Ethernet Amber Glow */
     0 12px 30px rgba(0, 0, 0, 0.5);
}

/* Thin Cinematic Outer Ring */
.vs-badge::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  pointer-events: none;
  z-index: -1;
  animation: slowOrbit 20s linear infinite;
}

.connector-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.5;
  text-align: center;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.connector-img {
  width: 150px;
  height: 110px;
  width: 130px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.connector-card-fiber .connector-img {
  animation: imgPulseBlue 4s ease-in-out infinite;
}

.connector-card-ethernet .connector-img {
  animation: imgPulseAmber 4s ease-in-out infinite;
  animation-delay: 2s;
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

/* Polished Dramatic Animations */
@keyframes vsDramaticPulse {
  0%, 100% { 
    transform: scale(1);  
    box-shadow:
      inset 0 2px 4px rgba(255, 255, 255, 0.2),
      inset 0 -2px 6px rgba(0, 0, 0, 0.6),
      -8px 0 20px rgba(116, 214, 241, 0.2),
       8px 0 20px rgba(255, 165, 80, 0.2),
       0 10px 25px rgba(0, 0, 0, 0.5);
  }
  50% { 
    transform: scale(1.06); 
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow:
      inset 0 3px 6px rgba(255, 255, 255, 0.3),
      inset 0 -2px 8px rgba(0, 0, 0, 0.7),
      -16px 0 35px rgba(116, 214, 241, 0.45), /* Expanded dual energy */
       16px 0 35px rgba(255, 165, 80, 0.45),
       0 14px 35px rgba(0, 0, 0, 0.6);
  }
}

@keyframes slowOrbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes imgPulseBlue {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(116,214,241,0.4)); }
  50%       { filter: drop-shadow(0 0 22px rgba(116,214,241,0.8)) brightness(1.1); }
}

@keyframes imgPulseAmber {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255,165,80,0.4)); }
  50%       { filter: drop-shadow(0 0 22px rgba(255,165,80,0.8)) brightness(1.1); }
}    /* Scroll Down — identical to main site */
.scroll-down {
    position: absolute;
    bottom: 2rem; left: 1.5rem;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: var(--transition-fast);
}

.scroll-down:hover { color: var(--text-primary); }
.scroll-down span { height: 1px; width: 30px; background: var(--text-muted); display: inline-block; transition: var(--transition-fast); }
.scroll-down span:first-child { width: auto; height: auto; background: none; }
.scroll-down:hover span:last-child { width: 45px; background: var(--primary); }

/* ── Real-Time Ticker ───────────────────────────────────────────────────── */
.rt-ticker {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-faint);
    border-bottom: 1px solid var(--border-faint);
    padding: 12px 0;
    overflow: hidden;
    direction: ltr;
    position: relative;
    z-index: 2;
}

.ticker-inner {
    display: flex;
    width: max-content;
    min-width: max-content;
    gap: 0;
    direction: ltr;
    animation: ticker 40s linear infinite;
    white-space: nowrap;
    will-change: transform;
}

.ticker-item {
    flex: 0 0 auto;
}
.ticker-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 32px; font-size: 11px; color: var(--text-muted); letter-spacing: 0.05em; }
.ticker-item strong { color: var(--primary); }
.ticker-sep { color: var(--text-muted); opacity: 0.4; }

/* ── MODULE 1: SPEED RACE ───────────────────────────────────────────────── */
.race-activities {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2.5rem;
}

.activity-btn {
    padding: 10px 20px;
    border-radius: 100px;
    border: 1px solid var(--primary-border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-family);
}

.activity-btn:hover  { border-color: var(--primary); color: var(--primary); }
.activity-btn.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow-strong);
}

.race-arena { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }

.race-building { overflow: hidden; }
.race-building:hover { transform: none; } /* override card hover lift for race buildings */

.race-building-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--primary-border);
}

.race-building-title {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag-copper {
    padding: 3px 10px;
    border-radius: 100px;
    background: rgba(200,121,65,.15);
    color: var(--copper-light);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.tag-fiber {
    padding: 3px 10px;
    border-radius: 100px;
    background: var(--surface-tinted);
    color: var(--primary);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.race-building-body { padding: 1.5rem; }

.building-visual {
    height: 120px;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.building-copper-vis { background: linear-gradient(180deg, #1a0f08 0%, #2a1810 100%); }
.building-fiber-vis  { background: linear-gradient(180deg, #060e14 0%, #0a1820 100%); }

.progress-track { height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; margin-bottom: 8px; overflow: hidden; }
.progress-bar   { height: 100%; border-radius: 3px; transition: width .1s linear; position: relative; }
.progress-copper { background: linear-gradient(90deg, var(--copper), var(--copper-light)); }
.progress-fiber  { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.progress-bar::after { content:''; position:absolute; right:0; top:0; bottom:0; width:20px; background:linear-gradient(90deg,transparent,rgba(255,255,255,.3)); animation: shimmer .8s infinite; }

.pct-label { font-size: 11px; color: var(--text-muted); text-align: right; margin-bottom: 12px; }

.race-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric-box {
    background: rgba(255,255,255,.03);
    border-radius: var(--radius);
    padding: 12px;
    border: 1px solid var(--primary-border);
}
.metric-label { font-size: 10px; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 4px; text-transform: uppercase; }
.metric-value { font-size: 18px; font-weight: 700; }
.metric-copper { color: var(--copper-light); }
.metric-fiber  { color: var(--primary); }

.buffering {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.6);
    border-radius: var(--radius);
    opacity: 0;
    transition: opacity .3s;
}
.buffering.active { opacity: 1; }
.buffer-spinner { width: 32px; height: 32px; border: 3px solid rgba(255,255,255,.1); border-top-color: var(--copper); border-radius: 50%; animation: spin .8s linear infinite; }

.race-start-btn { display: block; width: 100%; margin-top: 0.5rem; }

/* ── MODULE 2: SMART BUILDING ───────────────────────────────────────────── */
.smart-grid { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 1.5rem; align-items: start; }

.services-panel, .building-panel, .status-panel { overflow: hidden; }
.services-panel:hover, .building-panel:hover, .status-panel:hover { transform: none; }

.panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--primary-border);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.service-item {
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,.03);
    cursor: pointer;
    transition: background var(--transition-fast);
}
.service-item:hover { background: rgba(255,255,255,0.02); }

.service-info { display: flex; align-items: center; gap: 12px; }
.service-icon {
    width: 32px; height: 32px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    background: var(--surface-tinted);
    border: 1px solid var(--primary-border);
}
.service-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.service-bw   { font-size: 11px; color: var(--text-muted); }

.toggle {
    width: 40px; height: 22px;
    border-radius: 11px;
    background: rgba(255,255,255,.1);
    position: relative;
    cursor: pointer;
    transition: all .3s;
    border: none;
    flex-shrink: 0;
}
.toggle::after { content:''; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#fff; transition: all .3s; }
.toggle.on { background: var(--primary); }
.toggle.on::after { left: 21px; }

.building-vis-large { padding: 1.25rem; }
.bw-meter { margin: 1rem 0; padding: 1rem 1.25rem; background: rgba(255,255,255,.03); border-radius: var(--radius); border: 1px solid var(--primary-border); }
.bw-meter-label { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; color: var(--text-secondary); }
.bw-track { height: 8px; background: rgba(255,255,255,.05); border-radius: 4px; overflow: hidden; }
.bw-fill  { height: 100%; border-radius: 4px; transition: width .5s ease; }

.network-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 1rem; }
.net-box { padding: 1rem; border-radius: var(--radius); border: 1px solid var(--primary-border); background: rgba(255,255,255,.02); }
.net-box-label { font-size: 11px; letter-spacing: 1px; margin-bottom: 8px; font-weight: 600; text-transform: uppercase; }
.net-status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.net-status-text { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

.fiber-quote {
    margin-top: 1rem;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--surface-tinted);
    border: 1px solid var(--primary-border);
    font-size: 12px;
    color: var(--primary);
    text-align: center;
    font-style: italic;
}

.status-list { padding: 1rem; }
.status-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.03); font-size: 13px; }
.status-indicator { padding: 3px 10px; border-radius: 100px; font-size: 10px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.si-ok   { background: rgba(34,197,94,.1);  color: var(--status-green); }
.si-warn { background: rgba(245,158,11,.1); color: var(--status-yellow); }
.si-err  { background: rgba(239,68,68,.1);  color: var(--status-red); }

/* ── MODULE 3: DISTANCE ─────────────────────────────────────────────────── */
.distance-control { margin: 2rem 0; }

.dist-value-display {
    text-align: center;
    margin: 1rem 0;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
}
.dist-value-display span { font-size: 1rem; color: var(--text-muted); font-weight: 400; }

.slider-track { position: relative; padding: 20px 0; }

.dist-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, rgba(65,120,144,.3) 100%);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.dist-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--primary-light);
    box-shadow: 0 0 16px var(--primary-glow-strong);
    cursor: pointer;
    transition: all .2s;
}
.dist-slider::-webkit-slider-thumb:hover { transform: scale(1.2); box-shadow: 0 0 24px var(--primary-glow-strong); }

.dist-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); letter-spacing: 0.05em; margin-top: 8px; }

.perf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 2rem 0; }
.perf-card { overflow: hidden; }
.perf-card:hover { transform: none; }
.perf-card-inner { padding: 1.5rem; }
.perf-card-title { font-size: 13px; font-weight: 600; letter-spacing: 0.05em; margin-bottom: 1.25rem; display: flex; align-items: center; gap: 8px; padding: 1.5rem 1.5rem 0; }
.perf-bars { padding: 0 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 14px; }
.perf-row { display: flex; flex-direction: column; gap: 6px; }
.perf-row-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); }
.perf-track { height: 5px; background: rgba(255,255,255,.05); border-radius: 3px; overflow: hidden; }
.perf-fill  { height: 100%; border-radius: 3px; transition: width 1s cubic-bezier(.4,0,.2,1); }

.chart-area { margin-top: 1.5rem; }
.chart-area:hover { transform: none; }
.chart-label { font-size: 12px; font-weight: 600; margin-bottom: 1rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.08em; padding: 1.5rem 1.5rem 0; }
#distChart { width: 100%; padding: 0 1.5rem 1.5rem; }

/* ── MODULE 4: COST CALC ────────────────────────────────────────────────── */
.cost-grid { display: grid; grid-template-columns: 320px 1fr; gap: 2rem; align-items: start; }

.inputs-card { overflow: hidden; }
.inputs-card:hover { transform: none; }
.inputs-title { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); padding: 1.5rem 1.5rem 1rem; }

.input-group { margin-bottom: 1.25rem; padding: 0 1.5rem; }
.input-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.input-val { color: var(--primary); font-weight: 700; font-size: 13px; }

.cost-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), rgba(65,120,144,.3));
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.cost-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--primary-light);
    cursor: pointer;
    transition: all .2s;
}
.cost-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

.results-area { display: flex; flex-direction: column; gap: 1rem; }

.roi-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.roi-card { text-align: center; padding: 1.25rem; }
.roi-card:hover { transform: none; }
.roi-value { font-size: 1.75rem; font-weight: 700; margin-bottom: 4px; }
.roi-label { font-size: 11px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }

.chart-wrapper { padding: 1.5rem; }
.chart-wrapper:hover { transform: none; }
.chart-wrapper canvas { width: 100% !important; }

.cost-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cost-col { padding: 1.25rem; }
.cost-col:hover { transform: none; }
.cost-col-header { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.75rem; }
.cost-item { display: flex; justify-content: space-between; font-size: 12px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.cost-item-label { color: var(--text-secondary); }
.cost-item-val { font-weight: 600; }

/* ── MODULE 5: COMMAND CENTER ───────────────────────────────────────────── */
.mode-switcher {
    display: flex;
    gap: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--primary-border);
    width: fit-content;
    margin-bottom: 2rem;
}

.mode-btn {
    padding: 10px 28px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    letter-spacing: 0.05em;
    transition: all .3s;
    font-family: var(--font-family);
    text-transform: uppercase;
}
.mode-btn.copper-mode { background: rgba(200,121,65,.08); color: var(--copper-light); }
.mode-btn.fiber-mode  { background: var(--surface-tinted); color: var(--primary); }
.mode-btn.active.copper-mode { background: rgba(200,121,65,.25); box-shadow: 0 0 20px var(--copper-glow); }
.mode-btn.active.fiber-mode  { background: var(--primary); color: #fff; box-shadow: 0 0 20px var(--primary-glow-strong); }

.cc-metrics-row { display: grid; grid-template-columns: repeat(6,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.cc-metric {
    border-radius: var(--radius);
    background: var(--bg-surface);
    border: 1px solid var(--primary-border);
    padding: 1rem;
    text-align: center;
    transition: var(--transition-normal);
}
.cc-metric-icon { margin-bottom: 8px; display: flex; justify-content: center; }
.cc-metric-val { font-size: 18px; font-weight: 700; line-height: 1; }
.cc-metric-label { font-size: 10px; color: var(--text-muted); letter-spacing: 1px; margin-top: 4px; text-transform: uppercase; }

.cc-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.5rem; }
.cctv-feed {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--primary-border);
    aspect-ratio: 16/9;
    position: relative;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}
.cctv-feed:hover { border-color: var(--primary-border-hover); }
.cctv-header {
    position: absolute; top: 0; left: 0; right: 0;
    padding: 8px 12px;
    background: linear-gradient(180deg, rgba(0,0,0,.8), transparent);
    font-size: 10px;
    display: flex;
    justify-content: space-between;
    z-index: 2;
    letter-spacing: 0.05em;
}
.cctv-rec { color: var(--status-red); display: flex; align-items: center; gap: 4px; }
.cctv-rec::before { content:''; width:6px; height:6px; border-radius:50%; background:var(--status-red); display:inline-block; animation: pulse 1s infinite; }
.cctv-body { width: 100%; height: 100%; }
.lag-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.7);
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 8px;
    opacity: 0; transition: all .3s;
}
.lag-overlay.active { opacity: 1; }
.lag-text { font-size: 11px; color: var(--status-red); letter-spacing: 0.05em; }

.alerts-panel { overflow: hidden; }
.alerts-panel:hover { transform: none; }
.alerts-title { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); padding: 1.25rem 1.5rem 0.75rem; border-bottom: 1px solid var(--primary-border); }
.alert-item { display: flex; align-items: center; gap: 12px; padding: 10px 1.5rem; border-bottom: 1px solid rgba(255,255,255,.03); font-size: 13px; color: var(--text-secondary); }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── MODULE 6: CAPACITY ─────────────────────────────────────────────────── */
.capacity-arena { display: grid; grid-template-columns: 1fr 80px 1fr; gap: 0; align-items: center; }
.cap-side { padding: 2.5rem; }
.cap-side:hover { transform: none; }
.cap-side-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.cap-side-sub { font-size: 11px; color: var(--text-muted); margin-bottom: 1.25rem; }
.cap-vs { display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: var(--text-muted); }
.copper-cables { display: flex; flex-wrap: wrap; gap: 2px; width: 100%; margin: 1rem 0; }
.copper-wire { width: 8px; height: 72px; background: linear-gradient(180deg,var(--copper),var(--copper-light)); border-radius: 2px; position: relative; overflow: hidden; }
.copper-wire::after { content:''; position:absolute; top:-100%; left:0; right:0; height:20%; background:rgba(255,255,255,.3); animation: wireGlow 2s linear infinite; }
.fiber-cable { width: 6px; height: 72px; background: linear-gradient(180deg,rgba(65,120,144,.6),var(--primary)); border-radius: 3px; position: relative; overflow: hidden; margin: 1rem auto; }
.fiber-cable::after { content:''; position:absolute; top:-100%; left:0; right:0; height:30%; background:rgba(255,255,255,.8); animation: wireGlow .5s linear infinite; }
.cap-stats { margin-top: 1.25rem; }
.cap-stat-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 13px; }
.cap-stat-label { color: var(--text-secondary); }
.cap-stat-val { font-weight: 700; font-size: 12px; letter-spacing: 0.02em; }

/* ── MODULE 7: JOURNEY ──────────────────────────────────────────────────── */
.journey-play-btn { margin-bottom: 2rem; }

.journey-timeline { position: relative; margin-top: 0; }
.journey-line { position: absolute; top: 40px; left: 40px; right: 40px; height: 1px; background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary)); opacity: .25; }
.journey-steps { display: grid; grid-template-columns: repeat(5,1fr); gap: 1rem; position: relative; z-index: 1; }
.journey-step { text-align: center; padding: 1.25rem 0.5rem; }
.step-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--primary-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    margin: 0 auto 1rem;
    position: relative;
    transition: all .5s;
}
.step-icon.active { border-color: var(--primary); box-shadow: 0 0 24px var(--primary-glow-strong); }
.step-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.step-desc  { font-size: 11px; color: var(--text-muted); line-height: 1.5; }

.journey-chart-wrap { margin-top: 2rem; padding: 1.5rem; }
.journey-chart-wrap:hover { transform: none; }

/* ── METRICS DASHBOARD ──────────────────────────────────────────────────── */
.metrics-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1rem; }
.metric-card {
    border-radius: var(--radius);
    border: 1px solid var(--primary-border);
    background: var(--bg-surface);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-normal);
}
.metric-card::before {
    content: '';
    position: absolute; top: 0; right: 0;
    width: 60px; height: 60px;
    background: radial-gradient(circle, var(--primary-glow), transparent);
    border-radius: 0 0 0 100%;
}
.metric-card:hover { border-color: var(--primary-border-hover); transform: translateY(-4px); }
.metric-title { font-size: 10px; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 10px; }
.metric-big   { font-size: 2rem; font-weight: 700; line-height: 1; }
.metric-sub   { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.metric-trend { display: flex; align-items: center; gap: 4px; font-size: 12px; margin-top: 8px; }
.trend-up   { color: var(--status-green); }
.trend-down { color: var(--status-red); }
.sparkline { height: 40px; margin-top: 10px; }

/* ── FINALE ─────────────────────────────────────────────────────────────── */
#finale { text-align: center; }
#finale .section-header { margin: 0 auto 4rem; }

.finale-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 4rem; text-align: left; }
.finale-col { padding: 2rem; }
.finale-col:hover { transform: none; }
.finale-col-copper { border-color: rgba(200,121,65,.2) !important; }
.finale-col-fiber  { border-color: var(--primary-border-hover) !important; box-shadow: 0 0 40px var(--primary-glow); }
.finale-col-title  { font-size: 17px; font-weight: 600; margin-bottom: 1.25rem; display: flex; align-items: center; gap: 10px; }

.finale-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.finale-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-secondary); }
.finale-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.li-bad::before  { background: var(--status-red); }
.li-good::before { background: var(--status-green); }

.finale-quote {
    font-size: clamp(1.4rem, 3vw, 2.5rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin: 0 auto 3rem;
    max-width: 800px;
}
.finale-quote span {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.finale-brand { margin-bottom: 3rem; }
.finale-brand-name {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: 0.25em;
    color: var(--primary);
}
.finale-brand-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.finale-tags { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.finale-tag {
    padding: 10px 20px;
    border-radius: var(--radius);
    background: var(--bg-surface);
    border: 1px solid var(--primary-border);
    font-size: 12px;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: var(--transition-fast);
}
.finale-tag:hover { border-color: var(--primary-border-hover); color: var(--text-primary); }

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 2rem; right: -420px;
    width: 360px;
    background: var(--bg-surface);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: 0 12px 36px rgba(0,0,0,0.4);
    padding: 1.25rem 1.5rem;
    z-index: 3000;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.active { right: 2rem; }
.toast-icon { color: var(--primary); flex-shrink: 0; }
.toast-content h4 { font-size: 0.9rem; color: var(--text-primary); margin-bottom: 0.2rem; font-weight: 500; }
.toast-content p  { font-size: 0.825rem; color: var(--text-secondary); margin: 0; }

/* ── Lucide icon colour override ────────────────────────────────────────── */
.service-icon-lucide,
.cc-metric-icon-lucide,
.step-icon i,
.nav-status i {
    color: var(--primary) !important;
    width: 20px; height: 20px;
    stroke-width: 2px;
}

/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes pulse     { 0%,100%{opacity:1;}50%{opacity:.4;} }
@keyframes spin      { to{transform:rotate(360deg);} }
@keyframes shimmer   { 0%{transform:translateX(-40px);}100%{transform:translateX(40px);} }
@keyframes fiberPulse{ 0%{stroke-dashoffset:0;}100%{stroke-dashoffset:-80;} }
@keyframes wireGlow  { 0%{top:-100%;}100%{top:200%;} }
@keyframes ticker    { 0%{transform:translateX(0);}100%{transform:translateX(-50%);} }
@keyframes logoEnter { to{opacity:1;transform:scale(1);} }

canvas { display: block; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .cost-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .race-arena, .smart-grid, .perf-grid, .cc-grid,
    .capacity-arena, .journey-steps, .metrics-row,
    .finale-compare { grid-template-columns: 1fr 1fr; }

    .smart-grid     { grid-template-columns: 1fr; }
    .capacity-arena { grid-template-columns: 1fr; gap: 1rem; }
    .cap-vs { transform: rotate(90deg); }

    .cc-metrics-row { grid-template-columns: repeat(3,1fr); }

    .nav-desktop { display: none; }
    .menu-toggle { display: block; }

    #hero { align-items: center; padding: clamp(90px, 15vh, 140px) 0 clamp(40px, 6vh, 80px) 0; }
    .hero-content { padding: 1.5rem 1rem; }
    .hero-connector-visual { 
    position: static; 
    width: 100%; 
    max-width: 360px;
    margin: 0 auto; 
    justify-content: center;
}
    .connector-card { width: auto; min-width: 110px; max-width: 140px; padding: 12px 14px; }
    .connector-img { width: 80px; height: 80px; }
    .hero-stats { gap: 1.5rem; }
}

@media (max-width: 600px) {
.roi-summary, .metrics-row, .cc-metrics-row { grid-template-columns: 1fr; }
    .cc-grid { grid-template-columns: 1fr 1fr; }
    .hero-content { padding-bottom: 230px; }
    .hero-content { padding-bottom: 1rem; }
    .connector-card { min-width: 90px; padding: 10px 12px; }
    .connector-img { width: 64px; height: 64px; }
    .hero-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
    section { padding: 5rem 0; }
}

/* ── Fiber VS Copper Nav Button ─────────────────────────────────────────── */
.nav-link-fiber {
    padding: 0.45rem 1.1rem !important;
    border-radius: 100px;
    background: var(--primary);
    color: #fff !important;
    border: 1px solid var(--primary);
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-normal) !important;
}

.nav-link-fiber::after { display: none !important; } /* remove underline animation */

.nav-link-fiber:hover {
    background: #4f8ca8 !important;
    border-color: #4f8ca8 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 18px rgba(65, 120, 144, 0.35);
    color: #fff !important;
}

.nav-link-fiber i {
    transition: transform var(--transition-normal);
}

.nav-link-fiber:hover i {
    transform: translate(2px, -2px);
}
/* ==========================================================================
   11. Contact Us Portal
   ========================================================================== */
   .contact-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 5rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
}

.contact-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.contact-icon {
    color: var(--primary);
    margin-top: 0.2rem;
}

.contact-item h4 {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.contact-item p, .contact-item a {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 400;
}

.contact-item a:hover {
    color: var(--primary);
}

/* Tripoli Radar Map */
.cyber-map {
    width: 100%;
    height: 220px;
    background: #05070a;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cyber-map-grid {
    position: absolute;
    inset: 0;
    background-size: 20px 20px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
}

.radar-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 280px;
    height: 280px;
    background: conic-gradient(from 0deg, rgba(65, 120, 144, 0.1) 0deg, transparent 80deg);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    animation: radarRotation 4.5s linear infinite;
    pointer-events: none;
}

@keyframes radarRotation {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.map-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 50%;
    pointer-events: none;
}

.map-ring-1 { width: 80px; height: 80px; }
.map-ring-2 { width: 170px; height: 170px; }

.gps-ping {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px var(--primary);
}

.gps-ping::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pingSignal 2s ease-out infinite;
}

@keyframes pingSignal {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(3.5); opacity: 0; }
}

.map-coords {
    position: absolute;
    bottom: 1rem;
    left: 1.25rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.map-label {
    position: absolute;
    top: 35%;
    left: 54%;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--text-primary);
}

/* Minimal Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    padding: 3rem 2.5rem;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 0.7rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.925rem;
    transition: var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-bottom-color: var(--primary);
}

.form-label {
    position: absolute;
    left: 0;
    top: 0.7rem;
    color: var(--text-secondary);
    font-size: 0.925rem;
    pointer-events: none;
    transition: var(--transition-fast);
    font-weight: 300;
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: -0.75rem;
    font-size: 0.725rem;
    color: var(--primary);
    font-weight: 500;
}

textarea.form-input {
    min-height: 70px;
    resize: none;
}

/* ==========================================================================
   12. Footer Section
   ========================================================================== */
footer {
    background: #05070a;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    padding: 5rem 0 3rem 0;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3.5rem;
    margin-bottom: 4rem;
}

.footer-about {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    transition: all var(--transition-normal);
}

.footer-logo img {
    height: 26px;
    width: auto;
    object-fit: contain;
    transition: var(--transition-normal);
}

.footer-about p {
    font-size: 0.875rem;
    line-height: 1.55;
    max-width: 360px;
}

.footer-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    letter-spacing: 0.04em;
    font-weight: 500;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-link {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-link:hover {
    color: var(--primary);
    transform: translate3d(2px, 0, 0);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.footer-bottom p {
    font-size: 0.775rem;
    color: var(--text-muted);
}

.footer-badges {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.625rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.badge-item {
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.15rem 0.45rem;
    border-radius: 3px;
}

/* ==========================================================================
   13. Interactive Lightbox
   ========================================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(7, 10, 14, 0.97);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80%;
    transform: scale(0.97);
    transition: transform var(--transition-normal);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    width: 100%;
    height: auto;
    max-height: 75dvh;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.725rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lightbox-close:hover {
    color: var(--primary);
}

/* ==========================================================================
   14. Submission Success Overlay Toast
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: -420px;
    width: 360px;
    background: var(--bg-surface);
    border: 1px solid var(--primary);
    border-radius: 6px;
    box-shadow: var(--card-shadow-hover);
    padding: 1.25rem 1.5rem;
    z-index: 3000;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.active {
    right: 2rem;
}

.toast-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.toast-content h4 {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    font-weight: 500;
}

.toast-content p {
    font-size: 0.825rem;
    color: var(--text-secondary);
    margin: 0;
}
/* ==========================================================================
   15. Map Link Hover Animations
   ========================================================================== */
/* Base wrapper setup */
.map-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(65, 120, 144, 0.2); /* Creates a mobile touch ripple effect */
}

/* 1. Text Hover Animation */
.hover-target-text {
    transition: color 0.3s ease;
}

.map-link-wrapper:hover .hover-target-text {
    color: #417890; /* Turns into your requested color */
}

/* 2. Cyber Map Hover Animations */
.cyber-map {
    position: relative;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    border: 1px solid transparent; /* Gives room for the glowing border edge */
}

/* Map grows big and edges glow on hover */
.map-link-wrapper:hover .cyber-map {
    transform: scale(1.04); /* Makes the radar map turn big */
    border-color: #417890;
    box-shadow: 0 0 20px rgba(65, 120, 144, 0.6), inset 0 0 15px rgba(65, 120, 144, 0.3); /* Glowing edges */
}

/* 3. Mobile Affordance (Making sure mobile users know it's clickable) */
.mobile-tap-hint {
    display: none; /* Hidden on desktop by default */
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(65, 120, 144, 0.85);
    color: #fff;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    animation: pulseHint 2s infinite;
}

/* Micro-animation to draw the mobile user's eye naturally */
@keyframes pulseHint {
    0% { opacity: 0.6; box-shadow: 0 0 0 0 rgba(65, 120, 144, 0.4); }
    50% { opacity: 1; box-shadow: 0 0 0 6px rgba(65, 120, 144, 0); }
    100% { opacity: 0.6; box-shadow: 0 0 0 0 rgba(65, 120, 144, 0); }
}

/* Only show the hint on touch-screens (Mobile/Tablets) */
@media (max-width: 768px) {
    .mobile-tap-hint {
        display: block;
    }
}
/* Container Layout */
.social-links-container {
    display: flex;
    gap: 20px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Soft divider line */
}

/* Base Style for Social Links */
.social-icon-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.social-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.4s ease;
}
/* whatsapp and facbook
/* --- HOVER ANIMATIONS --- */

/* WhatsApp Hover Effect (Vibrant Green & Glow) */
.social-icon-link.whatsapp-style:hover {
    color: #25D366;
    border-color: #25D366;
    background: rgba(37, 211, 102, 0.05);
    transform: translateY(-5px); /* Pops up */
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.4); /* Glows green */
}

/* Facebook Hover Effect (Brand Blue & Glow) */
.social-icon-link.facebook-style:hover {
    color: #1877F2;
    border-color: #1877F2;
    background: rgba(24, 119, 242, 0.05);
    transform: translateY(-5px); /* Pops up */
    box-shadow: 0 0 15px rgba(24, 119, 242, 0.4); /* Glows blue */
}

/* Rotate icon slightly on hover for an extra high-fidelity feel */
.social-icon-link:hover .social-icon {
    transform: scale(1.1) rotate(8deg);
}

/* --- TOOLTIPS (Desktop interactive element) --- */
.social-tooltip {
    position: absolute;
    bottom: -35px;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    transform: translateY(-5px);
    white-space: nowrap;
}

.social-icon-link:hover .social-tooltip {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Tweak - Hide tooltips on touch screens to avoid layout clutter */
@media (max-width: 768px) {
    .social-tooltip {
        display: none !important;
    }
    .social-icon-link {
        -webkit-tap-highlight-color: transparent;
    }
    /* Keep a lighter variant of the hover glow active on mobile tap */
    .social-icon-link.whatsapp-style:active {
        background: rgba(37, 211, 102, 0.2);
    }
    .social-icon-link.facebook-style:active {
        background: rgba(24, 119, 242, 0.2);
    }
}
/* ==========================================================================
   15. Mobile-First Optimization Media Queries (Mobile Specific Cuts)
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        text-align: center;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual-area {
        justify-content: center;
    }

    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 4.5rem;
    }

    .about-visual {
        height: 380px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-about {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    /* Compress paddings and margins for quick mobile navigation */
    section {
        padding: 4rem 0;
    }

    header {
        padding: 1.25rem 0;
    }

    #hero {
        height: 100dvh;
        min-height: 100dvh;
        padding: 0;    }

    .hero-grid {
        gap: 2.5rem;
    }

    .hero-visual-card {
        height: 280px;
        max-width: 320px;
    }

    .nav-desktop {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .section-header {
        margin-bottom: 2.5rem;
        max-width: 100%;
    }

    .section-header .title {
        font-size: 1.75rem;
    }

    /* About Visual: Single visual frame for faster scroll clearance */
    .about-visual {
        height: 240px;
    }

    .about-img-frame.img-left {
        width: 100%;
        height: 240px;
        position: relative;
    }

    /* Hide overlapping visual to minimize screen clutter on phone viewports */
    .about-img-frame.img-right {
        display: none !important;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding-top: 2.5rem;
        margin-top: 2.5rem;
    }

    .stat-card:nth-child(3) {
        grid-column: span 2;
    }

    .stat-card .number {
        font-size: 2.5rem;
    }

    /* Services Grid: High-density 2-column layout on mobile! */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .service-card {
        padding: 1.25rem 1rem;
        border-radius: 6px;
    }

    .service-icon {
        margin-bottom: 0.75rem;
        width: 20px !important;
        height: 20px !important;
    }

    .service-card h3 {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
        line-height: 1.3;
    }

    .service-card p {
        font-size: 0.775rem;
        line-height: 1.45;
    }

    /* Expertise Grid: High-density 2-column layout on mobile! */
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-top: 1.75rem;
    }

    .expertise-card {
        padding: 1.25rem 1rem;
        border-radius: 6px;
    }

    .expertise-card-icon {
        margin-bottom: 0.75rem;
        width: 20px !important;
        height: 20px !important;
    }

    .expertise-card h3 {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .expertise-card p {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    /* Shorter 2-column project cards on mobile grids! */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .project-card {
        height: 170px;
        border-radius: 6px;
    }

    .project-overlay {
        padding: 1rem;
    }

    .project-category {
        font-size: 0.6rem;
        margin-bottom: 0.2rem;
    }

    .project-card h3 {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
        line-height: 1.2;
    }

    .project-card p {
        font-size: 0.725rem;
        line-height: 1.3;
    }

    .clients-section {
        padding-top: 4rem;
    }

    /* Partners Grid: 3-column tiny grid to avoid long scroll columns */
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .partner-badge {
        height: 52px;
        font-size: 0.725rem;
        letter-spacing: 0.02em;
    }

    /* Contact portals layouts */
    .contact-grid {
        gap: 3rem;
    }

    .contact-form {
        padding: 2.5rem 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-about {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .about-visual {
        height: 210px;
    }
    .about-img-frame.img-left {
        height: 210px;
    }
    
    /* Smaller outlines for mini devices */
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
/* ==========================================================================
   15. High-Specificity Mobile Fixes (Overriding Desktop Rules)
   ========================================================================== */
   @media screen and (max-width: 768px) {
    html body #hero {
        height: 100dvh !important;
        min-height: 100dvh !important;
        padding: 0 !important;
    }
    /* Prevent overall horizontal scroll leakage */
    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Forces the section layout to expand organically and adds defensive spacing at the top */
html body section {
        padding: 3.5rem 0 2rem 0 !important;
         height: auto !important; 
        min-height: unset !important;
        overflow: visible !important;
        max-width: 100% !important; /* Prevents sections from extending beyond screen */
        box-sizing: border-box !important;
    }

    /* Pushes your "About Us" and "Who We Are" header completely down past the floating pill navbar */
    html body .section-header {
        margin-top: 1.5rem !important;
        margin-bottom: 2rem !important;
        padding: 0 0.5rem !important;
        box-sizing: border-box !important;
    }

    /* 2. FIX THE REMOVED/MISSING IMAGES */
    /* Destroys the two-column layout grid to stack vertically */
    html body .about-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5rem !important;
        max-width: 100% !important;
    }

    /* Clear any absolute or hidden layout behavior on the wrapper */
    html body .about-visual {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
        margin-top: 1.5rem !important;
        height: auto !important; 
        min-height: 1px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    /* Forces BOTH images into view, stacked uniformly like standard clean web elements */
    html body .about-visual .about-img-frame,
    html body .about-visual .about-img-frame.img-left,
    html body .about-visual .about-img-frame.img-right,
    html body .about-visual [class*="img-"] {
        display: block !important;
        position: relative !important;
        visibility: visible !important;
        opacity: 1 !important;
        inset: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 250px !important; /* Fixed height for clean mobile presentation boxes */
        transform: none !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        z-index: 1 !important;
        box-sizing: border-box !important;
    }

    /* Retains your layout's clean border-radius frames and ensures crisp fitting */
    html body .about-img-frame img,
    html body .about-visual div img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* 3. OPTIONAL STUCK PILLARS ADJUSTMENT */
    /* Ensures the mini layout grids below the main paragraph text stack gracefully on small screens */
    html body .about-pillars {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        max-width: 100% !important;
    }
} /* Only ONE closing bracket for the media query now */
}

/* ── MODULE 7: ENVIRONMENTAL RESILIENCE ──────────────────────────────────── */
.env-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
}

.env-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 100px;
    border: 1px solid var(--primary-border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}
.env-btn-icon { font-size: 16px; }
.env-btn:hover { border-color: var(--primary); color: var(--primary); }
.env-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow-strong);
}

.env-arena {
    display: grid;
    grid-template-columns: 1fr 160px 1fr;
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

.env-side { overflow: hidden; }
.env-side:hover { transform: none; }

.env-side-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--primary-border);
    font-size: 14px;
    font-weight: 600;
}

.env-visual {
    position: relative;
    height: 120px;
    overflow: hidden;
}

.env-visual canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.env-status-badge {
    position: absolute;
    bottom: 8px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.env-status-bad  { background: rgba(239,68,68,.15);   color: var(--status-red);   border: 1px solid rgba(239,68,68,.3);   }
.env-status-good { background: rgba(34,197,94,.12);   color: var(--status-green); border: 1px solid rgba(34,197,94,.3);   }

.env-metrics { padding: 0.75rem 1.25rem; display: flex; flex-direction: column; gap: 6px; }
.env-metric-row { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.03); }
.env-metric-label { color: var(--text-secondary); }
.env-val-bad  { color: var(--status-red);   font-weight: 600; }
.env-val-good { color: var(--status-green); font-weight: 600; }

/* Center column */
.env-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 1rem 0;
}

.env-condition-icon { font-size: 2rem; line-height: 1; }
.env-condition-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-align: center;
    text-transform: uppercase;
}

.env-score-ring { position: relative; width: 80px; height: 80px; }
.env-ring-svg { width: 80px; height: 80px; transform: rotate(-90deg); }
.env-ring-track { fill: none; stroke: rgba(255,255,255,.06); stroke-width: 6; }
.env-ring-fill  {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s cubic-bezier(.4,0,.2,1), stroke 0.4s ease;
}
.env-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.env-ring-pct { font-size: 14px; font-weight: 700; line-height: 1; }
.env-ring-sub { font-size: 8px; color: var(--text-muted); letter-spacing: 0.08em; margin-top: 2px; }

.env-vs-divider {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* Detail card */
.env-detail {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1.5rem;
}
.env-detail:hover { transform: none; }
.env-detail-icon { font-size: 2rem; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.env-detail-body { flex: 1; }
.env-detail-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.env-detail-desc  { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.65; font-weight: 300; }
.env-detail-verdict { flex-shrink: 0; }
.env-verdict-text {
    display: inline-flex;
    padding: 8px 16px;
    border-radius: var(--radius);
    background: var(--surface-tinted);
    border: 1px solid var(--primary-border-hover);
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* ── MODULE 8: DEPLOYMENT COST ───────────────────────────────────────────── */
.deploy-scale-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 2rem;
}

.deploy-scale-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--primary-border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
    min-width: 100px;
}
.deploy-scale-dist { font-size: 10px; color: var(--text-muted); letter-spacing: 0.06em; }
.deploy-scale-btn:hover { border-color: var(--primary); color: var(--primary); }
.deploy-scale-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow-strong);
}
.deploy-scale-btn.active .deploy-scale-dist { color: rgba(255,255,255,.7); }

.deploy-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    align-items: start;
}

.deploy-breakdown { overflow: hidden; }
.deploy-breakdown:hover { transform: none; }

.deploy-bars { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 14px; }

.deploy-bar-row { display: flex; flex-direction: column; gap: 5px; }
.deploy-bar-label { font-size: 11px; color: var(--text-secondary); letter-spacing: 0.05em; text-transform: uppercase; }
.deploy-bar-tracks { display: flex; flex-direction: column; gap: 4px; }
.deploy-bar-wrap { height: 22px; background: rgba(255,255,255,.03); border-radius: 4px; overflow: hidden; position: relative; }
.deploy-bar-fill {
    height: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    transition: width 0.7s cubic-bezier(.4,0,.2,1);
    min-width: 40px;
    position: relative;
}
.deploy-bar-copper { background: linear-gradient(90deg, var(--copper), var(--copper-light)); }
.deploy-bar-fiber  { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.deploy-bar-val { font-size: 10px; font-weight: 700; color: rgba(255,255,255,.9); white-space: nowrap; }

/* Summary column */
.deploy-summary { display: flex; flex-direction: column; gap: 1rem; }

.deploy-total-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.deploy-total-card { padding: 1rem 1.25rem; text-align: center; }
.deploy-total-card:hover { transform: none; }
.deploy-total-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.deploy-total-val { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.deploy-total-sub { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.deploy-total-copper .deploy-total-val { color: var(--copper-light); }
.deploy-total-fiber  .deploy-total-val { color: var(--primary); }

.deploy-winner-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border-radius: var(--radius);
    background: rgba(34,197,94,.08);
    border: 1px solid rgba(34,197,94,.25);
    color: var(--status-green);
    font-size: 20px;
    font-weight: 800;
}

.deploy-advantages { display: flex; flex-direction: column; gap: 6px; }
.deploy-adv-pill {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius);
    background: var(--surface-tinted);
    border: 1px solid var(--primary-border);
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.deploy-chart-wrap { padding: 0; overflow: hidden; margin-bottom: 1.5rem; }
.deploy-chart-wrap:hover { transform: none; }
.deploy-chart-wrap canvas { width: 100% !important; padding: 0 1.5rem 1.5rem; }
.deploy-chart-legend {
    padding: 1rem 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.deploy-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.deploy-reasons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.deploy-reason-card { padding: 1.25rem; }
.deploy-reason-card:hover { transform: translateY(-4px); }
.deploy-reason-icon { font-size: 1.5rem; margin-bottom: 0.6rem; }
.deploy-reason-title { font-size: 14px; font-weight: 600; margin-bottom: 0.75rem; }
.deploy-reason-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.deploy-reason-tag {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 1px;
}
.deploy-reason-copper { background: rgba(200,121,65,.15); color: var(--copper-light); }
.deploy-reason-fiber  { background: var(--surface-tinted); color: var(--primary); }
.deploy-reason-text { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* ── Responsive additions ────────────────────────────────────────────────── */
/* ── Responsive additions & Mobile UX Redesign ───────────────────────────────── */

/* Reading Progress Indicator */
#reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.03);
    z-index: 9999;
    pointer-events: none;
}
#reading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    box-shadow: 0 0 10px var(--primary-light), 0 0 5px var(--primary);
    transition: width 0.1s ease-out;
}


/* Floating Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 19, 25, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    cursor: pointer;
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

#back-to-top i {
    width: 18px;
    height: 18px;
    stroke-width: 2.5px;
    transition: transform 0.3s ease;
}

#back-to-top:hover {
    background: var(--bg-surface-hover);
    border-color: var(--primary-border-hover);
    color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(65, 120, 144, 0.25);
}

#back-to-top:hover i {
    transform: translateY(-2px);
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Headline Consistency & Premium Glow */
.hero-title,
.finale-quote {
    font-size: clamp(2.4rem, 5.5vw, 4rem) !important;
    line-height: 1.15 !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
    color: var(--text-primary) !important;
    text-align: center !important;
}

.hero-title span,
.finale-quote span {
    background: linear-gradient(135deg, var(--text-primary) 20%, var(--primary) 100%) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    filter: drop-shadow(0 0 15px rgba(90, 157, 181, 0.45)) !important;
}

.finale-quote {
    margin: 3rem auto 3rem !important;
}

/* Responsiveness and Spacing Optimization */
@media (max-width: 900px) {
    .env-arena { grid-template-columns: 1fr; }
    .env-center { flex-direction: row; justify-content: center; flex-wrap: wrap; padding: 1.5rem 0; }
    .deploy-grid { grid-template-columns: 1fr; }
    .deploy-reasons-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {

    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }

    html body section {
        padding: 5rem 0 3rem 0 !important;
        height: auto !important;
        min-height: unset !important;
        overflow: visible !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    html body #hero {
        height: auto !important;
        min-height: 100dvh !important;
        padding: 100px 0 40px 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .hero-title,
    .finale-quote {
        font-size: clamp(1.8rem, 6vw, 2.4rem) !important;
    }

    html body .section-header {
        margin-top: 1rem !important;
        margin-bottom: 1.75rem !important;
        padding: 0 0.25rem !important;
        box-sizing: border-box !important;
    }

    .section-header .title {
        font-size: 1.4rem !important;
    }

    /* ── Speed Race ── */
    .race-activities {
        gap: 6px !important;
        margin-bottom: 1.25rem !important;
    }

    .activity-btn {
        padding: 7px 13px !important;
        font-size: 11px !important;
        gap: 5px !important;
    }

    .race-arena {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }    

    .race-building-header {
        padding: 0.75rem 1rem !important;
    }

    .race-building-title {
        font-size: 13px !important;
    }

    .race-building-body {
        padding: 1rem !important;
    }

    .building-visual {
        height: 80px !important;
        margin-bottom: 0.75rem !important;
    }

    .race-metrics {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }

    .metric-box {
        padding: 8px 6px !important;
        text-align: center !important;
    }

    .metric-value {
        font-size: 14px !important;
    }

    .metric-label {
        font-size: 9px !important;
    }

    /* ── Smart Building ── */
    .smart-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    #servicesList {
        display: flex !important;
        flex-direction: column !important;
    }

    .service-item {
        padding: 10px 14px !important;
    }

    .service-name {
        font-size: 13px !important;
    }

    .service-bw {
        font-size: 11px !important;
    }

#statusList {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 6px !important;
        padding: 0.75rem !important;
    }

    .status-row {
        font-size: 11px !important;
        padding: 6px 8px !important;
        border-bottom: none !important;
        border: 1px solid var(--primary-border) !important;
        border-radius: 6px !important;
        background: rgba(255,255,255,0.02) !important;
    }

    .status-indicator {
        font-size: 9px !important;
        padding: 2px 7px !important;
    }

/* ── Distance ── */
    .perf-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }

    .perf-card-title {
        font-size: 11px !important;
        padding: 1rem 1rem 0 !important;
        gap: 5px !important;
    }

    .perf-bars {
        padding: 0 1rem 1rem !important;
        gap: 10px !important;
    }

    .perf-row-label {
        font-size: 10px !important;
    }

    .dist-value-display {
        font-size: 2.5rem !important;
    }

    /* ── ROI Calculator ── */
    .cost-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .roi-summary {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
    }

    .roi-value {
        font-size: 1.1rem !important;
    }

    .roi-label {
        font-size: 9px !important;
    }

    .roi-card {
        padding: 0.75rem 0.5rem !important;
    }

.cost-compare {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }

    .cost-col {
        padding: 0.875rem !important;
    }

    .cost-col-header {
        font-size: 10px !important;
        margin-bottom: 0.5rem !important;
    }

    .cost-item {
        font-size: 10px !important;
        padding: 5px 0 !important;
    }

    /* ── Command Center ── */
    .cc-metrics-row {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.6rem !important;
    }

    .cc-metric {
        padding: 0.75rem 0.5rem !important;
    }

    .cc-metric-val {
        font-size: 15px !important;
    }

    .cc-metric-label {
        font-size: 9px !important;
    }

    .cc-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.6rem !important;
    }

    .mode-switcher {
        width: 100% !important;
    }

    .mode-btn {
        flex: 1 !important;
        padding: 10px 12px !important;
        font-size: 12px !important;
    }

    /* ── Capacity ── */
    .capacity-arena {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .cap-vs {
        display: none !important;
    }

.copper-cables {
        max-height: 60px !important;
        overflow: hidden !important;
        gap: 1px !important;
    }

    .copper-wire {
        height: 50px !important;
        width: 7px !important;
    }

    .cap-side {
        padding: 1.25rem !important;
    }

    .cap-stat-row {
        font-size: 12px !important;
    }

    /* ── Environmental ── */
    .env-selector {
        justify-content: flex-start !important;
        gap: 6px !important;
        flex-wrap: wrap !important;
        margin-bottom: 1.25rem !important;
    }

    .env-btn {
        padding: 7px 13px !important;
        font-size: 11px !important;
    }

    .env-arena {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .env-center {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 2rem !important;
        padding: 1rem 0 !important;
    }

    .env-visual {
        height: 100px !important;
    }

    .env-detail {
        flex-direction: column !important;
        padding: 1rem !important;
        gap: 0.75rem !important;
    }

    .env-verdict-text {
        white-space: normal !important;
    }

    /* ── Deployment Cost ── */
    .deploy-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .deploy-scale-row {
        justify-content: flex-start !important;
        gap: 6px !important;
        flex-wrap: wrap !important;
    }

.deploy-scale-btn {
        min-width: 68px !important;
        padding: 7px 8px !important;
        font-size: 10px !important;
    }

    .deploy-scale-dist {
        font-size: 9px !important;
    }

    .deploy-summary {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }

    .deploy-winner-badge {
        grid-column: span 2 !important;
        font-size: 14px !important;
    }

    .deploy-bars {
        padding: 0.75rem 1rem !important;
        gap: 12px !important;
    }

    .deploy-bar-val {
        font-size: 9px !important;
    }

    .deploy-reasons-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    /* ── Finale ── */
    .finale-compare {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin-bottom: 2rem !important;
    }

    .finale-col {
        padding: 1.25rem !important;
    }

    .finale-list li {
        font-size: 13px !important;
    }

    .finale-tags {
        gap: 0.5rem !important;
    }

    .finale-tag {
        font-size: 11px !important;
        padding: 7px 14px !important;
    }

    /* ── Contact ── */
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }

    .contact-form {
        padding: 1.75rem 1.25rem !important;
    }

    /* ── Footer ── */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
    }
}



@media (max-width: 600px) {
    .env-detail { flex-direction: column; }
    .env-verdict-text { white-space: normal; }
    .deploy-scale-btn { min-width: 80px; padding: 10px 12px; font-size: 12px; }
}

/* Global scroll margins for anchor scrolling */
section {
    scroll-margin-top: 75px;
}
