/* ============================================================
   MRGENIX — STYLE.CSS
   Base, Variables, Reset, Layout, Navbar, Hero, Stats, Footer
   ============================================================ */

/* ── CSS VARIABLES ── */
:root {
  --primary:      #0B2447;
  --primary-dark: #071730;
  --primary-mid:  #112240;
  --primary-light:#1a3a6e;
  --accent:       #FF6B35;
  --accent-dark:  #e55520;
  --accent-light: #ff8c5e;
  --neutral:      #E3E7AF;
  --neutral-dim:  #c8cda0;
  --white:        #ffffff;
  --white2:       rgba(255,255,255,0.85);
  --white3:       rgba(255,255,255,0.55);
  --white4:       rgba(255,255,255,0.08);
  --dark:         #333333;
  --dark2:        #555555;
  --border:       rgba(255,255,255,0.1);
  --border-accent:rgba(255,107,53,0.3);
  --shadow:       0 8px 40px rgba(0,0,0,0.4);
  --shadow-accent:0 8px 32px rgba(255,107,53,0.25);
  --radius:       10px;
  --radius-lg:    16px;
  --font-head:    'Playfair Display', Georgia, serif;
  --font-body:    'Inter', Arial, sans-serif;
  --nav-h:        70px;
  --transition:   all 0.3s ease;
}

/* ── RESET ── */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  font-size: 16px;
}
body {
  font-family: var(--font-body);
  background: var(--primary-dark);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font-body); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--primary-dark); }
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 99px;
}
::selection {
  background: var(--accent);
  color: var(--white);
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
}

/* ── REUSABLE COMPONENTS ── */
.sec-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 18px;
  border: 1px solid var(--border-accent);
  border-radius: 99px;
  background: rgba(255,107,53,0.07);
  margin-bottom: 1rem;
}
.sec-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 1rem;
}
.sec-title span { color: var(--accent); }
.sec-sub {
  color: var(--white3);
  font-size: 1rem;
  line-height: 1.85;
  max-width: 580px;
  margin-bottom: 3rem;
}
.accent-line {
  width: 56px; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 99px;
  margin: 0.8rem 0 2rem;
}
.section {
  padding: 100px 8%;
}
.section-alt {
  background: var(--primary-mid);
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover::before { left: 150%; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: var(--white);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

/* ============================================================
   SPLASH SCREEN
   ============================================================ */
#splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--primary-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
#splash.hide {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}
.spl-logo {
  width: 160px; height: 160px;
  object-fit: contain;
  animation: splPop 0.9s cubic-bezier(.34,1.56,.64,1) 0.2s both;
  filter: drop-shadow(0 0 30px rgba(255,107,53,0.4));
}
@keyframes splPop {
  from { opacity:0; transform: scale(0.1) rotate(-15deg); }
  to   { opacity:1; transform: scale(1) rotate(0deg); }
}
.spl-brand {
  font-family: var(--font-head);
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 6px;
  color: var(--white);
  animation: splFade 0.5s ease 0.9s both;
}
.spl-brand em { color: var(--accent); font-style: normal; }
.spl-bar-wrap {
  width: 220px; height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
  animation: splFade 0.3s ease 1s both;
}
.spl-bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent), var(--accent-light));
  animation: splFill 1.3s ease 1.1s both;
}
@keyframes splFill  { to { width: 100%; } }
@keyframes splFade  { from { opacity:0; } to { opacity:1; } }
.spl-txt {
  font-size: 0.68rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--white3);
  animation: splFade 0.4s ease 1.3s both;
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s;
}
#navbar.scrolled {
  background: rgba(7,23,48,0.97);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

/* Brand */
.nb-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.nb-brand img {
  height: 46px; width: 46px;
  object-fit: contain;
  border-radius: 6px;
  transition: transform 0.3s;
  filter: drop-shadow(0 0 8px rgba(255,107,53,0.3));
}
.nb-brand:hover img { transform: scale(1.08) rotate(3deg); }
.nb-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.nb-name {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--white);
}
.nb-name span { color: var(--accent); }
.nb-sub {
  font-size: 0.58rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--white3);
}

/* Nav menu */
.nb-menu {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nb-menu a {
  color: var(--white3);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.nb-menu a::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%; right: 50%;
  height: 1px;
  background: var(--accent);
  transition: left 0.3s, right 0.3s;
}
.nb-menu a:hover { color: var(--white); }
.nb-menu a:hover::after,
.nb-menu a.active::after { left: 12px; right: 12px; }
.nb-menu a.active { color: var(--white); }
.nb-cta {
  background: var(--accent) !important;
  color: var(--white) !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 16px rgba(255,107,53,0.3);
  transition: transform 0.2s, box-shadow 0.2s !important;
}
.nb-cta:hover {
  background: var(--accent-dark) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(255,107,53,0.45) !important;
}
.nb-cta::after { display: none !important; }
.nb-admin {
  border: 1px solid var(--border) !important;
  color: var(--white3) !important;
  font-size: 0.7rem !important;
}
.nb-admin:hover { border-color: var(--accent) !important; color: var(--accent) !important; }

/* Hamburger */
.nb-ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: none;
  background: none;
  padding: 4px;
  z-index: 1001;
}
.nb-ham span {
  display: block;
  width: 26px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.35s ease;
  transform-origin: center;
}
.nb-ham.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nb-ham.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nb-ham.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
@media (max-width: 960px) {
  .nb-ham { display: flex; }
  .nb-brand-text { display: none; }
  .nb-menu {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
    border-top: 3px solid var(--accent);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(.16,1,.3,1), opacity 0.3s;
  }
  .nb-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nb-menu li { width: 100%; }
  .nb-menu a {
    display: block;
    padding: 14px 6%;
    color: var(--dark) !important;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    border-radius: 0;
  }
  .nb-menu a::after { display: none; }
  .nb-menu a:hover { background: #f5f5f5; color: var(--accent) !important; }
  .nb-menu a.active { color: var(--accent) !important; background: rgba(255,107,53,0.06); }
  .nb-cta {
    margin: 10px 6% 0 !important;
    border-radius: var(--radius) !important;
    display: block !important;
    text-align: center !important;
    color: var(--white) !important;
  }
  .nb-admin {
    margin: 6px 6% 0 !important;
    border-radius: var(--radius) !important;
    display: block !important;
    text-align: center !important;
    color: var(--dark) !important;
    border: 1px solid #ddd !important;
  }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
#home {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
  background: var(--primary-dark);
}

/* Animated video-effect background */
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
}
.hero-bg-grad {
  position: absolute; inset: -40%;
  background:
    radial-gradient(ellipse 70% 60% at 15% 50%, rgba(255,107,53,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 80% 80% at 85% 30%, rgba(11,36,71,0.8) 0%, transparent 65%),
    radial-gradient(ellipse 60% 60% at 50% 80%, rgba(255,107,53,0.04) 0%, transparent 60%);
  animation: heroBgAnim 10s ease-in-out infinite alternate;
}
@keyframes heroBgAnim {
  0%   { transform: scale(1)    rotate(0deg);   }
  50%  { transform: scale(1.06) rotate(0.5deg); }
  100% { transform: scale(1.03) rotate(-0.3deg); }
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,107,53,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,107,53,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 25s linear infinite;
}
@keyframes gridMove { to { background-position: 60px 60px; } }

/* Particles */
.hero-particles { position: absolute; inset: 0; overflow: hidden; }
.p-dot {
  position: absolute;
  width: 3px; height: 3px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: pFloat linear infinite;
}
.p-dot:nth-child(1)  { left: 8%;  animation-duration:14s; animation-delay:0s;   }
.p-dot:nth-child(2)  { left: 18%; animation-duration:18s; animation-delay:2s;   width:2px;height:2px; }
.p-dot:nth-child(3)  { left: 28%; animation-duration:11s; animation-delay:4s;   width:4px;height:4px; }
.p-dot:nth-child(4)  { left: 42%; animation-duration:16s; animation-delay:1s;   }
.p-dot:nth-child(5)  { left: 56%; animation-duration:13s; animation-delay:3s;   width:2px;height:2px; }
.p-dot:nth-child(6)  { left: 67%; animation-duration:19s; animation-delay:5s;   }
.p-dot:nth-child(7)  { left: 77%; animation-duration:12s; animation-delay:0.5s; width:4px;height:4px; }
.p-dot:nth-child(8)  { left: 88%; animation-duration:15s; animation-delay:2.5s; }
.p-dot:nth-child(9)  { left: 94%; animation-duration:10s; animation-delay:1.5s; width:2px;height:2px; }
.p-dot:nth-child(10) { left: 4%;  animation-duration:17s; animation-delay:3.5s; }
@keyframes pFloat {
  0%   { bottom: -10px; opacity: 0; transform: translateX(0); }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.3; }
  100% { bottom: 105%; opacity: 0; transform: translateX(30px); }
}

/* Sweep light */
.hero-sweep {
  position: absolute; top: 0; bottom: 0; left: -100%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  opacity: 0.3;
  animation: sweepLine 8s ease-in-out 3s infinite;
}
@keyframes sweepLine {
  0%   { left: -2%; opacity: 0; }
  5%   { opacity: 0.3; }
  95%  { opacity: 0.15; }
  100% { left: 102%; opacity: 0; }
}

/* Hero content */
.hero-content {
  position: relative; z-index: 2;
  padding: 0 8%; max-width: 820px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,107,53,0.1);
  border: 1px solid var(--border-accent);
  padding: 8px 20px; border-radius: 99px;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease 3s both;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: dotPulse 2s ease infinite;
}
@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,107,53,0.7); }
  50%      { box-shadow: 0 0 0 6px rgba(255,107,53,0); }
}
.hero-eyebrow span {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent);
}
.hero-h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 900; line-height: 1.05;
  margin-bottom: 1.1rem;
  overflow: visible;
}
.h-line {
  display: block;
  animation: lineReveal 0.9s cubic-bezier(.16,1,.3,1) both;
}
.h-line:nth-child(1) { animation-delay: 3.1s; color: var(--white); }
.h-line:nth-child(2) { animation-delay: 3.25s; color: var(--accent); }
.h-line:nth-child(3) { animation-delay: 3.4s; color: var(--white); }
@keyframes lineReveal {
  from { transform: translateY(110%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.hero-desc {
  color: var(--white3);
  font-size: 1.1rem; line-height: 1.9;
  max-width: 520px; margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease 3.6s both;
}
.hero-btns {
  display: flex; gap: 16px; flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 3.8s both;
}
/* Scroll indicator */
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  animation: fadeInUp 0.8s ease 4.2s both;
}
.hero-scroll span {
  font-size: 0.6rem; letter-spacing: 3px;
  text-transform: uppercase; color: var(--white3);
}
.scroll-bar {
  width: 1px; height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%,100% { transform: scaleY(1); opacity: 0.5; }
  50%      { transform: scaleY(1.4); opacity: 1; }
}

/* ============================================================
   STATS BAR
   ============================================================ */
#stats {
  background: var(--primary-mid);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 8%;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
}
.stat-item { text-align: center; }
.stat-num {
  font-family: var(--font-head);
  font-size: 3.5rem; font-weight: 900;
  color: var(--accent);
  line-height: 1;
  display: block;
}
.stat-lbl {
  color: var(--white3);
  font-size: 0.72rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-top: 6px;
  display: block;
}
.stat-div {
  width: 1px; background: var(--border);
  align-self: stretch; min-height: 60px;
}
@media(max-width:680px) { .stat-div { display: none; } }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--primary-dark);
  border-top: 1px solid var(--border);
  padding: 72px 8% 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 1.2rem;
}
.footer-brand-logo img {
  height: 46px; width: 46px;
  object-fit: contain; border-radius: 6px;
}
.footer-brand-logo span {
  font-family: var(--font-head);
  font-size: 1.4rem; font-weight: 900;
  letter-spacing: 2px; color: var(--white);
}
.footer-brand-logo span em { color: var(--accent); font-style: normal; }
.footer-brand p {
  color: var(--white3);
  font-size: 0.88rem; line-height: 1.8;
  max-width: 260px;
}
.footer-col h4 {
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.footer-col ul li { margin-bottom: 0.7rem; }
.footer-col ul a {
  color: var(--white3); font-size: 0.88rem;
  transition: color 0.2s, padding-left 0.2s;
  display: inline-block;
}
.footer-col ul a:hover { color: var(--accent); padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 1rem;
  font-size: 0.8rem; color: var(--white3);
}
.footer-bottom a { color: var(--accent); }

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
#scroll-top {
  position: fixed; bottom: 28px; right: 28px;
  z-index: 500;
  width: 46px; height: 46px;
  background: var(--accent);
  color: var(--white);
  border: none; border-radius: 50%;
  font-size: 18px;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(255,107,53,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
#scroll-top.show { display: flex; }
#scroll-top:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 28px rgba(255,107,53,0.6);
}

/* ============================================================
   SCROLL REVEAL UTILITY
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* ============================================================
   SHARED ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity:0; transform: translateY(30px); }
  to   { opacity:1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity:0; transform: translateX(-30px); }
  to   { opacity:1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity:0; transform: translateX(30px); }
  to   { opacity:1; transform: translateX(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .section { padding: 80px 6%; }
}
@media (max-width: 768px) {
  .section { padding: 60px 5%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .section { padding: 50px 5%; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; }
}