/*
Theme Name: Eniola Ositelu
Theme URI: https://eniolaositelu.com
Author: SamoTrend
Description: Custom theme for Ẹniọlá Ọṣìtẹ̀lú — storyteller site with weekly comics, journal posts, book showcases, dark/light mode, and sliding testimonials.
Version: 1.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: eniola-ositelu
*/

:root {
  --bg: #fdfdfb;
  --text: #141312;
  --text-secondary: #57574f;
  --text-body: #2a2a26;
  --muted: #8c8c84;
  --border-light: #e4e4de;
  --border-lighter: #ececee;
  --border-heavy: #141312;
  --field-border: #cfcfc8;
  --btn-bg: #141312;
  --btn-text: #fff;
  --placeholder-bg1: #eaeae6;
  --placeholder-bg2: #e0e0db;
  --placeholder-border: #deded8;
  --placeholder-text: #9a9a92;
  --card-bg: #ffffff;
  --dot-inactive: #d9d9d2;
  --highlight-flash: #f4efe0;
  --success: #2e7d32;
  --error: #c62828;
}

[data-theme="dark"] {
  --bg: #161613;
  --text: #f3f2ee;
  --text-secondary: #b6b4ac;
  --text-body: #ddd9d0;
  --muted: #918e84;
  --border-light: #2d2d28;
  --border-lighter: #262622;
  --border-heavy: #f3f2ee;
  --field-border: #3a3a34;
  --btn-bg: #f3f2ee;
  --btn-text: #161613;
  --placeholder-bg1: #201f1c;
  --placeholder-bg2: #262521;
  --placeholder-border: #33322d;
  --placeholder-text: #75726a;
  --card-bg: #1d1d19;
  --dot-inactive: #3a3a34;
  --highlight-flash: #2a2820;
  --success: #6fbf73;
  --error: #e57373;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  font-family: 'Avenir Next','Avenir','Mulish',sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--text); color: var(--bg); }
img { max-width: 100%; display: block; }

.eo-wrap { max-width: 1180px; margin: 0 auto; padding: 0 40px; width: 100%; flex: 1; display: flex; flex-direction: column; }
.eo-main { flex: 1; }

.eo-masthead { text-align: center; padding: 36px 0 22px; border-bottom: 1px solid var(--border-heavy); position: relative; transition: padding 0.3s ease; }
.eo-eyebrow { font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.eo-sitename { display: inline-block; font-family: 'EB Garamond', Georgia, serif; font-size: 64px; line-height: 1; margin: 16px 0 10px; letter-spacing: -0.01em; color: var(--text); }
.eo-tagline { font-family: 'EB Garamond', Georgia, serif; font-style: italic; font-size: 20px; color: var(--text-secondary); }

/* Theme toggle - lives in nav bar on all screen sizes */
.eo-theme-toggle { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-light); background: var(--bg); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; transition: border-color 0.2s ease, transform 0.15s ease; flex-shrink: 0; position: relative; }
.eo-theme-toggle:hover { border-color: var(--muted); transform: translateY(-1px); }
.eo-theme-toggle svg { width: 16px; height: 16px; position: absolute; transition: opacity 0.25s ease, transform 0.35s ease; }
.eo-theme-toggle .icon-sun { color: var(--text); opacity: 1; transform: rotate(0deg) scale(1); }
.eo-theme-toggle .icon-moon { color: var(--text); opacity: 0; transform: rotate(-40deg) scale(0.6); }
[data-theme="dark"] .eo-theme-toggle .icon-sun { opacity: 0; transform: rotate(40deg) scale(0.6); }
[data-theme="dark"] .eo-theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }

/* Nav wrap */
.eo-nav-wrap { display: flex; align-items: center; justify-content: center; gap: 20px; border-bottom: 1px solid var(--border-light); padding: 10px 0; }
.eo-nav-wrap .eo-nav { border-bottom: none; padding: 0; flex: 1; justify-content: center; }

.eo-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 34px; padding: 15px 0; border-bottom: 1px solid var(--border-light); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; list-style: none; margin: 0; }
.eo-nav li { display: inline; }
.eo-nav a:hover { color: var(--muted); }

.eo-section { padding: 52px 0; border-bottom: 1px solid var(--border-light); }
.eo-label { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 800; color: var(--muted); margin-bottom: 16px; }
.eo-label-dark { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 800; color: var(--text); }

.eo-philosophy { text-align: center; max-width: 760px; margin: 0 auto; }
.eo-philosophy-text { font-family: 'EB Garamond', Georgia, serif; font-size: 27px; line-height: 1.45; color: var(--text); }

.eo-comic-title { font-family: 'EB Garamond', Georgia, serif; font-size: 40px; line-height: 1.1; margin-bottom: 22px; font-style: italic; color: var(--text); }

.eo-comic-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border-light);
}

.eo-two-col { display: grid; grid-template-columns: 1.55fr 1fr; border-bottom: 1px solid var(--border-heavy); }
.eo-col-left { padding: 40px 48px 44px 0; border-right: 1px solid var(--border-light); }
.eo-col-right { padding: 40px 0 44px 40px; }
.eo-col-heading { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 800; padding-bottom: 16px; border-bottom: 2px solid var(--border-heavy); margin-bottom: 20px; color: var(--text); }

.eo-post-item { display: block; padding: 26px 0; border-bottom: 1px solid var(--border-lighter); }
.eo-post-item:last-child { border-bottom: none; }
.eo-post-cat { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.eo-post-title { font-family: 'EB Garamond', Georgia, serif; font-size: 27px; line-height: 1.2; margin-bottom: 10px; color: var(--text); }
.eo-post-excerpt { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }
.eo-post-excerpt-serif { font-family: 'EB Garamond', Georgia, serif; font-size: 16px; font-style: italic; color: var(--text-secondary); line-height: 1.65; }
.eo-read-more { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 800; margin-top: 14px; display: inline-block; color: var(--text); }

.eo-book-cover { height: 250px; background: transparent; border: none; display: flex; align-items: center; justify-content: center; color: var(--placeholder-text); font-family: ui-monospace, monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; overflow: hidden; padding: 14px; }
.eo-book-cover.eo-placeholder { background: repeating-linear-gradient(45deg,var(--placeholder-bg1),var(--placeholder-bg1) 11px,var(--placeholder-bg2) 11px,var(--placeholder-bg2) 22px); border: 1px solid var(--placeholder-border); }
.eo-book-cover-img { width: 100%; height: 100%; object-fit: contain; }
.eo-book-title { font-family: 'EB Garamond', Georgia, serif; font-size: 26px; margin: 18px 0 6px; color: var(--text); }
.eo-book-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.eo-btn { display: block; margin-top: 16px; background: var(--btn-bg); color: var(--btn-text); text-align: center; padding: 14px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; border: none; cursor: pointer; width: 100%; transition: transform 0.15s ease, opacity 0.15s ease; }
.eo-btn:hover { transform: translateY(-2px); opacity: 0.85; }

.eo-newsletter { text-align: center; max-width: 620px; margin: 0 auto; }
.eo-newsletter-title { font-family: 'EB Garamond', Georgia, serif; font-size: 34px; line-height: 1.2; margin-bottom: 12px; color: var(--text); }
.eo-newsletter-sub { font-size: 15px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 26px; }
.eo-newsletter-form { display: flex; flex-direction: column; align-items: center; max-width: 440px; margin: 0 auto; gap: 12px; }
.eo-newsletter-form-row { display: flex; width: 100%; }
.eo-input { flex: 1; border: 1px solid var(--border-heavy); border-right: none; padding: 14px 16px; font-size: 14px; font-family: inherit; outline: none; background: var(--bg); color: var(--text); min-width: 0; }
.eo-newsletter-btn { background: var(--btn-bg); color: var(--btn-text); border: none; padding: 14px 26px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; cursor: pointer; transition: transform 0.15s ease, opacity 0.15s ease; white-space: nowrap; flex-shrink: 0; }
.eo-newsletter-btn:hover { transform: translateY(-2px); opacity: 0.85; }
.eo-success-msg { font-size: 13px; color: var(--success); margin-top: 12px; }
.eo-error-msg { font-size: 13px; color: var(--error); margin-top: 12px; }

.eo-reviews-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; }
.eo-review-quote { font-family: 'EB Garamond', Georgia, serif; font-style: italic; font-size: 19px; line-height: 1.5; color: var(--text); }
.eo-review-author { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 14px; font-weight: 700; }

.eo-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; border-bottom: 1px solid var(--border-heavy); padding: 52px 0; }
.eo-contact-title { font-family: 'EB Garamond', Georgia, serif; font-size: 32px; line-height: 1.2; margin-bottom: 16px; color: var(--text); }
.eo-contact-body { font-size: 15px; color: var(--text-secondary); line-height: 1.7; }
.eo-contact-body a { border-bottom: 1px solid var(--border-heavy); }
.eo-contact-emails { font-size: 14px; color: var(--text); margin-top: 18px; font-weight: 600; }
.eo-contact-form { display: flex; flex-direction: column; gap: 12px; }
.eo-field { border: 1px solid var(--field-border); padding: 14px 16px; font-size: 14px; font-family: inherit; outline: none; background: var(--bg); color: var(--text); }
.eo-submit-btn { background: var(--btn-bg); color: var(--btn-text); border: none; padding: 14px; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; cursor: pointer; align-self: flex-start; padding-left: 34px; padding-right: 34px; transition: transform 0.15s ease, opacity 0.15s ease; }
.eo-submit-btn:hover { transform: translateY(-2px); opacity: 0.85; }

.eo-footer { padding: 32px 0 48px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); flex-wrap: wrap; gap: 16px; border-top: 1px solid var(--border-light); }
.eo-footer-name { font-family: 'EB Garamond', Georgia, serif; font-size: 19px; color: var(--text); font-style: italic; }
.eo-footer-social { display: flex; gap: 22px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; list-style: none; margin: 0; padding: 0; }
.eo-footer-social a:hover { color: var(--text); }

.eo-page-header { text-align: center; padding: 52px 0; border-bottom: 1px solid var(--border-light); }
.eo-page-title { font-family: 'EB Garamond', Georgia, serif; font-size: 48px; color: var(--text); }

.eo-single-article { padding: 52px 0; max-width: 760px; margin: 0 auto; }
.eo-single-title { font-family: 'EB Garamond', Georgia, serif; font-size: 42px; line-height: 1.15; margin: 14px 0 22px; color: var(--text); }
.eo-single-content { font-size: 16px; line-height: 1.8; color: var(--text-body); }
.eo-single-content p { margin: 0 0 22px; }

.eo-archive-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 48px; padding: 44px 0; }

@media (max-width: 760px) {
  /* Layout */
  .eo-wrap { padding: 0 16px; }
  .eo-masthead { padding: 22px 0 16px !important; }
  .eo-sitename { font-size: 34px !important; }
  .eo-tagline { font-size: 15px !important; }

  /* Nav */
  .eo-nav-wrap { flex-wrap: wrap; justify-content: center; padding: 6px 0; gap: 10px; }
  .eo-nav-wrap .eo-nav { flex-wrap: wrap; justify-content: center; gap: 10px 16px !important; font-size: 10.5px !important; letter-spacing: 0.1em !important; }
  .eo-theme-toggle { width: 28px; height: 28px; }
  .eo-theme-toggle svg { width: 13px; height: 13px; }

  /* Sections - reduce padding on mobile */
  .eo-section { padding: 32px 0 !important; }
  .eo-philosophy-text { font-size: 19px !important; line-height: 1.4 !important; }
  .eo-comic-title { font-size: 26px !important; }

  /* Two-col and all grids */
  .eo-two-col { grid-template-columns: 1fr !important; }
  .eo-col-left { border-right: none !important; padding: 0 0 28px 0 !important; border-bottom: 1px solid var(--border-light); }
  .eo-col-right { padding: 28px 0 0 0 !important; }
  .eo-reviews-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .eo-contact-grid { grid-template-columns: 1fr !important; gap: 28px !important; padding: 32px 0 !important; }
  .eo-archive-grid { grid-template-columns: 1fr !important; gap: 28px !important; }

  /* Book cover */
  .eo-book-cover { height: 220px !important; }
  .eo-book-cover-img { object-fit: contain !important; }

  /* Newsletter form */
  .eo-newsletter { max-width: 100%; }
  .eo-newsletter-title { font-size: 26px !important; }
  .eo-newsletter-form { max-width: 100%; }
  .eo-newsletter-form-row { flex-direction: column; }
  .eo-input { border: 1px solid var(--border-heavy); border-bottom: none; border-radius: 0; }
  .eo-newsletter-btn { width: 100%; padding: 14px; border: 1px solid var(--btn-bg); }

  /* Contact form */
  .eo-contact-title { font-size: 26px !important; }
  .eo-field { font-size: 16px; } /* 16px prevents iOS zoom on focus */

  /* Submit button - full width on mobile */
  .eo-submit-btn { align-self: stretch; width: 100%; padding: 14px !important; }

  /* Buy now button */
  .eo-btn { font-size: 11px; padding: 13px; }

  /* Articles */
  .eo-single-article { padding: 24px 0; }
  .eo-single-title { font-size: 26px !important; line-height: 1.2 !important; }
  .eo-single-article[style*="grid"] { display: block !important; }
  .eo-page-title { font-size: 28px !important; }
  .eo-page-header { padding: 32px 0 !important; }

  /* Footer */
  .eo-footer { flex-direction: column; align-items: center; text-align: center; padding: 24px 0 36px; gap: 10px; }
  .eo-footer-social { justify-content: center; }

  /* Testimonial slider arrows */
  .eo-testimonial-controls { gap: 14px; }
}

html { scroll-behavior: smooth; }

.eo-masthead.eo-shrink { padding: 18px 0 14px; }
.eo-masthead.eo-shrink .eo-sitename { font-size: 40px; margin: 8px 0 4px; }
.eo-masthead.eo-shrink .eo-tagline { display: none; }
.eo-masthead.eo-shrink .eo-eyebrow { display: none; }

.eo-fade-init { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.eo-fade-init.eo-visible { opacity: 1; transform: translateY(0); }

#newsletter.eo-flash, #contact.eo-flash { animation: eo-highlight 0.9s ease; }
@keyframes eo-highlight { 0% { background: var(--highlight-flash); } 100% { background: transparent; } }

.eo-post-item { transition: opacity 0.2s ease; }
.eo-post-item:hover .eo-post-title { text-decoration: underline; text-underline-offset: 4px; }

.eo-subscribe-link { display: inline-block; margin-top: 10px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 800; border-bottom: 1px solid var(--border-heavy); color: var(--text); }
.eo-subscribe-link:hover { color: var(--muted); border-color: var(--muted); }

.eo-testimonial-wrap { position: relative; max-width: 100%; margin: 0 auto; overflow: hidden; }
.eo-testimonial-track { display: flex; transition: transform 0.5s ease; }
.eo-testimonial-slide { min-width: 100%; }
.eo-testimonial-controls { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 26px; }
.eo-testimonial-prev, .eo-testimonial-next { background: none; border: 1px solid var(--field-border); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 14px; color: var(--text); transition: background 0.15s ease; }
.eo-testimonial-prev:hover, .eo-testimonial-next:hover { background: var(--btn-bg); color: var(--btn-text); }
.eo-testimonial-dots { display: flex; gap: 8px; }
.eo-dot { width: 7px; height: 7px; border-radius: 50%; border: none; background: var(--dot-inactive); cursor: pointer; padding: 0; }
.eo-dot.active { background: var(--text); }

.eo-demo-success { animation: eo-fadein 0.3s ease; }
@keyframes eo-fadein { from { opacity: 0; } to { opacity: 1; } }

.eo-ticker { position: relative; height: 16px; overflow: hidden; }
.eo-ticker-item { position: absolute; left: 0; right: 0; opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; }
.eo-ticker-item.active { opacity: 1; transform: translateY(0); }
.eo-masthead.eo-shrink .eo-ticker { display: none; }
