/* ============================================================
   Diary of a CEO — Editorial Redesign Layer (v1)
   Loaded AFTER each page's inline styles to override them.
   Goal: warm editorial type system, restrained palette,
   fewer gradients/neon, less "template" feel.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Inter:wght@400;500;600&display=swap');

:root {
  --ink:        #0c0c11;
  --ink-2:      #14141c;
  --surface:    rgba(255,255,255,0.035);
  --surface-2:  rgba(255,255,255,0.06);
  --border:     rgba(233,228,216,0.10);
  --border-2:   rgba(233,228,216,0.16);
  --text:       #e9e4d8;
  --text-dim:   #b3ada0;
  --text-mute:  #837d72;
  --gold:       #d9a92e;
  --gold-soft:  rgba(217,169,46,0.10);
  --gold-line:  rgba(217,169,46,0.35);
  --plum:       #9182d6;
  --display:    'Fraunces', Georgia, 'Times New Roman', serif;
  --body:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Base ---- */
html { -webkit-font-smoothing: antialiased; }
body {
  background: var(--ink) !important;
  color: var(--text) !important;
  font-family: var(--body) !important;
  letter-spacing: 0.005em;
}
/* one quiet ambient wash instead of a 3-stop neon gradient */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(217,169,46,0.06), transparent 60%),
    radial-gradient(900px 600px at 10% 0%, rgba(145,130,214,0.05), transparent 55%);
}

p, li, span, cite, .summary-text, .episode-summary, .guest-bio, .guest-expertise { font-family: var(--body); }
a { color: var(--gold); }
a:hover { color: #e8c25e; }

/* ---- Display type ---- */
h1, h2, h3,
.section-title, .top-lessons-title, .dashboard-section-title,
.quotes-header, .category-header h2 {
  font-family: var(--display) !important;
  font-optical-sizing: auto;
  letter-spacing: -0.012em;
  color: var(--text) !important;
  font-weight: 500;
}
h1 { line-height: 1.12 !important; font-weight: 600; }
.episode-container h1, .content h1 { font-size: clamp(2rem, 4.2vw, 2.9rem) !important; }
h2, .section-title { font-weight: 500; }

/* kill the gradient-clipped headline; use a clean warm highlight */
.hero h1 .highlight {
  -webkit-text-fill-color: var(--gold) !important;
  color: var(--gold) !important;
  background: none !important;
}

/* ---- Editorial section headers: short rule + serif ---- */
.summary-section h2, .lessons-section h2, .quotes-section h2,
.clips-section h2, .books-section h2, .related-episodes h2,
.episode-container .section-title {
  position: relative;
  padding-top: 0.85rem;
  font-size: clamp(1.35rem, 2.4vw, 1.6rem) !important;
}
.summary-section h2::before, .lessons-section h2::before, .quotes-section h2::before,
.clips-section h2::before, .books-section h2::before, .related-episodes h2::before,
.episode-container .section-title::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 38px; height: 2px; background: var(--gold); border-radius: 2px;
}

/* ---- Header / nav ---- */
.header { background: rgba(10,10,14,0.82) !important; border-bottom: 1px solid var(--border) !important; }
.logo-icon {
  background: transparent !important;
  border: 1.5px solid var(--gold) !important;
  color: var(--gold) !important;
  font-family: var(--display) !important;
  border-radius: 9px !important;
  font-weight: 600 !important;
}
.logo-text { font-family: var(--display) !important; font-weight: 600; letter-spacing: -0.01em; }
.nav-links a, .main-nav a { font-family: var(--body); letter-spacing: 0.01em; }

/* ---- Tags / meta pills: quieter, editorial ---- */
.tag, .meta-tag {
  background: transparent !important;
  border: 1px solid var(--border-2) !important;
  color: var(--text-dim) !important;
  border-radius: 6px !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem !important;
}

/* ---- Body copy ---- */
.summary-text, .episode-summary, .episode-summary p {
  color: var(--text-dim) !important;
  font-size: 1.06rem !important;
  line-height: 1.85 !important;
}
.guest-expertise { color: var(--text-mute) !important; }
.guest-bio { background: var(--surface) !important; border-left: 3px solid var(--gold) !important; color: var(--text-dim) !important; }

/* ---- Lessons / takeaways ---- */
.lessons-list li, .takeaways-list li {
  background: var(--surface) !important;
  border-left: 3px solid var(--gold-line) !important;
  color: var(--text) !important;
}
.lessons-list li::before { color: var(--gold) !important; }
.takeaways-list li::before { background: var(--gold) !important; color: var(--ink) !important; }

/* ---- Quotes: drop the pink/purple gradient for a restrained pull-quote ---- */
.quote-card, blockquote {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-left: 3px solid var(--plum) !important;
  border-radius: 0 10px 10px 0 !important;
}
.quote-card p, blockquote {
  font-family: var(--display) !important;
  font-style: italic !important;
  color: var(--text) !important;
  font-weight: 400;
}
blockquote { box-shadow: none !important; }
.quote-card cite { font-family: var(--body) !important; color: var(--text-mute) !important; }

/* ---- Cards: thin warm borders, calmer hover ---- */
.ep-card, .episode-card, .related-card, .category-card, .book-card, .clip-card, .info-item {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease !important;
}
.ep-card:hover, .episode-card:hover, .related-card:hover, .category-card:hover, .book-card:hover {
  border-color: var(--gold-line) !important;
  background: var(--surface-2) !important;
  transform: translateY(-3px) !important;
  box-shadow: none !important;
}
.episode-card.has-quotes::after { content: none !important; }
.episode-category { background: var(--gold-soft) !important; color: var(--gold) !important; }

/* ---- CTAs / newsletter panels: flat warm panel, no neon gradient ---- */
.newsletter-cta, .newsletter-section, .top-lessons-section {
  background: var(--ink-2) !important;
  border: 1px solid var(--border-2) !important;
  border-radius: 14px !important;
}
.newsletter-cta h3, .newsletter-section h3, .top-lessons-title { color: var(--text) !important; }
.newsletter-cta h3, .newsletter-section h3 { font-size: 1.4rem !important; }
.top-lessons-title { text-transform: none !important; letter-spacing: -0.01em !important; }

/* ---- Buttons: solid refined gold, no scale/glow ---- */
.newsletter-form button, .newsletter-cta button, .watch-btn:not([href*="youtube"]),
.episode-grid-home + div a, button.watch-btn {
  background: var(--gold) !important;
  color: #1a1407 !important;
  font-family: var(--body) !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
  transition: filter 0.2s ease !important;
}
.newsletter-form button:hover, .newsletter-cta button:hover {
  transform: none !important; box-shadow: none !important; filter: brightness(1.08) !important;
}

/* ---- Hero ---- */
.hero-badge {
  background: transparent !important;
  border: 1px solid var(--border-2) !important;
  color: var(--text-dim) !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.74rem !important;
  border-radius: 6px !important;
}
.hero p { color: var(--text-dim) !important; }
.search-box input {
  background: var(--surface) !important;
  border: 1px solid var(--border-2) !important;
  font-family: var(--body) !important;
  border-radius: 10px !important;
}
.search-box input:focus { border-color: var(--gold-line) !important; }

.footer { color: var(--text-mute) !important; border-top: 1px solid var(--border) !important; }

/* ---- Homepage: search chips ---- */
.search-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; align-items: center; max-width: 600px; margin: 0 auto 2rem; }
.search-chips .chip-label { color: var(--text-mute); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin-right: 0.1rem; }
.search-chips .chip {
  background: transparent; border: 1px solid var(--border-2); color: var(--text-dim);
  font-family: var(--body); font-size: 0.85rem; padding: 0.4rem 0.85rem; border-radius: 7px;
  cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease;
}
.search-chips .chip:hover { border-color: var(--gold-line); color: var(--text); }

/* ---- Homepage: category cards use their own accent colour ---- */
.category-card { border-top: 2px solid var(--cat, var(--gold-line)) !important; position: relative; }
.category-icon { display: none !important; }
.category-name { font-family: var(--display) !important; font-size: 1.05rem !important; }
.category-count { color: var(--cat, var(--gold)) !important; font-weight: 600 !important; font-family: var(--body) !important; font-size: 0.82rem !important; }
.category-card.active { border-color: var(--cat, var(--gold)) !important; background: var(--surface-2) !important; box-shadow: none !important; }

/* ---- Break uniform grids: feature the first popular-episode card ---- */
@media (min-width: 760px) {
  .episode-grid-home { grid-template-columns: repeat(3, 1fr) !important; }
  .episode-grid-home > a:first-child {
    grid-column: span 2; grid-row: span 1;
    display: flex !important; flex-direction: column; justify-content: center;
    min-height: 150px; padding: 1.6rem !important;
  }
  .episode-grid-home > a:first-child span:last-child { font-size: 1.15rem !important; line-height: 1.4; color: var(--text) !important; }
}

/* ---- Quotes header / section titles on home ---- */
.quotes-header, .section-header .section-title { font-weight: 500; }

/* ---- Episode-list category tags: match homepage category colours ---- */
.tag[data-cat="mind"]          { color:#8B45FF !important; border-color:rgba(139,69,255,0.40) !important; background:rgba(139,69,255,0.08) !important; }
.tag[data-cat="health"]        { color:#FF69B4 !important; border-color:rgba(255,105,180,0.40) !important; background:rgba(255,105,180,0.08) !important; }
.tag[data-cat="success"]       { color:#FFD700 !important; border-color:rgba(255,215,0,0.40) !important; background:rgba(255,215,0,0.08) !important; }
.tag[data-cat="money"]         { color:#4CAF50 !important; border-color:rgba(76,175,80,0.40) !important; background:rgba(76,175,80,0.08) !important; }
.tag[data-cat="happiness"]     { color:#FF6B6B !important; border-color:rgba(255,107,107,0.40) !important; background:rgba(255,107,107,0.08) !important; }
.tag[data-cat="tech"]          { color:#3498DB !important; border-color:rgba(52,152,219,0.40) !important; background:rgba(52,152,219,0.08) !important; }
.tag[data-cat="relationships"] { color:#E91E63 !important; border-color:rgba(233,30,99,0.40) !important; background:rgba(233,30,99,0.08) !important; }
