@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Noto+Serif+SC:wght@300;400;600&family=Bebas+Neue&display=swap');

:root {
  --black: #0a0a0a;
  --white: #f5f5f0;
  --gray-1: #1a1a1a;
  --gray-2: #2a2a2a;
  --gray-3: #555;
  --gray-4: #888;
  --accent: #c8f03e;
  --accent-red: #ff3b30;
  --accent-blue: #0af;
  --border: rgba(245,245,240,0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Noto Serif SC', serif;
  overflow-x: hidden;
  cursor: none;
}

/* CURSOR */
#cursor {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1000001; /* Higher than modal (100000) */
  transform: translate(-50%, -50%);
  transition: transform 0.1s, width 0.2s, height 0.2s;
  mix-blend-mode: difference;
}

#cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1000000; /* Higher than modal (100000) */
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, width 0.2s, height 0.2s, opacity 0.2s;
  opacity: 0.6;
}

/* Ensure inputs also have cursor: none to avoid system cursor fighting with custom one */
input, select, textarea, button, a {
  cursor: none !important;
}





/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 48px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(20px);
}
.logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 4px;
  color: var(--white);
  text-decoration: none;
}
.logo span { color: var(--accent); }
nav ul { list-style: none; display: flex; gap: 40px; }
nav ul a {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-4);
  text-decoration: none;
  transition: color 0.2s;
}
nav ul a:hover { color: var(--accent); }
.nav-cta {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--black);
  padding: 10px 24px;
  border: none;
  cursor: none;
  font-weight: 700;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}
.nav-cta:hover { background: #d8ff4a; transform: translateY(-1px); }

/* FOOTER */
footer {
  padding: 48px;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border);
}
.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px; letter-spacing: 4px;
  color: var(--gray-3);
}
.footer-logo span { color: var(--accent); }
.footer-copy {
  font-family: 'Space Mono', monospace;
  font-size: 10px; letter-spacing: 1px;
  color: var(--gray-3);
}
.footer-links { display: flex; gap: 32px; }
.footer-links a {
  font-family: 'Space Mono', monospace;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gray-3); text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

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

/* RESPONSIVE COMMON */
@media (max-width: 1024px) {
  nav { padding: 20px 32px; }
  nav ul { gap: 24px; }
}

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

  nav {
    padding: 16px 24px;
  }
  nav ul { display: none; } /* Hide menu items on mobile for simplicity, or we could add a burger later */
  
  .logo { font-size: 22px; letter-spacing: 2px; }
  .nav-cta { padding: 8px 16px; font-size: 10px; }

  footer {
    padding: 32px 24px;
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
  }
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 48px 80px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 70% 40%, rgba(200,240,62,0.04) 0%, transparent 70%),
              radial-gradient(ellipse 40% 40% at 20% 70%, rgba(0,170,255,0.03) 0%, transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(245,245,240,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,245,240,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-tag {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  display: flex; align-items: center; gap: 12px;
}
.hero-tag::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--accent);
}
.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(72px, 10vw, 160px);
  line-height: 0.9;
  letter-spacing: -2px;
  color: var(--white);
  position: relative;
  z-index: 1;
}
.hero-title em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1px rgba(245,245,240,0.3);
}
.hero-sub {
  margin-top: 40px;
  display: flex; align-items: flex-end; justify-content: space-between;
  position: relative; z-index: 1;
}
.hero-desc {
  font-size: 15px;
  line-height: 1.9;
  color: var(--gray-4);
  max-width: 480px;
  font-weight: 300;
}
.hero-desc strong { color: var(--white); font-weight: 400; }
.hero-stats {
  display: flex; gap: 48px;
}
.stat { text-align: right; }
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 52px;
  color: var(--white);
  line-height: 1;
}
.stat-num span { color: var(--accent); }
.stat-label {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray-4);
  margin-top: 4px;
}
.scroll-hint {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-hint span {
  font-family: 'Space Mono', monospace;
  font-size: 9px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gray-3);
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--gray-3), transparent);
  animation: scrollAnim 2s infinite;
}
@keyframes scrollAnim { 0%,100%{opacity:0;transform:scaleY(0);transform-origin:top} 50%{opacity:1;transform:scaleY(1)} }

/* PAIN SECTION */
.section { padding: 120px 48px; border-bottom: 1px solid var(--border); }
.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--gray-3); margin-bottom: 64px;
  display: flex; align-items: center; gap: 16px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.pain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.pain-card {
  background: var(--gray-1);
  padding: 48px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}
.pain-card:hover { background: #1e1e1e; }
.pain-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--accent-red);
  transition: height 0.4s ease;
}
.pain-card:hover::before { height: 100%; }
.pain-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 80px; color: rgba(245,245,240,0.05);
  position: absolute; top: 16px; right: 24px;
  line-height: 1;
}
.pain-icon { font-size: 28px; margin-bottom: 20px; }
.pain-title {
  font-size: 20px; font-weight: 600;
  color: var(--white); margin-bottom: 16px;
  line-height: 1.4;
}
.pain-desc { font-size: 14px; line-height: 1.9; color: var(--gray-4); font-weight: 300; }
.pain-desc strong { color: var(--accent); font-weight: 400; }

/* SOLUTION */
.solution-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.solution-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px,5vw,80px);
  line-height: 1;
  color: var(--white);
  margin-bottom: 32px;
}
.solution-title em { font-style: normal; color: var(--accent); }
.solution-text { font-size: 15px; line-height: 1.9; color: var(--gray-4); font-weight: 300; margin-bottom: 24px; }
.solution-text strong { color: var(--white); font-weight: 400; }
.solution-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.pill {
  font-family: 'Space Mono', monospace;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid var(--border);
  color: var(--gray-4);
  transition: all 0.2s;
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.route-cards { display: flex; flex-direction: column; gap: 2px; }
.route-card {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--gray-1);
  padding: 20px 28px;
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
}
.route-card::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0; background: rgba(200,240,62,0.04);
  transition: width 0.3s;
}
.route-card:hover { background: #1e1e1e; }
.route-card:hover::after { width: 100%; }
.route-from-to {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: var(--white);
  display: flex; align-items: center; gap: 12px;
}
.route-arrow { color: var(--gray-3); }
.route-latency {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
}
.lat-fast { color: var(--accent); }
.lat-mid { color: #ffd60a; }
.lat-ok { color: var(--accent-blue); }
.route-bar {
  flex: 1; margin: 0 24px;
  height: 2px; background: var(--gray-2);
  position: relative;
}
.route-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), transparent);
  position: relative;
}
.route-bar-dot {
  position: absolute; right: -3px; top: -3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(200,240,62,0.4)} 50%{box-shadow:0 0 0 8px rgba(200,240,62,0)} }


/* MAP SECTION */
.map-section { padding: 120px 48px; border-bottom: 1px solid var(--border); }
.map-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 48px; }
.map-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(40px,4vw,64px); line-height: 1;
  color: var(--white);
}
.map-title em { font-style: normal; color: var(--accent); }
.map-legend { display: flex; gap: 24px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-family: 'Space Mono', monospace; font-size: 10px; letter-spacing: 1px; color: var(--gray-4); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-dot.fast { background: var(--accent); }
.legend-dot.mid { background: #ffd60a; }
.legend-dot.ok { background: var(--accent-blue); }

#world-map-container {
  position: relative;
  background: var(--gray-1);
  border: 1px solid var(--border);
  overflow: hidden;
  height: 520px;
}
#world-map {
  width: 100%; height: 100%;
}

/* NODE TOOLTIP */
.node-tooltip {
  position: absolute;
  background: var(--black);
  border: 1px solid var(--accent);
  padding: 14px 18px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 50;
  min-width: 160px;
}
.node-tooltip.visible { opacity: 1; }
.tooltip-city {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px; color: var(--white);
  margin-bottom: 4px;
}
.tooltip-latency {
  font-family: 'Space Mono', monospace;
  font-size: 11px; color: var(--accent);
  margin-bottom: 8px;
}
.tooltip-status {
  font-family: 'Space Mono', monospace;
  font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gray-4);
}
.tooltip-status span { color: var(--accent); }

/* FEATURES */
.features-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; }
.feature-card {
  background: var(--gray-1);
  padding: 48px 36px;
  position: relative;
  transition: background 0.3s;
}
.feature-card:hover { background: #1e1e1e; }
.feature-card::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 0;
  background: var(--accent);
  transition: height 0.3s;
  opacity: 0.06;
}
.feature-card:hover::before { height: 100%; }
.feature-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 11px; letter-spacing: 3px;
  color: var(--gray-3); margin-bottom: 24px;
}
.feature-title {
  font-size: 18px; font-weight: 600;
  color: var(--white); margin-bottom: 16px; line-height: 1.4;
}
.feature-desc { font-size: 13px; line-height: 1.9; color: var(--gray-4); font-weight: 300; }

/* CTA */
.cta-section {
  padding: 120px 48px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--gray-1);
}
.cta-left { max-width: 600px; }
.cta-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px,6vw,96px);
  line-height: 0.95; color: var(--white);
  margin-bottom: 24px;
}
.cta-title em { font-style: normal; color: var(--accent); }
.cta-desc { font-size: 15px; line-height: 1.9; color: var(--gray-4); font-weight: 300; }
.cta-right { display: flex; flex-direction: column; gap: 16px; }
.btn-primary {
  font-family: 'Space Mono', monospace;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  background: var(--accent); color: var(--black);
  padding: 18px 48px; border: none;
  font-weight: 700; cursor: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary:hover { background: #d8ff4a; transform: translateY(-2px); }
.btn-secondary {
  font-family: 'Space Mono', monospace;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  background: transparent; color: var(--gray-4);
  padding: 18px 48px;
  border: 1px solid var(--border);
  cursor: none; transition: all 0.2s;
  white-space: nowrap; text-align: center;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* CONTACT FORM */
.contact-form {
  background: var(--gray-2);
  padding: 40px;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 450px;
}
.form-group {
  margin-bottom: 20px;
}
.contact-form input, 
.contact-form select, 
.contact-form textarea {
  width: 100%;
  background: var(--black);
  border: 1px solid var(--border);
  padding: 14px 18px;
  color: var(--white);
  font-family: 'Noto Serif SC', serif;
  font-size: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.contact-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}
.contact-form input:focus, 
.contact-form select:focus, 
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.contact-form textarea {
  resize: none;
}
.contact-form ::placeholder {
  color: var(--gray-3);
}

/* PHISHING TOOLTIP */
.phishing-tooltip {
  position: relative;
  display: inline-flex;
}
.tooltip-popup {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 240px;
  background: var(--gray-1);
  border: 1px solid var(--accent);
  padding: 16px;
  z-index: 1000002;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.tooltip-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--accent) transparent transparent transparent;
}
.phishing-tooltip:hover .tooltip-popup {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-container {
  background: var(--gray-1);
  border: 1px solid var(--border);
  width: 90%;
  max-width: 500px;
  padding: 48px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}
.modal-overlay.active .modal-container {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--gray-3);
  cursor: none;
  transition: color 0.2s;
}
.modal-close:hover {
  color: var(--accent);
}
.modal-content h2 span {
  color: var(--accent);
}

/* FORM SUBMISSION STATES */
.btn-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0,0,0,0.1);
  border-top: 2px solid var(--black);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -10px;
  margin-left: -10px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-primary.loading .btn-text {
  visibility: hidden;
}
.btn-primary.loading .btn-loader {
  display: block;
}

/* Entrance animations */
.fade-up {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.in { opacity: 1; transform: translateY(0); }

/* RESPONSIVE INDEX */
@media (max-width: 1024px) {
  .hero-stats { gap: 32px; }
  .solution-layout { gap: 40px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 80px 24px; }
  
  .hero { padding: 0 24px 60px; }
  .hero-title { font-size: 64px; }
  .hero-sub { flex-direction: column; align-items: flex-start; gap: 40px; }
  .hero-stats { width: 100%; justify-content: space-between; gap: 20px; }
  .stat-num { font-size: 40px; }
  
  .pain-grid { grid-template-columns: 1fr; }
  .pain-card { padding: 32px; }
  .pain-num { font-size: 60px; }
  
  .solution-layout { grid-template-columns: 1fr; }
  .solution-title { font-size: 40px; }
  .route-card { padding: 16px 20px; }
  .route-latency { font-size: 24px; }
  
  .map-section { padding: 80px 24px; }
  .map-header { flex-direction: column; align-items: flex-start; gap: 24px; }
  #world-map-container { height: 320px; }
  
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 32px 24px; }
  
  .cta-section {
    padding: 80px 24px;
    flex-direction: column;
    text-align: center;
    gap: 48px;
  }
  .cta-title { font-size: 48px; }
  .btn-primary, .btn-secondary { width: 100%; }
}
