/* ==========================================================================
   ABSOLVE TRAINING - GLOBAL DESIGN SYSTEM v2
   Highly interactive, cinematic, career-upskilling platform.
   ========================================================================== */

:root {
  /* Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-dark: #0f172a;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  
  --black: #000000;
  --white: #ffffff;
  
  /* Gradients */
  --gradient-glass: rgba(255, 255, 255, 0.85);
  --gradient-glass-dark: rgba(15, 23, 42, 0.85);
  --gradient-accent: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  --gradient-bg: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  
  /* Spacing Scale */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
  --spacing-xxl: 6rem;
  
  /* Typography Scale */
  --font-family: 'Poppins', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 3rem;
  --text-4xl: 4rem;
  --text-5xl: 5.5rem;
  
  /* Shadows & Elevations */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 20px -5px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 40px -10px rgba(0,0,0,0.08);
  --shadow-xl: 0 30px 60px -15px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 30px rgba(37,99,235,0.15);
  
  /* Radii */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-out-expo);
  --transition-base: 0.4s var(--ease-out-expo);
  --transition-slow: 0.8s var(--ease-out-expo);
  
  /* Layout */
  --container-width: 1400px;
  --header-height: 100px;
}

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

html {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.7;
  scroll-behavior: smooth;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); letter-spacing: -0.04em; }
h2 { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
h3 { font-size: var(--text-xl); font-weight: 600; }
h4 { font-size: var(--text-lg); font-weight: 600; }

p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: all var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

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

ul, ol {
  list-style: none;
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xxl) 0;
  position: relative;
  overflow: hidden;
}

.section-dark {
  background-color: var(--bg-dark);
  color: var(--white);
}

.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
  color: var(--white);
}

.section-dark p {
  color: var(--text-muted);
}

.section-light {
  background: var(--gradient-bg);
}

.section-head {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-lg);
}

.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* Buttons with Magnetic Hover Effect wrapper logic in JS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-weight: 600;
  font-size: var(--text-base);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  cursor: pointer;
  border: 1px solid transparent;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255,255,255,0.1);
  transform: translateY(100%);
  transition: transform var(--transition-base);
  z-index: -1;
}

.btn:hover::before {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--accent);
  color: var(--white);
  box-shadow: 0 10px 20px -5px rgba(37,99,235,0.4);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: var(--white);
  box-shadow: 0 15px 30px -5px rgba(37,99,235,0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--black);
  color: var(--white);
  box-shadow: 0 10px 20px -5px rgba(0,0,0,0.3);
}

.btn-secondary:hover {
  box-shadow: 0 15px 30px -5px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(0,0,0,0.1);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.section-dark .btn-ghost,
.hero-section .btn-ghost {
  color: var(--white) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.section-dark .btn-ghost:hover,
.hero-section .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white) !important;
  color: var(--white) !important;
}

/* Navbar */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--black);
  color: var(--white);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background-color var(--transition-base), height var(--transition-base), box-shadow var(--transition-base);
}

.site-header.scrolled {
  height: 80px;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.brand img {
  height: 60px; /* FIXED HEIGHT AS REQUESTED */
  width: auto;
  transition: height var(--transition-base);
}

.site-header.scrolled .brand img {
  height: 50px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.nav-link {
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  font-size: var(--text-base);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--white);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-base);
}

.nav-link:hover::after, .nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Dropdown */
.dropdown {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.drop-trigger {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-family);
  font-weight: 500;
  font-size: var(--text-base);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
}

.drop-trigger:hover {
  color: var(--white);
}

.drop-trigger svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.dropdown:hover .drop-trigger svg {
  transform: rotate(180deg);
}

.drop-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  min-width: 400px;
  padding: var(--spacing-sm);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  border: 1px solid rgba(255,255,255,0.05);
}

.dropdown:hover .drop-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.drop-panel a {
  color: rgba(255,255,255,0.7);
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.drop-panel a:hover {
  background-color: rgba(255,255,255,0.05);
  color: var(--white);
  transform: translateX(4px);
}

/* Mobile Menu */
.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  z-index: 1001;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--black);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  clip-path: circle(0% at top right);
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  clip-path: circle(150% at top right);
}

.mobile-menu .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-md);
  text-align: center;
  max-height: 80vh;
  overflow-y: auto;
}

.mobile-menu a {
  color: var(--white);
  font-size: var(--text-2xl);
  font-weight: 600;
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-base);
}

.mobile-menu.open a {
  opacity: 1;
  transform: translateY(0);
}

/* Animation Delays for Mobile */
.mobile-menu.open a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.open a:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu.open a:nth-child(6) { transition-delay: 0.35s; }
.mobile-menu.open a:nth-child(7) { transition-delay: 0.4s; }
.mobile-menu.open a:nth-child(8) { transition-delay: 0.45s; }

/* Premium Cards */
.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.03);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.card.tilt-effect {
  transform-style: preserve-3d;
}

.card-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  color: var(--accent);
  transition: transform var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px);
}

.card:hover .card-icon {
  transform: scale(1.1);
  background: var(--accent);
  color: var(--white);
}

.card h3 {
  margin-bottom: 0.75rem;
  font-size: var(--text-xl);
}

.card p {
  font-size: var(--text-base);
  margin-bottom: 0;
  flex-grow: 1;
}

/* Image Visuals */
.visual-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.visual-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.5s var(--ease-out-expo);
}

.visual-wrapper:hover img {
  transform: scale(1.05);
}

/* Visual Dashboard Overlay (CSS built) */
.dashboard-mockup {
  position: absolute;
  top: 10%; right: -5%;
  width: 80%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--spacing-md);
  z-index: 10;
  transform-style: preserve-3d;
}

.parallax-layer {
  transition: transform 0.1s linear;
}

/* Hero Section Specific */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + var(--spacing-xl));
  padding-bottom: var(--spacing-xl);
  overflow: hidden;
}

/* Roadmap / Timeline */
.roadmap {
  position: relative;
  padding-left: 4rem;
  max-width: 800px;
}
.roadmap::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--bg-tertiary);
  border-radius: 4px;
}
.roadmap-progress {
  position: absolute;
  left: 20px;
  top: 0;
  height: 0%; /* JS controlled */
  width: 4px;
  background: var(--accent);
  border-radius: 4px;
  transition: height 0.3s ease-out;
}
.roadmap-step {
  position: relative;
  margin-bottom: var(--spacing-xl);
}
.roadmap-step:last-child { margin-bottom: 0; }
.roadmap-step::before {
  content: '';
  position: absolute;
  left: -4rem;
  top: 0.25rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white);
  border: 6px solid var(--bg-tertiary);
  z-index: 2;
  transition: all 0.4s ease;
  transform: translateX(4px);
}
.roadmap-step.active::before {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.15);
}

/* Scroll Animations */
.reveal, .reveal-left, .reveal-right, .reveal-scale {
  opacity: 0;
  transition: all 1s var(--ease-out-expo);
}

.reveal { transform: translateY(60px); }
.reveal-left { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }
.reveal-scale { transform: scale(0.9); }

.reveal.active, .reveal-left.active, .reveal-right.active, .reveal-scale.active {
  opacity: 1;
  transform: translate(0) scale(1);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Filter Tabs (Courses) */
.filter-tabs {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
}

.filter-tab {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.1);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-tab.active, .filter-tab:hover {
  background: var(--bg-dark);
  color: var(--white);
  border-color: var(--bg-dark);
  box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
  background-color: var(--bg-dark);
  color: var(--white);
  padding: var(--spacing-xxl) 0 var(--spacing-md);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at top right, rgba(37,99,235,0.05), transparent 50%);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.footer p, .footer a, .footer div {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.footer h4 {
  color: var(--white);
  font-size: var(--text-lg);
  margin-bottom: var(--spacing-md);
}

.footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer a::before {
  content: '→';
  opacity: 0;
  transform: translateX(-10px);
  transition: all var(--transition-fast);
  color: var(--accent);
}

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

.footer a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.footer .copy {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--spacing-md);
  text-align: center;
  font-size: var(--text-xs);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .roadmap { padding-left: 3rem; }
  .roadmap::before, .roadmap-progress { left: 10px; }
  .roadmap-step::before { left: -3.3rem; }
}

@media (max-width: 768px) {
  :root {
    --spacing-xxl: 6rem;
    --spacing-xl: 4rem;
    --header-height: 80px;
  }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .dashboard-mockup {
    position: relative;
    top: 0; right: 0; width: 100%;
    transform: none !important;
  }
  .hero-section {
    padding-top: calc(var(--header-height) + var(--spacing-md));
  }
  .footer-grid { grid-template-columns: 1fr; }
  .brand img { height: 48px; }
}
