/*
Theme Name: Omundu Magazine
Theme URI: https://omundumagazine.com
Author: Omundu Magazine
Description: The official Omundu Magazine theme — bold editorial design. Supports light and dark mode.
Version: 1.1
License: GNU General Public License v2 or later
Text Domain: omundu
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=DM+Sans:wght@300;400;500&family=DM+Serif+Display:ital@0;1&display=swap');

/* ═══════════════════════════════════════════
   LIGHT MODE TOKENS (default)
═══════════════════════════════════════════ */
:root {
  --brand:          #8B1A1A;
  --brand-hover:    #6d1313;
  --gold:           #C9963A;

  --bg-page:        #F5F0E8;
  --bg-surface:     #FFFFFF;
  --bg-stripe:      #EDE8DF;
  --bg-dark:        #0E0D0B;
  --bg-mid:         #1C1A16;

  --text-primary:   #1C1A16;
  --text-secondary: #6B6458;

  --border:         #DDD5C4;
  --border-strong:  #1C1A16;

  --header-bg:      #0E0D0B;
  --nav-text:       rgba(255,255,255,0.55);
  --nav-hover:      #ffffff;

  --card-bg:        #FFFFFF;
  --card-border:    #DDD5C4;

  --footer-bg:      #0E0D0B;
  --footer-text:    rgba(255,255,255,0.38);
  --footer-link:    rgba(255,255,255,0.42);
  --footer-col:     rgba(255,255,255,0.35);

  --logo-filter:    brightness(0) invert(1);
  --toggle-track:   rgba(255,255,255,0.15);
}

/* ═══════════════════════════════════════════
   DARK MODE TOKENS
   Triggered by [data-theme="dark"] on <html>
   OR system prefers-color-scheme: dark
═══════════════════════════════════════════ */
[data-theme="dark"] {
  --bg-page:        #0E0D0B;
  --bg-surface:     #161411;
  --bg-stripe:      #1C1A16;

  --text-primary:   #EDE8DF;
  --text-secondary: #8C8278;

  --border:         #2E2B26;
  --border-strong:  #EDE8DF;

  --card-bg:        #161411;
  --card-border:    #2E2B26;

  --logo-filter:    brightness(0) invert(1);
  --toggle-track:   rgba(255,255,255,0.08);
}

/* System dark mode auto-applies when no manual override */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg-page:        #0E0D0B;
    --bg-surface:     #161411;
    --bg-stripe:      #1C1A16;
    --text-primary:   #EDE8DF;
    --text-secondary: #8C8278;
    --border:         #2E2B26;
    --border-strong:  #EDE8DF;
    --card-bg:        #161411;
    --card-border:    #2E2B26;
    --logo-filter:    brightness(0) invert(1);
    --toggle-track:   rgba(255,255,255,0.08);
  }
}

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ═══════════════════════════════════════════
   THEME TOGGLE — pill switch in nav bar
═══════════════════════════════════════════ */
.omundu-theme-toggle-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 0 18px; flex-shrink: 0;
}
.omundu-toggle-icon {
  font-size: 13px; line-height: 1; width: 16px; text-align: center;
  color: rgba(255,255,255,0.5);
}
.omundu-theme-toggle {
  width: 38px; height: 20px;
  background: var(--toggle-track);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  flex-shrink: 0;
  appearance: none;
  outline: none;
}
.omundu-theme-toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  transition: transform 0.3s;
}
[data-theme="dark"] .omundu-theme-toggle::after { transform: translateX(18px); }

/* ═══════════════════════════════════════════
   TOP BAR
═══════════════════════════════════════════ */
.omundu-topbar {
  background: var(--brand);
  color: #fff;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 32px;
}
.omundu-topbar a { color: rgba(255,255,255,0.85); transition: color 0.2s; }
.omundu-topbar a:hover { color: #fff; }
.omundu-topbar-links { display: flex; gap: 24px; }

/* ═══════════════════════════════════════════
   HEADER
═══════════════════════════════════════════ */
.omundu-header {
  background: var(--header-bg);
  border-bottom: 3px solid var(--brand);
}
.omundu-header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 4px 24px 0;
}
.omundu-logo-wrap {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px; margin-bottom: 6px;
  text-decoration: none; width: 100%;
}
.omundu-logo-wrap img {
  display: block; height: 180px; width: auto; max-width: 100%;
  object-fit: contain; filter: var(--logo-filter); flex-shrink: 0;
}
.omundu-tagline {
  display: block; font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: rgba(255,255,255,0.4);
  margin: 0; text-align: center; width: 100%;
}

/* ═══════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════ */
.omundu-nav { width: 100%; border-top: 1px solid rgba(255,255,255,0.07); }
.omundu-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.omundu-nav ul {
  display: flex; justify-content: center; flex-wrap: wrap;
  list-style: none; padding: 0; flex: 1;
}
.omundu-nav ul li a {
  display: block; padding: 13px 18px;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--nav-text); font-weight: 500;
  border-bottom: 2px solid transparent; transition: all 0.2s; white-space: nowrap;
}
.omundu-nav ul li a:hover,
.omundu-nav ul li.current-menu-item > a,
.omundu-nav ul li.current-menu-ancestor > a {
  color: var(--nav-hover); border-bottom-color: var(--brand);
}
.omundu-nav ul ul { display: none; }

/* ═══════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════ */
.omundu-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.omundu-main { padding: 48px 0; }
.omundu-content-area { display: grid; grid-template-columns: 1fr 300px; gap: 48px; }

/* ═══════════════════════════════════════════
   SECTION HEADERS
═══════════════════════════════════════════ */
.omundu-section-header {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 28px; padding-bottom: 12px;
  border-bottom: 2px solid var(--border-strong);
}
.omundu-section-title {
  font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700;
  color: var(--text-primary); white-space: nowrap;
}
.omundu-section-line { flex: 1; height: 1px; background: var(--border); }
.omundu-section-link {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand); font-weight: 500;
  border-bottom: 1px solid var(--brand); padding-bottom: 1px; white-space: nowrap;
}

/* ═══════════════════════════════════════════
   ARTICLE CARDS
═══════════════════════════════════════════ */
.omundu-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.omundu-card { display: block; cursor: pointer; }
.omundu-card:hover .omundu-card-title { color: var(--brand); }
.omundu-card-img { overflow: hidden; margin-bottom: 14px; }
.omundu-card-img img { width: 100%; height: 200px; object-fit: cover; transition: transform 0.5s; }
.omundu-card:hover .omundu-card-img img { transform: scale(1.04); }
.omundu-card-cat { font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brand); font-weight: 500; margin-bottom: 8px; }
.omundu-card-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--text-primary); line-height: 1.25; margin-bottom: 8px; transition: color 0.2s; }
.omundu-card-excerpt { font-size: 13px; color: var(--text-secondary); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.omundu-card-date { font-size: 11px; color: var(--text-secondary); margin-top: 8px; }

/* ═══════════════════════════════════════════
   SINGLE ARTICLE
═══════════════════════════════════════════ */
.omundu-article-header { margin-bottom: 32px; }
.omundu-article-cat { display: inline-block; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: #fff; background: var(--brand); padding: 4px 10px; margin-bottom: 16px; font-weight: 500; }
.omundu-article-title { font-family: 'Playfair Display', serif; font-size: clamp(28px, 4vw, 48px); font-weight: 700; line-height: 1.15; color: var(--text-primary); margin-bottom: 16px; }
.omundu-article-meta { font-size: 12px; color: var(--text-secondary); letter-spacing: 0.06em; text-transform: uppercase; display: flex; gap: 16px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 2px solid var(--border-strong); margin-bottom: 28px; }
.omundu-article-featured-img { width: 100%; margin-bottom: 32px; overflow: hidden; }
.omundu-article-featured-img img { width: 100%; max-height: 520px; object-fit: cover; }
.omundu-article-content { font-size: 17px; line-height: 1.8; color: var(--text-primary); }
.omundu-article-content p { margin-bottom: 1.5em; }
.omundu-article-content h2 { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; color: var(--text-primary); margin: 2em 0 0.75em; }
.omundu-article-content h3 { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--text-primary); margin: 1.75em 0 0.75em; }
.omundu-article-content blockquote { border-left: 3px solid var(--brand); padding: 4px 0 4px 24px; margin: 2em 0; font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--text-primary); line-height: 1.5; }
.omundu-article-content img { width: 100%; margin: 2em 0; }
.omundu-article-content a { color: var(--brand); text-decoration: underline; }

/* ═══════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════ */
.omundu-widget { margin-bottom: 36px; }
.omundu-widget-title { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500; color: var(--text-secondary); padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--border-strong); }
.omundu-sidebar ul { list-style: none; }
.omundu-sidebar ul li { padding: 9px 0; border-bottom: 1px solid var(--border); }
.omundu-sidebar ul li a { font-family: 'DM Serif Display', serif; font-size: 15px; color: var(--text-primary); transition: color 0.2s; }
.omundu-sidebar ul li a:hover { color: var(--brand); }
.omundu-sidebar ul li:last-child { border-bottom: none; }

/* ═══════════════════════════════════════════
   ARCHIVE HEADER
═══════════════════════════════════════════ */
.omundu-archive-header { background: var(--header-bg); padding: 40px 0; margin-bottom: 48px; }
.omundu-archive-eyebrow { font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brand); font-weight: 500; margin-bottom: 8px; }
.omundu-archive-title { font-family: 'Playfair Display', serif; font-size: clamp(28px, 5vw, 52px); font-weight: 700; color: #fff; line-height: 1.1; }
.omundu-archive-desc { font-size: 14px; color: rgba(255,255,255,0.5); max-width: 560px; margin-top: 8px; }

/* ═══════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════ */
.omundu-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.omundu-pagination a, .omundu-pagination span { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; font-size: 13px; color: var(--text-secondary); border: 1px solid var(--border); transition: all 0.2s; }
.omundu-pagination a:hover { background: var(--text-primary); color: var(--bg-page); border-color: var(--text-primary); }
.omundu-pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ═══════════════════════════════════════════
   NEWSLETTER
═══════════════════════════════════════════ */
.omundu-newsletter { background: var(--brand); padding: 56px 0; text-align: center; }
.omundu-newsletter-eyebrow { font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 10px; font-weight: 500; }
.omundu-newsletter-title { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 700; color: #fff; margin-bottom: 10px; }
.omundu-newsletter-sub { font-size: 15px; color: rgba(255,255,255,0.7); margin-bottom: 28px; }
.omundu-newsletter-form { display: flex; max-width: 440px; margin: 0 auto; }
.omundu-newsletter-form input { flex: 1; padding: 14px 18px; font-family: 'DM Sans', sans-serif; font-size: 14px; border: none; outline: none; background: rgba(255,255,255,0.95); color: #1C1A16; }
.omundu-newsletter-form input::placeholder { color: #999; }
.omundu-newsletter-form button { padding: 14px 24px; background: #0E0D0B; color: #fff; border: none; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; transition: background 0.2s; }
.omundu-newsletter-form button:hover { background: #000; }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.omundu-footer { background: var(--footer-bg); padding: 56px 0 24px; }
.omundu-footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.omundu-footer-logo img { height: 96px; width: auto; object-fit: contain; filter: brightness(0) invert(1) opacity(0.85); margin-bottom: 14px; }
.omundu-footer-about { font-size: 13px; color: var(--footer-text); line-height: 1.75; max-width: 240px; margin-top: 10px; }
.omundu-footer-col-title { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--footer-col); font-weight: 500; margin-bottom: 16px; }
.omundu-footer ul { list-style: none; }
.omundu-footer ul li { margin-bottom: 9px; }
.omundu-footer ul li a { font-size: 13px; color: var(--footer-link); transition: color 0.2s; }
.omundu-footer ul li a:hover { color: #F5F0E8; }
.omundu-footer-bottom { border-top: 1px solid rgba(255,255,255,0.07); padding-top: 22px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: rgba(255,255,255,0.2); }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .omundu-topbar { padding: 8px 16px; font-size: 10px; }
  .omundu-header-inner { padding: 4px 16px 0; }
  .omundu-logo-wrap img { height: 120px; }
  .omundu-container { padding: 0 16px; }
  .omundu-content-area { grid-template-columns: 1fr; }
  .omundu-card-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .omundu-footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .omundu-nav ul li a { padding: 12px 12px; font-size: 9px; }
}
@media (max-width: 560px) {
  .omundu-topbar { display: none; }
  .omundu-logo-wrap img { height: 90px; }
  .omundu-card-grid { grid-template-columns: 1fr; }
  .omundu-newsletter-form { flex-direction: column; }
  .omundu-footer-top { grid-template-columns: 1fr; }
  .omundu-nav { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .omundu-nav ul { justify-content: flex-start; min-width: max-content; }
}
