/* ========================================
   LAYOUT - Container, Navbar, Footer
   ======================================== */

/* === Layout === */
.page { 
  min-height: 100vh;
  padding-top: 80px;
  position: relative;
}

.container { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 var(--space-6);
}

section { 
  padding: var(--space-24) 0;
  position: relative;
}

/* === Progress Bar === */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  width: 0%;
  z-index: 1001;
  box-shadow: 0 0 20px var(--glow-primary);
}

/* === Navbar === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13, 13, 13, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  color: white;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 25px var(--glow-primary);
  animation: brandPulse 3s ease-in-out infinite;
}

.brand-mark:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 0 40px var(--glow-primary);
}

.brand-text { 
  font-weight: 600; 
  font-size: 16px;
  background: linear-gradient(90deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub { 
  font-size: 12px; 
  color: var(--text-muted); 
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.3s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s;
}

.nav-link:hover,
.nav-link.active { color: var(--text); }

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.nav-cta {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  transition: all 0.3s;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--glow-primary);
}

/* === Footer === */
footer {
  border-top: 1px solid var(--border);
  padding: var(--space-8) 0;
  background: rgba(0, 0, 0, 0.3);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* === Mobile Menu === */
.menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: 0.3s;
  border-radius: 2px;
}

.menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* === Scroll to Top === */
.scroll-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  color: white;
  font-size: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s;
  box-shadow: 0 4px 25px var(--glow-primary);
  cursor: pointer;
}

.scroll-top.show { opacity: 1; visibility: visible; }
.scroll-top:hover { transform: translateY(-6px) scale(1.1); }


/* Brand Link */
a.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

a.brand-mark {
  text-decoration: none;
}


/* Visitor Counter */
.visitor-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: 13px;
}

.visitor-icon {
  color: var(--primary);
  font-size: 14px;
  animation: pulse 2s ease-in-out infinite;
}

.visitor-count {
  font-weight: 600;
  color: var(--primary);
  font-family: var(--font-mono);
  min-width: 40px;
  text-align: center;
  transition: all 0.3s;
}

.visitor-count.loaded {
  animation: countPop 0.5s ease;
}

@keyframes countPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.visitor-label {
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer-inner {
    gap: var(--space-4);
  }
  
  .visitor-counter {
    order: -1;
    width: 100%;
    justify-content: center;
  }
}
