/* NEST Website - Main Styles */
/* nest-eeg.org — Dark Glassmorphism */

:root {
  /* Colors */
  --bg-primary: #07070F;
  --bg-secondary: #0A0A14;
  --bg-tertiary: #060610;
  --bg-card: rgba(255, 255, 255, 0.06);

  /* Glass system */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-subtle: rgba(255, 255, 255, 0.03);
  --glass-bg-medium: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-subtle: rgba(255, 255, 255, 0.07);
  --glass-blur: blur(28px);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.09);

  --text-primary: #FFFFFF;
  --text-secondary: #A0A0B0;
  --text-muted: #5A5A70;

  --accent-purple: #8B5CF6;
  --accent-indigo: #6366F1;
  --accent-violet: #A855F7;
  --accent-green: #22C55E;
  --accent-teal: #10B981;

  /* Glow colors */
  --glow-purple: rgba(139, 92, 246, 0.25);
  --glow-indigo: rgba(99, 102, 241, 0.25);

  /* Fonts */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 60px;
  --spacing-4xl: 80px;
  --spacing-5xl: 100px;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-purple);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -2px;
}

h2 {
  font-size: clamp(28px, 3.5vw, 52px);
  letter-spacing: -1px;
}

h3 {
  font-size: clamp(22px, 2.5vw, 36px);
}

h4 {
  font-size: clamp(20px, 2vw, 28px);
}

h5 {
  font-size: clamp(16px, 1.5vw, 20px);
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-indigo), var(--accent-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-animated {
  background: linear-gradient(270deg, var(--accent-purple), var(--accent-indigo), var(--accent-violet), var(--accent-purple));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.mono {
  font-family: var(--font-mono);
}

.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-purple);
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 80px;
}

.section {
  padding: 100px 80px;
}

.section-alt {
  background: rgba(255, 255, 255, 0.018);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.section-dark {
  background: rgba(0, 0, 0, 0.25);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.gap-xl { gap: 32px; }
.gap-2xl { gap: 40px; }
.gap-3xl { gap: 60px; }

.text-center { text-align: center; }

/* ===== SECTION HEADER ===== */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header .label {
  display: inline-block;
  margin-bottom: 16px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(7, 7, 15, 0.55);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: var(--glass-inset);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
  background: rgba(7, 7, 15, 0.88);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.6), inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 80px;
  max-width: 1440px;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-primary);
  position: relative;
}

.logo::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-purple);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.logo:hover::after {
  transform: scaleX(1);
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent-purple);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

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

.nav-link.active::after,
.nav-link:hover::after {
  transform: scaleX(1);
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  background: rgba(7, 7, 15, 0.95);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 16px 24px 24px;
  gap: 4px;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav .nav-link {
  padding: 12px 0;
  font-size: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav .btn {
  margin-top: 16px;
  width: 100%;
  justify-content: center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-purple);
  color: var(--text-primary);
  box-shadow: 0 0 0 rgba(139, 92, 246, 0);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--glow-purple), 0 0 0 1px rgba(139, 92, 246, 0.4);
  background: #9D6EFF;
  color: var(--text-primary);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.20);
  color: var(--text-primary);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: rgba(139, 92, 246, 0.5);
  color: var(--accent-purple);
  background: rgba(139, 92, 246, 0.07);
}

.btn-lg {
  padding: 15px 32px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  padding-top: 180px;
  padding-bottom: 120px;
  text-align: center;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ===== SPLINE 3D VIEWER ===== */
.hero-spline {
  position: absolute;
  top: -60px;
  right: -120px;
  width: 58%;
  height: calc(100% + 60px);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateX(60px) scale(0.94);
  transition: opacity 1.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 1.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-spline.loaded {
  opacity: 0.9;
  transform: translateX(0) scale(1);
}

@media (max-width: 1100px) {
  .hero-spline {
    display: none;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139, 92, 246, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 100px;
  padding: 6px 16px;
  margin-bottom: 32px;
  font-size: 13px;
  font-weight: 500;
  color: #C4B5FD;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-violet);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.hero h1 {
  max-width: 900px;
  margin: 0 auto 28px;
  line-height: 1.05;
}

.hero-subtitle {
  font-size: clamp(16px, 1.5vw, 20px);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto 44px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

/* Stats Row */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 700px;
  margin: 0 auto;
  background: var(--glass-bg-medium);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}

.stat {
  text-align: center;
  flex: 1;
  position: relative;
}

.stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-value.purple { color: var(--accent-purple); }
.stat-value.indigo { color: var(--accent-indigo); }
.stat-value.violet { color: var(--accent-violet); }

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===== WHY NEST SECTION ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.why-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--glass-inset);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.why-card:hover {
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.10),
              0 0 0 1px rgba(139, 92, 246, 0.10);
  transform: translateY(-4px);
}

.why-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
}

.why-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.why-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== HOW IT WORKS SECTION ===== */
.steps-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.step-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  width: 210px;
  flex-shrink: 0;
  box-shadow: var(--glass-inset);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.step-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(139, 92, 246, 0.04);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.step-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  border-color: rgba(139, 92, 246, 0.20);
}

.step-card:hover::before {
  opacity: 1;
}

.step-number {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.step-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.10);
  border: 1px solid rgba(139, 92, 246, 0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
}

.step-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
}

.step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--accent-purple);
  opacity: 0.6;
}

.step-connector svg {
  width: 20px;
  height: 20px;
}

/* ===== ARCHITECTURE SECTION ===== */
.arch-diagram {
  max-width: 1200px;
  margin: 0 auto 60px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--glass-shadow);
}

.arch-diagram::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: rgba(139, 92, 246, 0.45);
}

.arch-pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.arch-block {
  flex-shrink: 0;
  text-align: center;
  padding: 20px 16px;
  min-width: 120px;
}

.arch-block-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 24px;
}

.arch-block-icon.purple {
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.28);
}

.arch-block-icon.indigo {
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.28);
}

.arch-block-icon.violet {
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.28);
}

.arch-block-icon.teal {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.arch-block-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.arch-block-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.arch-arrow {
  color: rgba(139, 92, 246, 0.5);
  flex-shrink: 0;
}

/* ===== DEMO SECTION ===== */
.demo-container {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  box-shadow: var(--glass-shadow);
}

.demo-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-panel-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-panel-title::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-purple);
  flex-shrink: 0;
}

.demo-visualization {
  background: rgba(5, 5, 18, 0.8);
  border-radius: var(--radius-md);
  height: 260px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

#eeg-mini-canvas {
  width: 100%;
  height: 100%;
}

.demo-visualization-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-viz-label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: rgba(139, 92, 246, 0.7);
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 8px;
  border-radius: 4px;
}

.demo-viz-channels {
  display: flex;
  gap: 3px;
}

.demo-viz-channel {
  width: 4px;
  height: 12px;
  border-radius: 2px;
  opacity: 0.7;
  animation: channelPulse 1.5s ease-in-out infinite;
}

.demo-viz-channel:nth-child(1) { background: #8B5CF6; animation-delay: 0s; }
.demo-viz-channel:nth-child(2) { background: #6366F1; animation-delay: 0.2s; }
.demo-viz-channel:nth-child(3) { background: #A855F7; animation-delay: 0.4s; }
.demo-viz-channel:nth-child(4) { background: #10B981; animation-delay: 0.6s; }
.demo-viz-channel:nth-child(5) { background: #8B5CF6; animation-delay: 0.8s; }

@keyframes channelPulse {
  0%, 100% { height: 8px; opacity: 0.5; }
  50% { height: 16px; opacity: 1; }
}

.demo-output-panel {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  padding: 24px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
}

.demo-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.demo-output-title {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.demo-output-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent-teal);
}

.demo-output-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-teal);
  animation: pulse 1.5s ease-in-out infinite;
}

.demo-output-text {
  font-family: var(--font-mono);
  font-size: 17px;
  color: #C4B5FD;
  line-height: 1.7;
  flex: 1;
}

.demo-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent-purple);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.demo-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

/* ===== FEATURES SECTION ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--glass-inset);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(139, 92, 246, 0.6);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  border-color: rgba(139, 92, 246, 0.18);
}

.feature-card:hover::after {
  transform: scaleX(1);
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
  background: rgba(139, 92, 246, 0.10);
  border: 1px solid rgba(139, 92, 246, 0.18);
}

.feature-icon {
  font-size: 24px;
  color: var(--accent-purple);
  line-height: 1;
}

/* ===== PHOSPHOR ICON COLORS ===== */
.why-icon i {
  color: var(--accent-purple);
  line-height: 1;
}

.step-icon i {
  color: var(--accent-purple);
  line-height: 1;
}

.arch-block-icon.purple i { color: var(--accent-purple); }
.arch-block-icon.indigo i { color: var(--accent-indigo); }
.arch-block-icon.violet i { color: var(--accent-violet); }
.arch-block-icon.teal i   { color: var(--accent-teal); }

.feature-icon-wrapper i {
  color: var(--accent-purple);
  line-height: 1;
}

.feature-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== RESEARCH QUOTE ===== */
.research-quote {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.quote-text {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 24px;
  quotes: "\201C" "\201D";
}

.quote-text::before {
  content: open-quote;
  color: var(--accent-purple);
}

.quote-text::after {
  content: close-quote;
  color: var(--accent-purple);
}

.quote-attribution {
  font-size: 14px;
  color: var(--text-muted);
}

.quote-attribution strong {
  color: var(--text-secondary);
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: rgba(139, 92, 246, 0.04);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-top: 1px solid rgba(139, 92, 246, 0.12);
  border-bottom: 1px solid rgba(139, 92, 246, 0.12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ===== DOWNLOAD SECTION ===== */
.download-section {
  text-align: center;
}

.code-block {
  background: rgba(0, 0, 8, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  max-width: 700px;
  margin: 40px auto;
  text-align: left;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), var(--glass-inset);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-block-dots {
  display: flex;
  gap: 6px;
}

.code-block-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-block-dot:nth-child(1) { background: #FF5F57; }
.code-block-dot:nth-child(2) { background: #FEBC2E; }
.code-block-dot:nth-child(3) { background: #28C840; }

.code-block-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.copy-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.code-block pre {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #C4B5FD;
  line-height: 1.9;
  overflow-x: auto;
}

.code-block .comment { color: var(--text-muted); }
.code-block .command { color: var(--accent-teal); }
.code-block .string { color: #86EFAC; }
.code-block .keyword { color: #F9A8D4; }

.download-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== FOOTER ===== */
.footer {
  background: rgba(0, 0, 8, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 72px 80px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand {
  max-width: 280px;
  flex-shrink: 0;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 14px;
  color: var(--text-primary);
  display: inline-block;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-social-links {
  display: flex;
  gap: 12px;
}

.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.footer-social-link:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.28);
  color: var(--accent-purple);
}

.footer-links {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-column h5 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.footer-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-column a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: var(--text-primary);
}

.footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 32px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-copyright {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
  color: var(--text-secondary);
}

/* ===== DOCS ===== */
.docs-layout {
  display: flex;
  min-height: calc(100vh - 72px);
  margin-top: 72px;
}

.docs-sidebar {
  width: 272px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 32px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  position: fixed;
  height: calc(100vh - 72px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.2) transparent;
}

.docs-sidebar-section {
  margin-bottom: 32px;
}

.docs-sidebar-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding: 0 12px;
}

.docs-sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-sidebar-links a {
  font-size: 14px;
  color: var(--text-secondary);
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.docs-sidebar-links a:hover,
.docs-sidebar-links a.active {
  background: rgba(139, 92, 246, 0.10);
  color: var(--accent-purple);
}

.docs-content {
  flex: 1;
  margin-left: 272px;
  padding: 56px 80px;
  max-width: calc(100% - 272px);
}

.docs-content h1 { font-size: clamp(32px, 3vw, 48px); margin-bottom: 24px; }
.docs-content h2 { font-size: 26px; margin-top: 56px; margin-bottom: 16px; }
.docs-content h3 { font-size: 20px; margin-top: 40px; margin-bottom: 12px; }

.docs-content p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.docs-content ul, .docs-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.docs-content li {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 6px;
}

.docs-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: rgba(139, 92, 246, 0.10);
  padding: 2px 8px;
  border-radius: 4px;
  color: #C4B5FD;
}

.docs-content pre {
  background: rgba(0, 0, 8, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 24px;
  overflow-x: auto;
  margin-bottom: 24px;
}

.docs-content pre code {
  padding: 0;
  background: transparent;
  font-size: 14px;
}

.docs-nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.docs-nav-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-nav-btn-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.docs-nav-btn-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-purple);
}

/* ===== UTILITY ===== */
.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0 80px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.10);
  border: 1px solid rgba(139, 92, 246, 0.20);
  color: #C4B5FD;
}

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

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

.animate-fadeInUp {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1280px) {
  .container, .section {
    padding-left: 48px;
    padding-right: 48px;
  }

  .header-inner, .footer {
    padding-left: 48px;
    padding-right: 48px;
  }

  .docs-content {
    padding-left: 48px;
    padding-right: 48px;
  }
}

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

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-links {
    gap: 40px;
  }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .header-inner .btn { display: none; }
  .mobile-menu-btn { display: flex; }

  .demo-container {
    grid-template-columns: 1fr;
  }

  .steps-container {
    flex-direction: column;
    align-items: center;
  }

  .step-connector {
    transform: rotate(90deg);
  }

  .stats-row {
    gap: 0;
    padding: 24px 16px;
  }

  .stat-value { font-size: 28px; }

  .docs-sidebar { display: none; }
  .docs-content {
    margin-left: 0;
    max-width: 100%;
    padding: 32px 24px;
  }

  .footer-top {
    flex-direction: column;
    gap: 40px;
  }

  .footer-links {
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .container, .section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header-inner, .footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .hero {
    padding-top: 130px;
    padding-bottom: 80px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-lg {
    width: 100%;
    max-width: 320px;
  }

  .stats-row {
    flex-direction: column;
    gap: 0;
    max-width: 100%;
  }

  .stat {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .stat:not(:last-child)::after {
    display: none;
  }

  .stat:last-child {
    border-bottom: none;
  }

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

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

  .download-buttons {
    flex-direction: column;
    align-items: center;
  }

  .download-buttons .btn {
    width: 100%;
    max-width: 320px;
  }

  .footer {
    padding-top: 48px;
    padding-bottom: 32px;
  }

  .divider {
    margin: 0 20px;
  }
}
