/* ==========================================================================
   CFX NETWORK — HEADER, NAVIGATION & GLOBAL FOOTER (header-footer.css)
   Matches Figma Navigation [1440x105] & Footer [1440x620]
   ========================================================================== */

/* ── 1. Site Header ─────────────────────────────────────────────────────── */
.cfx-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--cfx-header-h);
  background-color: rgba(245, 243, 238, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cfx-rule);
  transition: background-color var(--cfx-transition-fast), border-color var(--cfx-transition-fast), box-shadow var(--cfx-transition-fast);
}

.cfx-header.is-dark-hero {
  background-color: rgba(11, 11, 12, 0.90);
  border-bottom-color: var(--cfx-rule-dark);
  color: var(--cfx-on-dark);
}

.cfx-header.is-scrolled {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.cfx-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* ── 2. Brand Lockup ("CFX NETWORK" / "PR / MEDIA / FILMS") ─────────────── */
.cfx-brand {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
}

.cfx-brand-title {
  font-family: var(--cfx-font-sans);
  font-size: 1.5rem; /* 24-26px */
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: inherit;
  text-transform: uppercase;
}

.cfx-brand-sub {
  font-family: var(--cfx-font-mono);
  font-size: 0.625rem; /* 10px */
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.72;
  margin-top: 3px;
}

/* ── 3. Primary Desktop Navigation ──────────────────────────────────────── */
.cfx-nav-desktop {
  display: flex;
  align-items: center;
  gap: 36px;
}

.cfx-nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.cfx-nav-link {
  font-size: 0.9375rem; /* 15px */
  font-weight: 500;
  color: inherit;
  opacity: 0.82;
  padding: 10px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.cfx-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 0;
  height: 1.5px;
  background-color: var(--cfx-accent);
  transition: width var(--cfx-transition-fast);
}

.cfx-nav-link:hover,
.cfx-nav-link.is-active {
  opacity: 1;
}

.cfx-nav-link.is-active {
  font-weight: 600;
}

.cfx-nav-link:hover::after,
.cfx-nav-link.is-active::after {
  width: 100%;
}

.cfx-nav-caret {
  width: 10px;
  height: 10px;
  transition: transform var(--cfx-transition-fast);
}

.cfx-nav-item.has-dropdown:hover .cfx-nav-caret,
.cfx-nav-item.has-dropdown.is-open .cfx-nav-caret {
  transform: rotate(180deg);
}

/* Desktop Dropdown Panel */
.cfx-dropdown-menu {
  position: absolute;
  top: 100%;
  left: -20px;
  min-width: 300px;
  background-color: var(--cfx-surface);
  color: var(--cfx-ink);
  border: 1px solid var(--cfx-rule-strong);
  box-shadow: 0 20px 48px rgba(11, 11, 12, 0.14);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--cfx-transition-fast);
  z-index: 1010;
}

.cfx-nav-item.has-dropdown:hover .cfx-dropdown-menu,
.cfx-nav-item.has-dropdown:focus-within .cfx-dropdown-menu,
.cfx-nav-item.has-dropdown.is-open .cfx-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cfx-dropdown-link {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-bottom: 1px solid var(--cfx-rule);
  transition: background-color var(--cfx-transition-fast);
}

.cfx-dropdown-link:last-child {
  border-bottom: none;
}

.cfx-dropdown-link:hover {
  background-color: var(--cfx-paper);
}

.cfx-dropdown-num {
  font-family: var(--cfx-font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--cfx-accent);
  margin-bottom: 2px;
}

.cfx-dropdown-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--cfx-ink);
}

.cfx-dropdown-desc {
  font-size: 0.78125rem;
  color: var(--cfx-ink-muted);
  margin-top: 2px;
}

/* Header Right Actions ("Let's talk ↗") */
.cfx-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cfx-header-cta {
  padding: 12px 22px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* ── 4. Mobile Menu Toggle & Drawer ─────────────────────────────────────── */
.cfx-mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: var(--cfx-radius-xs);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.cfx-mobile-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background-color: currentColor;
  transition: transform var(--cfx-transition-fast), opacity var(--cfx-transition-fast);
}

.cfx-mobile-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.cfx-mobile-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.cfx-mobile-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.cfx-mobile-drawer {
  position: fixed;
  top: var(--cfx-header-h);
  left: 0;
  right: 0;
  height: calc(100vh - var(--cfx-header-h));
  height: calc(100dvh - var(--cfx-header-h));
  background-color: var(--cfx-obsidian);
  color: var(--cfx-on-dark);
  padding: 28px var(--cfx-gutter) 48px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 9999;
  border-top: 1px solid var(--cfx-rule-dark);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s;
}

.cfx-mobile-drawer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.cfx-mobile-nav-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.cfx-mobile-nav-item {
  border-bottom: 1px solid var(--cfx-rule-dark);
}

.cfx-mobile-nav-link,
.cfx-mobile-acc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cfx-on-dark);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
}

.cfx-mobile-nav-link.is-active,
.cfx-mobile-nav-link:hover,
.cfx-mobile-acc-btn:hover {
  color: #FFFFFF;
}

.cfx-mobile-submenu {
  display: none;
  padding: 4px 0 20px 16px;
  flex-direction: column;
  gap: 14px;
}

.cfx-mobile-submenu.is-open {
  display: flex;
}

.cfx-mobile-submenu a {
  font-size: 1rem;
  color: var(--cfx-on-dark-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cfx-mobile-submenu a:hover {
  color: var(--cfx-on-dark);
}

.cfx-mobile-drawer-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--cfx-rule-dark);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── 5. Service Category Selector Bar (HOME / OUR SERVICES + 01 | 02) ───── */
.cfx-service-selector-bar {
  background-color: var(--cfx-surface);
  border-bottom: 1px solid var(--cfx-rule);
  padding: 24px 0;
}

.cfx-service-selector-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 12px;
}

.cfx-service-selector-label {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cfx-service-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 318px));
  border: 1px solid var(--cfx-rule-strong);
  background: var(--cfx-paper);
}

.cfx-service-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cfx-ink-secondary);
  border-right: 1px solid var(--cfx-rule-strong);
  transition: all var(--cfx-transition-fast);
}

.cfx-service-tab:last-child {
  border-right: none;
}

.cfx-service-tab .num {
  font-family: var(--cfx-font-mono);
  font-size: 0.75rem;
  opacity: 0.7;
}

.cfx-service-tab:hover {
  color: var(--cfx-ink);
  background-color: rgba(15, 16, 18, 0.04);
}

.cfx-service-tab.is-active {
  background-color: var(--cfx-ink);
  color: var(--cfx-paper);
}

.cfx-service-tab.is-active .num {
  color: var(--cfx-accent);
  opacity: 1;
}

/* ── 6. Global Footer [1440x620] ────────────────────────────────────────── */
.cfx-footer {
  background-color: var(--cfx-obsidian);
  color: var(--cfx-on-dark);
  padding: 64px 0 48px;
  border-top: 1px solid var(--cfx-rule-dark);
}

.cfx-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--cfx-rule-dark);
}

.cfx-footer-brand-col {
  max-width: 520px;
}

.cfx-footer-tagline {
  margin-top: 16px;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--cfx-on-dark-muted);
}

.cfx-footer-socials {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9375rem;
  color: var(--cfx-on-dark-muted);
}

.cfx-footer-socials a:hover {
  color: var(--cfx-on-dark);
  text-decoration: underline;
}

.cfx-footer-socials .sep {
  opacity: 0.35;
}

.cfx-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  padding: 48px 0;
  border-bottom: 1px solid var(--cfx-rule-dark);
}

.cfx-footer-col h4 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--cfx-on-dark);
  margin-bottom: 20px;
}

.cfx-footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cfx-footer-col a {
  font-size: 0.9375rem;
  color: var(--cfx-on-dark-muted);
}

.cfx-footer-col a:hover {
  color: #FFFFFF;
  padding-left: 4px;
}

.cfx-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 32px;
  font-size: 0.875rem;
  color: var(--cfx-on-dark-faint);
}

.cfx-footer-legal-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cfx-footer-legal-links a:hover {
  color: var(--cfx-on-dark);
}
