/* khalidrashidwrites.com: Miraan series look (Nov 2026)
   Palette and type follow the Covenant cover: ink, regime blue, red, cream. */
:root {
  --ink: #07090d;
  --ink-2: #0d1118;
  --panel: #111723;
  --blue: #10305e;
  --blue-deep: #0a1f3d;
  --red: #d62020;
  --red-dark: #a8161a;
  --cream: #f0e8d6;
  --muted: #a9a294;
  --line: rgba(240, 232, 214, 0.14);
  --head: 'Barlow Condensed', 'Bahnschrift', 'Arial Narrow', Arial, sans-serif;
  --body: 'EB Garamond', Garamond, Georgia, serif;
  --max: 1160px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-size: 1.2rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--cream); }
a:hover { color: #fff; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- type helpers ---------- */
.kicker {
  font-family: var(--head); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.32em; font-size: 0.95rem; color: var(--red); margin: 0 0 14px;
}
.section-title {
  font-family: var(--head); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; font-size: clamp(2.1rem, 4.5vw, 3rem); line-height: 1.05; margin: 0 0 22px;
}
.section-title .red { color: var(--red); }
.rule {
  display: flex; align-items: center; gap: 12px; width: 260px; max-width: 70%; margin: 26px 0;
}
.rule::before, .rule::after { content: ''; flex: 1; height: 2px; background: var(--red); }
.rule span { width: 11px; height: 11px; background: var(--red); transform: rotate(45deg); flex: none; }
.rule.center { margin-left: auto; margin-right: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font-family: var(--head); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 1.02rem; text-decoration: none; padding: 15px 30px;
  border: 2px solid var(--red); transition: background .2s, color .2s, border-color .2s; cursor: pointer;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--cream); border-color: rgba(240,232,214,.5); }
.btn-ghost:hover { border-color: var(--cream); color: #fff; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 9, 13, 0.92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.wordmark { text-decoration: none; line-height: 1; }
.wordmark .wm-main {
  display: block; font-family: var(--head); font-weight: 700; font-size: 1.45rem;
  letter-spacing: 0.16em; color: var(--cream);
}
.wordmark .wm-main b { color: var(--red); font-weight: 700; }
.wordmark .wm-sub {
  display: block; font-family: var(--head); font-weight: 600; font-size: 0.7rem;
  letter-spacing: 0.42em; color: var(--muted); margin-top: 3px;
}
.nav { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav a {
  font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 0.92rem; text-decoration: none; color: var(--muted);
}
.nav a:hover { color: var(--cream); }
.menu-btn {
  display: none; background: none; border: 1px solid var(--line); color: var(--cream);
  font-size: 1.3rem; line-height: 1; padding: 8px 11px; cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink) url('miraan-hero.jpg') center 30% / cover no-repeat;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,9,13,.94) 0%, rgba(7,9,13,.78) 45%, rgba(7,9,13,.35) 100%),
              linear-gradient(0deg, var(--ink) 0%, rgba(7,9,13,0) 30%);
}
.hero .wrap {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 88px;
}
.hero h1 { margin: 0; font-family: var(--head); font-weight: 700; text-transform: uppercase; line-height: 0.9; }
.hero h1 .t1 { display: block; font-size: clamp(4.2rem, 11vw, 8.2rem); letter-spacing: 0.02em; color: var(--cream); }
.hero h1 .t2 { display: block; font-size: clamp(2.3rem, 5.6vw, 4.1rem); letter-spacing: 0.04em; color: var(--red); margin-top: 6px; }
.hero .tagline { font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-style: italic; color: var(--cream); max-width: 34ch; margin: 0 0 30px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero .note { font-family: var(--head); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.9rem; color: var(--muted); margin: 22px 0 0; }
.hero .note a { color: var(--cream); }
.cover-frame { justify-self: center; max-width: 380px; width: 100%; }
.cover-frame img { width: 100%; height: auto; box-shadow: 0 30px 60px rgba(0,0,0,.65), 0 0 0 1px rgba(240,232,214,.08); }

/* ---------- the book ---------- */
.book { padding: 96px 0; background: var(--ink); }
.book .wrap { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 64px; align-items: start; }
.book .blurb p { margin: 0 0 1.05em; max-width: 60ch; }
.book .blurb .lead { font-family: var(--head); font-weight: 600; letter-spacing: 0.24em; color: var(--red); text-transform: uppercase; font-size: 1.05rem; }
.book .blurb .tight { margin-bottom: 0.15em; }
.billboard {
  background: var(--blue); border: 1px solid rgba(255,255,255,.12); padding: 34px 30px; position: sticky; top: 100px;
  box-shadow: 0 0 60px rgba(16,48,94,.45);
}
.billboard svg { width: 44px; height: auto; margin: 0 auto 18px; display: block; }
.billboard p {
  margin: 0; font-family: var(--head); font-weight: 700; color: #fff; text-transform: uppercase;
  letter-spacing: 0.2em; font-size: 1.5rem; line-height: 1.5; text-align: center;
}

/* ---------- free chapters ---------- */
.magnet { padding: 92px 0; background: linear-gradient(180deg, var(--ink-2), var(--blue-deep)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.magnet .sub { max-width: 52ch; margin: 0 auto 30px; color: var(--cream); }
.magnet .small { font-size: 0.95rem; color: var(--muted); margin-top: 18px; }

/* MailerLite embedded form, re-themed (high specificity beats its injected styles) */
.krw-ml { max-width: 460px; margin: 0 auto; }
#mlSignup .ml-form-embedContainer .ml-form-embedWrapper.embedForm,
#mlSignup .ml-form-embedContainer .ml-form-embedWrapper.embedDefault { background-color: transparent !important; width: 100% !important; max-width: 100% !important; }
#mlSignup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedContent { display: none !important; }
#mlSignup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody { padding: 0 !important; }
#mlSignup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow .ml-field-group input.form-control {
  background-color: rgba(0,0,0,.35) !important; color: #fff !important; border: 1.5px solid rgba(240,232,214,.35) !important;
  border-radius: 0 !important; padding: 15px 18px !important; font-size: 1.05rem !important; font-family: var(--body) !important;
}
#mlSignup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow .ml-field-group input.form-control::placeholder { color: var(--muted) !important; }
#mlSignup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button.primary {
  background-color: var(--red) !important; color: #fff !important; border: none !important; border-radius: 0 !important;
  font-family: var(--head) !important; font-weight: 700 !important; text-transform: uppercase !important;
  letter-spacing: 0.16em !important; font-size: 1.05rem !important; padding: 15px !important;
}
#mlSignup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button.primary:hover { background-color: var(--red-dark) !important; }
#mlSignup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-successBody.row-success .ml-form-successContent h4,
#mlSignup .ml-form-embedContainer .ml-form-embedWrapper .ml-form-successBody.row-success .ml-form-successContent p { color: var(--cream) !important; text-align: center !important; font-family: var(--body) !important; }

/* ---------- trilogy ---------- */
.trilogy { padding: 96px 0; background: var(--ink); text-align: center; }
.books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; margin-top: 46px; }
.bk { text-align: center; }
.bk .art { aspect-ratio: 2 / 3; background: var(--panel); box-shadow: 0 18px 40px rgba(0,0,0,.55); overflow: hidden; }
.bk .art img { width: 100%; height: 100%; object-fit: cover; }
.bk .placeholder {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px;
  border: 1px solid var(--line); font-family: var(--head); text-transform: uppercase;
}
.bk .placeholder.b2 { background: radial-gradient(ellipse at 50% 35%, #173b6a 0%, #0a1a31 55%, #05080d 100%); }
.bk .placeholder.b3 { background: radial-gradient(ellipse at 50% 30%, #6b3a12 0%, #2a1408 50%, #07090d 100%); }
.bk .placeholder .p-series { color: var(--red); letter-spacing: 0.3em; font-size: 0.8rem; font-weight: 600; }
.bk .placeholder .p-m { color: var(--cream); font-weight: 700; font-size: 3rem; letter-spacing: 0.03em; line-height: 1; }
.bk .placeholder .p-t { color: var(--red); font-weight: 700; font-size: 1.7rem; letter-spacing: 0.05em; line-height: 1; }
.bk .placeholder .p-soon { margin-top: 22px; color: var(--muted); letter-spacing: 0.3em; font-size: 0.85rem; border-top: 1px solid var(--line); padding-top: 10px; }
.bk h3 { font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 1.35rem; margin: 22px 0 4px; }
.bk .num { font-family: var(--head); text-transform: uppercase; letter-spacing: 0.26em; color: var(--red); font-size: 0.85rem; font-weight: 600; }
.bk p { margin: 6px auto 0; color: var(--muted); font-size: 1.05rem; max-width: 30ch; }

/* ---------- author ---------- */
.author { padding: 96px 0; background: var(--ink-2); border-top: 1px solid var(--line); }
.author .wrap { max-width: 820px; text-align: center; }
.author .name { font-family: var(--head); font-weight: 700; letter-spacing: 0.3em; font-size: 1.6rem; margin: 0; }
.author .name b { color: var(--red); }
.author p { margin: 0 auto 1em; max-width: 62ch; }

/* ---------- faq ---------- */
.faq { padding: 80px 0 90px; background: var(--ink); }
.faq .wrap { max-width: 820px; }
.faq details { border-top: 1px solid var(--line); padding: 20px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; font-family: var(--head); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 1.15rem; display: flex; justify-content: space-between; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--red); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '\2013'; }
.faq details p { margin: 14px 0 0; color: var(--cream); }

/* ---------- contact ---------- */
.contact { padding: 90px 0; background: var(--ink-2); border-top: 1px solid var(--line); }
.contact .wrap { max-width: 720px; text-align: center; }
.contact p.intro { color: var(--muted); margin: 0 0 28px; }
.contact-form { display: grid; gap: 14px; text-align: left; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form input, .contact-form textarea {
  width: 100%; background: rgba(0,0,0,.35); color: #fff; border: 1.5px solid rgba(240,232,214,.25);
  padding: 15px 16px; font-family: var(--body); font-size: 1.08rem; border-radius: 0;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--red); }
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form .btn { justify-self: center; margin-top: 6px; }
.form-message { margin-top: 18px; padding: 12px 16px; font-size: 1.05rem; }
.form-message.success { border: 1px solid rgba(240,232,214,.4); }
.form-message.error { border: 1px solid var(--red); }

/* ---------- footer ---------- */
.site-footer { padding: 54px 0 40px; background: var(--ink); border-top: 1px solid var(--line); text-align: center; }
.site-footer .socials { display: flex; justify-content: center; gap: 18px; margin: 22px 0; }
.site-footer .socials a {
  width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); transition: border-color .2s;
}
.site-footer .socials a:hover { border-color: var(--red); }
.site-footer .socials svg { width: 20px; height: 20px; fill: var(--cream); }
.site-footer .small { color: var(--muted); font-size: 0.95rem; margin: 6px 0; }

/* ---------- reading page ---------- */
.read-head { padding: 70px 0 30px; text-align: center; background: linear-gradient(180deg, var(--blue-deep), var(--ink)); border-bottom: 1px solid var(--line); }
.read-head h1 { margin: 0; font-family: var(--head); font-weight: 700; text-transform: uppercase; line-height: 0.95; }
.read-head h1 .t1 { display: block; font-size: clamp(3rem, 8vw, 5rem); }
.read-head h1 .t2 { display: block; color: var(--red); font-size: clamp(1.8rem, 4.5vw, 2.7rem); margin-top: 4px; }
.read-head .by { font-family: var(--head); letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); margin-top: 18px; }
.chapter { max-width: 680px; margin: 0 auto; padding: 64px 24px 30px; font-size: 1.24rem; line-height: 1.75; }
.chapter .ch-num {
  font-family: var(--head); font-weight: 700; font-size: 3.4rem; color: var(--red); text-align: center; margin: 0 0 6px; line-height: 1;
  text-indent: 0;
}
.chapter .rule { margin: 0 auto 44px; width: 160px; }
.chapter p { margin: 0; text-indent: 1.6em; }
.chapter p.first, .chapter p.after-break { text-indent: 0; }
.chapter p.after-break { margin-top: 1.6em; }
.read-end { max-width: 680px; margin: 30px auto 90px; padding: 46px 28px; text-align: center; background: var(--panel); border: 1px solid var(--line); }
.read-end p { margin: 0 auto 1em; max-width: 46ch; }
.read-end .actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 24px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 64px; text-align: left; }
  .cover-frame { max-width: 300px; justify-self: start; }
  .book .wrap { grid-template-columns: 1fr; gap: 40px; }
  .billboard { position: static; }
  .books { grid-template-columns: 1fr; max-width: 340px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 760px) {
  body { font-size: 1.12rem; }
  .wrap { padding: 0 16px; }
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--line);
  }
  .site-header.open .nav { display: flex; }
  .nav a { display: block; padding: 16px; border-top: 1px solid var(--line); }
  .contact-row { grid-template-columns: 1fr; }
  .book, .trilogy, .author, .magnet, .contact { padding: 70px 0; }
  .chapter { font-size: 1.14rem; padding: 48px 16px 24px; }
}
