:root {
  --bg: #0a0f14;
  --bg-2: #0d1319;
  --card: #0f161d;
  --stroke: #1a2530;
  --text: #e6f1ff;
  --muted: #a7b3c3;
  --accent: #00d1c5;
  /* teal */
  --accent-2: #00f0e3;
  --danger: #ff4d6d;
  --success: #46e8a6;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --glow: 0 0 18px rgba(0, 209, 197, .35), inset 0 0 12px rgba(0, 209, 197, .15);
  --radius: 16px;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 15% 10%, #0c1218 0%, var(--bg) 55%, #070b0f 100%);
  color: var(--text);
  font-family: Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", sans-serif
}

a {
  text-decoration: none;
  color: var(--text)
}

img {
  max-width: 100%;
  display: block
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
  position: relative;
  z-index: 2;
  /* Ensure above canvas */
}

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
  background: linear-gradient(180deg, rgba(10, 15, 20, .85), rgba(10, 15, 20, .65));
  border-bottom: 1px solid var(--stroke)
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px
}

.brand img {
  width: 42px;
  filter: drop-shadow(0 0 10px rgba(0, 209, 197, .25))
}

.brand .title {
  font-weight: 800;
  letter-spacing: .6px
}

.brand .host {
  color: var(--accent)
}

.nav-links {
  display: flex;
  gap: 26px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  font-weight: 600
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text)
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--card);
  min-width: 160px;
  box-shadow: var(--shadow);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  z-index: 1;
  padding: 8px 0;
  top: 100%;
  left: 0;
}

.dropdown-content a {
  color: var(--muted);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: var(--bg-2);
  color: var(--accent);
}

.dropdown:hover .dropdown-content {
  display: block;
}

.cta {
  display: flex;
  gap: 12px
}

.btn {
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  display: inline-block;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #00110f;
  border: none;
  box-shadow: var(--glow)
}

.btn.ghost {
  color: var(--muted)
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text);
}

/* HERO */
.hero {
  position: relative;
  overflow: hidden
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 42px;
  align-items: center;
  padding: 72px 0 42px
}

.hero h1 {
  font-family: Rajdhani, Montserrat, sans-serif;
  font-size: clamp(40px, 5.5vw, 74px);
  line-height: 1.05;
  margin: 0
}

.hero h1 .accent {
  color: var(--accent);
  text-shadow: 0 0 14px rgba(0, 209, 197, .35)
}

.hero p {
  color: var(--muted);
  font-size: 18px;
  margin: 18px 0 28px
}

.hero .actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px
}

.wolf-card {
  background: radial-gradient(600px 300px at 70% 30%, rgba(0, 209, 197, .10), transparent 60%), var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px
}

.wolf-card img {
  width: 100%
}

.wolf-card.map-card {
  padding: 0;
  height: 400px;
  overflow: hidden;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
  background: var(--card);
  /* Base ocean color */
  z-index: 1;
}

/* Leaflet Overrides */
.leaflet-container {
  background: transparent !important;
  font-family: inherit !important;
}

/* Vector SVG Styles */
path.leaflet-interactive {
  transition: fill-opacity 0.2s, fill 0.2s;
  stroke-linejoin: round;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--bg-2) !important;
  /* Darker popup */
  border: 1px solid var(--accent);
  color: var(--text) !important;
  border-radius: 8px !important;
  box-shadow: 0 0 15px rgba(0, 209, 197, 0.2) !important;
  backdrop-filter: blur(4px);
}

.leaflet-popup-tip {
  border-top: none;
  border-left: none;
  background: var(--bg-2) !important;
}

.leaflet-popup-close-button {
  color: var(--muted) !important;
}

.map-popup {
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.map-popup strong {
  color: var(--text);
  font-family: Rajdhani, sans-serif;
  font-size: 16px;
  display: block;
  margin-bottom: 2px;
}

.map-popup .flag {
  font-size: 18px;
  display: block;
  margin-bottom: 4px;
}

.map-popup .muted {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

/* Pin Animation */
.server-pin {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-inner {
  width: 12px;
  height: 12px;
  background: #fff;
  /* White center for contrast */
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  position: relative;
  z-index: 2;
}

.pin-inner::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--accent);
  z-index: -1;
}

.pin-inner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: var(--accent);
  border-radius: 50%;
  z-index: -2;
  animation: radar-pulse 2s ease-out infinite;
}

@keyframes radar-pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }

  100% {
    transform: translate(-50%, -50%) scale(4);
    opacity: 0;
  }
}

/* Stat-row update for 4 columns including ping widget */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px
}

.stat {
  background: linear-gradient(180deg, #0f161d, #0b1117);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 14px
}

.stat h4 {
  margin: 0;
  font-size: 14px;
  color: var(--muted)
}

.stat .val {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent)
}

/* FEATURES */
.section {
  padding: 64px 0
}

.section h2 {
  font-family: Rajdhani;
  font-size: 42px;
  margin: 0 0 10px
}

.section p.lead {
  color: var(--muted)
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 26px
}

.feature {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 18px;
  position: relative
}

.feature:before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 209, 197, .35), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude
}

.icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 209, 197, .15), rgba(0, 209, 197, .05));
  border: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0
}

.icon svg {
  width: 24px;
  height: 24px;
}

.feature h3 {
  margin: 12px 0 8px
}

.feature p {
  color: var(--muted);
  font-size: 15px
}

/* PLANS */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 26px
}

.plans.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.plan {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 22px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.plan.highlight {
  border-color: rgba(0, 209, 197, .6);
  box-shadow: var(--glow)
}

.badge-pop {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #00110f;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 10px rgba(0, 209, 197, .4)
}

.plan h3 {
  margin: 0 0 6px;
  text-align: center;
}

.plan-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 10px rgba(0, 209, 197, 0.2));
  margin-left: auto;
  margin-right: auto;
}

.price {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  margin: 10px 0
}

.price .num {
  font-size: 38px;
  font-weight: 800;
  color: var(--accent)
}

.price .unit {
  color: var(--muted)
}

.list {
  margin: 14px 0 18px;
  color: var(--muted);
  padding-left: 0;
  list-style: none;
  text-align: center;
}

.list li {
  margin: 8px 0;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.list li:before {
  content: "✓";
  color: var(--accent);
}

.list li.no:before {
  content: "✗";
  color: var(--danger);
}

.plan .btn {
  width: 100%;
  margin-top: auto;
}

/* CONFIGURATOR */
.config-layout {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 32px;
  margin-top: 32px;
}

.config-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
}

.subdomain-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.subdomain-suffix {
  color: var(--muted);
  font-weight: 600;
}

.cycle-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.cycle-option {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
}

.cycle-option.active {
  border-color: var(--accent);
  background: rgba(0, 209, 197, .05);
}

.cycle-option .save {
  font-size: 12px;
  color: var(--accent);
  display: block;
  margin-top: 4px;
}

.upsell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  margin-bottom: 12px;
  cursor: pointer;
}

.upsell:hover {
  background: var(--bg-2);
}

.upsell.active {
  border-color: var(--accent);
  background: rgba(0, 209, 197, .05);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stroke);
}

.summary-row.total {
  border: none;
  margin-top: 16px;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
}

/* TEXT PAGE */
.text-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 64px 20px;
}

.text-page h1 {
  font-family: Rajdhani;
  font-size: 48px;
  margin-bottom: 24px;
}

.text-page p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

/* TRUST & FOOTER */
.logos {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  align-items: center;
  opacity: .85
}

.testimonial {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 18px
}

footer {
  border-top: 1px solid var(--stroke);
  background: var(--bg-2);
  padding: 36px 0
}

.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  gap: 26px
}

.small {
  font-size: 14px;
  color: var(--muted)
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding-top: 40px
  }

  .features,
  .plans,
  .stat-row,
  .foot-grid,
  .config-layout,
  .story-grid {
    grid-template-columns: 1fr
  }

  .nav-links {
    display: none
  }

  .mobile-toggle {
    display: block
  }

  .plans.grid-4 {
    grid-template-columns: 1fr 1fr;
  }
}

.hardware-section {
  background: rgba(0, 209, 197, 0.03);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}

.hardware-grid {
  align-items: center;
}

@media (max-width: 640px) {

  .features,
  .plans,
  .plans.grid-4,
  .stat-row,
  .foot-grid {
    grid-template-columns: 1fr
  }

  .brand .title {
    font-size: 18px
  }
}

/* Toast Notification (Activity Feed) */
#activity-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 100;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#activity-toast.toast-hidden {
  opacity: 0;
  transform: translateY(20px) scale(0.9);
}

.toast-content {
  background: rgba(15, 22, 29, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--accent);
  padding: 12px 18px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.toast-icon {
  font-size: 16px;
}

#toast-message {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* Range Slider */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: var(--stroke);
  outline: none;
  transition: background .2s;
}

.slider:hover {
  background: var(--bg-2);
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent);
  transition: transform 0.1s;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent);
}

/* SCROLL REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Staggered children reveal */
.reveal-group>* {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-group.active>* {
  opacity: 1;
  transform: translateY(0);
}

/* Delays for children in a group */
.reveal-group.active>*:nth-child(1) {
  transition-delay: 0.1s;
}

.reveal-group.active>*:nth-child(2) {
  transition-delay: 0.2s;
}

.reveal-group.active>*:nth-child(3) {
  transition-delay: 0.3s;
}

.reveal-group.active>*:nth-child(4) {
  transition-delay: 0.4s;
}

.reveal-group.active>*:nth-child(5) {
  transition-delay: 0.5s;
}

.reveal-group.active>*:nth-child(6) {
  transition-delay: 0.6s;
}

/* NETWORK MAP ANIMATION */
.network-line {
  stroke-dasharray: 8;
  animation: network-flow 30s linear infinite;
}

@keyframes network-flow {
  to {
    stroke-dashoffset: -500;
  }
}