/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0f1729;
  --bg-deep: #0a1628;
  --surface-1: #162037;
  --surface-2: #1c2844;
  --surface-3: #243352;
  --border: rgba(148, 180, 255, 0.1);
  --border-hover: rgba(148, 180, 255, 0.25);
  --text-primary: #e8edf5;
  --text-secondary: #94a3c4;
  --text-dim: #5b6b8a;
  --indigo: #6366f1;
  --violet: #8b5cf6;
  --amber: #f59e0b;
  --sky: #38bdf8;
  --emerald: #34d399;
  --coral: #fb7185;
  --indigo-light: #a5b4fc;
  --violet-light: #c4b5fd;
  --glow-indigo: rgba(99, 102, 241, 0.15);
  --glow-amber: rgba(245, 158, 11, 0.1);
  --font-display: 'Urbanist', sans-serif;
  --font-body: 'Nunito Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-w: 72rem;
  --radius: 1rem;
  --radius-lg: 1.25rem;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== GRADIENTS & UTILITIES ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--indigo-light), var(--violet-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-warm {
  background: linear-gradient(135deg, var(--amber), #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 36rem;
  margin: 0 auto 4rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  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; }

/* ===== COSMIC BACKGROUND ===== */
.cosmic-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.cosmic-bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  will-change: transform;
}

.aurora-a {
  width: 55vw;
  height: 55vh;
  top: -10%;
  left: 5%;
  background: rgba(99, 102, 241, 0.09);
  animation: auroraA 28s ease-in-out infinite;
}

.aurora-b {
  width: 45vw;
  height: 45vh;
  top: 30%;
  right: -10%;
  background: rgba(139, 92, 246, 0.07);
  animation: auroraB 33s ease-in-out infinite;
}

.aurora-c {
  width: 50vw;
  height: 40vh;
  bottom: 5%;
  left: -5%;
  background: rgba(245, 158, 11, 0.05);
  animation: auroraC 37s ease-in-out infinite;
}

.aurora-d {
  width: 40vw;
  height: 40vh;
  top: 55%;
  left: 35%;
  background: rgba(56, 189, 248, 0.04);
  animation: auroraD 31s ease-in-out infinite;
}

@keyframes auroraA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(6vw, -4vh) scale(1.12); }
  50% { transform: translate(-4vw, 7vh) scale(0.92); }
  75% { transform: translate(5vw, 2vh) scale(1.08); }
}

@keyframes auroraB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-5vw, 6vh) scale(1.08); }
  50% { transform: translate(3vw, -5vh) scale(0.95); }
  75% { transform: translate(-7vw, 3vh) scale(1.05); }
}

@keyframes auroraC {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(8vw, -4vh) scale(1.15); }
  66% { transform: translate(-6vw, 5vh) scale(0.88); }
}

@keyframes auroraD {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-6vw, -5vh) scale(1.1); }
  66% { transform: translate(5vw, 4vh) scale(0.93); }
}

.noise-grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.025;
}

.mouse-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.025) 35%, transparent 65%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.5s ease;
  opacity: 0;
  will-change: left, top;
}

/* Content above cosmic bg */
.hero, .stats, .features, .self-improve, .products, .opensource, .cta-section, .footer {
  position: relative;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .aurora { animation: none !important; }
  .mouse-glow { display: none; }
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 41, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(148, 180, 255, 0.08);
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(15, 23, 41, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.nav-logo img {
  width: 2rem;
  height: 2rem;
}

.brand-coral { color: var(--coral); }
.brand-indigo { color: #818cf8; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a:not(.lang-switch a) {
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 0.5rem;
  transition: color var(--transition), background var(--transition);
}

.nav-links a:not(.lang-switch a):hover {
  color: var(--text-primary);
  background: rgba(148, 180, 255, 0.06);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 1rem;
  padding: 0.2rem;
  background: rgba(148, 180, 255, 0.06);
  border-radius: 2rem;
  border: 1px solid var(--border);
}

.lang-switch a {
  padding: 0.3rem 0.75rem !important;
  font-size: 0.8rem !important;
  border-radius: 2rem !important;
  font-weight: 600 !important;
  color: var(--text-dim) !important;
  transition: all var(--transition) !important;
}

.lang-switch a.active {
  background: linear-gradient(135deg, var(--indigo), var(--violet)) !important;
  color: #fff !important;
}

.nav-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  padding: 0.25rem;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.35) 0%, rgba(15, 25, 50, 0.3) 40%, rgba(20, 30, 60, 0.25) 100%);
  overflow: hidden;
  padding-top: 4rem;
}

/* Hero background effects */
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  height: 70vh;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.08) 40%, transparent 70%);
  pointer-events: none;
  animation: heroGlowPulse 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0%;
  right: 5%;
  width: 60vw;
  height: 50vh;
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.12) 0%, rgba(251, 113, 133, 0.06) 40%, transparent 65%);
  pointer-events: none;
  animation: heroGlowPulse 10s ease-in-out infinite reverse;
}

@keyframes heroGlowPulse {
  0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.7; transform: translateX(-50%) scale(1.08); }
}

.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(148, 180, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.7;
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  background: rgba(99, 102, 241, 0.18);
  top: 5%;
  left: 10%;
  animation: orbFloat1 28s ease-in-out infinite;
}

.hero-orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(139, 92, 246, 0.15);
  top: 25%;
  right: 8%;
  animation: orbFloat2 32s ease-in-out infinite;
}

.hero-orb-3 {
  width: 350px;
  height: 350px;
  background: rgba(245, 158, 11, 0.1);
  bottom: 10%;
  left: 25%;
  animation: orbFloat3 35s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(40px, -30px); }
  66% { transform: translate(-20px, 20px); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-30px, 40px); }
  66% { transform: translate(25px, -15px); }
}

@keyframes orbFloat3 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(20px, 30px); }
  66% { transform: translate(-35px, -20px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 56rem;
  padding: 0 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-display);
  border-radius: 3rem;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  margin-bottom: 2.5rem;
}

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

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
}

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

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 42rem;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.hero-features-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 44rem;
  margin: 0 auto 2.5rem;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.hero-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.hero-feature-pill::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--indigo-light);
  border-radius: 50%;
  opacity: 0.75;
}

.hero-feature-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.hero-features-stack > .hero-features:nth-child(2) .hero-feature-pill {
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.06);
  font-weight: 400;
}

.hero-features-stack > .hero-features:nth-child(2) .hero-feature-pill::before {
  display: none;
}

.hero-features-stack > .hero-features:nth-child(2) .hero-feature-pill:hover {
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  border-radius: var(--radius);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.25), 0 4px 15px rgba(99, 102, 241, 0.2);
  transition: transform var(--transition), box-shadow var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.35), 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.btn-secondary:hover {
  background: rgba(148, 180, 255, 0.06);
  border-color: rgba(148, 180, 255, 0.35);
  transform: translateY(-2px);
}

.hero-platforms {
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.hero-separator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--indigo) 50%, transparent 100%);
  opacity: 0.3;
}

/* ===== STATS BAR ===== */
.stats {
  background: rgba(22, 32, 55, 0.6);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat-item {
  text-align: center;
  padding: 1rem 1.5rem;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--border);
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.stat-number.c-indigo {
  background: linear-gradient(135deg, var(--indigo-light), var(--violet-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-number.c-sky {
  background: linear-gradient(135deg, var(--sky), #7dd3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-number.c-emerald {
  background: linear-gradient(135deg, var(--emerald), #6ee7b7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-number.c-amber {
  background: linear-gradient(135deg, var(--amber), #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== FEATURES BENTO GRID ===== */
.features {
  padding: 8rem 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.bento-card {
  background: rgba(28, 40, 68, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.08);
}

.bento-card.span-2 {
  grid-column: span 2;
  padding: 2.5rem;
}

.bento-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  margin-bottom: 1.25rem;
}

.bento-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.bento-icon.accent-indigo {
  background: rgba(99, 102, 241, 0.12);
  color: var(--indigo-light);
}

.bento-icon.accent-sky {
  background: rgba(56, 189, 248, 0.12);
  color: var(--sky);
}

.bento-icon.accent-amber {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
}

.bento-icon.accent-emerald {
  background: rgba(52, 211, 153, 0.12);
  color: var(--emerald);
}

.bento-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

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

/* ===== SELF-IMPROVE ===== */
.self-improve {
  padding: 8rem 0;
}

.cycle-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  position: relative;
  margin-bottom: 1.5rem;
}

.cycle-flow::before {
  content: '';
  position: absolute;
  top: 4.5rem;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, var(--indigo), var(--sky), var(--amber), var(--emerald));
  opacity: 0.2;
}

.cycle-step {
  background: rgba(28, 40, 68, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  z-index: 1;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.cycle-step:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.08);
}

.cycle-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 1rem;
}

.cycle-step:nth-child(1) .cycle-num {
  background: linear-gradient(135deg, var(--indigo-light), var(--violet-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cycle-step:nth-child(2) .cycle-num {
  background: linear-gradient(135deg, var(--sky), #7dd3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cycle-step:nth-child(3) .cycle-num {
  background: linear-gradient(135deg, var(--amber), #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cycle-step:nth-child(4) .cycle-num {
  background: linear-gradient(135deg, var(--emerald), #6ee7b7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cycle-step .bento-icon {
  margin: 0 auto 1rem;
}

.cycle-step h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.cycle-step p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.cycle-return {
  text-align: center;
  margin-bottom: 4rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0;
}

.cycle-return svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--emerald);
  animation: cycleSpin 6s linear infinite;
}

@keyframes cycleSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.si-highlights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.si-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem;
  background: rgba(28, 40, 68, 0.4);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.si-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--emerald);
  margin-top: 0.15rem;
}

.si-item h4 {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.si-item p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

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

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

  .cycle-flow::before { display: none; }

  .si-highlights {
    grid-template-columns: 1fr;
  }

  .self-improve {
    padding: 5rem 0;
  }
}

@media (max-width: 480px) {
  .cycle-flow {
    grid-template-columns: 1fr;
  }
}

/* ===== PRODUCT SUITE ===== */
.products {
  padding: 8rem 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.product-card {
  background: rgba(28, 40, 68, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.08);
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.product-card.bar-indigo::before { background: linear-gradient(90deg, var(--indigo), var(--violet)); }
.product-card.bar-coral::before { background: linear-gradient(90deg, var(--coral), #f472b6); }
.product-card.bar-sky::before { background: linear-gradient(90deg, var(--sky), #7dd3fc); }
.product-card.bar-amber::before { background: linear-gradient(90deg, var(--amber), #fbbf24); }

.product-emoji {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.product-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.product-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.product-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 2rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--indigo-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.product-badge.badge-free {
  background: rgba(52, 211, 153, 0.1);
  color: var(--emerald);
  border-color: rgba(52, 211, 153, 0.2);
}

.product-badge.badge-pro {
  background: rgba(251, 113, 133, 0.1);
  color: var(--coral);
  border-color: rgba(251, 113, 133, 0.2);
}

/* ===== OPEN SOURCE ===== */
.opensource {
  padding: 8rem 0;
}

.oss-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.oss-grid-center {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.oss-card {
  background: rgba(28, 40, 68, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.oss-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.08);
}

.oss-grid-center .oss-card {
  width: calc(33.333% - 0.42rem);
}

.oss-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.oss-card-header svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.oss-card-name {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.oss-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.oss-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.oss-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.oss-lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.oss-lang-dot.python { background: #3572A5; }
.oss-lang-dot.js { background: #f1e05a; }
.oss-lang-dot.html { background: #e34c26; }

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw;
  height: 50vh;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
              radial-gradient(ellipse at 60% 40%, rgba(245, 158, 11, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.cta-content .section-title {
  margin-bottom: 1.25rem;
}

.cta-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.cta-links {
  margin-top: 1.5rem;
}

.cta-links a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition);
}

.cta-links a:hover {
  color: var(--indigo-light);
}

/* ===== FOOTER ===== */
.footer {
  background: rgba(11, 19, 34, 0.92);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

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

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 1rem;
  max-width: 20rem;
}

.footer-brand .nav-logo {
  display: inline-flex;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

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

.footer-col li {
  margin-bottom: 0.65rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
}

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

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(15, 23, 41, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.25rem;
  }

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

  .nav-links a:not(.lang-switch a) {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
  }

  .lang-switch {
    margin: 0.5rem 0 0;
    width: fit-content;
  }

  .hero-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas a {
    width: 100%;
    justify-content: center;
  }

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

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

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

  .bento-card.span-2 {
    grid-column: span 1;
    padding: 2rem;
  }

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

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

  .oss-grid-center {
    flex-direction: column;
    align-items: stretch;
  }

  .oss-grid-center .oss-card {
    width: 100%;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  .features, .products, .opensource, .cta-section {
    padding: 5rem 0;
  }
}

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

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