/* HEADER & NAVIGATION */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  padding: var(--s-6) 0;
  transition: all var(--transition-base);
}

.site-header.scrolled {
  padding: var(--s-5) 0;
  border-bottom-color: var(--border);
}

.logo {
  height: 26px;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.logo:hover {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.4));
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.4));
    opacity: 1;
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 24px rgba(255, 255, 255, 0.6));
    opacity: 0.85;
  }
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 0px;
}

.version-badge {
  margin-left: var(--s-3);
  padding: 2px var(--s-2);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: #a5b4fc;
  text-decoration: none;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.version-badge:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #c7d2fe;
  transform: translateY(-1px);
}

.brand-lockup .word-1 {
  font-weight: 500;
  letter-spacing: 0.05em;
  font-size: 10px;
  color: var(--text-secondary);
}

.brand-lockup .word-2 {
  font-weight: 600;
  letter-spacing: 0.25em;
  font-size: 9px;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--s-8);
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--small);
  transition: color var(--transition-fast);
  position: relative;
}

.nav a:not(.btn):hover {
  color: var(--text);
}

.nav a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width var(--transition-base);
}

.nav a:not(.btn):hover::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s-3);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mobile-menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all var(--transition-base);
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.nav {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: var(--s-8) 10%;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  z-index: 999;
  max-height: calc(100vh - 70px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
}

.nav.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-sections-wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-8);
  margin-bottom: var(--s-8);
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.nav-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--s-2);
}

.nav-section a {
  display: inline-block;
  padding: var(--s-2) var(--s-4);
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition-base);
  font-size: var(--p);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.nav-section a:hover {
  background: var(--bg-secondary);
  border-color: var(--border);
  color: var(--accent);
}

.nav-cta {
  text-align: center;
  padding-top: var(--s-6);
  border-top: 1px solid var(--border);
}

.nav-cta .btn {
  width: 100%;
  max-width: 400px;
  justify-content: center;
  display: inline-block;
}

@media (max-width: 768px) {
  .nav {
    padding: var(--s-6) var(--s-6);
  }
  
  .nav-sections-wrapper {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  cursor: pointer;
  height: 40px;
  padding: 0 var(--s-6);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  background: var(--bg);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--small);
  transition: all var(--transition-base);
  white-space: nowrap;
  position: relative;
}

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

.btn:active {
  transform: scale(0.98);
}

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

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

.btn.lg {
  height: 48px;
  padding: 0 var(--s-8);
  font-size: var(--body);
}

.btn.sm,
.btn-sm {
  height: 36px;
  padding: 0 var(--s-5);
  font-size: var(--tiny);
}

.btn.block {
  width: 100%;
}

.btn-loading {
  display: none;
}

.btn.loading .btn-text {
  display: none;
}

.btn.loading .btn-loading {
  display: inline;
}

/* CARDS */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-7);
}

@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-8);
  background: var(--surface);
  transition: all var(--transition-base);
  position: relative;
}

.card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.card p {
  margin: 0 0 var(--s-5);
  color: var(--muted);
  line-height: 1.6;
  font-size: var(--small);
}

.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: var(--s-5);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg);
}

.card-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--text);
}

.feature-card .list {
  margin: var(--s-5) 0 0;
  padding-left: 0;
  list-style: none;
}

.feature-card .list li {
  margin: var(--s-3) 0;
  padding-left: var(--s-6);
  position: relative;
  color: var(--text-secondary);
  font-size: var(--small);
}

.feature-card .list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 4px;
  height: 4px;
  background: var(--text-secondary);
  border-radius: 50%;
}

/* HERO SECTION */
.hero {
  padding: var(--s-20) 0 var(--s-16);
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-block;
  padding: var(--s-2) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--tiny);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--s-7);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-cta {
  justify-content: center;
  margin-bottom: var(--s-12);
}

@media (max-width: 640px) {
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-cta .btn {
    width: 100%;
  }
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--s-12);
  flex-wrap: wrap;
  padding-top: var(--s-10);
  border-top: 1px solid var(--border-subtle);
  max-width: 800px;
  margin: 0 auto;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: var(--h3);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--s-2);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: var(--tiny);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* TEXT ANIMATIONS */
.u-sweep {
  position: relative;
  white-space: nowrap;
  display: inline-block;
}

.u-sweep::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0.05em;
  height: 1px;
  width: 0;
  background: var(--text);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body.has-sweep .u-sweep::after {
  width: 100%;
}

/* REVEAL ANIMATIONS */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}
