/* ============================================================
   The Source Code — 12 Principles of Transformation
   Shared Stylesheet
   ============================================================ */

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

:root {
  --bg:        #0a0a0a;
  --bg-card:   #111111;
  --bg-hover:  #161616;
  --gold:      #F5C842;
  --gold-dim:  #c9a030;
  --text:      #e0e0e0;
  --text-muted:#999999;
  --border:    #2a2a2a;
  --radius:    6px;
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 18px;
  line-height: 1.7;
  min-height: 100vh;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: Georgia, serif;
  font-weight: normal;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: #fff; }

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

.section {
  padding: 80px 0;
}

/* --- Gold Accent Line --- */
.gold-rule {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 24px auto;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: Georgia, serif;
}

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

.nav-links a {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaaaaa;
  transition: color 0.2s;
}

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 14px 36px;
  font-family: Georgia, serif;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  border-radius: var(--radius);
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  color: #0a0a0a;
}
.btn-primary:hover {
  background: #fff;
  color: #0a0a0a;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}
.btn-outline:hover {
  background: var(--gold);
  color: #0a0a0a;
  transform: translateY(-2px);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* 64px nav + 72px breathing room */
  padding: 136px 24px 72px;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

/* Subtle gold radial glow at top center */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 480px;
  background: radial-gradient(ellipse 65% 45% at 50% 0%, rgba(245, 200, 66, 0.09) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  position: relative;
  z-index: 1;
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}

.hero-title {
  position: relative;
  z-index: 1;
  font-size: clamp(48px, 8vw, 88px);
  font-weight: bold;
  line-height: 1.05;
  margin-bottom: 28px;
}

.hero-title-white { color: #ffffff; }
.hero-title-gold  { color: var(--gold); }

.hero-tagline {
  position: relative;
  z-index: 1;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: #aaaaaa;
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.7;
}

.hero-desc {
  position: relative;
  z-index: 1;
  font-size: clamp(0.88rem, 1.6vw, 0.98rem);
  color: #666666;
  max-width: 560px;
  line-height: 1.85;
  margin: 0 auto;
}

.hero-handle {
  position: relative;
  z-index: 1;
  margin-top: 52px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: #272727;
}

/* ============================================================
   PRINCIPLES GRID
   ============================================================ */
.principles-section {
  background: var(--bg);
  padding: 80px 0 100px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  color: #fff;
}

.section-header p {
  color: #bbbbbb;
  max-width: 520px;
  margin: 0 auto;
  font-size: 0.95rem;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.principle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  cursor: default;
  text-decoration: none;
}

.principle-card:hover {
  border-color: var(--gold);
  background: var(--bg-hover);
  transform: translateY(-3px);
  color: inherit;
}

.principle-number {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-style: normal;
  min-width: 28px;
  padding-top: 3px;
}

.principle-name {
  font-size: 1rem;
  color: #fff;
  line-height: 1.4;
  font-family: Georgia, serif;
}

.principle-card.completed .principle-name::after {
  content: ' ✓';
  color: var(--gold);
  font-size: 0.85rem;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  text-align: center;
  padding: 80px 24px;
  border-top: 1px solid var(--border);
}

.cta-section h2 {
  color: #fff;
  margin-bottom: 16px;
}

.cta-section p {
  color: #bbbbbb;
  margin-bottom: 40px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-brand {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #333333;
}

.footer-handle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-handle a {
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-handle a:hover { color: var(--gold); }

/* ============================================================
   LESSON PAGE
   ============================================================ */
.lesson-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  padding-top: 64px;
}

/* Sidebar */
.lesson-sidebar {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 40px 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.sidebar-title {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #aaaaaa;
  padding: 0 24px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  font-size: 0.85rem;
  color: #aaaaaa;
  transition: color 0.2s, background 0.2s;
  line-height: 1.4;
}

.sidebar-nav li a:hover {
  color: var(--gold);
  background: rgba(245, 200, 66, 0.05);
}

.sidebar-nav li a.active {
  color: var(--gold);
  background: rgba(245, 200, 66, 0.08);
  border-right: 2px solid var(--gold);
}

.sidebar-nav li a.done {
  color: var(--text-muted);
}

.sidebar-nav li a.done .lesson-check {
  opacity: 1;
  color: var(--gold);
}

.lesson-num {
  font-size: 0.7rem;
  min-width: 20px;
  color: inherit;
  opacity: 0.6;
}

.lesson-check {
  margin-left: auto;
  opacity: 0;
  font-size: 0.8rem;
}

/* Main content */
.lesson-main {
  padding: 60px 64px;
  max-width: 800px;
}

.lesson-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.lesson-title {
  color: #fff;
  margin-bottom: 8px;
}

.lesson-deck {
  font-size: 1.1rem;
  color: #cccccc;
  font-style: italic;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.lesson-body h3 {
  color: var(--gold);
  margin: 40px 0 16px;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.lesson-body p {
  color: var(--text);
  margin-bottom: 20px;
}

.lesson-body blockquote {
  border-left: 3px solid var(--gold);
  margin: 32px 0;
  padding: 16px 24px;
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: #cccccc;
}

/* Reflection box */
.reflection-box {
  margin: 48px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.reflection-box h3 {
  color: var(--gold);
  margin: 0 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.reflection-box p {
  color: #bbbbbb;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.reflection-textarea {
  width: 100%;
  min-height: 140px;
  background: #111111;
  border: 1px solid #333333;
  border-radius: var(--radius);
  color: #e0e0e0;
  font-family: Georgia, serif;
  font-size: 0.95rem;
  padding: 16px;
  resize: vertical;
  transition: border-color 0.2s;
  line-height: 1.6;
}

.reflection-textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.reflection-textarea::placeholder {
  color: #888888;
  opacity: 1;
}

.reflection-save {
  margin-top: 12px;
  font-size: 0.8rem;
  color: #999999;
  font-style: italic;
}

/* Lesson nav footer */
.lesson-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}

.mark-complete-btn {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 12px 28px;
  font-family: Georgia, serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}

.mark-complete-btn:hover,
.mark-complete-btn.is-complete {
  background: var(--gold);
  color: #0a0a0a;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar-wrap {
  padding: 0 24px 24px;
}

.progress-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aaaaaa;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.progress-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* ============================================================
   VIDEO SECTION
   ============================================================ */
.video-section {
  padding: 0 24px 64px;
  background: var(--bg);
}

.video-container {
  max-width: 800px;
  margin: 0 auto;
}

.video-section-heading {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 24px;
}

/* Thumbnail / embed wrapper — maintains 16:9 */
.video-embed-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.video-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.25s;
}

.video-embed-wrapper:hover .video-play-overlay {
  background: rgba(0, 0, 0, 0.18);
}

.video-play-btn {
  width: 80px;
  height: 80px;
  border: 2px solid rgba(245, 200, 66, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, border-color 0.2s;
}

.video-embed-wrapper:hover .video-play-btn {
  transform: scale(1.08);
  border-color: var(--gold);
}

.video-play-btn::after {
  content: '';
  border-style: solid;
  border-width: 14px 0 14px 24px;
  border-color: transparent transparent transparent rgba(245, 200, 66, 0.85);
  margin-left: 6px;
}

.video-embed-wrapper:hover .video-play-btn::after {
  border-color: transparent transparent transparent var(--gold);
}

/* Loaded iframe fills the wrapper */
.video-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-cta {
  text-align: center;
  margin-top: 36px;
}

/* ============================================================
   COURSE CTA / PROGRESS SECTION
   ============================================================ */
.course-cta-section {
  text-align: center;
  padding: 60px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.progress-tracker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  font-size: 0.82rem;
  color: #888888;
}

.progress-count-val {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 1rem;
}

.progress-mini-bar {
  width: 90px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-mini-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-gold  { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .lesson-layout {
    grid-template-columns: 1fr;
  }

  .lesson-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .lesson-main {
    padding: 40px 24px;
  }

  .lesson-nav-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

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

  .nav-links {
    display: none;
  }

  .hero {
    padding: 100px 20px 60px;
  }
}
