/* ==========================================================================
   BEAM.MBA — Business Environment Aptitude Mentoring
   Main Stylesheet — Design Tokens, Typography, Layout & Base Elements
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=JetBrains+Mono:wght@500;600;700&display=swap');

:root {
  /* Dark Mode / Charcoal Palette */
  --bg-dark: #0B0A09;
  --bg-dark-card: #141311;
  --bg-dark-elevated: #1B1A17;
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-dark-gold: rgba(200, 148, 69, 0.25);
  
  /* Light Mode / Warm Ivory Palette */
  --bg-light: #FAF8F5;
  --bg-light-card: #FFFFFF;
  --bg-light-soft: #F2EFE9;
  --border-light: rgba(28, 26, 24, 0.09);
  --border-light-gold: rgba(200, 148, 69, 0.3);

  /* BEAM Brand Accent Palette (derived from brochure) */
  --accent-gold: #C89445;
  --accent-gold-hover: #DEB25E;
  --accent-gold-deep: #8F6224;
  --accent-gold-soft: rgba(200, 148, 69, 0.12);
  --accent-gold-glow: rgba(200, 148, 69, 0.25);

  /* Typography Colors */
  --text-on-dark-primary: #F5F3EF;
  --text-on-dark-secondary: #A39D93;
  --text-on-dark-muted: #6E685F;

  --text-on-light-primary: #161412;
  --text-on-light-secondary: #5C564E;
  --text-on-light-muted: #8F887D;

  /* Typography Families */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans-ui: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing System */
  --container-max: 1280px;
  --container-narrow: 980px;
  --section-padding-y: clamp(5rem, 10vw, 8.5rem);
  --grid-gap: clamp(1.5rem, 3vw, 2.5rem);

  /* Shadows & Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-section: clamp(2rem, 4.5vw, 3.5rem);
  --radius-full: 9999px;
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-elevated: 0 16px 40px rgba(0, 0, 0, 0.12);
  --shadow-dark-glow: 0 0 40px rgba(200, 148, 69, 0.12);

  /* Header Height */
  --header-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans-body);
  color: var(--text-on-dark-primary);
  background-color: var(--bg-dark);
  line-height: 1.65;
  overflow-x: hidden;
}

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

.eyebrow {
  font-family: var(--font-sans-ui);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--accent-gold);
}

/* Chapter Narrative Flag */
.chapter-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.chapter-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-gold-soft);
  border: 1px solid var(--border-dark-gold);
  color: var(--accent-gold);
  font-family: var(--font-sans-ui);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chapter-flag:hover .chapter-num {
  transform: scale(1.15);
  box-shadow: 0 0 14px rgba(200, 148, 69, 0.4);
  border-color: #DEB25E;
}

.chapter-label {
  font-family: var(--font-sans-ui);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-gold);
  transition: color 0.25s ease;
}

.chapter-flag:hover .chapter-label {
  color: #DEB25E;
}

.theme-light .chapter-num {
  background: rgba(200, 148, 69, 0.15);
  border-color: rgba(200, 148, 69, 0.4);
  color: var(--accent-gold-deep);
}

.theme-light .chapter-label {
  color: var(--accent-gold-deep);
}

.hero-title {
  font-size: clamp(2.75rem, 6.5vw, 5.25rem);
  line-height: 1.05;
  color: var(--text-on-dark-primary);
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  line-height: 1.12;
  margin-bottom: 1.25rem;
}

.section-subtitle {
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  line-height: 1.7;
  max-width: 680px;
}

/* Narrative Pullquote */
.narrative-pullquote {
  margin: clamp(3.5rem, 7vw, 6rem) auto;
  text-align: center;
  max-width: 960px;
  padding: 0 1rem;
}

.narrative-pullquote blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.8vw, 3.25rem);
  line-height: 1.22;
  color: var(--text-on-dark-primary);
  font-style: normal;
}

.narrative-pullquote blockquote span {
  color: var(--accent-gold);
  font-style: italic;
}

.theme-light .narrative-pullquote blockquote {
  color: var(--text-on-light-primary);
}

.theme-light .narrative-pullquote blockquote span {
  color: var(--accent-gold-deep);
}

/* Container & Layout */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 3rem);
  padding-right: clamp(1.25rem, 4vw, 3rem);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
  position: relative;
  z-index: 1;
}

/* Fixed Dark Organic Flowing Wave Background Layer */
.site-bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background-image: url('../assets/bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.site-bg-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, rgba(11, 10, 9, 0.12) 0%, rgba(11, 10, 9, 0.45) 100%);
}

@media (max-width: 768px) {
  .site-bg-layer {
    background-position: center center;
  }
}

/* Storytelling Chapter Architecture */
.story-chapter {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.chapter-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  transform-origin: center top;
  will-change: transform, opacity;
}

/* Organic Flowing Wave Transition Lip */
.organic-wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
  position: absolute;
  left: 0;
  z-index: 5;
}

.organic-wave-divider svg {
  display: block;
  width: 100%;
  height: clamp(40px, 6vw, 90px);
}

.organic-wave-divider.wave-top {
  bottom: 100%;
  margin-bottom: -1px;
}

.organic-wave-divider.wave-bottom {
  top: 100%;
  margin-top: -1px;
}

/* Narrative Editorial Photography */
.narrative-image-banner {
  position: relative;
  width: 100%;
  margin: clamp(2.5rem, 5vw, 4.5rem) 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.narrative-image-banner img {
  width: 100%;
  height: clamp(280px, 45vh, 480px);
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.narrative-image-banner:hover img {
  transform: scale(1.05);
}

.narrative-image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 2rem;
  background: linear-gradient(180deg, transparent 0%, rgba(11, 10, 9, 0.88) 100%);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-sans-ui);
  font-size: 0.82rem;
  color: var(--text-on-dark-secondary);
}

.narrative-image-caption strong {
  color: var(--accent-gold);
}

/* Theme Alternation: Dark & Light Sections */
.theme-dark {
  background-color: transparent;
  color: var(--text-on-dark-primary);
}

.theme-dark .section-subtitle {
  color: var(--text-on-dark-secondary);
}

.theme-light {
  background-color: var(--bg-light) !important;
  color: var(--text-on-light-primary);
  position: relative;
  z-index: 4;
  overflow: visible;
  margin: clamp(40px, 6vw, 90px) 0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65);
  opacity: 1 !important;
  filter: none !important;
}

.theme-light .chapter-inner {
  opacity: 1 !important;
  filter: none !important;
}

.theme-light .section-title {
  color: var(--text-on-light-primary);
}

.theme-light .section-subtitle {
  color: var(--text-on-light-secondary);
}

.theme-light .eyebrow {
  color: var(--accent-gold-deep);
}

.theme-light .eyebrow::before {
  background: var(--accent-gold-deep);
}

/* Buttons & CTA Hierarchy */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: var(--font-sans-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.9rem 1.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  white-space: nowrap;
}

/* Primary Institutional Button */
.btn-primary {
  background: linear-gradient(135deg, #DEB25E 0%, #C89445 60%, #B07D30 100%);
  color: #0B0A09;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(200, 148, 69, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ECC77D 0%, #D4A050 60%, #BF893A 100%);
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 10px 30px rgba(200, 148, 69, 0.55), 0 0 24px rgba(222, 178, 94, 0.25);
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.995);
}

/* Secondary Button on Dark */
.btn-secondary-dark {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-on-dark-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.btn-secondary-dark:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(200, 148, 69, 0.6);
  color: #FFFFFF;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 18px rgba(200, 148, 69, 0.2);
}

/* Secondary Button on Light */
.btn-secondary-light {
  background: rgba(22, 20, 18, 0.04);
  color: var(--text-on-light-primary);
  border: 1px solid rgba(22, 20, 18, 0.16);
}

.btn-secondary-light:hover {
  background: rgba(22, 20, 18, 0.08);
  border-color: var(--accent-gold-deep);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.6rem 1.25rem;
  font-size: 0.84rem;
}

.btn-lg {
  padding: 1.1rem 2.4rem;
  font-size: 1.05rem;
}

.btn-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Editorial Badges & Tags */
.badge-gold {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--border-dark-gold);
  font-family: var(--font-sans-ui);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.badge-gold:hover {
  transform: scale(1.06);
  border-color: #DEB25E;
  box-shadow: 0 0 16px rgba(200, 148, 69, 0.35);
}

/* Institutional Sticky Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: all 0.35s ease;
  background: rgba(11, 10, 9, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-header.scrolled {
  height: 70px;
  background: rgba(11, 10, 9, 0.94);
  border-bottom-color: rgba(200, 148, 69, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

.nav-brand,
.nav-brand:link,
.nav-brand:visited {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--accent-gold);
}

.nav-brand img,
.brand-mark {
  height: 40px;
  width: auto;
  transition: transform 0.2s ease;
}

.nav-brand:hover img {
  transform: scale(1.05);
}

.brand-wordmark,
.brand-wordmark:link,
.brand-wordmark:visited {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--accent-gold);
}

.brand-wordmark em {
  font-style: normal;
  font-family: var(--font-sans-ui);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-gold-hover);
  margin-left: 0.15rem;
  vertical-align: middle;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-sans-ui);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-on-dark-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  padding: 0.4rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-on-dark-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-gold);
  transition: width 0.25s ease;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-on-dark-primary);
}

.mobile-toggle svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
}

/* Mobile Nav Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background: #11100E;
  z-index: 1001;
  padding: 6rem 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 1px solid var(--border-dark-gold);
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.6);
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.mobile-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-on-dark-secondary);
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.mobile-menu .nav-link {
  font-size: 1.35rem;
  font-family: var(--font-serif);
}

/* Subtle editorial line divider */
.gold-divider {
  width: 48px;
  height: 2px;
  background: var(--accent-gold);
  margin: 1.75rem 0;
}

/* Responsive Utilities */
@media (max-width: 1024px) {
  .nav-menu {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
}

@media (max-width: 640px) {
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  .btn-group .btn {
    width: 100%;
  }
  .nav-brand img {
    height: 38px;
  }
}
