/* ==========================================================================
   THE GAME OF HEROIC MEANING - LUXURY OBSIDIAN & RADIANT GOLD DESIGN SYSTEM
   Mark Michael Lewis Digital Ecosystem Alignment
   ========================================================================== */

:root {
  /* Typography */
  --font-display: 'Cinzel', Georgia, serif;
  --font-serif: 'Newsreader', 'Lora', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', Menlo, Monaco, Consolas, monospace;

  /* Color Palette: Obsidian Dark (Default) */
  --bg-primary: #070a0e;
  --bg-secondary: #0d131a;
  --bg-tertiary: #131c26;
  --bg-card: rgba(16, 24, 36, 0.78);
  --bg-card-hover: rgba(22, 34, 50, 0.95);
  --bg-glass: rgba(7, 10, 14, 0.88);

  --text-primary: #f2efe9;
  --text-secondary: #b0bccb;
  --text-muted: #748396;
  --text-quote: #e8e2d5;
  --text-highlight: #ffffff;

  --accent-gold: #e5a93c;
  --accent-gold-light: #f5c56c;
  --accent-gold-dark: #b87e20;
  --accent-gold-glow: rgba(229, 169, 60, 0.25);
  --accent-gold-subtle: rgba(229, 169, 60, 0.12);

  --accent-emerald: #10b981;
  --accent-emerald-light: #34d399;
  --accent-emerald-dark: #059669;
  --accent-emerald-glow: rgba(16, 185, 129, 0.22);
  --accent-emerald-subtle: rgba(16, 185, 129, 0.1);

  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;
  --accent-cyan: #06b6d4;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(229, 169, 60, 0.25);
  --border-card-emerald: rgba(16, 185, 129, 0.25);
  --border-hover: rgba(229, 169, 60, 0.65);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.8);
  --shadow-gold: 0 0 25px rgba(229, 169, 60, 0.2);
  --shadow-emerald: 0 0 25px rgba(16, 185, 129, 0.2);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --page-max: 1220px;
  --measure: 68ch;
  --transition-smooth: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Parchment Theme */
:root[data-theme="light"] {
  --bg-primary: #fbf9f4;
  --bg-secondary: #f2ece0;
  --bg-tertiary: #e8dfce;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(251, 249, 244, 0.94);

  --text-primary: #1c1815;
  --text-secondary: #484138;
  --text-muted: #7d7265;
  --text-quote: #29221b;
  --text-highlight: #000000;

  --accent-gold: #a86208;
  --accent-gold-light: #c97914;
  --accent-gold-dark: #7a4603;
  --accent-gold-glow: rgba(168, 98, 8, 0.2);
  --accent-gold-subtle: rgba(168, 98, 8, 0.08);

  --accent-emerald: #0b5d52;
  --accent-emerald-light: #147d6f;
  --accent-emerald-dark: #07433b;
  --accent-emerald-glow: rgba(11, 93, 82, 0.18);
  --accent-emerald-subtle: rgba(11, 93, 82, 0.08);

  --border-subtle: rgba(0, 0, 0, 0.09);
  --border-card: rgba(168, 98, 8, 0.24);
  --border-card-emerald: rgba(11, 93, 82, 0.22);
  --border-hover: rgba(168, 98, 8, 0.65);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 0 25px rgba(168, 98, 8, 0.15);
  --shadow-emerald: 0 0 25px rgba(11, 93, 82, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
}

.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--text-highlight);
  margin-bottom: 0.75rem;
}

h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.lede {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-gold-light);
  background: var(--accent-gold-subtle);
  border: 1px solid var(--border-card);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

:root[data-theme="light"] .eyebrow {
  color: var(--accent-gold);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-primary) 100%);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: var(--shadow-gold);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-highlight);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-nav a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  transition: var(--transition-smooth);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent-gold-light);
}

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

.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  background: var(--accent-gold-subtle);
  border-color: var(--border-hover);
}

.mobile-menu-btn {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

@media (max-width: 980px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
    gap: 16px;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.active {
    display: flex;
  }
  .mobile-menu-btn {
    display: flex;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-dark) 100%);
  color: #070a0e !important;
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm), var(--shadow-gold);
  cursor: pointer;
  transition: var(--transition-smooth);
  min-height: 48px;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 0 30px rgba(229, 169, 60, 0.45);
  background: linear-gradient(135deg, var(--accent-gold-light) 0%, var(--accent-gold) 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary) !important;
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  color: var(--accent-gold-light) !important;
}

.btn-emerald {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-emerald-dark) 100%);
  color: #ffffff !important;
  box-shadow: var(--shadow-sm), var(--shadow-emerald);
}

.btn-emerald:hover {
  background: linear-gradient(135deg, var(--accent-emerald-light) 0%, var(--accent-emerald) 100%);
  box-shadow: var(--shadow-md), 0 0 30px rgba(16, 185, 129, 0.45);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.88rem;
  min-height: 38px;
}

/* Sections */
.section {
  padding: 85px 0;
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
}

.section-darker {
  background-color: var(--bg-secondary);
}

.section-hero {
  padding: 95px 0 80px;
  background: radial-gradient(circle at 50% 0%, var(--accent-gold-glow) 0%, transparent 65%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 52px;
  align-items: center;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-portrait-frame {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 10px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-emerald) 100%);
  box-shadow: var(--shadow-gold), var(--shadow-lg);
  width: 100%;
  max-width: 380px;
}

.hero-portrait-img {
  border-radius: var(--radius-md);
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero-under-portrait-card {
  margin-top: 16px;
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}

.stat-item strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent-gold);
}

.stat-item span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* The 3 P's Tri-Part Engine */
.three-ps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 36px;
}

.p-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
}

.p-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.p-card.card-prosperity {
  border-top: 4px solid var(--accent-emerald);
}
.p-card.card-prosperity:hover {
  border-color: var(--accent-emerald);
  box-shadow: var(--shadow-emerald);
}

.p-card.card-pleasure {
  border-top: 4px solid var(--accent-rose);
}
.p-card.card-pleasure:hover {
  border-color: var(--accent-rose);
}

.p-card.card-purpose {
  border-top: 4px solid var(--accent-gold);
}
.p-card.card-purpose:hover {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-gold);
}

.p-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  align-self: flex-start;
  margin-bottom: 16px;
}

.card-prosperity .p-badge {
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald-light);
  border: 1px solid var(--border-card-emerald);
}

.card-pleasure .p-badge {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.card-purpose .p-badge {
  background: var(--accent-gold-subtle);
  color: var(--accent-gold-light);
  border: 1px solid var(--border-card);
}

.p-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.p-card .p-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.p-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.p-card li {
  position: relative;
  padding-left: 20px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.p-card li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--accent-gold);
  font-size: 0.8rem;
}

@media (max-width: 900px) {
  .three-ps-grid {
    grid-template-columns: 1fr;
  }
}

/* Video Masterclass Player */
.video-player-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 36px;
  box-shadow: var(--shadow-md);
}

.video-player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-lg);
}

.video-player-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-switcher-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.video-switcher-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.video-switcher-btn:hover,
.video-switcher-btn.active {
  background: var(--accent-gold);
  color: #070a0e;
  border-color: var(--accent-gold);
}

/* 14-Lesson Curriculum Matrix */
.curriculum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.lesson-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.lesson-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-card);
  box-shadow: var(--shadow-md);
}

.lesson-card.open-lesson {
  border-color: var(--border-card-emerald);
}

.lesson-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.lesson-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.lesson-status-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.status-open {
  background: var(--accent-emerald-subtle);
  color: var(--accent-emerald-light);
  border: 1px solid var(--border-card-emerald);
}

.status-coached {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.lesson-card h4 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.lesson-card p {
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

/* Meaning Scorecard (HMQ) */
.scorecard-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 44px;
  margin-top: 36px;
  box-shadow: var(--shadow-lg);
}

.scorecard-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
}

.slider-group {
  margin-bottom: 24px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.slider-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-highlight);
}

.slider-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.scorecard-result-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
}

.hmq-number {
  font-family: var(--font-mono);
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
  margin: 12px 0;
}

@media (max-width: 860px) {
  .scorecard-grid {
    grid-template-columns: 1fr;
  }
}

/* FAQ */
.faq-box {
  max-width: 880px;
  margin: 36px auto 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

details {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: var(--transition-smooth);
}

details[open] {
  border-color: var(--border-card);
  box-shadow: var(--shadow-sm);
}

summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-highlight);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--accent-gold);
}

details[open] summary::after {
  content: "−";
}

details p {
  margin: 16px 0 0;
  font-size: 1rem;
  line-height: 1.6;
}

/* Final CTA Chamber */
.cta-chamber {
  background: linear-gradient(135deg, rgba(16, 24, 36, 0.95) 0%, rgba(8, 12, 18, 0.98) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  box-shadow: var(--shadow-gold), var(--shadow-lg);
  max-width: 860px;
  margin: 0 auto;
}

/* Footer */
footer {
  padding: 60px 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-ecosystem {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

.footer-ecosystem a {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-ecosystem a:hover {
  color: var(--accent-gold);
}
