/*
 * darkmode.css
 * Soft dark mode for nicolematusow.com
 * Activated automatically when OS dark mode is enabled.
 *
 * Palette:
 *   background:  #18181a  (near-black, slightly warm)
 *   surface:     #232325  (card/section backgrounds)
 *   surface-alt: #2c2c2e  (alt sections, filter bar)
 *   border:      #3a3a3c
 *   text-primary:   #e8e6e3
 *   text-secondary: #9a9895
 *   accent:      #77b3d5  (unchanged)
 */

@media (prefers-color-scheme: dark) {

  /* ── Base ── */
  body,
  #canvas,
  #box_wrapper {
    background-color: #18181a !important;
    color: #e8e6e3;
  }

  /* ── Global text ── */
  h1, h2, h3, h4, h5, h6 { color: #e8e6e3 !important; }
  p { color: #9a9895; }
  a { color: #77b3d5; }
  a:hover { color: #a8cfe0; }

  /* ── Footer — keep white lettering as-is ── */
  .cs p, .cs h1, .cs h2, .cs h3, .cs h4, .cs h5, .cs h6,
  .cs a, .page_copyright p, .page_copyright a { color: inherit !important; }

  /* ── Template light sections (.ls) ── */
  .ls { background-color: #18181a !important; }
  .ls h1, .ls h2, .ls h3, .ls h4, .ls h5 { color: #e8e6e3 !important; }
  .ls p, .ls li { color: #9a9895; }

  /* ── Header (darkgrey) ── */
  /* already dark — leave as is */

  /* ── Back button — article body pages ── */
  .art-back-bar {
    background-color: #232325 !important;
    border-bottom-color: #3a3a3c !important;
  }
  .art-back-bar a[href="index.html"] { color: #e8e6e3 !important; }

  /* ── Title strips ── */
  .art-title-strip,
  .lim-title-strip {
    background-color: #232325 !important;
    border-bottom-color: #3a3a3c !important;
  }
  .art-title-strip h1,
  .lim-title-strip h1 { color: #e8e6e3 !important; }
  .art-title-strip p,
  .art-title-strip h6.art-section-sub,
  .lim-title-strip p,
  .lim-title-strip .lim-phonetic,
  .lim-title-strip .lim-definition { color: #9a9895 !important; }

  /* ── Filter bar ── */
  .art-filter-bar {
    background-color: #232325 !important;
    border-bottom-color: #3a3a3c !important;
  }
  .art-filter-btn {
    color: #9a9895 !important;
    border-color: #3a3a3c !important;
    background: none !important;
  }
  .art-filter-btn:hover {
    border-color: #77b3d5 !important;
    color: #77b3d5 !important;
  }
  .art-filter-btn.active {
    background: #77b3d5 !important;
    border-color: #77b3d5 !important;
    color: #18181a !important;
  }

  /* ── Article grid section ── */
  .art-section-grey { background-color: #18181a !important; }

  /* ── Article cards (image cards already look great dark) ── */
  /* no changes needed — dark overlay on photo works in both modes */

  /* ── Limerence page sections ── */
  .lim-section-white { background-color: #232325 !important; }
  .lim-section-grey  { background-color: #18181a !important; }

  .lim-section-white h2,
  .lim-section-grey  h2 { color: #e8e6e3 !important; }
  .lim-section-white p,
  .lim-section-grey  p  { color: #9a9895 !important; }

  .lim-section-sub { color: #77b3d5 !important; }
  .lim-rule { background: #77b3d5 !important; }

  /* ── In-therapy page sections ── */
  .ith-section-white { background-color: #232325 !important; }
  .ith-section-grey  { background-color: #18181a !important; }
  .ith-section-white h2,
  .ith-section-grey  h2 { color: #e8e6e3 !important; }
  .ith-section-white p,
  .ith-section-grey  p  { color: #9a9895 !important; }

  /* ── Index page — About section has light background, keep text dark ── */
  .page_about h2, .page_about h3, .page_about h4,
  .page_about p, .page_about span { color: #383a3b !important; }

  /* ── Nav tiles (index) ── */
  .nav-tile { background-color: #2c2c2e !important; border-color: #3a3a3c !important; }
  .nav-tile h3 { color: #e8e6e3 !important; }
  .nav-tile p   { color: #9a9895 !important; }
  .nav-tile:hover { background-color: #333335 !important; }

  /* ── Article body pages ── */
  .article-body-section { background-color: #232325 !important; }
  .article-body-section h1,
  .article-body-section h2 { color: #e8e6e3 !important; }
  .article-body-section p,
  .article-body-section li { color: #9a9895 !important; }

  /* ── Related articles section ── */
  .related-section { background-color: #18181a !important; }
  .related-section h2 { color: #e8e6e3 !important; }

  /* ── Wave dividers — match surrounding section ── */
  .wave-divider svg path { fill: #18181a !important; }

  /* ── Contact page ── */
  .contact-section { background-color: #232325 !important; }
  .contact-section h2 { color: #e8e6e3 !important; }
  .contact-section p  { color: #9a9895 !important; }
  .contact-section input,
  .contact-section textarea,
  .contact-section select {
    background-color: #2c2c2e !important;
    border-color: #3a3a3c !important;
    color: #e8e6e3 !important;
  }

  /* ── Footer ── */
  /* already dark — leave as is */

  /* ── Article body content ── */
  .vertical-item.with_shadow,
  .vertical-item.content-padding { background-color: #232325 !important; }

  .entry-content blockquote {
    background: #2c2c2e !important;
    border-left-color: #77b3d5 !important;
  }
  .entry-content blockquote p.highlight { color: #e8e6e3 !important; }
  .entry-content blockquote .item-meta h5 { color: #77b3d5 !important; }
  .art-meta { color: #5a5856 !important; }

  .entry-content p { color: #9a9895 !important; }
  .entry-content p a { color: #77b3d5 !important; }

  /* Author bio */
  .author-bio { border-top-color: #3a3a3c !important; }
  .author-bio-name { color: #e8e6e3 !important; }
  .author-bio-desc { color: #9a9895 !important; }

  /* Post-article share + related */
  .post-share { color: #5a5856 !important; }
  .post-related { border-left-color: #77b3d5 !important; color: #9a9895 !important; }
  .post-related a { color: #e8e6e3 !important; }

  /* Mailchimp in articles */
  .post-subscribe { background: #2c2c2e !important; border-top-color: #3a3a3c !important; }
  .post-subscribe-heading { color: #e8e6e3 !important; }
  #mc_embed_signup { background: transparent !important; }
  #mc_embed_signup .mc-field-group label { color: #9a9895 !important; }
  #mc_embed_signup input.email,
  #mc_embed_signup input.text {
    background: #18181a !important;
    border-color: #3a3a3c !important;
    color: #e8e6e3 !important;
  }

  /* Limerence specialist article list */
  .lim-article-list li { background: none !important; }
  .lim-article-list li a { color: #e8e6e3 !important; }

  /* ── Diversity statement ── */
  .diversity-statement {
    background-color: #2c2c2e !important;
    border-left-color: #77b3d5 !important;
    color: #9a9895 !important;
  }

  /* ── Podcast embed area ── */
  .podcast-section { background-color: #232325 !important; }
  .podcast-section h2 { color: #e8e6e3 !important; }
  .podcast-section p  { color: #9a9895 !important; }

}
