/* ============================================
   lucum.io — Main Stylesheet
   ============================================ */

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

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

body {
  overflow-x: hidden;
}

ul,
ol {
  list-style: none;
}

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

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

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

/* ----- Design Tokens ----- */
:root {
  /* Colors */
  --color-bg-primary:   #0a0a0f;
  --color-bg-secondary: #12121a;
  --color-bg-tertiary:  #1a1a2e;
  --color-surface:      #111118;

  --color-text-primary:   #e8e8f0;
  --color-text-secondary: #9898b0;
  --color-text-muted:     #5a5a78;

  --color-accent:       #6c63ff;
  --color-accent-light: #8b83ff;
  --color-accent-glow:  rgba(108, 99, 255, 0.3);

  /* Spacing (8px base) */
  --space-xs:  0.25rem;  /* 4px */
  --space-sm:  0.5rem;   /* 8px */
  --space-md:  1rem;     /* 16px */
  --space-lg:  1.5rem;   /* 24px */
  --space-xl:  2rem;     /* 32px */
  --space-2xl: 4rem;     /* 64px */
  --space-3xl: 6rem;     /* 96px */

  /* Typography */
  --font-heading: 'Inter', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  2rem;
  --text-4xl:  2.5rem;
  --text-hero: clamp(3rem, 8vw, 6rem);

  /* Borders & Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --border-subtle: 1px solid rgba(255, 255, 255, 0.06);

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --transition-base: 300ms ease;
  --transition-slow: 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----- Body ----- */
body {
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
}

/* ----- Starfield Canvas ----- */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

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

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: background var(--transition-base),
              backdrop-filter var(--transition-base);
}

.nav--scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: var(--border-subtle);
}

.nav__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav__logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav__logo-img {
  height: 24px;
  width: auto;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
  align-items: center;
}

.nav__links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color var(--transition-base);
}

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

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

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: block;
}

/* Hamburger -> X animation */
.nav--open .nav__toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav--open .nav__toggle span:nth-child(2) {
  opacity: 0;
}

.nav--open .nav__toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  line-height: 1;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  border: none;
}

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

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

.btn--ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: var(--text-xs);
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: var(--text-base);
}

/* ============================================
   Hero
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: var(--space-3xl) var(--space-lg);
}

.hero__title {
  font-family: var(--font-mono);
  font-size: var(--text-hero);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero__dot {
  color: var(--color-accent);
}

.hero__subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: var(--space-lg) auto var(--space-xl);
  line-height: 1.6;
  font-weight: 300;
}

.hero__cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.hero__scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-text-muted), transparent);
}

/* ============================================
   Section Header
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: var(--space-md) auto 0;
  border-radius: 2px;
}

.section-header p {
  color: var(--color-text-secondary);
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Features
   ============================================ */
.features {
  padding: var(--space-3xl) 0;
  position: relative;
  z-index: 1;
  background: rgba(10, 10, 15, 0.85);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  background: var(--color-bg-secondary);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: transform var(--transition-base),
              box-shadow var(--transition-base),
              border-color var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: rgba(108, 99, 255, 0.2);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-lg);
  color: var(--color-accent);
}

.feature-card__icon svg {
  width: 100%;
  height: 100%;
}

.feature-card__title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.feature-card__desc {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
  padding: var(--space-3xl) 0;
  position: relative;
  z-index: 1;
  background: rgba(10, 10, 15, 0.9);
}

.faq__list {
  max-width: 768px;
  margin: 0 auto;
}

.faq__item {
  border-bottom: var(--border-subtle);
}

.faq__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 0;
  background: none;
  border: none;
  color: var(--color-text-primary);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: color var(--transition-base);
}

.faq__question:hover {
  color: var(--color-accent);
}

.faq__icon {
  font-size: var(--text-xl);
  color: var(--color-accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: var(--space-md);
}

.faq__item.is-open .faq__icon {
  transform: rotate(45deg);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease,
              padding 0.4s ease;
}

.faq__item.is-open .faq__answer {
  max-height: 300px;
}

.faq__answer p {
  padding-bottom: var(--space-lg);
  color: var(--color-text-secondary);
  line-height: 1.7;
  font-size: var(--text-sm);
}

/* Scroll lock for mobile nav */
body.scroll-lock {
  overflow: hidden;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--color-surface);
  padding: var(--space-2xl) 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

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

.footer__logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.footer__logo-img {
  width: 28px;
  height: auto;
}

.footer__brand p {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
  max-width: 280px;
}

.footer__links h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer__links ul {
  list-style: none;
}

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

.footer__links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-base);
}

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

.footer__bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: var(--border-subtle);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

/* ============================================
   Responsive — Tablet (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
  /* Nav mobile overlay */
  .nav__links {
    display: none;
  }

  .nav--open .nav__links {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.98);
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    z-index: 1000;
  }

  .nav--open .nav__links a {
    font-size: var(--text-xl);
    color: var(--color-text-primary);
  }

  .nav__toggle {
    display: flex;
  }

  /* Features single column */
  .features__grid {
    grid-template-columns: 1fr;
  }

  /* Footer two columns */
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Hero subtitle */
  .hero__subtitle {
    font-size: var(--text-lg);
  }

  /* Reduce section padding */
  .features,
  .faq {
    padding: var(--space-2xl) 0;
  }

  .hero {
    padding: var(--space-2xl) var(--space-md);
  }
}

/* ============================================
   Responsive — Mobile (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .hero__cta {
    flex-direction: column;
  }

  .hero__cta .btn {
    width: 100%;
  }
}
