/* Iyke Nnaemeka — author site */

:root {
  --ink: #0e0c0a;          /* near-black, warm */
  --ink-2: #1a1612;        /* raised dark surface */
  --parchment: #f5f0e7;    /* light reading background */
  --paper: #fbf8f2;
  --text-dark: #1d1914;    /* body text on light */
  --muted-dark: #5e554a;   /* secondary text on light */
  --text-light: #efe8dc;   /* body text on dark */
  --muted-light: #b3a895;  /* secondary text on dark */
  --gold: #d4ae5c;         /* accent on dark */
  --gold-deep: #7d5f1c;    /* accent on light (AA contrast) */
  --ember: #c8413a;        /* Third Day red, used sparingly */
  --rule-dark: rgba(212, 174, 92, 0.22);
  --rule-light: rgba(29, 25, 20, 0.14);

  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 5vw, 48px);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text-light);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--gold); color: var(--ink); padding: 8px 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 12, 10, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule-dark);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark {
  font-family: var(--display); font-weight: 600; font-size: 22px;
  letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; color: var(--text-light);
  white-space: nowrap;
}
.nav { display: flex; gap: 28px; }
.nav a {
  font-size: 14px; letter-spacing: 0.06em; text-decoration: none; color: var(--muted-light);
  padding: 8px 0; transition: color .15s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold); }
.menu-btn {
  display: none; background: none; border: 1px solid var(--rule-dark); color: var(--text-light);
  font: 500 14px var(--body); letter-spacing: 0.06em; padding: 8px 14px; border-radius: 999px; cursor: pointer;
}
@media (max-width: 720px) {
  .wordmark { font-size: 19px; letter-spacing: 0.12em; }
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--ink); border-bottom: 1px solid var(--rule-dark);
    padding: 8px var(--gutter) 16px;
  }
  .nav.open { display: flex; }
  .nav a { font-size: 17px; padding: 14px 0; border-bottom: 1px solid var(--rule-dark); color: var(--text-light); }
  .nav a:last-child { border-bottom: 0; }
}

/* ---------- Type ---------- */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 18px;
}
.eyebrow .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); margin-right: 10px; vertical-align: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.02; margin: 0; letter-spacing: -0.005em; }
.title-xl { font-size: clamp(56px, 11vw, 112px); }
.title-lg { font-size: clamp(42px, 7vw, 72px); }
.title-md { font-size: clamp(32px, 5vw, 46px); }
.subtitle { font-family: var(--display); font-size: clamp(22px, 3vw, 28px); font-weight: 500; margin: 6px 0 0; color: var(--muted-light); }
.hook {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(24px, 3.4vw, 32px); line-height: 1.25; margin: 20px 0 0;
}
.lede p { margin: 0 0 1em; }
.lede { margin-top: 26px; max-width: 34em; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  font: 600 15px var(--body); letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #e2c077; }
.btn-ghost { border-color: rgba(239, 232, 220, 0.35); color: var(--text-light); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.light .btn-dark { background: var(--text-dark); color: var(--paper); }
.light .btn-dark:hover { background: #3a3128; }
.light .btn-outline { border-color: rgba(29, 25, 20, 0.35); color: var(--text-dark); }
.light .btn-outline:hover { border-color: var(--gold-deep); color: var(--gold-deep); }
.text-link {
  font-weight: 600; font-size: 15px; color: var(--gold); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.light .text-link { color: var(--gold-deep); }

/* ---------- Sections ---------- */
section { padding: clamp(64px, 10vw, 120px) 0; }
.light { background: var(--parchment); color: var(--text-dark); }
.light .eyebrow { color: var(--gold-deep); }
.light .subtitle, .light .muted { color: var(--muted-dark); }
.muted { color: var(--muted-light); }

.book {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 7vw, 96px); align-items: center;
}
.book.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.book.flip .cover { order: 2; }
.cover { position: relative; }
.cover img {
  width: 100%; max-width: 440px; margin: 0 auto; border-radius: 3px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.65), 0 12px 24px -12px rgba(0,0,0,.5);
}
.dark-glow .cover::before {
  content: ""; position: absolute; inset: 8% 4%; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 214, 140, 0.18), transparent);
  filter: blur(30px);
}
.light .cover img { box-shadow: 0 30px 50px -24px rgba(40, 28, 10, .55), 0 10px 20px -12px rgba(40, 28, 10, .35); }

@media (max-width: 820px) {
  .book, .book.flip { grid-template-columns: 1fr; gap: 40px; }
  .book.flip .cover { order: 0; }
  .cover img { max-width: 250px; }
}

.hero { padding-top: clamp(40px, 7vw, 96px); position: relative; isolation: isolate; }

.formats { font-size: 14px; margin-top: 18px; }

/* ---------- About ---------- */
.about {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(36px, 6vw, 80px); align-items: center;
}
.about img { width: 100%; max-width: 380px; border-radius: 3px; }
.about p { max-width: 34em; }
@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
  .about img { max-width: 260px; }
}

/* ---------- Newsletter ---------- */
.signup { max-width: 640px; margin: 0 auto; text-align: center; }
.signup form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 10px; margin-top: 32px; }
.signup input {
  width: 100%; min-width: 0; min-height: 52px; padding: 12px 18px; border-radius: 999px;
  border: 1px solid rgba(239, 232, 220, 0.25); background: var(--ink-2); color: var(--text-light);
  font: 16px var(--body);
}
.signup input::placeholder { color: #8d8373; }
.signup input:focus { outline: none; border-color: var(--gold); }
.signup .btn { min-height: 52px; }
.form-note { font-size: 13px; margin-top: 16px; }
.form-status { min-height: 1.6em; margin-top: 14px; font-weight: 500; }
.form-status.ok { color: var(--gold); }
.form-status.err { color: #f08a80; }
@media (max-width: 640px) {
  .signup form { grid-template-columns: 1fr; }
}

/* ---------- Contact / footer ---------- */
.contact { border-top: 1px solid var(--rule-dark); }
.contact-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; align-items: end; }
.email-link {
  font-family: var(--display); font-size: clamp(26px, 5vw, 44px); font-weight: 500;
  color: var(--text-light); text-decoration: none; border-bottom: 1px solid var(--rule-dark);
  word-break: break-word;
}
.email-link:hover { color: var(--gold); border-color: var(--gold); }
.social { display: flex; gap: 10px; }
.social a {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--rule-dark); color: var(--muted-light); transition: color .15s, border-color .15s;
}
.social a:hover { color: var(--gold); border-color: var(--gold); }
.social svg { width: 20px; height: 20px; fill: currentColor; }

.site-footer { padding: 28px 0 40px; font-size: 13px; color: #8d8373; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: inherit; }

/* ---------- Book detail page ---------- */
.blurb p { margin: 0 0 1.1em; }
.blurb .beat { font-family: var(--display); font-size: 1.35em; font-style: italic; line-height: 1.35; }
.details { margin: 32px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule-dark); }
.details li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule-dark); font-size: 15px; }
.details li span:first-child { color: var(--muted-light); }
.book-page .cover { align-self: start; position: sticky; top: 96px; }
@media (max-width: 820px) { .book-page .cover { position: static; } }
.back { display: inline-block; margin-bottom: 32px; font-size: 14px; color: var(--muted-light); text-decoration: none; }
.back:hover { color: var(--gold); }

/* ---------- Prose page ---------- */
.prose { max-width: 680px; }
.prose h2 { font-size: 30px; margin: 40px 0 10px; }
.prose p, .prose li { color: var(--text-dark); }
