/* ai·maturity — Lessons-Page Styles
   Reuses the Cream/Tan palette + Cormorant + Inter from the main site. */

:root {
  --cream:        #f7f0e3;
  --cream-soft:   #faf5ea;
  --cream-deep:   #efe6d3;
  --ink:          #1a1612;
  --ink-soft:     #3a332c;
  --muted:        #7a6f61;
  --tan:          #c9a46a;
  --tan-line:     #d4b485;
  --tan-deep:     #8a6a3a;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Inter", -apple-system, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

/* ── Header ───────────────────────────────────────────────────────────── */
.lh-header {
  border-bottom: 1px solid var(--tan-line);
  padding: 18px 0;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.lh-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
}
.logo-ai { font-style: italic; }
.logo-dot { color: var(--tan-deep); margin: 0 2px; }
.logo-word { font-weight: 500; }

.lh-nav { display: flex; gap: 22px; align-items: center; }
.lh-nav a {
  font-size: .92rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.lh-nav a:hover { border-bottom-color: var(--tan-deep); }
.lh-nav .lh-cta {
  background: var(--ink);
  color: var(--cream);
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--ink);
}
.lh-nav .lh-cta:hover { background: #000; border-bottom-color: transparent; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.lh-main { padding-bottom: 80px; }
.lh-hero { padding: 56px 0 40px; }
.eyebrow {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tan-deep);
  margin-bottom: 20px;
}
.lh-hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 24px;
  letter-spacing: -0.01em;
  max-width: 24ch;
}
.lh-hero h1 em { font-style: italic; color: var(--tan-deep); }
.lede {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 64ch;
}
.lede a { color: var(--tan-deep); border-bottom: 1px solid var(--tan-line); text-decoration: none; }
.lede a:hover { color: var(--ink); }

/* ── Tier switcher ────────────────────────────────────────────────────── */
.tier-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 24px;
}
.tier-pill {
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 500;
  padding: 10px 22px;
  border: 1px solid var(--tan-line);
  border-radius: 999px;
  background: var(--cream-soft);
  color: var(--ink);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tier-pill:hover { background: var(--cream-deep); }
.tier-pill.active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.tier-pill .count {
  font-family: var(--mono);
  font-size: .72rem;
  opacity: 0.7;
  margin-left: 8px;
}

/* ── Progress ─────────────────────────────────────────────────────────── */
.progress-wrap {
  margin: 0 0 32px;
  padding: 16px 20px;
  border: 1px solid var(--tan-line);
  border-radius: 12px;
  background: var(--cream-soft);
  display: flex;
  align-items: center;
  gap: 16px;
}
.progress-label {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tan-deep);
  white-space: nowrap;
}
.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--cream-deep);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--tan-deep);
  width: 0;
  transition: width .3s ease;
}
.progress-count {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ── Layout: player + sidebar ─────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  margin-bottom: 80px;
}
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
}

/* ── Player frame (YouTube click-to-load) ─────────────────────────────── */
.player-frame {
  background: var(--ink);
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
}
.player-frame iframe,
.player-frame video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: contain;
  background: var(--ink);
}
.yt-thumb {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: #1a1612;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.yt-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.5));
}
.yt-play {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(247, 240, 227, 0.96);
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  transition: transform .2s ease;
}
.yt-thumb:hover .yt-play { transform: scale(1.05); }
.yt-play svg { width: 32px; height: 32px; fill: var(--ink); margin-left: 4px; }
.yt-consent-note {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  color: var(--cream);
  font-size: .82rem;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  pointer-events: none;
}

.coming-soon {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, #2a2420, #1a1612);
}
.coming-soon p {
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tan-line);
  margin: 0 0 12px;
}
.coming-soon h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  margin: 0;
  max-width: 24ch;
}

/* ── Player meta ──────────────────────────────────────────────────────── */
.player-meta { margin-top: 24px; }
.lesson-tag {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tan-deep);
  margin-bottom: 12px;
}
.player-meta h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2rem;
  margin: 0 0 12px;
  letter-spacing: -0.005em;
}
.player-meta .desc {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 56ch;
}
.player-controls {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 500;
  padding: 10px 20px;
  border: 1px solid var(--tan-line);
  border-radius: 999px;
  background: var(--cream-soft);
  color: var(--ink);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--cream-deep); }
.btn-primary {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.btn-primary:hover { background: #000; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.track-cta {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--tan-line);
  border-radius: 12px;
  background: var(--cream-soft);
  font-size: .92rem;
  color: var(--ink-soft);
}
.track-cta:empty { display: none; }
.track-cta a {
  color: var(--tan-deep);
  font-weight: 500;
  border-bottom: 1px solid var(--tan-line);
  text-decoration: none;
}
.track-cta a:hover { color: var(--ink); }

/* ── Sidebar lesson list ──────────────────────────────────────────────── */
.lesson-list {
  background: var(--cream-soft);
  border: 1px solid var(--tan-line);
  border-radius: 16px;
  padding: 20px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  position: sticky;
  top: 100px;
  scrollbar-color: var(--tan-line) transparent;
}
.lesson-list::-webkit-scrollbar { width: 10px; }
.lesson-list::-webkit-scrollbar-thumb {
  background: var(--tan-line);
  border-radius: 999px;
  border: 2px solid var(--cream-soft);
}
.list-title {
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tan-deep);
  padding: 8px 8px 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--tan-line);
  background: var(--cream-soft);
  position: sticky;
  top: 0;
  z-index: 1;
}
.list-title:not(:first-child) { margin-top: 28px; }
.list-title .count {
  float: right;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: .08em;
}
.lesson-item {
  display: block;
  text-align: left;
  width: 100%;
  padding: 14px;
  margin-bottom: 4px;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
  font-family: inherit;
  color: inherit;
}
.lesson-item:hover { background: var(--cream-deep); }
.lesson-item.active {
  background: var(--cream-deep);
  border-left-color: var(--tan-deep);
}
.lesson-item .id {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--tan-deep);
  text-transform: uppercase;
}
.lesson-item .title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
  margin: 4px 0 6px;
}
.lesson-item .meta {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--muted);
  letter-spacing: .04em;
}
.lesson-item.watched .id::after {
  content: " ✓";
  color: var(--tan-deep);
}
.lesson-item.locked {
  cursor: not-allowed;
  opacity: 0.55;
}
.lesson-item.locked:hover { background: transparent; }
.lesson-item .lock-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--tan-line);
  padding: 1px 8px;
  border-radius: 999px;
  margin-top: 6px;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.lh-footer {
  border-top: 1px solid var(--tan-line);
  padding: 32px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .78rem;
  text-align: center;
  background: var(--cream);
}
.lh-footer a { color: var(--ink-soft); border-bottom: 1px solid var(--tan-line); text-decoration: none; }
.lh-footer a:hover { color: var(--tan-deep); }
.lh-yt-note { margin-top: 8px; max-width: 64ch; margin-inline: auto; }
