/* ==============================
   Infiforge — Design System & Styles
   ============================== */

/* --- Design Tokens --- */
:root {
  --bg-primary: #0A0A0F;
  --bg-secondary: #14141F;
  --bg-tertiary: #1C1C2E;
  --accent-violet: #8B5CF6;
  --accent-indigo: #6366F1;
  --text-primary: #F0F0F5;
  --text-secondary: #9494A6;
  --text-muted: #6B6B80;
  --border: #2A2A3E;
  --border-hover: #3B3B55;
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;
  --overlay-light: rgba(255,255,255,0.05);
  --overlay-medium: rgba(255,255,255,0.08);
  --glow-violet: rgba(139,92,246,0.15);
  --glow-indigo: rgba(99,102,241,0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --max-width: 1200px;
  --nav-height: 64px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Motion easing — strong custom curves (design engineering) */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* Motion timing */
  --duration-instant: 100ms;
  --duration-fast: 160ms;
  --duration-base: 250ms;
  --duration-slow: 500ms;
  --duration-hero: 700ms;

  /* Entrance offsets */
  --reveal-offset: 24px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent-violet);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

a:focus-visible {
  outline: 2px solid var(--accent-violet);
  outline-offset: 2px;
  border-radius: 2px;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent-violet);
  color: #0A0A0F;
  font-weight: 600;
  border-radius: var(--radius-sm);
  z-index: 10000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
  font-size: 1.25rem;
  font-family: var(--font-body);
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-violet);
  margin-bottom: var(--space-sm);
  display: block;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: transform var(--duration-fast) var(--ease-out-quart),
              box-shadow var(--duration-base) var(--ease-out-quart),
              background-color var(--duration-base) var(--ease-out-quart),
              border-color var(--duration-base) var(--ease-out-quart),
              color var(--duration-base) var(--ease-out-quart);
  text-decoration: none;
  white-space: nowrap;
  will-change: transform;
}

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

.btn-primary {
  background: var(--accent-violet);
  color: #0A0A0F;
  border: 1px solid var(--accent-violet);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent-violet);
  box-shadow: 0 0 20px var(--glow-violet);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-violet);
  border: 1px solid var(--accent-violet);
}

.btn-secondary:hover {
  background: var(--accent-violet);
  color: #0A0A0F;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 212, 170, 0.28);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-secondary);
  background: var(--overlay-light);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.btn .icon {
  font-size: 1.1em;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo:hover {
  color: var(--accent-violet);
}

.nav-logo .logo-icon {
  width: 28px;
  height: 28px;
  background: var(--accent-violet);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #0A0A0F;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

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

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-violet);
  border-radius: 1px;
}

.nav-cta {
  margin-left: var(--space-sm);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.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);
}

/* --- Sections --- */
.section {
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  font-size: 1.1rem;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg .gradient {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
}

.hero-bg .gradient-1 {
  width: 600px;
  height: 600px;
  background: var(--accent-violet);
  top: -200px;
  right: -200px;
  opacity: 0.15;
}

.hero-bg .gradient-2 {
  width: 400px;
  height: 400px;
  background: var(--accent-indigo);
  bottom: -100px;
  left: -100px;
  opacity: 0.1;
}

.hero-bg .grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--overlay-light);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

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

.hero h1 {
  margin-bottom: var(--space-lg);
}

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

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--border);
}

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

.hero-stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* --- Hero Visual & Entrance Choreography --- */
.hero-visual {
  position: relative;
  max-width: 640px;
  margin: var(--space-3xl) auto 0;
  transform: translateY(var(--parallax, 0px));
  transition: transform var(--duration-slow) var(--ease-out-quart);
  will-change: transform;
}

.hero-figure {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  transform: translateZ(0);
}

.hero-figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0) 55%, rgba(10, 10, 15, 0.35) 100%);
  pointer-events: none;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-quart);
}

.hero-visual:hover .hero-image {
  transform: scale(1.03);
}

.hero-pill {
  position: absolute;
  z-index: 2;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  animation: pillIn var(--duration-slow) var(--ease-out-expo) forwards,
             float 6s ease-in-out infinite;
}

.hero-pill:nth-child(2) { top: 8%; left: 6%; animation-delay: 0s; }
.hero-pill:nth-child(3) { top: 45%; right: -4%; animation-delay: 1.2s; }
.hero-pill:nth-child(4) { bottom: 12%; left: 12%; animation-delay: 2.4s; }
.hero-pill:nth-child(5) { bottom: 8%; right: 10%; animation-delay: 3.6s; }

.hero-anim {
  opacity: 0;
  transform: translateY(28px);
  animation: heroReveal var(--duration-hero) var(--ease-out-expo) forwards;
  animation-delay: var(--reveal-delay, 0s);
}

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pillIn {
  to {
    opacity: 1;
  }
}

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

/* --- Network Visualization --- */
.network-viz {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.node {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-violet);
  box-shadow: 0 0 12px var(--glow-violet);
  animation: node-pulse 3s ease-in-out infinite;
}

.node:nth-child(2) { width: 8px; height: 8px; background: var(--accent-indigo); animation-delay: 0.5s; }
.node:nth-child(3) { width: 10px; height: 10px; background: var(--accent-violet); animation-delay: 1s; }
.node:nth-child(4) { width: 6px; height: 6px; background: var(--accent-indigo); animation-delay: 1.5s; }
.node:nth-child(5) { width: 14px; height: 14px; background: transparent; border: 2px solid var(--accent-violet); animation-delay: 2s; }
.node:nth-child(6) { width: 8px; height: 8px; background: var(--accent-indigo); animation-delay: 2.5s; }

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--overlay-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
  border: 1px solid var(--border);
}

.feature-card h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.15rem;
}

.feature-card p {
  font-size: 0.9rem;
  margin: 0;
}

/* --- Protocols --- */
.protocols {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.protocol-tag {
  padding: 0.25rem 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-violet);
}

.protocol-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* --- Decentralized Network Section --- */
.network-section-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 768px) {
  .network-section-inner {
    grid-template-columns: 1fr 1fr;
  }
}

.network-section-content {
  max-width: 560px;
}

.network-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-violet);
  margin-bottom: var(--space-md);
}

.network-section-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.network-section-content h2 {
  margin-bottom: var(--space-md);
}

.network-section-content p {
  margin-bottom: var(--space-lg);
}

.network-section-points {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.network-section-points li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.network-section-points li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

.network-section-visual {
  position: relative;
}

.network-section-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transform: translateZ(0);
}

.network-section-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-quart);
}

.network-section-visual:hover .network-section-image {
  transform: scale(1.03);
}

.network-section-figure--device {
  position: absolute;
  width: 45%;
  right: var(--space-md);
  bottom: var(--space-md);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  align-items: start;
}

.pricing-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.pricing-card.featured {
  border-color: var(--accent-violet);
  box-shadow: 0 0 30px var(--glow-violet);
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  padding: 0.25rem 0.75rem;
  background: var(--accent-violet);
  color: #0A0A0F;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.pricing-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.pricing-amount {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.pricing-amount .currency {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.pricing-amount .period {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.pricing-features {
  margin: var(--space-xl) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.pricing-features li .check {
  color: var(--success);
  flex-shrink: 0;
  margin-top: 3px;
}

.pricing-card .btn {
  width: 100%;
}

/* --- Testimonials --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

.testimonial-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  transition: transform var(--duration-base) var(--ease-out-quart),
              box-shadow var(--duration-base) var(--ease-out-quart),
              border-color var(--duration-base) var(--ease-out-quart);
  will-change: transform;
}

.testimonial-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.testimonial-text {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.testimonial-role {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* --- CTA Section --- */
.cta-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.cta-section h2 {
  margin-bottom: var(--space-md);
}

.cta-section p {
  max-width: 500px;
  margin: 0 auto var(--space-xl);
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* --- Footer --- */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand p {
  font-size: 0.85rem;
  margin-top: var(--space-md);
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--accent-violet);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--accent-violet);
}

/* --- Forms --- */
.form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-violet);
  box-shadow: 0 0 0 3px var(--glow-violet);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

/* --- Page Header --- */
.page-header {
  padding: calc(var(--nav-height) + var(--space-3xl)) 0 var(--space-3xl);
  text-align: center;
  position: relative;
}

.page-header h1 {
  margin-bottom: var(--space-md);
}

.page-header p {
  max-width: 600px;
  margin: 0 auto;
}

/* --- Features Page --- */
.features-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  counter-reset: feature-counter;
}

.feature-detail {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  position: relative;
  padding-left: calc(var(--space-xl) + 3rem);
}

.feature-detail::before {
  counter-increment: feature-counter;
  content: '0' counter(feature-counter);
  position: absolute;
  left: var(--space-xl);
  top: var(--space-xl);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-violet);
  font-weight: 500;
}

.feature-detail h3 {
  margin-bottom: var(--space-sm);
}

.feature-detail p {
  font-size: 0.9rem;
}

/* --- About Page --- */
.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.about-story-content h2 {
  margin-bottom: var(--space-md);
}

.about-story-content p {
  margin-bottom: var(--space-md);
}

.about-mission {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  max-width: 800px;
  margin: var(--space-3xl) auto;
}

.about-mission blockquote {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.about-mission cite {
  color: var(--text-secondary);
  font-style: normal;
  font-size: 0.9rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.team-card {
  text-align: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
}

.team-card h4 {
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.team-card .role {
  color: var(--accent-violet);
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.team-card p {
  font-size: 0.85rem;
  margin-top: var(--space-sm);
}

/* --- Contact Page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
}

.contact-info h3 {
  margin-bottom: var(--space-md);
}

.contact-info p {
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.contact-method:last-child {
  border-bottom: none;
}

.contact-method-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.contact-method h4 {
  font-size: 0.9rem;
  margin-bottom: var(--space-xs);
}

.contact-method a {
  font-size: 0.85rem;
}

/* --- Legal Pages --- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.legal-content h3 {
  font-size: 1.15rem;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}

.legal-content p,
.legal-content li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.legal-content ul {
  list-style: disc;
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

.legal-content li {
  margin-bottom: var(--space-sm);
}

.legal-content strong {
  color: var(--text-primary);
}

.legal-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

/* --- 404 Page --- */
.page-404 {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-height);
}

.page-404 .code {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-lg);
}

.page-404 h2 {
  margin-bottom: var(--space-md);
}

.page-404 p {
  max-width: 400px;
  margin-bottom: var(--space-xl);
}

.page-404 .btn {
  margin-bottom: var(--space-2xl);
}

/* --- Animations --- */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

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

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px var(--glow-violet); }
  50% { box-shadow: 0 0 40px var(--glow-violet), 0 0 60px var(--glow-indigo); }
}

.glow-pulse {
  animation: glow-pulse 3s ease-in-out infinite;
}

.animate {
  opacity: 0;
  transform: translateY(20px);
}

.animate.visible {
  animation: fade-in-up 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }
.animate-delay-6 { animation-delay: 0.6s; }

/* Scroll reveal — animate-in system */
.animate-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--duration-slow) var(--ease-out-expo),
              transform var(--duration-slow) var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

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

/* --- FAQ --- */
.faq-list {
  max-width: 700px;
  margin: var(--space-2xl) auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-lg) 0;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--accent-violet);
}

.faq-question .icon {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
  color: var(--text-secondary);
}

.faq-item.open .faq-question .icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: var(--space-lg);
}

.faq-answer p {
  font-size: 0.9rem;
  margin: 0;
}

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

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

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

@media (max-width: 768px) {
  :root {
    --space-4xl: 4rem;
    --space-3xl: 3rem;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: var(--space-xl);
    gap: var(--space-md);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-toggle {
    display: flex;
  }

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

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

  .about-story {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero-stats {
    flex-direction: column;
    gap: var(--space-lg);
  }
}

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

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

  .pricing-card.featured {
    order: -1;
  }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Screen-Reader-Only Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Selection --- */
::selection {
  background: var(--accent-violet);
  color: #0A0A0F;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* --- 3D Showcase (Phase 15) --- */
.w3d-showcase {
  overflow: hidden;
  background: var(--color-surface-alt, var(--color-bg, #fafafa));
  padding: var(--section-gap, 96px) 0;
}
.w3d-showcase__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.w3d-showcase__copy h2 {
  margin-bottom: 16px;
}
.w3d-showcase__copy p {
  color: var(--color-text-secondary, inherit);
  font-size: 1.05rem;
  max-width: 46ch;
}
.w3d-showcase__visual {
  position: relative;
  height: 380px;
  min-height: 320px;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,0.06) 0%, transparent 60%);
}
@media (max-width: 820px) {
  .w3d-showcase__grid { grid-template-columns: 1fr; gap: 32px; }
  .w3d-showcase__visual { height: 300px; min-height: 260px; }
}
