/* learn-shell.css
 *
 * Cream/gold "editorial premium" theme used by:
 *   /prompts/*  (public prompt directory)
 *   /courses    (paid course catalog)
 *   /learn/*    (lesson player matching the approved mockup)
 *
 * Distinct from the dark-magenta marketing theme (index.html, buy.html).
 * Brand DNA shared via gold accents + Playfair Display headings.
 */

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

:root {
  --bg: #FAF7F2;
  --bg-soft: #F3EEE3;
  --card: #FFFFFF;
  --border: #ECE5D8;
  --border-strong: #D9CFBC;

  --text: #2A2520;
  --text-muted: #6B6056;
  --text-soft: #8A7E72;

  --gold: #C9A876;
  --gold-soft: #E8D9BC;
  --gold-deep: #A88557;

  --magenta: #b83e7a;
  --green: #4F8A5B;

  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(42, 37, 32, 0.04);
  --shadow: 0 4px 18px rgba(42, 37, 32, 0.06);
  --shadow-lg: 0 12px 40px rgba(42, 37, 32, 0.08);

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ── TOP NAV ───────────────────────────────── */
.shell-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 32px;
  background: rgba(250, 247, 242, 0.88);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.shell-brand {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--gold-deep);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.shell-brand-dot { color: var(--gold); }
.shell-nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
  align-items: center;
}
.shell-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.shell-nav-link:hover { color: var(--text); }
.shell-nav-link.active { color: var(--text); font-weight: 600; }
.shell-nav-link.cta {
  padding: 8px 18px;
  background: var(--gold);
  color: white;
  border-radius: 999px;
  transition: background 0.15s;
}
.shell-nav-link.cta:hover { background: var(--gold-deep); color: white; }

/* ── PAGE WRAPPERS ─────────────────────────── */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 96px;
}
.page-narrow {
  max-width: 760px;
}
.page-header {
  text-align: center;
  margin-bottom: 48px;
}
.page-eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
  margin-bottom: 12px;
}
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--text);
}
.page-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── CARDS ─────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.card-link:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

/* ── BUTTONS ───────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, color 0.15s;
}
.btn:hover { background: var(--bg-soft); border-color: var(--gold); }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--gold);
  color: white;
  border-color: var(--gold);
}
.btn-primary:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: white; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--border); }
.btn-block { width: 100%; }

/* ── TAGS ──────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ── PROMPT CATALOG GRID ───────────────────── */
.prompt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.prompt-card-title {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.prompt-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.55;
}
.prompt-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.prompt-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-soft);
}
.prompt-card-walkthrough-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--gold-deep);
}
.prompt-card-walkthrough-badge::before {
  content: '✨';
}

/* ── PROMPT DETAIL PAGE ────────────────────── */
.prompt-detail-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}
.prompt-detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.prompt-detail-section {
  margin-bottom: 36px;
}
.prompt-detail-section h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  margin-bottom: 14px;
  color: var(--text);
}
.prompt-block {
  position: relative;
  background: #1a1611;
  color: #f5e9d4;
  border-radius: var(--radius);
  padding: 24px 24px 24px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-x: auto;
  border: 1px solid #2a221a;
}
.prompt-block-copy {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 14px;
  background: rgba(232, 217, 188, 0.12);
  border: 1px solid rgba(232, 217, 188, 0.25);
  color: #f5e9d4;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.prompt-block-copy:hover { background: rgba(232, 217, 188, 0.22); }
.prompt-block-copy.copied { background: var(--green); border-color: var(--green); color: white; }

/* ── UPSELL CARD ───────────────────────────── */
.upsell-card {
  background: linear-gradient(135deg, #FFF8EC 0%, #FFE9C4 100%);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 32px;
  display: flex;
  gap: 24px;
  align-items: center;
}
.upsell-card-body { flex: 1; }
.upsell-card-eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
  margin-bottom: 8px;
}
.upsell-card-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.25;
}
.upsell-card-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}
.upsell-card-action {
  flex-shrink: 0;
}

/* ── PROSE (markdown content) ──────────────── */
.prose h1, .prose h2, .prose h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  margin: 28px 0 12px;
  line-height: 1.2;
}
.prose h1 { font-size: 32px; }
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 18px; }
.prose p { margin: 12px 0; line-height: 1.65; color: var(--text); }
.prose ul, .prose ol { margin: 12px 0 12px 24px; }
.prose li { margin: 6px 0; line-height: 1.55; }
.prose a { color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--gold); }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.prose blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--gold);
  background: var(--bg-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-style: italic;
}

/* ── EMPTY STATE ───────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

/* ── MOBILE ────────────────────────────────── */
@media (max-width: 720px) {
  .shell-nav { padding: 14px 18px; gap: 18px; }
  .shell-nav-links { gap: 14px; }
  .shell-nav-link { font-size: 13px; }
  .page { padding: 32px 18px 64px; }
  .upsell-card { flex-direction: column; align-items: stretch; text-align: center; }
}
