/* ==========================================================================
   ROOT STUDIO GLOBAL — LAYOUT MODULES (HEADER, MEGAMENU, FOOTER, MOBILE BAR)
   ========================================================================== */

/* 1. Titanium Glass Header */
.root-header-wrapper {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.root-header-scrolled {
  padding: 10px 0;
  background: rgba(5, 11, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--root-border-glass);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.root-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand Identity */
.root-brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.root-brand-emblem {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(0, 240, 255, 0.2));
  border: 1px solid var(--root-border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
  transition: var(--transition-snap);
}

.root-brand-lockup:hover .root-brand-emblem {
  transform: rotate(45deg);
  border-color: var(--root-gold);
  box-shadow: 0 0 25px var(--root-gold-glow);
}

.root-brand-text {
  display: flex;
  flex-direction: column;
}

.root-brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--root-text-white);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.root-brand-tag {
  font-size: 0.72rem;
  color: var(--root-gold);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Navigation Links */
.root-nav-desktop {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.root-nav-item {
  position: relative;
}

.root-nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--root-text-titanium);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-snap);
}

.root-nav-link:hover,
.root-nav-link.active {
  color: var(--root-cyan);
  background: rgba(0, 240, 255, 0.06);
}

.root-nav-link svg.arrow {
  transition: transform 0.3s ease;
}
.root-nav-item:hover .root-nav-link svg.arrow {
  transform: rotate(180deg);
}

/* Megamenu */
.root-megamenu {
  position: absolute;
  top: 100%;
  left: -180px;
  width: 900px;
  background: rgba(5, 11, 20, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--root-border-glass);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr) 260px;
  gap: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 240, 255, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: var(--transition-snap);
  pointer-events: none;
}

.root-nav-item:hover .root-megamenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.root-megamenu-col-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--root-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
}

.root-megamenu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.root-megamenu-link {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--root-text-muted);
  transition: var(--transition-snap);
}

.root-megamenu-link strong {
  display: block;
  color: var(--root-text-white);
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.root-megamenu-link:hover {
  color: var(--root-cyan);
  transform: translateX(-4px);
}
.root-megamenu-link:hover strong {
  color: var(--root-cyan);
}

/* Megamenu Feature Card */
.root-megamenu-feature {
  background: linear-gradient(145deg, rgba(18, 24, 33, 0.9), rgba(5, 11, 20, 0.95));
  border: 1px solid var(--root-border-gold);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.root-megamenu-feature h4 {
  font-size: 1rem;
  color: var(--root-gold);
  margin-bottom: 8px;
}

.root-megamenu-feature p {
  font-size: 0.82rem;
  color: var(--root-text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Header Action Right (Status & CTA) */
.root-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.root-system-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--root-teal);
  font-weight: 600;
  background: rgba(69, 162, 158, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(69, 162, 158, 0.25);
}

.root-status-pulse {
  width: 8px;
  height: 8px;
  background: var(--root-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--root-cyan);
  animation: rootPulse 2s infinite;
}

@keyframes rootPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(0, 240, 255, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 240, 255, 0); }
}

/* Hamburger for Mobile */
.root-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 6px;
  z-index: 1001;
}

.root-toggle-bar {
  display: block;
  height: 2px;
  background: var(--root-cyan);
  border-radius: 2px;
  transition: var(--transition-snap);
}
.root-toggle-bar:nth-child(1) { width: 26px; }
.root-toggle-bar:nth-child(2) { width: 18px; margin-right: auto; }

/* Mobile Navigation Overlay */
.root-mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(5, 11, 20, 0.98);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 999;
  padding: 90px 24px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateX(100%);
  transition: var(--transition-smooth);
}

.root-mobile-drawer.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.root-mobile-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.root-mobile-link {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--root-text-white);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: block;
}

/* 2. Global Authoritative Footer */
.root-footer {
  position: relative;
  background: #020509;
  border-top: 1px solid var(--root-border-glass);
  padding: 80px 0 30px;
  margin-top: 100px;
}

.root-footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1.2fr);
  gap: 40px;
  margin-bottom: 60px;
}

.root-footer-brand-desc {
  color: var(--root-text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-top: 20px;
  margin-bottom: 24px;
}

.root-holding-covenant {
  padding: 16px;
  background: rgba(0, 240, 255, 0.03);
  border-left: 3px solid var(--root-gold);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--root-text-titanium);
  line-height: 1.6;
}

.root-footer-col-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--root-cyan);
  margin-bottom: 20px;
  position: relative;
}

.root-footer-col-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--root-gold);
}

.root-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.root-footer-links a {
  color: var(--root-text-muted);
  font-size: 0.92rem;
  transition: var(--transition-snap);
}

.root-footer-links a:hover {
  color: var(--root-cyan);
  transform: translateX(4px);
}

.root-footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--root-text-muted);
}

/* 3. Mobile Split Sticky Bar (Thumb Zone) */
.root-mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(5, 11, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--root-border-glass);
  padding: 8px 16px;
  z-index: 990;
  align-items: center;
  gap: 12px;
}

.root-btn-m-action {
  flex: 1;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .root-nav-desktop,
  .root-system-status {
    display: none;
  }
  .root-menu-toggle {
    display: flex;
  }
  .root-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .root-footer-grid {
    grid-template-columns: 1fr;
  }
  .root-mobile-sticky-bar {
    display: flex;
  }
  body.root-chassis-void {
    padding-bottom: 74px; /* clearance for sticky bar */
  }
}
