/* ==========================================================================
   N4mation Base — shared layout, nav, footer, utilities
   ========================================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--foreground);
  line-height: var(--leading-normal);
}

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

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

/* ==========================================================================
   Nav
   ========================================================================== */

.n4m-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--background);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.n4m-nav__inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.n4m-nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

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

.n4m-nav__links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.n4m-nav__link {
  position: relative;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-slate-500);
  text-decoration: none;
  transition: color var(--transition-fast);
  white-space: nowrap;
  padding-bottom: 2px;
}

.n4m-nav__link:hover {
  color: var(--color-slate-900);
}

.n4m-nav__link--active {
  color: var(--color-slate-900);
  font-weight: var(--weight-semibold, 600);
}

.n4m-nav__link--active::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-teal-500);
  border-radius: 1px;
}

.n4m-nav__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  background-color: var(--color-teal-500);
  color: var(--color-slate-900);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.n4m-nav__cta:hover {
  background-color: var(--color-teal-400);
  color: var(--color-slate-900);
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.25);
}

/* Mobile nav toggle — hidden on desktop, shown via media query */
.n4m-nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--foreground);
}

/* Mobile menu — hidden by default, toggled open via JS */
.n4m-nav__menu {
  display: none;
}

@media (max-width: 768px) {
  .n4m-nav__toggle {
    display: flex;
    align-items: center;
  }

  .n4m-nav__menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: var(--background);
    box-shadow: 0 4px 6px rgba(15, 23, 42, 0.06);
    padding: var(--space-4) var(--space-6);
  }

  .n4m-nav__menu.is-open {
    display: block;
  }

  .n4m-nav__links {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
    margin-bottom: var(--space-4);
  }

  .n4m-nav__link {
    display: block;
    padding: var(--space-2) 0;
    font-size: var(--text-base);
  }

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

  /* Hide desktop cta + links in nav__inner on mobile */
  .n4m-nav__inner .n4m-nav__links,
  .n4m-nav__inner .n4m-nav__cta {
    display: none;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.n4m-footer {
  background-color: var(--color-slate-950);
  color: var(--color-slate-400);
  padding: var(--space-12) var(--space-6);
}

.n4m-footer__inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.n4m-footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.n4m-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.n4m-footer__logo img {
  height: 24px;
  width: auto;
  opacity: 0.8;
}

.n4m-footer__tagline {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-slate-500);
  margin: 0;
  max-width: 260px;
  line-height: var(--leading-relaxed);
}

.n4m-footer__links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  align-items: center;
}

.n4m-footer__link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-slate-500);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.n4m-footer__link:hover {
  color: var(--color-slate-300);
}

.n4m-footer__divider {
  border: none;
  border-top: 1px solid var(--color-slate-800);
  margin: 0;
}

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

.n4m-footer__copy {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-slate-600);
  margin: 0;
}

@media (max-width: 600px) {
  .n4m-footer__top {
    flex-direction: column;
    gap: var(--space-6);
  }

  .n4m-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Skip link (accessibility)
   ========================================================================== */

.n4m-skip-link {
  position: absolute;
  top: -40px;
  left: var(--space-4);
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--btn-radius);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  z-index: 999;
  transition: top 0.1s;
}

.n4m-skip-link:focus {
  top: var(--space-4);
}
