/* ===== ROOT VARIABLES ===== */
:root {
  --bg: #0d0d0d;
  --bg2: #111;
  --bg3: #1a1a1a;
  --primary: #00bfa6;
  --accent: #ff5f2e;
  --text: #f0f0f0;
  --muted: #999;
  --border: rgba(255,255,255,0.08);
  --glow-p: rgba(0,191,166,0.25);
  --glow-a: rgba(255,95,46,0.25);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

h2 { font-family: 'Orbitron', sans-serif; color: var(--accent); margin-bottom: 0.8em; }
h3 { font-family: 'Orbitron', sans-serif; color: var(--primary); margin-bottom: 0.6em; }

p { line-height: 1.7; color: var(--muted); margin-bottom: 1.1em; }

ul { color: var(--muted); line-height: 1.8; padding-left: 1.4em; }
ul li { margin-bottom: 0.4em; }

section { padding: 3em 1.5em; max-width: 1200px; margin: 0 auto; }

/* ===== LOADER ===== */
#loader {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease;
}
#loader.hidden { opacity: 0; pointer-events: none; }
.spinner {
  border: 5px solid #222;
  border-top: 5px solid var(--accent);
  border-radius: 50%;
  width: 48px; height: 48px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== HEADER ===== */
header {
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(12px);
  padding: 0.9em 1.5em;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 20px var(--glow-a);
  display: flex; align-items: center; justify-content: space-between;
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; color: var(--primary); }

/* Desktop nav */
nav {
  display: flex; gap: 0.2em; align-items: center; flex-wrap: nowrap;
}
nav a {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4em 0.7em;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}
nav a:hover { color: var(--primary); background: rgba(0,191,166,0.08); text-decoration: none; }
nav a.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  background: transparent;
}


/* Hamburger button */
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  cursor: pointer;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  z-index: 1002;
  transition: background .2s ease;
  padding: 0;
}
.hamburger:hover { background: rgba(255,255,255,.1); }
.hamburger svg { width: 18px; height: 18px; overflow: visible; }
.hamburger svg line {
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  transform-origin: center;
  transition: transform .35s cubic-bezier(.77,0,.18,1), opacity .25s ease;
}
.hamburger svg .l1 { transform: translateY(-5px); }
.hamburger svg .l2 { transform: translateY(0); }
.hamburger svg .l3 { transform: translateY(5px); }
.hamburger.open svg .l1 { transform: translateY(0) rotate(45deg); }
.hamburger.open svg .l2 { opacity: 0; transform: scaleX(0); }
.hamburger.open svg .l3 { transform: translateY(0) rotate(-45deg); }

/* Bottom-sheet overlay */
.nav-overlay {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1001;
  background: rgba(8,8,8,.98);
  border-top: 1px solid rgba(255,255,255,.09);
  border-radius: 24px 24px 0 0;
  padding: 12px 0 env(safe-area-inset-bottom, 24px);
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.77,0,.18,1);
  pointer-events: none;
  flex-direction: column;
}
.nav-overlay.open {
  transform: translateY(0);
  pointer-events: all;
}
/* Drag handle */
.nav-overlay::before {
  content: '';
  display: block;
  width: 36px; height: 4px;
  background: rgba(255,255,255,.15);
  border-radius: 4px;
  margin: 0 auto 20px;
}
/* Scrim */
.nav-scrim {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.nav-scrim.open {
  opacity: 1;
  pointer-events: all;
}
.nav-overlay a {
  font-family: 'Inter', 'Orbitron', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: .3px;
  color: rgba(240,240,240,.75);
  text-decoration: none;
  padding: .85em 1.6em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition: color .2s ease, background .2s ease;
  transform: translateY(16px);
  opacity: 0;
  transition: color .2s, background .2s, transform .35s cubic-bezier(.77,0,.18,1), opacity .3s ease;
}
.nav-overlay.open a {
  transform: translateY(0);
  opacity: 1;
}
.nav-overlay.open a:nth-child(2) { transition-delay: .06s; }
.nav-overlay.open a:nth-child(3) { transition-delay: .10s; }
.nav-overlay.open a:nth-child(4) { transition-delay: .14s; }
.nav-overlay.open a:nth-child(5) { transition-delay: .18s; }
.nav-overlay.open a:nth-child(6) { transition-delay: .22s; }
.nav-overlay.open a:nth-child(7) { transition-delay: .26s; }
.nav-overlay.open a:nth-child(8) { transition-delay: .30s; }
.nav-overlay a:last-child { border-bottom: none; }
.nav-overlay a::after {
  content: '↗';
  font-size: .75rem;
  opacity: 0;
  color: var(--primary);
  transform: translateX(-4px);
  transition: all .2s ease;
}
.nav-overlay a:hover,
.nav-overlay a.active {
  color: #fff;
  background: rgba(255,255,255,.04);
}
.nav-overlay a:hover::after,
.nav-overlay a.active::after {
  opacity: 1;
  transform: translateX(0);
}
.nav-overlay a.active { color: var(--primary); }

/* ===== STATS TICKER ===== */
.stats-ticker {
  background: linear-gradient(90deg, var(--bg3), #151515, var(--bg3));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.9em 1.5em;
  display: flex;
  justify-content: center;
  gap: 2.5em;
  flex-wrap: wrap;
}
.stat-item {
  display: flex; align-items: center; gap: 0.5em;
  font-size: 0.9rem;
}
.stat-item .num {
  font-family: 'Orbitron', sans-serif;
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 700;
}
.stat-item .lbl { color: var(--muted); }

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 5em 1.5em 3em;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,191,166,0.08) 0%, transparent 70%),
              linear-gradient(180deg, #0d0d0d 0%, #111 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 60px,
    rgba(0,191,166,0.02) 60px, rgba(0,191,166,0.02) 61px
  ),
  repeating-linear-gradient(
    90deg, transparent, transparent 60px,
    rgba(0,191,166,0.02) 60px, rgba(0,191,166,0.02) 61px
  );
  pointer-events: none;
}
.hero h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  color: var(--primary);
  margin-bottom: 0.5em;
  line-height: 1.2;
  position: relative;
}
.hero .tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text);
  max-width: 680px;
  margin: 0 auto 2em;
  position: relative;
}
.hero .cta-row { display: flex; gap: 1em; justify-content: center; flex-wrap: wrap; position: relative; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.85em 2.2em;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--glow-a);
}
.btn-primary:hover { background: var(--primary); box-shadow: 0 0 28px var(--glow-p); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  box-shadow: 0 0 12px var(--glow-p);
}
.btn-outline:hover { background: var(--primary); color: #000; box-shadow: 0 0 28px var(--glow-p); }

/* ===== CARDS / GLASS ===== */
.glass {
  background: rgba(26,26,26,0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2em;
  transition: all 0.3s ease;
}
.glass:hover {
  border-color: var(--primary);
  box-shadow: 0 0 24px var(--glow-p);
  transform: translateY(-4px);
}

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5em; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5em; }

/* ===== VIDEO GRID ===== */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5em; }

.yt-placeholder {
  position: relative;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(0,255,200,0.12);
  transition: all 0.3s ease;
  aspect-ratio: 16/9;
}
.yt-placeholder img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.yt-placeholder:hover { box-shadow: 0 0 24px var(--primary); }
.yt-placeholder:hover img { transform: scale(1.03); }

.play-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  background: rgba(0,0,0,0.65);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255,255,255,0.15);
}
.yt-placeholder:hover .play-btn { background: rgba(255,95,46,0.8); transform: translate(-50%,-50%) scale(1.1); }
.play-icon {
  width: 0; height: 0;
  border-left: 18px solid white;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}

/* Section sub-nav (Production page) */
.sub-nav {
  position: sticky; top: 65px; z-index: 900;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0.6em 1em;
  display: flex; gap: 0.3em; flex-wrap: wrap; justify-content: center;
}
.sub-nav a {
  color: var(--muted);
  font-size: 0.82rem; font-weight: 600;
  padding: 0.4em 0.9em;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.sub-nav a:hover { color: var(--primary); border-color: var(--primary); background: rgba(0,191,166,0.07); }
.sub-nav a.active { color: var(--primary); background: rgba(0,191,166,0.12); border-color: var(--primary); }

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
/* Safety: reduced motion / JS-off — never hide content */
@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}
/* Mobile: disable hidden-until-scroll — no gaps, no invisible stacked cards */
@media (max-width: 768px) {
  .reveal { opacity: 1 !important; transform: none !important; }
  .stagger > * { opacity: 1 !important; transform: none !important; }
}

/* Staggered children */
.stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 0.45s ease, transform 0.45s ease; }
.stagger.visible > *:nth-child(1)  { opacity:1; transform:none; transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2)  { opacity:1; transform:none; transition-delay: 0.10s; }
.stagger.visible > *:nth-child(3)  { opacity:1; transform:none; transition-delay: 0.15s; }
.stagger.visible > *:nth-child(4)  { opacity:1; transform:none; transition-delay: 0.20s; }
.stagger.visible > *:nth-child(5)  { opacity:1; transform:none; transition-delay: 0.25s; }
.stagger.visible > *:nth-child(6)  { opacity:1; transform:none; transition-delay: 0.30s; }
.stagger.visible > *:nth-child(7)  { opacity:1; transform:none; transition-delay: 0.35s; }
.stagger.visible > *:nth-child(8)  { opacity:1; transform:none; transition-delay: 0.40s; }
.stagger.visible > *:nth-child(9)  { opacity:1; transform:none; transition-delay: 0.45s; }
.stagger.visible > *:nth-child(10) { opacity:1; transform:none; transition-delay: 0.50s; }
/* Catch-all: any child beyond nth rules — never stay invisible */
.stagger.visible > * { opacity:1; transform:none; }

/* ===== FLOATING BUTTONS ===== */
.float-btns {
  position: fixed;
  bottom: 24px; right: 20px;
  z-index: 2000;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-end;
}

.wa-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.45);
  transition: all 0.25s ease;
  text-decoration: none;
}
.wa-btn:hover { transform: scale(1.1); box-shadow: 0 6px 22px rgba(37,211,102,0.6); }
.wa-btn svg { width: 28px; height: 28px; fill: #fff; }

.top-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0,191,166,0.15);
  border: 1.5px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px var(--glow-p);
  transition: all 0.25s ease;
  opacity: 0; pointer-events: none;
  color: var(--primary); font-size: 1.2rem;
}
.top-btn.show { opacity: 1; pointer-events: all; }
.top-btn:hover { background: var(--primary); color: #000; }

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 2.5em 1.5em;
  background: #080808;
  border-top: 1px solid var(--border);
  color: var(--muted);
  position: relative;
  z-index: 10;
}
footer p { color: var(--muted); margin: 0; }

.social-links {
  margin: 1.2em 0;
  display: flex;
  justify-content: center;
  gap: 1em;
  flex-wrap: wrap;
}
.social-links a {
  display: inline-flex;
  opacity: 0.75;
  transition: all 0.25s ease;
}
.social-links a:hover { opacity: 1; transform: translateY(-3px); }
.social-links svg { width: 22px; height: 22px; fill: var(--primary); transition: fill 0.25s ease; }
.social-links a:hover svg { fill: var(--accent); }

/* ===== CLIENTS BAR ===== */
.clients-bar {
  padding: 1.5em;
  text-align: center;
  background: var(--bg3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.clients-bar p { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 1em; }
.client-logos {
  display: flex; flex-wrap: wrap; gap: 1.2em;
  justify-content: center; align-items: center;
}
.client-logo {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 0.5em 1.2em;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}
.client-logo:hover { border-color: var(--primary); color: var(--primary); background: rgba(0,191,166,0.06); }

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.95); z-index: 10000;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90%; max-height: 90%; border-radius: 8px; box-shadow: 0 0 50px var(--glow-p); }
.lightbox-close {
  position: absolute; top: 20px; right: 30px;
  color: var(--primary); font-size: 44px; cursor: pointer; line-height: 1;
  transition: color 0.2s ease;
}
.lightbox-close:hover { color: var(--accent); }

/* ===== SECTION HEADINGS ===== */
.section-head { text-align: center; margin-bottom: 2em; }
.section-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
.section-head p { max-width: 600px; margin: 0 auto; }

/* ===== CONTACT FORM ===== */
.contact-form { display: flex; flex-direction: column; gap: 1em; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; }
.form-field { display: flex; flex-direction: column; gap: 0.4em; }
.form-field label { font-size: 0.85rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.form-field input,
.form-field textarea,
.form-field select {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75em 1em;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,191,166,0.1); }
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field select option { background: #1a1a1a; }

/* ===== MBEATZ PAGE ===== */
.mbeatz-hero {
  text-align: center;
  padding: 5em 1.5em 3em;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,95,46,0.1) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(0,191,166,0.08) 0%, transparent 50%),
    linear-gradient(180deg, #0d0d0d 0%, #0f0d0d 100%);
  position: relative;
  overflow: hidden;
}
.mbeatz-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 40px,
    rgba(255,95,46,0.015) 40px, rgba(255,95,46,0.015) 41px
  );
  pointer-events: none;
}
.mbeatz-logo-mark {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 0.3em;
  position: relative;
}
.mbeatz-logo-mark .m { color: var(--accent); }
.mbeatz-logo-mark .beatz { color: var(--primary); }
.mbeatz-logo-mark .africa { color: var(--text); font-size: 0.5em; display: block; letter-spacing: 4px; text-transform: uppercase; }

.feature-card {
  background: rgba(26,26,26,0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.8em;
  transition: all 0.3s ease;
  text-align: center;
}
.feature-card:hover { border-color: var(--accent); box-shadow: 0 0 20px var(--glow-a); transform: translateY(-4px); }
.feature-card .icon { font-size: 2.4rem; margin-bottom: 0.5em; }
.feature-card h3 { font-size: 1rem; margin-bottom: 0.4em; }
.feature-card p { font-size: 0.9rem; margin: 0; }

.mbeatz-cta {
  background: linear-gradient(135deg, rgba(255,95,46,0.12) 0%, rgba(0,191,166,0.08) 100%);
  border: 1px solid rgba(255,95,46,0.3);
  border-radius: 16px;
  padding: 3em 2em;
  text-align: center;
  margin: 2em auto;
  max-width: 700px;
}
.mbeatz-cta h2 { color: var(--accent) !important; }

/* ===== ABOUT PAGE ===== */
.about-hero {
  text-align: center;
  padding: 5em 1.5em 3em;
  background: radial-gradient(ellipse at 60% 0%, rgba(0,191,166,0.07) 0%, transparent 65%),
              linear-gradient(180deg, #0d0d0d, #111);
}

/* ===== TIMELINE (case study) ===== */
.process-section { background: var(--bg3); padding: 4em 1.5em; }
.timeline-step {
  max-width: 1000px; margin: 0 auto 3em;
}
.step-badge {
  display: inline-block;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem; font-weight: 700;
  color: var(--accent); text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 0.5em;
}
.step-media iframe {
  width: 100%; height: 400px; border: none;
  border-radius: 10px; box-shadow: 0 0 12px rgba(0,255,200,0.12);
}
.bts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1em; margin-top: 1em; }
.bts-grid img { border-radius: 10px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 14px rgba(0,0,0,0.3); }
.bts-grid img:hover { transform: scale(1.04); box-shadow: 0 0 20px var(--glow-p); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  nav { display: none; }
  .hamburger { display: flex; }
  .nav-overlay { display: none; }
  .nav-scrim { display: none; }

  header { padding: 0.8em 1.2em; }
  .logo { font-size: 1.25rem; }

  .hero { padding: 3.5em 1em 2.5em; }
  .hero .cta-row { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 300px; text-align: center; }

  .form-row { grid-template-columns: 1fr; }

  .step-media iframe { height: 220px; }

  .stats-ticker { gap: 1.2em; }

  section { padding: 2.5em 1em; }

  .float-btns { bottom: 18px; right: 14px; }
  .wa-btn { width: 46px; height: 46px; }
  .wa-btn svg { width: 24px; height: 24px; }
}

@media (max-width: 480px) {
  .logo { font-size: 1.1rem; }
  .hero h1 { font-size: 1.6rem; }
  .glass { padding: 1.4em; }
  .mbeatz-logo-mark { font-size: 2rem; }
}
