/* ============================================================
   KOJILABS — Layout System
   
   Structural styles for the page skeleton: body, containers,
   navbar, hero, sections, grids, footer, and responsive
   breakpoints.  Everything adapts from 1400px down to 320px.
   ============================================================ */


/* ────────────────────────────────────────────────────────────
   B O D Y
   ──────────────────────────────────────────────────────────── */
body {
  background-color: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}


/* ────────────────────────────────────────────────────────────
   C O N T A I N E R S
   Three width tiers that keep content comfortable to read.
   ──────────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

.container--narrow {
  max-width: 800px;
}

.container--wide {
  max-width: 1400px;
}


/* ────────────────────────────────────────────────────────────
   N A V B A R
   
   Fixed glassmorphism bar pinned to the top of the viewport.
   Stays readable over any scroll position thanks to the
   frosted backdrop-filter.
   ──────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--navbar-height);

  /* Glass effect */
  -webkit-backdrop-filter: blur(var(--blur-strength));
          backdrop-filter: blur(var(--blur-strength));
  background: var(--blur-tint);
  border-bottom: 1px solid var(--surface-border);

  /* Layout */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
}

/* ── Logo ──────────────────────────────────────── */
.navbar__logo {
  font-weight: 800;
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
}

.navbar__logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: var(--bg);
}

/* ── Navigation Links ──────────────────────────── */
.navbar__links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.navbar__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  padding: var(--space-xs) 0;
  text-decoration: none;
  position: relative;
}

.navbar__link:hover,
.navbar__link--active {
  color: var(--text-primary);
}

/* Subtle underline indicator for active state */
.navbar__link--active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

/* ── Right Controls ────────────────────────────── */
.navbar__right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}


/* ────────────────────────────────────────────────────────────
   H E R O
   
   Full-width introductory section with badge, headline,
   subtitle, and call-to-action buttons.
   ──────────────────────────────────────────────────────────── */
.hero {
  padding-top: calc(var(--navbar-height) + var(--space-3xl));
  padding-bottom: var(--space-3xl);
  text-align: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: var(--surface);
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--surface-border);
  margin-bottom: var(--space-lg);
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  line-height: 1.6;
}

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


/* ────────────────────────────────────────────────────────────
   S E C T I O N S
   
   Generic section wrapper with centered header block.
   ──────────────────────────────────────────────────────────── */
.section {
  padding: var(--space-3xl) 0;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section__title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section__subtitle {
  font-size: var(--text-md);
  color: var(--text-secondary);
  margin-top: var(--space-sm);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}


/* ────────────────────────────────────────────────────────────
   P R O D U C T   S H O W C A S E
   
   2-column grid that collapses to single-column on mobile.
   ──────────────────────────────────────────────────────────── */
.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}


/* ────────────────────────────────────────────────────────────
   F E E D
   
   Centered single-column content feed with filter controls.
   ──────────────────────────────────────────────────────────── */
.feed__filters {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  justify-content: center;
}

.feed__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  max-width: 720px;
  margin: 0 auto;
}


/* ────────────────────────────────────────────────────────────
   D I S C O R D   C T A   S E C T I O N
   
   Standout banner with accent-tinted gradient background.
   ──────────────────────────────────────────────────────────── */
.discord {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius);
  background: linear-gradient(
    135deg,
    rgba(88, 101, 242, 0.08) 0%,
    rgba(88, 101, 242, 0.02) 50%,
    rgba(88, 101, 242, 0.06) 100%
  );
  border: 1px solid var(--surface-border);
}


/* ────────────────────────────────────────────────────────────
   F O O T E R
   ──────────────────────────────────────────────────────────── */
.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--surface-border);
}

.footer__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__text {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}


/* ────────────────────────────────────────────────────────────
   R E S P O N S I V E   —   T A B L E T   ( ≤ 768px )
   ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Hide desktop nav links — mobile menu takes over */
  .navbar__links {
    display: none;
  }

  /* Tighten container padding */
  .container {
    padding: 0 var(--space-md);
  }

  /* Scale down the hero headline */
  .hero__title {
    font-size: 2rem;
  }

  /* Stack hero buttons vertically */
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  /* Collapse product grid to single column */
  .products {
    grid-template-columns: 1fr;
  }

  /* Let footer stack naturally */
  .footer__content {
    flex-direction: column;
    text-align: center;
  }
}


/* ────────────────────────────────────────────────────────────
   R E S P O N S I V E   —   M O B I L E   ( ≤ 480px )
   ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Reduce navbar padding */
  .navbar {
    padding: 0 var(--space-md);
  }

  /* Reduce section vertical rhythm */
  .section {
    padding: var(--space-2xl) 0;
  }

  /* Smaller section titles */
  .section__title {
    font-size: var(--text-2xl);
  }

  /* Reduce hero spacing */
  .hero {
    padding-top: calc(var(--navbar-height) + var(--space-2xl));
    padding-bottom: var(--space-2xl);
  }

  /* Smaller discord section padding */
  .discord {
    padding: var(--space-2xl) var(--space-md);
  }
}
