/* ============================================================
   MAJONS MEDIA — DESIGN SYSTEM STYLESHEET
   Pan-African Corporate Information Distribution Infrastructure
   Tech Stack: PHP + Bootstrap 5 + Custom CSS + Alpine.js + HTMX
   ============================================================ */

/* CSS Variables */
:root {
  /* Core Brand Tokens */
  --majons-red: #FB1313;
  --majons-red-rgb: 251, 19, 19;
  --charcoal: #0F1012;
  --charcoal-rgb: 15, 16, 18;
  --soft-gray: #F8F9FA;
  --soft-gray-rgb: 248, 249, 250;
  --color-muted: #5E636E;
  --color-border: #E5E7EB;
  --color-border-dark: #27272A;
  --color-bg: #FFFFFF;

  /* Typography Stacks (Extracted from Business Wire: Figtree & Oxygen) */
  --font-display: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-editorial: "Oxygen", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Elevation */
  --shadow-subtle: 0 4px 20px -4px rgba(15, 16, 18, 0.06);
  --shadow-elevated: 0 20px 50px -12px rgba(15, 16, 18, 0.10);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 10px 24px -5px rgba(0, 0, 0, 0.04);

  /* Physics Motion */
  --ease-majons: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-smooth: all 0.5s var(--ease-majons);
  --transition-fast: all 0.25s var(--ease-majons);
}

/* Prevent Alpine cloak flicker */
[x-cloak] {
  display: none !important;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Typographic Utility Classes */
.font-display { font-family: var(--font-display) !important; }
.font-body { font-family: var(--font-body) !important; }
.font-editorial { font-family: var(--font-editorial) !important; }
.font-figtree { font-family: var(--font-display) !important; }
.font-oxygen { font-family: var(--font-editorial) !important; }
.font-mono-code { font-family: var(--font-mono) !important; }

/* Display Headlines (Hero & Milestone statements) */
.display-text {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--charcoal);
}
@media (min-width: 768px) {
  .display-text { font-size: 3.5rem; line-height: 1.05; }
}
@media (min-width: 1024px) {
  .display-text { font-size: 4.25rem; line-height: 1.05; }
}
@media (min-width: 1280px) {
  .display-text { font-size: 5rem; line-height: 1.05; }
}

/* Heading Text (Section Titles) */
.heading-text {
  font-family: var(--font-display);
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--charcoal);
}
@media (min-width: 768px) {
  .heading-text { font-size: 2.25rem; line-height: 1.2; }
}
@media (min-width: 1024px) {
  .heading-text { font-size: 2.75rem; line-height: 1.15; }
}

/* Subheading Text (Subheaders & Narrative intros) */
.subheading-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--color-muted);
}
@media (min-width: 768px) {
  .subheading-text { font-size: 1.45rem; line-height: 1.35; }
}

/* Label Text (Eyebrow Headers & Trackers) */
.label-text {
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-muted);
  display: block;
}

/* Editorial Text (Reading & Lead Body) */
.editorial-text {
  font-family: var(--font-editorial, var(--font-body));
  font-size: 1.125rem;
  line-height: 1.65;
  letter-spacing: -0.015em;
  color: var(--color-muted);
}
@media (min-width: 1024px) {
  .editorial-text { font-size: 1.185rem; line-height: 1.7; }
}

/* Colors & Backgrounds */
.text-majons-red { color: var(--majons-red) !important; }
.bg-majons-red { background-color: var(--majons-red) !important; }
.border-majons-red { border-color: var(--majons-red) !important; }

.text-charcoal { color: var(--charcoal) !important; }
.bg-charcoal { background-color: var(--charcoal) !important; }

.bg-soft-gray { background-color: var(--soft-gray) !important; }
.border-soft { border-color: var(--color-border) !important; }
.border-white-10 { border-color: rgba(255, 255, 255, 0.12) !important; }

/* Fluid Responsive Padding (.section-padding) */
.section-padding {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (min-width: 768px) {
  .section-padding { padding-left: 3rem; padding-right: 3rem; }
}
@media (min-width: 1024px) {
  .section-padding { padding-left: 5rem; padding-right: 5rem; }
}
@media (min-width: 1280px) {
  .section-padding { padding-left: 7.5rem; padding-right: 7.5rem; }
}

/* Floating Glass Header */
.majons-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: padding 0.3s var(--ease-majons), background-color 0.3s var(--ease-majons), box-shadow 0.3s var(--ease-majons);
}
.majons-header.is-scrolled {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.06);
}

/* Nav Links & Indicator */
.majons-nav-link {
  position: relative;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.25s var(--ease-majons);
  padding: 0.35rem 0;
}
.majons-nav-link:hover {
  color: var(--charcoal);
}
.majons-nav-link.active {
  color: var(--charcoal);
  font-weight: 600;
}
.majons-nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background-color: var(--majons-red);
}

/* Institutional Dropdown Menus */
.majons-dropdown {
  position: relative;
}
.majons-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.015em;
  color: var(--color-muted);
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0.35rem 0;
  cursor: pointer;
  transition: color 0.2s var(--ease-majons);
}
.majons-dropdown-toggle:hover,
.majons-dropdown-toggle.active,
.majons-dropdown-toggle[aria-expanded="true"] {
  color: var(--charcoal);
}
.majons-dropdown-toggle .chevron-icon,
.chevron-icon {
  transition: transform 0.25s var(--ease-majons);
}
.majons-dropdown-toggle.open .chevron-icon,
.rotate-180 {
  transform: rotate(180deg) !important;
}

.majons-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 0;
  min-width: 320px;
  max-width: 380px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--majons-red);
  border-radius: 6px;
  box-shadow: 0 16px 40px -8px rgba(15, 16, 18, 0.12);
  padding: 0.6rem;
  z-index: 1060;
}
.majons-dropdown-menu.menu-end {
  left: auto;
  right: 0;
}

.majons-dropdown-item {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.majons-dropdown-item:hover {
  background-color: #f8f9fa;
  transform: translateX(2px);
}
.majons-dropdown-item .item-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.majons-dropdown-item:hover .item-title {
  color: var(--majons-red);
}
.majons-dropdown-item .item-desc {
  font-family: var(--font-body);
  font-size: 0.735rem;
  color: var(--color-muted);
  line-height: 1.35;
  margin-top: 0.15rem;
}

.majons-dropdown-divider {
  height: 1px;
  background-color: var(--color-border);
  margin: 0.4rem 0.5rem;
}

.majons-dropdown-footer {
  background-color: #f8f9fa;
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  margin-top: 0.4rem;
}

/* Mobile Navigation Drawer & Backdrop */
.mobile-menu-drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #ffffff;
  border-top: 1px solid var(--color-border);
  border-bottom: 2px solid var(--majons-red);
  box-shadow: 0 24px 48px -8px rgba(15, 16, 18, 0.16);
  max-height: calc(100vh - 70px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  z-index: 1050;
  padding: 1rem 1.5rem 1.75rem;
  transform-origin: top center;
}

.mobile-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 16, 18, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1030;
}

.accordion-toggle-btn {
  transition: color 0.2s ease;
}
.accordion-toggle-btn:hover {
  color: var(--majons-red) !important;
}

/* Hairlines & Accent Bars */
.hairline-red {
  display: none;
  height: 1px;
  background-color: var(--majons-red);
  border: 0;
}
.bar-red-vertical {
  width: 3px;
  background: linear-gradient(to bottom, var(--majons-red), rgba(251, 19, 19, 0.2));
  border-radius: 9999px;
}

/* Pulse indicator for live wire */
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #16a34a;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: pulseGreen 2s infinite;
}
@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* Terminal Badges */
.terminal-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}
.terminal-badge.badge-verified {
  background-color: rgba(22, 163, 74, 0.08);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.25);
}
.terminal-badge.badge-audited {
  background-color: rgba(251, 19, 19, 0.08);
  color: #fb1313;
  border: 1px solid rgba(251, 19, 19, 0.22);
}
.terminal-badge.badge-neutral {
  background-color: #f4f4f5;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

/* Audit Certificate Card */
.audit-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--majons-red);
  box-shadow: 0 16px 40px -12px rgba(15, 16, 18, 0.09);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

/* Pipeline Step Cards */
.pipeline-step {
  position: relative;
  background-color: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 2rem 1.75rem;
  transition: all 0.3s var(--ease-majons);
}
.pipeline-step:hover {
  border-color: var(--majons-red);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -6px rgba(15, 16, 18, 0.08);
}
.pipeline-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--majons-red);
  font-weight: 600;
  display: block;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

/* Live Wire Telemetry Table */
.telemetry-row {
  border-bottom: 1px solid var(--color-border);
  background-color: #ffffff;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.telemetry-row:hover {
  background-color: #fbfbfb;
}
.telemetry-row:last-child {
  border-bottom: 0;
}

/* Hero Background Dot Grid */
.hero-dot-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, var(--charcoal) 1px, transparent 0);
  background-size: 32px 32px;
}

/* Inputs & Form Controls */
.majons-input {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.8rem 1rem;
  font-size: 0.925rem;
  background-color: #ffffff;
  color: var(--charcoal);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.majons-input:focus {
  outline: none;
  border-color: var(--majons-red);
  box-shadow: 0 0 0 2px rgba(251, 19, 19, 0.15);
}

/* Buttons */
.btn-majons-primary {
  background-color: var(--majons-red);
  color: #FFFFFF !important;
  border: 1px solid var(--majons-red);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.75rem 1.6rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-majons-primary:hover,
.btn-majons-primary:focus {
  background-color: #d80f0f;
  border-color: #d80f0f;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(251, 19, 19, 0.25);
}

.btn-majons-outline {
  background-color: transparent;
  color: var(--charcoal) !important;
  border: 1px solid var(--color-border);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.75rem 1.6rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-majons-outline:hover {
  border-color: var(--majons-red);
  color: var(--majons-red) !important;
  background-color: #ffffff;
}

/* Subtle Interactive Link */
.explore-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  position: relative;
  transition: color 0.25s ease;
}
.explore-link span.underline-effect {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background-color: var(--majons-red);
  transition: width 0.25s ease;
}
.explore-link:hover {
  color: var(--majons-red);
}
.explore-link:hover span.underline-effect {
  width: 100%;
}

.hover-dark {
  transition: color 0.2s ease;
}
.hover-dark:hover {
  color: var(--charcoal) !important;
}

/* HTMX Transition Indicators */
.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator {
  display: inline-block;
}
.htmx-request.htmx-indicator {
  display: inline-block;
}

/* ============================================================
   BUSINESS WIRE INSPIRED B2B WIRE & TERMINAL UTILITIES
   ============================================================ */

/* Top Utility Masthead Bar */
.wire-utility-bar {
  background-color: #0b0c0e;
  color: #9ca3af;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.wire-utility-bar a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.2s ease;
}
.wire-utility-bar a:hover {
  color: #ffffff;
}

/* Institutional Terminal Container */
.wire-terminal {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(15, 16, 18, 0.08);
}
.wire-terminal-header {
  background: #f8f9fa;
  border-bottom: 1px solid var(--color-border);
  padding: 0.85rem 1.25rem;
}

/* Monospace Pill / Tag */
.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  text-transform: uppercase;
}

/* Circuit Explorer Tabs */
.circuit-tab-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-muted);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.circuit-tab-btn:hover {
  background: #f8f9fa;
  color: var(--charcoal);
  border-color: #cbd5e1;
}
.circuit-tab-btn.active {
  background: var(--charcoal);
  color: #ffffff;
  border-color: var(--charcoal);
}

/* Firewall Comparison Cards */
.firewall-card {
  border-radius: 6px;
  padding: 2.25rem 2rem;
  height: 100%;
  position: relative;
}
.firewall-commercial {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--majons-red);
}
.firewall-editorial {
  background: #0f1012;
  color: #ffffff;
  border: 1px solid #27272a;
  border-top: 3px solid #3b82f6;
}

/* Step / Selection Radio Pills for Guided Request */
.form-pill-check {
  display: none;
}
.form-pill-label {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--charcoal);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.form-pill-label:hover {
  border-color: #94a3b8;
  background: #f8f9fa;
}
.form-pill-check:checked + .form-pill-label {
  background: rgba(251, 19, 19, 0.06);
  border-color: var(--majons-red);
  color: var(--majons-red);
  font-weight: 600;
}

/* Roadmap Grid */
.roadmap-phase-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.75rem;
  height: 100%;
  position: relative;
  transition: all 0.25s ease;
}
.roadmap-phase-card.active-phase {
  border-color: var(--majons-red);
  box-shadow: 0 8px 24px -6px rgba(251, 19, 19, 0.12);
}
.roadmap-phase-card:hover {
  transform: translateY(-2px);
}

/* Corrections */
.mono-tag{
  display: none !important;
}