/* ============================================
   CycleSpire AI — Global Styles
   ============================================ */

:root {
  /* Core Palette */
  --black: #0A0A0A;
  --black-light: #111111;
  --black-card: #141414;
  --green: #00FF41;
  --green-dim: #00cc34;
  --green-glow: rgba(0, 255, 65, 0.15);
  --purple: #6E00FF;
  --purple-dim: #5800cc;
  --purple-glow: rgba(110, 0, 255, 0.15);
  --white: #EAEAEA;
  --white-dim: #999999;
  --white-muted: #666666;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.07);

  /* Spacing */
  --section-pad: 120px;
  --container-max: 1200px;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   Canvas Background
   ============================================ */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============================================
   Glass Card Component
   ============================================ */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--green), var(--green-dim));
  color: var(--black);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--white);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-ghost:hover {
  border-color: var(--green);
  color: var(--green);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
}



/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 12px 0;
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.logo-cycle { color: var(--green); }
.logo-spire { color: var(--purple); }
.logo-ai {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--white-dim);
  margin-left: 4px;
  padding: 2px 6px;
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  vertical-align: super;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--white-dim);
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-nav-cta {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 32px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 255, 65, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(0, 255, 65, 0); }
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--green), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--white-dim);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-item {
  padding: 16px 24px;
  text-align: center;
  min-width: 120px;
}

.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--green), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--white-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
  display: block;
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.spiral-ring {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 1px solid rgba(110, 0, 255, 0.2);
  position: relative;
  animation: rotate-slow 20s linear infinite;
}

.spiral-ring::before,
.spiral-ring::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
}

.spiral-ring::before {
  width: 70%;
  height: 70%;
  top: 15%;
  left: 15%;
  border-color: rgba(0, 255, 65, 0.15);
  animation: rotate-slow 15s linear infinite reverse;
}

.spiral-ring::after {
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
  border-color: rgba(110, 0, 255, 0.3);
  animation: rotate-slow 10s linear infinite;
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   Slogan Banner
   ============================================ */
.slogan-banner {
  position: relative;
  z-index: 1;
  padding: 40px 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  text-align: center;
  background: rgba(110, 0, 255, 0.03);
}

.slogan-en {
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 600;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--green), var(--purple), var(--green));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ============================================
   Section Common
   ============================================ */
.features,
.solutions,
.modules,
.architecture,
.cta-section {
  position: relative;
  z-index: 1;
  padding: var(--section-pad) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 16px;
  padding: 6px 16px;
  border: 1px solid rgba(0, 255, 65, 0.2);
  border-radius: 100px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--white-dim);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Features Grid
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:nth-child(2)::before {
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.icon-green {
  background: var(--green-glow);
  color: var(--green);
}

.icon-purple {
  background: var(--purple-glow);
  color: var(--purple);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--white-dim);
  line-height: 1.7;
  margin-bottom: 20px;
}

.feature-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--green);
  padding: 4px 12px;
  border: 1px solid rgba(0, 255, 65, 0.2);
  border-radius: 6px;
}

.feature-card:nth-child(2) .feature-tag {
  color: var(--purple);
  border-color: rgba(110, 0, 255, 0.3);
}

/* ============================================
   Solutions Grid
   ============================================ */
.solutions {
  background: linear-gradient(180deg, transparent, rgba(110, 0, 255, 0.02), transparent);
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.solution-card {
  padding: 40px 32px;
  position: relative;
}

.solution-card.featured {
  border-color: rgba(110, 0, 255, 0.3);
  background: rgba(110, 0, 255, 0.05);
}

.solution-number {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.04);
  position: absolute;
  top: 20px;
  right: 24px;
}

.solution-icon-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-bottom: 24px;
  position: relative;
}

.ring-green {
  border: 2px solid var(--green);
  box-shadow: 0 0 20px var(--green-glow);
}

.ring-purple {
  border: 2px solid var(--purple);
  box-shadow: 0 0 20px var(--purple-glow);
}

.solution-icon-ring::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ring-green::after { background: var(--green); }
.ring-purple::after { background: var(--purple); }

.solution-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.solution-subtitle {
  font-size: 0.85rem;
  color: var(--white-muted);
  margin-bottom: 16px;
  font-weight: 500;
}

.solution-card > p:not(.solution-subtitle) {
  font-size: 0.95rem;
  color: var(--white-dim);
  line-height: 1.7;
  margin-bottom: 20px;
}

.solution-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.solution-features li {
  font-size: 0.85rem;
  color: var(--white-dim);
  padding-left: 20px;
  position: relative;
}

.solution-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--green);
}

.solution-card.featured .solution-features li::before {
  color: var(--purple);
}

/* ============================================
   Modules Timeline
   ============================================ */
.modules-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.module-item {
  display: flex;
  gap: 32px;
  position: relative;
}

.module-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 40px;
  flex-shrink: 0;
}

.connector-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.dot-green {
  background: var(--green);
  box-shadow: 0 0 16px rgba(0, 255, 65, 0.4);
}

.dot-purple {
  background: var(--purple);
  box-shadow: 0 0 16px rgba(110, 0, 255, 0.4);
}

.connector-line {
  width: 2px;
  flex: 1;
  background: linear-gradient(180deg, var(--green), var(--purple));
  opacity: 0.3;
}

.module-content {
  flex: 1;
  padding: 32px;
  margin-bottom: 32px;
}

.module-phase {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 8px;
}

.module-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.module-keyword {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--purple);
  margin-bottom: 16px;
}

.module-content > p:last-of-type {
  font-size: 0.95rem;
  color: var(--white-dim);
  line-height: 1.7;
  margin-bottom: 20px;
}

.module-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.module-tags span {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--white-dim);
}

/* ============================================
   Architecture
   ============================================ */
.architecture {
  background: linear-gradient(180deg, transparent, rgba(0, 255, 65, 0.02), transparent);
}

.arch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.arch-card {
  padding: 40px 36px;
}

.arch-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--green-glow), var(--purple-glow));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--green);
}

.arch-card:nth-child(2) .arch-icon {
  color: var(--purple);
}

.arch-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.arch-card > p {
  font-size: 0.95rem;
  color: var(--white-dim);
  line-height: 1.7;
  margin-bottom: 24px;
}

.arch-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.flow-node {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--green);
}

.arch-card:nth-child(2) .flow-node {
  color: var(--purple);
}

.flow-arrow {
  color: var(--white-muted);
  font-size: 0.9rem;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  padding: 80px 0 120px;
}

.cta-content {
  text-align: center;
  padding: 80px 40px;
  background: linear-gradient(135deg, rgba(0, 255, 65, 0.05), rgba(110, 0, 255, 0.05));
  border-color: rgba(110, 0, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.cta-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(0, 255, 65, 0.05), transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(110, 0, 255, 0.05), transparent 50%);
  animation: rotate-slow 30s linear infinite;
}

.cta-content h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
}

.cta-content > p {
  font-size: 1.1rem;
  color: var(--white-dim);
  margin-bottom: 40px;
  position: relative;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--glass-border);
  padding: 64px 0 32px;
  background: rgba(0, 0, 0, 0.3);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--white-dim);
  margin-top: 16px;
  line-height: 1.6;
}



.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--white-muted);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--green);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--glass-border);
  font-size: 0.8rem;
  color: var(--white-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: var(--white-muted);
  transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
  color: var(--white);
}

/* ============================================
   Scroll Animations
   ============================================ */
.feature-card,
.solution-card,
.module-item,
.arch-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-card.visible,
.solution-card.visible,
.module-item.visible,
.arch-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:nth-child(2),
.solution-card:nth-child(2),
.module-item:nth-child(2),
.arch-card:nth-child(2) {
  transition-delay: 0.1s;
}

.feature-card:nth-child(3),
.solution-card:nth-child(3),
.module-item:nth-child(3) {
  transition-delay: 0.2s;
}


/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 140px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-subtitle {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    margin-top: 40px;
  }

  .spiral-ring {
    width: 280px;
    height: 280px;
  }

  .features-grid,
  .solutions-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
  }

  .arch-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: 80px;
  }

  .nav-links,
  .nav-actions .btn-nav-cta {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .navbar.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--glass-border);
  }

  .nav-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
    letter-spacing: -1px;
  }

  .hero-stats {
    flex-direction: column;
    align-items: center;
  }

  .stat-item {
    width: 100%;
    max-width: 200px;
  }

  .module-item {
    flex-direction: column;
    gap: 16px;
  }

  .module-connector {
    flex-direction: row;
    width: auto;
    gap: 12px;
  }

  .connector-line {
    width: auto;
    height: 2px;
    flex: 1;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .cta-content {
    padding: 48px 24px;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn-lg {
    width: 100%;
    justify-content: center;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn-lg {
    width: 100%;
    max-width: 300px;
  }

  .arch-flow {
    justify-content: center;
  }
}
