/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}
.navbar.scrolled {
  background: rgba(3, 6, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--c-border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.nav-brand img {
  height: 40px;
  width: auto;
}
.nav-brand span {
  font-family: var(--ff-heading);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--c-text);
}

.nav-links {
  display: none;
  list-style: none;
  gap: var(--space-xl);
  align-items: center;
}
@media (min-width: 1024px) {
  .nav-links { display: flex; }
}
.nav-links a {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--c-text);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--c-primary);
  transition: width var(--transition-base);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  display: none;
}
@media (min-width: 1024px) {
  .nav-cta { display: inline-flex; }
}

/* ── Mobile menu ── */
.nav-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  cursor: pointer;
  padding: 14px 22px;
}
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
}
.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle-bars span {
  width: 30px;
  height: 3.5px;
  background: var(--c-text);
  border-radius: 2px;
  transition: all var(--transition-base);
}
.nav-toggle-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: 0.5px;
}
.nav-toggle.open .nav-toggle-bars span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle.open .nav-toggle-bars span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 6, 15, 0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a {
  font-size: 27px;
  color: var(--c-text);
  font-weight: 500;
}

/* ── Grid layouts ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}
@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}
@media (min-width: 640px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ── Mobile fixes ── */
@media (max-width: 480px) {
  .navbar {
    height: 60px;
  }
  .nav-brand img {
    height: 38px;
  }
  .nav-brand span {
    font-size: 0.85rem;
  }
  .nav-toggle {
    padding: 10px 14px;
  }
  .nav-toggle-bars span {
    width: 22px;
  }
  .nav-toggle-label {
    font-size: 14px;
  }
  .mobile-menu a {
    font-size: 25px;
  }
  .grid-2, .grid-3 {
    gap: var(--space-md);
  }
}
