/*
Theme Name:  Mel Todd Author
Theme URI:   https://meltodd.com
Description: Custom author theme for Mel Todd — Bad Ash Publishing
Author:      Bad Ash Publishing
Author URI:  https://badashpublishing.com
Version:     1.0.0
Tags:        custom, author, dark, fantasy
Text Domain: meltodd
*/

/* ============================================================
   BRAND TOKENS
   ============================================================ */
:root {
  --purple-deep:   #2D1B4E;
  --purple-mid:    #6B3FA0;
  --purple-light:  #A98FD0;
  --teal:          #2AAFA0;
  --teal-dark:     #1A5C56;
  --burgundy:      #7B1C2C;
  --crimson:       #8B1010;
  --near-black:    #0F0A1A;
  --off-white:     #F5F2FA;
  --white:         #FFFFFF;
  --font-head:     'Cinzel', Georgia, serif;
  --font-body:     'Lato', 'Open Sans', sans-serif;
  --radius:        4px;
  --shadow:        0 4px 24px rgba(45,27,78,0.35);
  --transition:    all 0.3s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--near-black);
  color: var(--off-white);
  line-height: 1.7;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--purple-light); }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-head);
  color: var(--white);
  line-height: 1.2;
  letter-spacing: 0.03em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.7rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}
.section--dark   { background: var(--near-black); }
.section--purple { background: var(--purple-deep); }

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--purple-mid));
  margin: 0.75rem auto 2.5rem;
  border-radius: 2px;
}

.series-title {
  color: var(--teal);
  border-bottom: 2px solid var(--teal);
  padding-bottom: 0.4rem;
  margin: 2rem 0 0.75rem;
  font-size: 1.3rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn--teal    { background: var(--teal); color: var(--near-black); border-color: var(--teal); }
.btn--teal:hover { background: transparent; color: var(--teal); }
.btn--outline { background: transparent; color: var(--purple-light); border-color: var(--purple-light); }
.btn--outline:hover { background: var(--purple-mid); color: var(--white); border-color: var(--purple-mid); }
.btn--ebook   { background: var(--teal); color: var(--near-black); border-color: var(--teal); }
.btn--audio   { background: var(--purple-mid); color: var(--white); border-color: var(--purple-mid); }
.btn--print   { background: var(--burgundy); color: var(--white); border-color: var(--burgundy); }
.btn--ebook:hover { background: transparent; color: var(--teal); }
.btn--audio:hover { background: transparent; color: var(--purple-light); border-color: var(--purple-light); }
.btn--print:hover { background: transparent; color: var(--burgundy); }

.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.btn-group--center { justify-content: center; }

/* ============================================================
   HEADER & NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--near-black) 0%, var(--purple-deep) 100%);
  border-bottom: 2px solid var(--teal);
  box-shadow: 0 2px 20px rgba(42,175,160,0.15);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}
.site-logo img { height: 52px; width: auto; }
.site-logo span {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--white);
  letter-spacing: 0.05em;
}

.site-nav { display: flex; align-items: center; gap: 0; list-style: none; padding: 0; margin: 0; }
.site-nav > li { position: relative; }
.site-nav > li > a {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--off-white);
  padding: 0.6rem 1rem;
  display: block;
  transition: var(--transition);
}
.site-nav > li > a:hover,
.site-nav > li.current > a { color: var(--teal); }

/* Dropdown */
.site-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--purple-deep);
  border-top: 2px solid var(--teal);
  border-radius: 0 0 var(--radius) var(--radius);
  min-width: 220px;
  box-shadow: var(--shadow);
  list-style: none;
  padding: 0.5rem 0;
  z-index: 200;
}
.site-nav li:hover > .dropdown { display: block; }
.site-nav .dropdown li a {
  display: block;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  color: var(--off-white);
  border-bottom: 1px solid rgba(169,143,208,0.1);
  transition: var(--transition);
}
.site-nav .dropdown li a:hover { background: rgba(42,175,160,0.12); color: var(--teal); }
.site-nav .dropdown .dropdown {
  top: 0;
  left: 100%;
  border-top: 2px solid var(--teal);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--teal);
  color: var(--teal);
  font-size: 1.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--purple-deep); border-top: 2px solid var(--teal); padding: 1rem 0; }
  .site-nav.open { display: flex; }
  .site-nav > li > a { padding: 0.8rem 1.5rem; }
  .site-nav .dropdown { position: static; border: none; box-shadow: none;
    background: rgba(0,0,0,0.2); display: none; }
  .site-nav li.open > .dropdown { display: block; }
  .site-nav .dropdown .dropdown { left: 0; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--near-black);
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/images/colored-smoke.png');
  background-size: cover;
  background-position: center top;
  opacity: 0.32;
  z-index: 0;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(15,10,26,0.35) 0%,
    rgba(45,27,78,0.45) 50%,
    rgba(15,10,26,0.88) 100%);
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 4rem 2rem;
  max-width: 860px;
}
.hero__eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}
.hero__name {
  font-family: var(--font-head);
  font-size: clamp(3.5rem, 9vw, 7rem);
  color: var(--white);
  line-height: 1;
  text-shadow: 0 2px 40px rgba(45,27,78,0.9);
  margin-bottom: 0.5rem;
}
.hero__tagline {
  font-family: var(--font-head);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--purple-light);
  font-style: italic;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* ============================================================
   SMOKE SECTION ACCENT
   ============================================================ */
.smoke-accent {
  position: relative;
  overflow: hidden;
}
.smoke-accent::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/images/colored-smoke.png');
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  pointer-events: none;
}
.smoke-accent > * { position: relative; z-index: 1; }

/* ============================================================
   PAGE HERO BANNER
   ============================================================ */
.page-banner {
  background: var(--purple-deep);
  padding: 60px 0 50px;
  text-align: center;
  border-bottom: 2px solid rgba(42,175,160,0.3);
}
.page-banner h1 { margin-bottom: 0.4rem; }
.page-banner .sub { color: var(--teal); letter-spacing: 0.15em; text-transform: uppercase; font-size: 0.85rem; }

/* ============================================================
   BOOK GRID & CARDS
   ============================================================ */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.5rem;
  margin: 1rem 0 2rem;
}
.book-card {
  display: flex;
  flex-direction: column;
  background: rgba(45,27,78,0.45);
  border: 1px solid rgba(169,143,208,0.2);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: var(--transition);
}
.book-card:hover {
  transform: translateY(-5px);
  border-color: var(--teal);
  box-shadow: 0 10px 30px rgba(42,175,160,0.18);
}
.book-card__cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--purple-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--purple-light);
  text-align: center;
  padding: 0.5rem;
}
.book-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card__info { padding: 0.7rem 0.85rem 0.9rem; }
.book-card__title { font-family: var(--font-head); font-size: 0.8rem; color: var(--white); line-height: 1.3; margin-bottom: 0.2rem; }
.book-card__series { font-size: 0.7rem; color: var(--teal); text-transform: uppercase; letter-spacing: 0.05em; }

/* ============================================================
   SINGLE BOOK PAGE
   ============================================================ */
.book-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
  padding: 3rem 0 2rem;
}
.book-hero__cover img {
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(45,27,78,0.65);
  width: 100%;
}
.book-hero__series-tag {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.book-hero__series-list {
  list-style: none;
  padding: 0 0 0 1rem;
  margin: 1rem 0 1.5rem;
  border-left: 3px solid var(--purple-mid);
}
.book-hero__series-list li { font-size: 0.88rem; color: var(--off-white); padding: 3px 0; }
.book-hero__series-list li.current { color: var(--teal); font-weight: 700; }
.book-hero__series-list li a { color: var(--off-white); }
.book-hero__series-list li a:hover { color: var(--teal); }

.book-blurb {
  border-left: 3px solid var(--teal);
  padding-left: 1.1rem;
  margin-bottom: 2rem;
  font-size: 1.03rem;
  line-height: 1.85;
}
.book-excerpt {
  background: rgba(45,27,78,0.35);
  border: 1px solid rgba(169,143,208,0.2);
  border-radius: var(--radius);
  padding: 2rem;
  font-style: italic;
  line-height: 1.9;
  position: relative;
  margin-top: 2rem;
}
.book-excerpt::before {
  content: '\201C';
  font-family: var(--font-head);
  font-size: 5rem;
  color: var(--purple-mid);
  opacity: 0.35;
  position: absolute;
  top: -0.8rem;
  left: 0.8rem;
  line-height: 1;
}
.signed-link { font-size: 0.85rem; margin-top: 0.6rem; }
.signed-link a { color: var(--teal); }

/* ============================================================
   EVENTS
   ============================================================ */
.event-list { list-style: none; padding: 0; }
.event-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(169,143,208,0.15);
}
.event-item:last-child { border-bottom: none; }
.event-date {
  font-family: var(--font-head);
  text-align: center;
  background: var(--purple-deep);
  border: 1px solid var(--purple-mid);
  border-radius: var(--radius);
  padding: 0.65rem 0.4rem;
}
.event-date__month { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }
.event-date__day   { font-size: 1.9rem; color: var(--white); line-height: 1; }
.event-name     { font-family: var(--font-head); font-size: 1rem; color: var(--white); }
.event-location { font-size: 0.88rem; color: var(--purple-light); margin-top: 0.2rem; }
.event-link     { font-size: 0.82rem; margin-top: 0.3rem; }

/* ============================================================
   BIO PAGE
   ============================================================ */
.bio-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3rem;
  align-items: start;
}
.bio-photo { border-radius: var(--radius); box-shadow: var(--shadow); position: sticky; top: 100px; }
.bio-text h2 { margin-bottom: 1rem; }
.bio-text p  { color: var(--off-white); line-height: 1.85; }

/* ============================================================
   FAQ
   ============================================================ */
.faq { border-top: 1px solid rgba(169,143,208,0.2); max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid rgba(169,143,208,0.2); }
.faq summary {
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--white);
  padding: 1.1rem 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; color: var(--teal); transition: var(--transition); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 0 1.1rem; color: var(--off-white); line-height: 1.8; }

/* ============================================================
   SOCIAL LINKS
   ============================================================ */
.social-links { display: flex; flex-wrap: wrap; gap: 0.65rem; margin: 1.25rem 0; }
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 9px 16px;
  border: 1px solid rgba(169,143,208,0.3);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--off-white);
  transition: var(--transition);
}
.social-link:hover { border-color: var(--teal); color: var(--teal); background: rgba(42,175,160,0.08); }

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter-hero { text-align: center; padding: 4rem 2rem; }
.newsletter-hero h1 { margin-bottom: 1rem; }
.newsletter-hero p  { color: var(--purple-light); max-width: 580px; margin: 0 auto 2rem; line-height: 1.8; }

.campaign-list { list-style: none; padding: 0; max-width: 700px; margin: 0 auto; }
.campaign-item {
  background: rgba(45,27,78,0.4);
  border: 1px solid rgba(169,143,208,0.2);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin-bottom: 0.9rem;
}
.campaign-item__date { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }
.campaign-item__title { font-family: var(--font-head); font-size: 0.95rem; color: var(--white); margin: 0.2rem 0 0.4rem; }
.campaign-item__link { font-size: 0.88rem; color: var(--purple-light); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-form-note { color: var(--purple-light); font-style: italic; }
.contact-form-note code { color: var(--teal); font-style: normal; }

/* WPForms / CF7 overrides */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea,
.wpforms-field input,
.wpforms-field textarea {
  background: rgba(45,27,78,0.4) !important;
  border: 1px solid rgba(169,143,208,0.3) !important;
  color: var(--off-white) !important;
  border-radius: var(--radius) !important;
  padding: 11px 15px !important;
  width: 100% !important;
  font-family: var(--font-body) !important;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus { border-color: var(--teal) !important; outline: none !important; }
.wpcf7-form input[type="submit"],
.wpforms-submit {
  background: var(--teal) !important;
  color: var(--near-black) !important;
  border: none !important;
  font-family: var(--font-head) !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  padding: 13px 34px !important;
  border-radius: var(--radius) !important;
  cursor: pointer !important;
}

/* ============================================================
   BLOG
   ============================================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}
.post-card {
  background: rgba(45,27,78,0.3);
  border: 1px solid rgba(169,143,208,0.15);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.post-card:hover { border-color: var(--teal); transform: translateY(-3px); }
.post-card__thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--purple-deep); }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 1.25rem; }
.post-card__meta { font-size: 0.78rem; color: var(--teal); margin-bottom: 0.5rem; letter-spacing: 0.05em; }
.post-card__title { font-family: var(--font-head); font-size: 1.05rem; margin-bottom: 0.6rem; }
.post-card__title a { color: var(--white); }
.post-card__title a:hover { color: var(--teal); }
.post-card__excerpt { font-size: 0.9rem; color: var(--off-white); line-height: 1.7; }

/* Single post */
.post-content { max-width: 760px; margin: 0 auto; }
.post-content p, .post-content li { color: var(--off-white); line-height: 1.85; }
.post-content h2, .post-content h3 { margin: 2rem 0 0.75rem; }
.post-content a { color: var(--teal); }

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), var(--purple-mid), transparent);
  border: none;
  margin: 3rem auto;
  max-width: 500px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: linear-gradient(135deg, var(--near-black) 0%, var(--purple-deep) 100%);
  border-top: 2px solid var(--teal);
  padding: 50px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(169,143,208,0.15);
}
.footer-brand img { height: 50px; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.88rem; color: var(--purple-light); line-height: 1.7; max-width: 300px; }
.footer-col h4 { font-family: var(--font-head); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--white); margin-bottom: 1rem; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.45rem; }
.footer-col ul li a { font-size: 0.88rem; color: var(--purple-light); }
.footer-col ul li a:hover { color: var(--teal); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-size: 0.82rem;
  color: rgba(169,143,208,0.6);
}
.footer-bottom a { color: rgba(169,143,208,0.6); }
.footer-bottom a:hover { color: var(--teal); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .book-hero, .bio-layout, .contact-grid { grid-template-columns: 1fr; }
  .book-hero__cover { max-width: 260px; margin: 0 auto; }
  .bio-photo { position: static; max-width: 280px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .section { padding: 50px 0; }
  .hero { min-height: 70vh; }
  .btn-group { flex-direction: column; align-items: flex-start; }
  .btn-group--center { align-items: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .book-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 1rem; }
  .event-item { grid-template-columns: 75px 1fr; gap: 1rem; }
}
