/* ============================================================
   BACON-AI Coding Engine — Marketing Site Stylesheet
   Modern SaaS aesthetic inspired by Linear, Vercel, Stripe
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --accent: #a78bfa;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg: #f8fafc;
  --bg-dark: #0f172a;
  --bg-dark-2: #1e293b;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-light: #ffffff;
  --border: rgba(255, 255, 255, 0.08);
  --border-light: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  max-width: 680px;
}

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

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

/* --- Dot Grid Background Pattern --- */
.dot-pattern {
  background-image: radial-gradient(circle, rgba(99, 102, 241, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition);
  background: transparent;
}

.nav.scrolled {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: -0.03em;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: #fff;
}

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--transition);
}

.nav-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all var(--transition);
}

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

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -25%;
  width: 150%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(167, 139, 250, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99, 102, 241, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 32px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

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

.hero h1 {
  color: #fff;
  margin-bottom: 24px;
  font-weight: 800;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: rgba(255, 255, 255, 0.6);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* --- Section Styles --- */
.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--bg-dark);
  color: #fff;
}

.section-dark .text-muted {
  color: rgba(255, 255, 255, 0.5);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header .label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}

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

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-dark .section-header p {
  color: rgba(255, 255, 255, 0.5);
}

/* --- Problem Section --- */
.problem-section {
  background: linear-gradient(180deg, var(--bg-dark-2) 0%, var(--bg-dark) 100%);
  color: #fff;
  position: relative;
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.problem-list {
  list-style: none;
}

.problem-list li {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
}

.problem-list li .icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-top: 2px;
}

.problem-visual {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 32px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.8;
}

.problem-visual .err {
  color: var(--danger);
}

.problem-visual .warn {
  color: var(--warning);
}

.problem-visual .ok {
  color: var(--success);
}

/* --- Solution / Features Section --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  position: relative;
  background: var(--bg-card-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px;
  transition: all var(--transition);
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: rgba(99, 102, 241, 0.2);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(167, 139, 250, 0.1));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 20px;
  color: var(--primary);
}

.feature-card h3 {
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* --- Glass Card (dark sections) --- */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--transition);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

/* --- How It Works --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 15%;
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light));
  opacity: 0.3;
}

.step-card {
  text-align: center;
  position: relative;
}

.step-number {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  margin: 0 auto 24px;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
  position: relative;
  z-index: 1;
}

.step-card h3 {
  margin-bottom: 12px;
  color: var(--text);
}

.step-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 300px;
  margin: 0 auto;
}

/* --- Stats Section --- */
.stats-section {
  background: var(--bg-dark);
  padding: 80px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item {
  padding: 24px 16px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  line-height: 1.1;
}

.stat-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  font-weight: 500;
}

/* --- Projects Section --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  position: relative;
  background: var(--bg-card-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-thumb {
  height: 200px;
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-2));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99, 102, 241, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
}

.project-thumb .thumb-icon {
  font-size: 3rem;
  position: relative;
  z-index: 1;
}

.project-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

.badge-live {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-soon {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-locked {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.project-info {
  padding: 24px;
}

.project-info h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.project-info p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.project-info .btn {
  width: 100%;
  justify-content: center;
}

/* --- NPSL / Whitepaper Section --- */
.npsl-section {
  position: relative;
  overflow: hidden;
}

.npsl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.npsl-pipeline {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.pipeline-stage {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: all var(--transition);
}

.pipeline-stage:hover {
  background: rgba(255, 255, 255, 0.03);
}

.pipeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pipeline-dot.observe { background: var(--text-muted); }
.pipeline-dot.challenge { background: var(--warning); }
.pipeline-dot.enforce { background: var(--danger); }
.pipeline-dot.immutable { background: var(--success); }

.pipeline-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pipeline-desc {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

.pipeline-arrow {
  text-align: center;
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  padding: 4px 0;
}

.npsl-concepts {
  list-style: none;
}

.npsl-concepts li {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.npsl-concepts li:last-child {
  border-bottom: none;
}

.concept-icon {
  width: 40px;
  height: 40px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.concept-text h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: #fff;
}

.concept-text p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* --- Self-Annealing Diagram --- */
.annealing-loop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  margin-top: 24px;
  flex-wrap: wrap;
}

.annealing-step {
  padding: 10px 18px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.annealing-arrow {
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.25rem;
}

/* --- Access Page --- */
.access-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
  position: relative;
  padding: 120px 0 80px;
}

.access-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99, 102, 241, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.access-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 48px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.access-card h2 {
  color: #fff;
  text-align: center;
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.access-card .subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: all var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.form-divider {
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.8rem;
  margin: 24px 0;
  position: relative;
}

.form-divider::before,
.form-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 24px);
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.form-divider::before { left: 0; }
.form-divider::after { right: 0; }

.access-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #fca5a5;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

.access-error.show {
  display: block;
}

.access-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #6ee7b7;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

.access-success.show {
  display: block;
}

/* --- Request Access Form --- */
.request-form {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.request-form h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 20px;
  text-align: center;
}

/* --- Whitepaper Page --- */
.whitepaper-hero {
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
  color: #fff;
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
}

.whitepaper-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

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

.whitepaper-content {
  padding: 80px 0;
}

.wp-section {
  margin-bottom: 64px;
}

.wp-section h2 {
  margin-bottom: 24px;
  font-size: 1.75rem;
}

.wp-section h3 {
  margin-bottom: 12px;
  margin-top: 32px;
}

.wp-section p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}

.wp-code {
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  overflow-x: auto;
  margin: 16px 0;
}

.wp-code .keyword {
  color: var(--primary-light);
}

.wp-code .comment {
  color: var(--text-muted);
}

.wp-code .string {
  color: var(--success);
}

.laws-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.law-card {
  background: var(--bg-card-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}

.law-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}

.law-card h4 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.law-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0 auto;
}

/* --- Email CTA --- */
.email-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  color: #fff;
}

.email-cta h3 {
  margin-bottom: 12px;
  font-size: 1.5rem;
}

.email-cta p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 auto 24px;
}

.email-form {
  display: flex;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
}

.email-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
}

.email-form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.email-form input:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

.email-form button {
  padding: 12px 24px;
  background: #fff;
  color: var(--primary-dark);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.email-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- Footer --- */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.5);
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand .nav-logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.4);
}

.footer-links a:hover {
  color: var(--primary-light);
}

/* --- Watermark (project pages) --- */
.watermark-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(99, 102, 241, 0.92);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 9999;
  backdrop-filter: blur(8px);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

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

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .npsl-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 100px 0 60px;
    min-height: auto;
  }

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

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

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .steps-grid::before {
    display: none;
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .access-card {
    padding: 32px 24px;
  }

  .email-form {
    flex-direction: column;
  }

  .annealing-loop {
    flex-direction: column;
    gap: 8px;
  }

  .annealing-arrow {
    transform: rotate(90deg);
  }

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

/* ============================================================
   BENEFIT TILES — Clickable grid with modal detail
   ============================================================ */

/* --- Benefit Grid: 4x2 desktop, 2x4 tablet, 1x8 mobile --- */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.benefit-tile {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-body);
  color: #fff;
  outline: none;
  overflow: hidden;
}

.benefit-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.benefit-tile:hover,
.benefit-tile:focus-visible {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

.benefit-tile:hover::before,
.benefit-tile:focus-visible::before {
  opacity: 1;
}

.benefit-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(167, 139, 250, 0.15));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--primary-light);
  transition: background 0.25s ease;
}

.benefit-tile:hover .benefit-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(167, 139, 250, 0.25));
}

.benefit-hook {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.benefit-sub {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.benefit-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-light);
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.benefit-tile:hover .benefit-link {
  color: #a78bfa;
}

/* --- Benefit Detail Modal --- */
.benefit-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.benefit-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.benefit-modal-overlay[hidden] {
  display: none;
}

.benefit-modal {
  position: relative;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 40px;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.benefit-modal-overlay.open .benefit-modal {
  transform: translateY(0) scale(1);
}

.benefit-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.benefit-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.benefit-modal-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(167, 139, 250, 0.2));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary-light);
}

.benefit-modal-title {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.3;
}

.benefit-modal-body {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

.benefit-modal-body p {
  margin-bottom: 12px;
  max-width: none;
}

.benefit-modal-evidence {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 28px;
}

.benefit-modal-evidence h4 {
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.benefit-modal-evidence ul {
  list-style: none;
  padding: 0;
}

.benefit-modal-evidence li {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}

.benefit-modal-evidence li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.benefit-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.benefit-modal-actions .btn {
  flex: 1;
  justify-content: center;
  min-width: 160px;
}

/* --- Inquiry Form Modal --- */
.inquiry-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.inquiry-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.inquiry-modal-overlay[hidden] {
  display: none;
}

.inquiry-modal {
  position: relative;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.inquiry-modal-overlay.open .inquiry-modal {
  transform: translateY(0) scale(1);
}

.inquiry-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.inquiry-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.inquiry-modal h2 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.inquiry-sub {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.88rem;
  margin-bottom: 28px;
  line-height: 1.6;
}

.inquiry-form textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.inquiry-status {
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: none;
}

.inquiry-status.success {
  display: block;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
}

.inquiry-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

/* --- Floating CTA --- */
.floating-cta {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1500;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.floating-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.floating-cta[hidden] {
  display: none;
}

.floating-cta-btn {
  padding: 14px 28px;
  font-size: 0.95rem;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.2);
  border-radius: 12px;
}

.floating-cta-btn:hover {
  box-shadow: 0 12px 44px rgba(99, 102, 241, 0.55), 0 0 0 1px rgba(99, 102, 241, 0.3);
}

/* --- Light mode overrides for new components --- */
[data-theme="light"] .benefit-tile {
  background: #fff;
  border-color: var(--border-light);
  color: var(--text);
}

[data-theme="light"] .benefit-tile:hover {
  background: rgba(99, 102, 241, 0.04);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .benefit-sub {
  color: var(--text-secondary);
}

[data-theme="light"] .benefit-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(167, 139, 250, 0.08));
}

/* --- Benefit Grid Responsive --- */
@media (max-width: 1024px) {
  .benefit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .benefit-modal {
    padding: 28px 20px;
    max-height: 90vh;
  }

  .inquiry-modal {
    padding: 28px 20px;
  }

  .benefit-modal-actions {
    flex-direction: column;
  }

  .floating-cta {
    bottom: 16px;
    right: 16px;
  }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

/* --- Selection --- */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
}

/* ============================================================
   DARK / LIGHT MODE TOGGLE
   ============================================================ */

/* Logo images — constrained size, theme-aware */
.nav-logo .logo-img,
.nav-logo .logo-img-dark {
  height: 30px;
  width: 30px;
  object-fit: contain;
  border-radius: 6px;
}
/* Default dark theme: show dark logo, hide light */
.logo-img { display: none !important; }
.logo-img-dark { display: inline-block !important; }

/* Theme toggle button */
.theme-toggle {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  margin-left: 8px;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.2);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }

/* ---- LIGHT MODE ---- */
[data-theme="light"] {
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --bg: #f8fafc;
  --bg-card-light: #ffffff;
  --border-light: #e2e8f0;
}

[data-theme="light"] body {
  background: var(--bg);
  color: var(--text);
}

[data-theme="light"] .nav {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
}

[data-theme="light"] .nav-logo {
  color: var(--text);
}

[data-theme="light"] .nav-links a {
  color: var(--text-secondary);
}
[data-theme="light"] .nav-links a:hover {
  color: var(--primary);
}

[data-theme="light"] .nav-cta {
  background: var(--primary) !important;
  color: #fff !important;
}

[data-theme="light"] .theme-toggle {
  background: rgba(0,0,0,0.05);
  border-color: var(--border-light);
  color: var(--text);
}
[data-theme="light"] .theme-toggle:hover {
  background: rgba(0,0,0,0.1);
}
[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

[data-theme="light"] .nav-logo .logo-img { display: inline-block !important; }
[data-theme="light"] .nav-logo .logo-img-dark { display: none !important; }

/* Light mode sections */
[data-theme="light"] .section {
  background: var(--bg);
}

[data-theme="light"] .section.dot-pattern {
  background-image: radial-gradient(circle, #cbd5e1 1px, transparent 1px);
}

[data-theme="light"] .feature-card,
[data-theme="light"] .project-card {
  background: #fff;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .feature-card:hover,
[data-theme="light"] .project-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}

[data-theme="light"] .stat-number {
  color: var(--primary);
}

[data-theme="light"] .project-info h3 {
  color: var(--text);
}
[data-theme="light"] .project-info p {
  color: var(--text-secondary);
}

[data-theme="light"] .btn-outline {
  border-color: var(--primary);
  color: var(--primary);
}
[data-theme="light"] .btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

[data-theme="light"] .email-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

/* Light mode hero stays dark for contrast */
[data-theme="light"] .hero,
[data-theme="light"] .whitepaper-hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
}
[data-theme="light"] .hero .nav-logo,
[data-theme="light"] .hero h1 {
  color: #fff;
}

/* Footer stays dark */
[data-theme="light"] .footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.6);
}

/* ---- DARK MODE (default) ---- */
[data-theme="dark"] .nav-logo .logo-img { display: none !important; }
[data-theme="dark"] .nav-logo .logo-img-dark { display: inline-block !important; }

/* ---- SVG Logo in Nav ---- */
.nav-logo-svg {
  height: 28px;
  width: auto;
  color: #fff;
  flex-shrink: 0;
}
[data-theme="light"] .nav-logo-svg {
  color: #1e293b;
}
/* Hide old PNG logos if any remain */
.nav-logo .logo-img,
.nav-logo .logo-img-dark {
  display: none !important;
}
