/* ==========================================================================
   TRAIN WITH MUNEEB - LUXURY CORPORATE DESIGN SYSTEM
   Theme: Matte Black (#0F0F10), Champagne Gold (#C8A96A), Dark Grey (#2D2D2D)
   Typography: Playfair Display / Cormorant Garamond + Manrope / Inter
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Manrope:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  /* Color Tokens */
  --color-bg-dark: #0F0F10;
  --color-bg-card: #161618;
  --color-bg-card-hover: #1E1E22;
  --color-gold-primary: #C8A96A;
  --color-gold-light: #E0C895;
  --color-gold-dark: #9A7B3E;
  --color-gold-glow: rgba(200, 169, 106, 0.25);
  --color-text-main: #F5F5F5;
  --color-text-muted: #A0A0A5;
  --color-text-dim: #6E6E73;
  --color-dark-grey: #2D2D2D;
  --color-light-grey: #F5F5F5;
  --color-white: #FFFFFF;
  --color-black: #050505;
  --color-glass: rgba(255, 255, 255, 0.03);
  --color-glass-border: rgba(200, 169, 106, 0.2);

  /* Fonts */
  --font-serif: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --section-padding-y: 120px;
  --container-max: 1360px;
  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Variables (Ultra-Luxury Alabaster & Champagne Gold Palette) */
[data-theme="light"] {
  --color-bg-dark: #FAF9F5;
  --color-bg-card: #FFFFFF;
  --color-bg-card-hover: #F5F3EB;
  --color-text-main: #141416;
  --color-text-muted: #4D4D54;
  --color-text-dim: #7A7A84;
  --color-gold-primary: #B8934A;
  --color-gold-light: #C8A96A;
  --color-gold-dark: #8C6A28;
  --color-gold-glow: rgba(184, 147, 74, 0.18);
  --color-dark-grey: #E8E6DF;
  --color-light-grey: #1C1C1E;
  --color-glass: rgba(255, 255, 255, 0.85);
  --color-glass-border: rgba(184, 147, 74, 0.28);
}

/* CSS Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--color-bg-dark);
  color: var(--color-text-main);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Luxury Champagne Gold Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0F0F10;
}
::-webkit-scrollbar-thumb {
  background: #2D2D2D;
  border-radius: 4px;
  border: 1px solid rgba(200, 169, 106, 0.2);
}
::-webkit-scrollbar-thumb:hover {
  background: #C8A96A;
}

/* Lenis Smooth Scroll Helper Classes */
html.lenis {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  overflow-x: hidden;
  line-height: 1.65;
  background-color: var(--color-bg-dark);
  color: var(--color-text-main);
  transition: background-color 0.6s ease, color 0.6s ease;
}

/* Global Smooth Text & Element Transitions */
h1, h2, h3, h4, p, span, a, button, div, .glass-panel {
  transition: color 0.5s ease, background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Typography Utility */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* iPhone iOS-Style Luxury Theme Toggle Switch */
.ios-theme-switch {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
}

.ios-switch-track {
  width: 58px;
  height: 30px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--color-glass-border);
  border-radius: 30px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  transition: background-color 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.ios-switch-icon {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  opacity: 0.5;
  transition: color 0.4s ease, opacity 0.4s ease;
}

.ios-switch-icon svg {
  width: 13px;
  height: 13px;
}

.ios-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E0C895 0%, #C8A96A 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 10px var(--color-gold-glow);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.45s ease;
  z-index: 2;
}

/* Light Theme Switch State */
[data-theme="light"] .ios-switch-track {
  background: rgba(200, 169, 106, 0.2);
  border-color: var(--color-gold-primary);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .ios-switch-thumb {
  transform: translateX(27px);
  background: linear-gradient(135deg, #1A1A1D 0%, #0F0F10 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .sun-icon {
  color: var(--color-gold-primary);
  opacity: 1;
}

[data-theme="dark"] .moon-icon {
  color: var(--color-gold-primary);
  opacity: 1;
}

.text-gold {
  color: var(--color-gold-primary);
}

.gradient-gold-text {
  background: linear-gradient(135deg, #FFF 0%, #C8A96A 50%, #E0C895 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  font-weight: 300;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold-primary);
  margin-bottom: 16px;
}

.section-tag::before {
  content: '';
  width: 24px;
  height: 1px;
  background-color: var(--color-gold-primary);
}

.section-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  color: var(--color-text-main);
  margin-bottom: 20px;
}

.section-desc {
  max-width: 680px;
  margin-bottom: 48px;
  font-size: 1.15rem;
}

/* Layout Elements */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
}

.section-padding {
  padding: var(--section-padding-y) 0;
  position: relative;
}

/* Glassmorphism Panels */
.glass-panel {
  background: var(--color-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-glass-border);
  border-radius: 12px;
  transition: transform 0.4s var(--transition-smooth), border-color 0.4s ease, box-shadow 0.4s ease;
}

.glass-panel:hover {
  border-color: rgba(200, 169, 106, 0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 30px var(--color-gold-glow);
}

/* Luxury Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 36px;
  background: linear-gradient(135deg, #C8A96A 0%, #A88644 100%);
  color: #0F0F10;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.35s var(--transition-smooth);
  box-shadow: 0 8px 24px rgba(200, 169, 106, 0.25);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s ease;
}

.btn-primary:hover::after {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(200, 169, 106, 0.4);
  background: linear-gradient(135deg, #E0C895 0%, #C8A96A 100%);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 36px;
  background: transparent;
  color: var(--color-text-main);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid var(--color-glass-border);
  cursor: pointer;
  transition: all 0.35s var(--transition-smooth);
}

.btn-secondary:hover {
  border-color: var(--color-gold-primary);
  color: var(--color-gold-primary);
  background: rgba(200, 169, 106, 0.05);
  transform: translateY(-3px);
}

/* Header & Navigation */
.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 24px 0;
  transition: all 0.4s ease;
}

.header-nav.scrolled {
  padding: 16px 0;
  background: rgba(15, 15, 16, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(200, 169, 106, 0.15);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text-main);
}

.brand-logo-img {
  height: 46px;
  max-width: 220px;
  object-fit: contain;
  filter: brightness(1.1) contrast(1.05);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.04);
  filter: brightness(1.2) drop-shadow(0 0 12px rgba(200, 169, 106, 0.4));
}

.footer-logo-img {
  height: 56px;
  max-width: 260px;
}

[data-theme="light"] .brand-logo-img {
  filter: invert(0.9) hue-rotate(180deg) brightness(0.85);
  mix-blend-mode: multiply;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; width: 0; height: 1px;
  background-color: var(--color-gold-primary);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--color-gold-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0; right: -100%; width: 320px; height: 100vh;
  background: var(--color-bg-dark);
  border-left: 1px solid var(--color-glass-border);
  z-index: 1100;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: right 0.4s var(--transition-smooth);
}

.mobile-nav-drawer.active {
  right: 0;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  :root {
    --section-padding-y: 80px;
  }
}

@media (max-width: 768px) {
  .header-nav {
    padding: 12px 0;
  }
  .header-nav.scrolled {
    padding: 8px 0;
  }
  .nav-actions {
    gap: 8px;
  }
  .nav-actions .btn-primary {
    width: auto !important;
    padding: 8px 14px !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.04em !important;
    border-radius: 20px !important;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(200, 169, 106, 0.25);
  }
  .brand-logo-img {
    height: 34px;
    max-width: 140px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  .section-title {
    font-size: 2rem;
  }
  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary,
  .editorial-grid .btn-primary,
  .editorial-grid .btn-secondary,
  .service-card .btn-primary,
  .partner-card .btn-primary,
  .partner-card .btn-secondary {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .nav-actions .btn-primary {
    padding: 6px 10px !important;
    font-size: 0.68rem !important;
  }
  .brand-logo-img {
    height: 30px;
    max-width: 115px;
  }
}
