/* ══════════════════════════════════════════════════
   SoftBricks Academy — Unified Navigation System
   Professional-grade design system for cross-platform continuity
   ══════════════════════════════════════════════════ */

/* ── SITE RIBBON ── */
.site-ribbon {
  background: linear-gradient(90deg, #4f46e5 0%, #6366f1 25%, #8b5cf6 50%, #a78bfa 75%, #6366f1 100%);
  background-size: 200% 100%;
  animation: ribbonShimmer 8s ease infinite;
  height: 2px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
}

@keyframes ribbonShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ── UNIFIED NAV ── */
.u-nav {
  position: sticky;
  top: 2px;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.u-nav.scrolled {
  background: rgba(10, 10, 10, 0.96);
  box-shadow: 0 1px 32px rgba(0, 0, 0, 0.5);
}

.u-nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}

/* ── Back-to-Academy arrow ── */
.u-nav-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a5b4fc;
  flex-shrink: 0;
  margin-right: 10px;
  transition: all 0.2s;
  text-decoration: none;
}
.u-nav-back:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  transform: translateX(-2px);
}
.u-nav-back svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.25; }
.u-nav-lockup { display: flex; align-items: center; }
@media (max-width: 600px) {
  .u-nav-back { width: 32px; height: 32px; margin-right: 8px; }
  .u-nav-back svg { width: 16px; height: 16px; }
}

/* ── Brand Mark ── */
.u-nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.u-nav-brand:hover {
  opacity: 0.85;
}

.u-nav-shield {
  width: 34px;
  height: 34px;
  background: linear-gradient(145deg, #6366f1 0%, #7c3aed 100%);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.72rem;
  color: #fff;
  letter-spacing: -0.3px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
  position: relative;
}

.u-nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.u-nav-brand-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f3f4f6;
  letter-spacing: -0.02em;
}

.u-nav-brand-name em {
  font-style: normal;
  color: #a5b4fc;
}

.u-nav-brand-sub {
  font-size: 0.58rem;
  font-weight: 600;
  color: #4b5563;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* ── Desktop Links ── */
.u-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.u-nav-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: #6b7280;
  padding: 7px 13px;
  border-radius: 7px;
  transition: color 0.15s ease, background 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  letter-spacing: -0.005em;
}

.u-nav-link:hover {
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.05);
}

.u-nav-link.active {
  color: #c4b5fd;
  background: rgba(99, 102, 241, 0.1);
  font-weight: 600;
}

/* Divider */
.u-nav-divider {
  width: 1px;
  height: 18px;
  background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.3), transparent);
  margin: 0 8px;
  flex-shrink: 0;
}

/* CTA */
.u-nav-cta {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  padding: 8px 22px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  margin-left: 6px;
  letter-spacing: -0.005em;
}

.u-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255,255,255,0.15);
  background: linear-gradient(135deg, #7c3aed, #6366f1);
}

.u-nav-cta:active {
  transform: translateY(0);
  box-shadow: 0 1px 8px rgba(99, 102, 241, 0.3);
}

/* ── Hamburger Button ── */
.u-nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  z-index: 1002;
  transition: all 0.2s ease;
}

.u-nav-hamburger:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.06);
}

.u-nav-hamburger.open {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.1);
}

.u-nav-hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: #9ca3af;
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center;
}

.u-nav-hamburger.open span {
  background: #c4b5fd;
}

.u-nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(2.5px, 2.5px);
}
.u-nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.u-nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(2.5px, -2.5px);
}

/* ── Mobile Drawer ── */
.u-nav-drawer {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 6, 8, 0.97);
  backdrop-filter: blur(32px) saturate(1.2);
  -webkit-backdrop-filter: blur(32px) saturate(1.2);
  z-index: 999;
  padding: 20px 24px 100px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(-8px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.u-nav-drawer.open {
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.u-nav-drawer-section {
  margin-bottom: 28px;
}

.u-nav-drawer-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #4b5563;
  padding: 0 12px 10px;
  margin-bottom: 4px;
}

.u-nav-drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px;
  color: #9ca3af;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.15s ease;
  letter-spacing: -0.005em;
}

.u-nav-drawer-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #e5e7eb;
}

.u-nav-drawer-link.active {
  background: rgba(99, 102, 241, 0.1);
  color: #c4b5fd;
  font-weight: 600;
}

.u-nav-drawer-link svg {
  width: 20px;
  height: 20px;
  opacity: 0.4;
  flex-shrink: 0;
  stroke-width: 1.5;
}

.u-nav-drawer-link.active svg {
  opacity: 0.7;
  stroke: #a78bfa;
}

.u-nav-drawer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.04);
  margin: 4px 12px;
}

.u-nav-drawer-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  margin-top: 12px;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  letter-spacing: -0.01em;
}

.u-nav-drawer-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
}

/* ── UNIFIED FOOTER ── */
.u-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 64px 0 36px;
  background: #060608;
  position: relative;
}

.u-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.25), transparent);
}

.u-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
}

.u-footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.u-footer-brand-col .u-footer-logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e5e7eb;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.u-footer-brand-col .u-footer-logo em {
  font-style: normal;
  color: #a5b4fc;
}

.u-footer-brand-col p {
  font-size: 0.8rem;
  color: #4b5563;
  line-height: 1.7;
  max-width: 260px;
}

.u-footer-heading {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #6b7280;
  margin-bottom: 18px;
}

.u-footer-link {
  display: block;
  font-size: 0.84rem;
  color: #4b5563;
  text-decoration: none;
  padding: 5px 0;
  transition: color 0.15s ease, transform 0.15s ease;
  letter-spacing: -0.005em;
}

.u-footer-link:hover {
  color: #a5b4fc;
  transform: translateX(2px);
}

.u-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  flex-wrap: wrap;
  gap: 16px;
}

.u-footer-copy {
  font-size: 0.72rem;
  color: #374151;
  letter-spacing: 0.01em;
}

.u-footer-back {
  font-size: 0.78rem;
  color: #4b5563;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
  letter-spacing: -0.005em;
}

.u-footer-back:hover {
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.05);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .u-nav-links {
    display: none;
  }
  .u-nav-hamburger {
    display: flex;
  }
  .u-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 600px) {
  .u-nav-inner {
    height: 56px;
    padding: 0 20px;
  }
  .u-nav-brand-sub {
    display: none;
  }
  .u-nav-drawer {
    top: 58px;
    padding: 16px 20px 100px;
  }
  .u-footer {
    padding: 48px 0 28px;
  }
  .u-footer-inner {
    padding: 0 20px;
  }
  .u-footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .u-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
