/* ========================================
   NearlyAI — Space Theme
   Colors derived from the robot logo:
     Green glow:  #00E676 / #00C853
     Dark outline: #1a1a2e
     White body:   #e8e8f0
     Eye dark:     #0d0d1a
   ======================================== */

:root {
  --green:        #00E676;
  --green-dim:    #00C853;
  --green-dark:   #00893a;
  --green-glow:   rgba(0, 230, 118, 0.3);
  --green-glow-strong: rgba(0, 230, 118, 0.6);
  --bg:           #000000;
  --bg-card:      rgba(14, 14, 30, 0.7);
  --bg-card-hover:rgba(20, 20, 42, 0.85);
  --surface:      #0e0e1e;
  --text:         #d0d0e0;
  --text-bright:  #f0f0ff;
  --text-dim:     #707090;
  --border:       rgba(0, 230, 118, 0.12);
  --border-bright:rgba(0, 230, 118, 0.3);
  --nebula-purple:rgba(100, 40, 180, 0.08);
  --nebula-blue:  rgba(30, 80, 200, 0.06);
  --nebula-green: rgba(0, 230, 118, 0.04);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Star canvas */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Nebula blobs */
.nebula {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.nebula-1 {
  width: 600px; height: 600px;
  top: -100px; right: -150px;
  background: radial-gradient(circle, var(--nebula-purple), transparent 70%);
  animation: nebulaDrift 30s ease-in-out infinite alternate;
}
.nebula-2 {
  width: 500px; height: 500px;
  bottom: 20%; left: -100px;
  background: radial-gradient(circle, var(--nebula-blue), transparent 70%);
  animation: nebulaDrift 25s ease-in-out infinite alternate-reverse;
}
.nebula-3 {
  width: 400px; height: 400px;
  top: 50%; left: 40%;
  background: radial-gradient(circle, var(--nebula-green), transparent 70%);
  animation: nebulaDrift 35s ease-in-out infinite alternate;
}

@keyframes nebulaDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, -30px) scale(1.1); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}

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

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-bright);
}
.nav-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--green);
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
}
.hero-content {
  max-width: 700px;
}
.hero-logo-container {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
}
.hero-glow {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--green-glow-strong), transparent 70%);
  animation: heroGlow 4s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0%   { opacity: 0.5; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1.1); }
}
.hero-logo {
  position: relative;
  width: 160px;
  height: 160px;
  object-fit: contain;
  animation: heroFloat 6s ease-in-out infinite;
  filter: drop-shadow(0 0 20px var(--green-glow));
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-bright);
  margin-bottom: 12px;
}
.text-green {
  color: var(--green);
}
.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-dim);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}
.hero-description {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 28px;
  line-height: 1.7;
}
.hero-description strong {
  color: var(--green);
  font-weight: 600;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.badge {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--border-bright);
  color: var(--green);
  background: rgba(0, 230, 118, 0.06);
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--green), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}
.section-alt {
  background: rgba(8, 8, 20, 0.5);
}
.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-bright);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.section-subtitle {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 56px;
  font-size: 1.05rem;
}

/* Speed Banner */
.speed-banner {
  padding: 64px 0;
}
.speed-content {
  display: flex;
  align-items: center;
  gap: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 16px;
  padding: 40px 48px;
  box-shadow: 0 0 40px rgba(0, 230, 118, 0.05);
}
.speed-stat {
  flex: 0 0 auto;
  text-align: center;
  min-width: 200px;
}
.speed-number {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 6px;
}
.speed-label {
  display: block;
  font-size: 0.95rem;
  color: var(--text-dim);
  font-weight: 500;
}
.speed-divider {
  width: 1px;
  align-self: stretch;
  background: linear-gradient(to bottom, transparent, var(--border-bright), transparent);
  flex-shrink: 0;
}
.speed-text p {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.7;
}
.speed-text strong {
  color: var(--green);
  font-weight: 600;
}

@media (max-width: 768px) {
  .speed-content {
    flex-direction: column;
    padding: 28px 24px;
    text-align: center;
    gap: 24px;
  }
  .speed-divider {
    width: 60%;
    height: 1px;
    align-self: center;
  }
  .speed-stat { min-width: auto; }
}

/* How It Works */
.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  justify-content: center;
}
.step {
  flex: 0 1 280px;
  text-align: center;
  padding: 0 16px;
}
.step-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.step-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 1px solid var(--border-bright);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}
.step-icon svg {
  width: 26px;
  height: 26px;
}
.step h3 {
  font-size: 1.1rem;
  color: var(--text-bright);
  margin-bottom: 8px;
}
.step p {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}
.step-connector {
  flex: 0 0 60px;
  padding-top: 52px;
  color: var(--green-dim);
  opacity: 0.4;
}
.connector-line {
  width: 60px;
  height: 20px;
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}
.feature-card:hover {
  border-color: var(--border-bright);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.feature-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 230, 118, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  margin-bottom: 16px;
}
.feature-icon-wrap svg {
  width: 22px;
  height: 22px;
}
.feature-card h3 {
  font-size: 1rem;
  color: var(--text-bright);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
}

/* Agentic AI section */
.agentic-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.agentic-text {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.agentic-block h3 {
  font-size: 1.1rem;
  color: var(--text-bright);
  margin-bottom: 8px;
}
.agentic-block p {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.7;
}
.agentic-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.agentic-robot-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.agentic-robot {
  width: 120px;
  height: 120px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 16px var(--green-glow));
}
.agentic-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.agentic-orbit-1 {
  width: 160px; height: 160px;
  animation: orbitSpin 12s linear infinite;
  border-color: var(--border-bright);
}
.agentic-orbit-2 {
  width: 210px; height: 210px;
  animation: orbitSpin 18s linear infinite reverse;
  opacity: 0.6;
}
.agentic-orbit-3 {
  width: 260px; height: 260px;
  animation: orbitSpin 25s linear infinite;
  opacity: 0.3;
}
.agentic-orbit-1::after,
.agentic-orbit-2::after,
.agentic-orbit-3::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 8px var(--green-glow-strong);
}
@keyframes orbitSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Vision */
.vision-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
.vision-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s;
}
.vision-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}
.vision-phase {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--green);
  margin-bottom: 12px;
  padding: 3px 10px;
  border: 1px solid var(--border-bright);
  border-radius: 100px;
  display: inline-block;
  background: rgba(0, 230, 118, 0.06);
}
.vision-card h3 {
  font-size: 1.1rem;
  color: var(--text-bright);
  margin-bottom: 10px;
}
.vision-card p {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
}

/* Built on */
.built-on {
  text-align: center;
  padding-top: 8px;
}
.built-on p {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.built-on a {
  color: var(--green);
  text-decoration: none;
  transition: opacity 0.2s;
}
.built-on a:hover {
  opacity: 0.8;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.footer-inner {
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.footer-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.footer-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
}
.footer-tagline {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 16px;
  font-style: italic;
}
.footer-contact {
  margin-bottom: 12px;
  font-size: 0.85rem;
}
.footer-contact a {
  color: var(--green);
  text-decoration: none;
  transition: opacity 0.2s;
}
.footer-contact a:hover {
  opacity: 0.8;
}
.footer-copyright {
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--text-dim);
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-title { font-size: 2.5rem; }
  .hero-logo { width: 120px; height: 120px; }
  .steps { flex-direction: column; align-items: center; }
  .step-connector { display: none; }
  .step { flex: none; max-width: 400px; margin-bottom: 32px; }
  .features-grid { grid-template-columns: 1fr; }
  .agentic-content { grid-template-columns: 1fr; }
  .agentic-visual { order: -1; margin-bottom: 16px; }
  .vision-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-logo { width: 100px; height: 100px; }
  .agentic-robot-wrap { width: 200px; height: 200px; }
  .agentic-robot { width: 90px; height: 90px; }
  .agentic-orbit-1 { width: 120px; height: 120px; }
  .agentic-orbit-2 { width: 160px; height: 160px; }
  .agentic-orbit-3 { width: 200px; height: 200px; }
}
