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

:root {
  --blue-900: #0a1628;
  --blue-800: #0d1f3c;
  --blue-700: #102a52;
  --blue-600: #1a3a6b;
  --blue-500: #1e4d8c;
  --blue-400: #2563eb;
  --blue-300: #3b82f6;
  --blue-200: #93c5fd;
  --blue-100: #dbeafe;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-300: #cbd5e1;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --accent: #2563eb;
  --nav-height: 64px;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(10, 22, 40, 0.12);
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
  height: 100vh;
  width: 100vw;
  overflow-y: scroll;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--white);
  color: var(--gray-900);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.accent {
  color: var(--blue-300);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--blue-400);
  color: var(--white);
  border-color: var(--blue-400);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--blue-300);
  border-color: var(--blue-300);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

/* used in nav (on dark bg) */
.btn-outline {
  background: transparent;
  color: var(--blue-200);
  border-color: var(--blue-600);
}

.btn-outline:hover {
  background: var(--blue-700);
  border-color: var(--blue-300);
  color: var(--white);
}

/* used in hero (on dark bg) */
.btn-ghost {
  background: transparent;
  color: var(--blue-200);
  border-color: var(--blue-600);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--blue-300);
  color: var(--white);
}

/* used in install section (on white bg) */
.btn-primary-light {
  background: var(--blue-400);
  color: var(--white);
  border-color: var(--blue-400);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary-light:hover {
  background: var(--blue-300);
  border-color: var(--blue-300);
}

/* =============================================
   NAV  (frosted glass)
   ============================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid rgba(37, 99, 235, 0.12);
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 2px 24px rgba(37, 99, 235, 0.1);
}

/* nav logo text should be visible on light bg */
.nav-logo {
  color: var(--blue-400);
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}

/* =============================================
   BACKGROUND DOTS CANVAS
   ============================================= */
#dots-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* =============================================
   HERO  
   ============================================= */
.hero {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: calc(100vh - var(--nav-height));
  background: transparent;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 calc((100vw - 1100px) / 2);
  gap: 60px;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 24px;
}

.badge {
  display: inline-block;
  background: var(--blue-700);
  color: var(--blue-200);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--blue-600);
  width: fit-content;
  letter-spacing: 0.3px;
}

.hero h1 {
  color: var(--blue-400);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--blue-900);
  max-width: 460px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.github-btn {
  background-color: #000000;
  color: var(--white);
  padding: 10px;
  border-radius: 10px;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;

}

.github-btn img {
  max-width: 30px;
  filter: invert(100%);
}

/* Browser mockup */
.hero-image img {
  max-width: 300px;
}

/* =============================================
   SECTIONS SHARED  (white background)
   ============================================= */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-inner h2 {
  text-align: center;
  margin-bottom: 12px;
  color: var(--gray-900);
}

.section-sub {
  text-align: center;
  color: var(--gray-500);
  margin-bottom: 48px;
  font-size: 1rem;
}

/* =============================================
   INSTALL STEPS  (white)
   ============================================= */
.install {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  max-width: 680px;
  margin: 48px auto 0;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--blue-100);
  z-index: 0;
}

.step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  position: relative;
  padding-bottom: 36px;
}

.step:last-child {
  padding-bottom: 0;
}

.step-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue-400);
  color: var(--white);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--white);
}

.step-body {
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-body h3 {
  color: var(--gray-900);
}

.step-body p {
  color: var(--gray-500);
  font-size: 0.9rem;
}

code {
  background: var(--blue-100);
  color: var(--blue-500);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
}

/* =============================================
   USAGE  (light gray tint)
   ============================================= */
.usage {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 36px;
  margin-top: 48px;
}

.usage-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.usage-icon {
  font-size: 2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.usage-item h3 {
  margin-bottom: 6px;
  color: var(--gray-900);
}

.usage-item p {
  color: var(--gray-500);
  font-size: 0.9rem;
}

kbd {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.8rem;
  font-family: 'Courier New', monospace;
}

/* =============================================
   FOOTER  (dark blue)
   ============================================= */
.footer {
  position: relative;
  z-index: 1;
  background: var(--blue-400);
}

.footer-logo {
  color: var(--white);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
}

.footer-brand p {
  color: var(--white);
  font-size: 0.9rem;
  margin-top: 6px;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-200);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition), transform var(--transition);
}

.footer-links a:hover {
  color: var(--white);
  transform: translateY(-2px);
}

.social-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(0.6);
  transition: filter var(--transition);
}

.footer-links a:hover .social-icon {
  filter: brightness(0) invert(1);
}

.footer-copy {
  color: var(--gray-300);
  font-size: 0.8rem;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .hero {
    padding: 0 24px;
  }
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - var(--nav-height));
    padding: 60px 24px;
    gap: 48px;
    text-align: center;
  }

  .hero-inner {
    padding: 0;
  }

  .hero-visual {
    padding: 0;
    display: none;
  }

  .hero-sub {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .badge {
    margin: 0 auto;
  }

  .steps::before {
    left: 21px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

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

  .footer-links {
    gap: 20px;
  }
}

/* =============================================
   JS-DRIVEN ANIMATIONS
   ============================================= */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.step:nth-child(1) {
  transition-delay: 0.05s;
}

.step:nth-child(2) {
  transition-delay: 0.12s;
}

.step:nth-child(3) {
  transition-delay: 0.19s;
}

.step:nth-child(4) {
  transition-delay: 0.26s;
}

.step:nth-child(5) {
  transition-delay: 0.33s;
}

.usage-item:nth-child(1) {
  transition-delay: 0.05s;
}

.usage-item:nth-child(2) {
  transition-delay: 0.15s;
}

.usage-item:nth-child(3) {
  transition-delay: 0.25s;
}

/* Preview line shimmer */
.preview-line.shimmer {
  background: var(--blue-400);
  opacity: 1;
  transition: background 0.3s ease, opacity 0.3s ease;
}