/*
  Joe Boadi Danquah – Books
  Fonts: system stacks for now; to be replaced with locally hosted WOFF2 files in /fonts.
*/

:root {
  --bg: #f8f6f1;
  --surface: #f0ebe1;
  --ink: #1a2238;
  --muted: #5a6275;
  --line: #ddd6c8;
  --accent: #85631a;
  --deep: #0f1a33;
  --deep-ink: #f3efe6;
  --gold: #c9a24a;

  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 68rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }

p { margin: 0 0 1em; }

a { color: var(--accent); }

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

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.4em;
  border: 1px solid var(--deep);
  border-radius: 999px;
  background: var(--deep);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.button:hover,
.button:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--deep);
}

.button--light {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--deep);
}

.button--light:hover,
.button--light:focus-visible {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Header */
.site-header {
  background: var(--deep);
  color: var(--deep-ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.site-header__name {
  display: flex;
  flex-direction: column;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.15;
  color: inherit;
  text-decoration: none;
}

.site-header__sub {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.2rem;
}

.site-nav { display: flex; gap: 1.5rem; }

.site-nav a {
  color: inherit;
  text-decoration: none;
  font-size: 0.9375rem;
  opacity: 0.85;
}

.site-nav a:hover { opacity: 1; color: var(--gold); }

/* Hero */
.hero {
  background:
    radial-gradient(ellipse at 80% 0%, rgba(210, 169, 90, 0.18), transparent 60%),
    var(--deep);
  color: var(--deep-ink);
  padding-block: clamp(4rem, 12vw, 8rem);
  text-align: center;
}

.hero__inner { max-width: 44rem; }

.hero .eyebrow { color: var(--gold); }

.hero__title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero__lead {
  font-size: 1.125rem;
  opacity: 0.85;
  margin-bottom: 2rem;
}

/* Section heading */
.section-head {
  text-align: center;
  max-width: 38rem;
  margin: 0 auto clamp(3rem, 7vw, 5rem);
}

.section-head__intro { color: var(--muted); }

/* Books */
.books { padding-block: clamp(4rem, 10vw, 7rem); }

.book {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
}

.book:first-of-type { border-top: 0; padding-top: 0; }

.book__cover {
  width: min(16rem, 70%);
  margin-inline: auto;
}

.book__number {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.book__title {
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  margin-bottom: 0.25rem;
}

.book__subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.book__body .button { margin-top: 0.75rem; }

@media (min-width: 48rem) {
  .book {
    grid-template-columns: 2fr 3fr;
    gap: clamp(3rem, 6vw, 5rem);
  }

  .book__cover { width: 100%; max-width: 18rem; }

  .book:nth-of-type(even) .book__cover { order: 2; }
}

.book__cover img {
  width: 100%;
  border-radius: 2px 6px 6px 2px;
  box-shadow: 0 18px 30px -12px rgba(15, 26, 51, 0.45);
}

/* Mission */
.mission {
  background: var(--surface);
  padding-block: clamp(4rem, 10vw, 6rem);
}

.mission__inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.mission__photo {
  margin: 0;
  width: min(17rem, 75%);
  margin-inline: auto;
}

.mission__photo img {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
  border-radius: 999px 999px 8px 8px;
  box-shadow: 0 18px 30px -12px rgba(15, 26, 51, 0.45);
}

.mission__body p:last-child { font-size: 1.125rem; margin-bottom: 0; }

@media (min-width: 48rem) {
  .mission__inner { grid-template-columns: 2fr 3fr; gap: clamp(3rem, 6vw, 5rem); }
  .mission__photo { width: 100%; max-width: 20rem; }
}

/* Closing */
.closing {
  background: var(--surface);
  padding-block: clamp(4rem, 10vw, 6rem);
  text-align: center;
  border-top: 3px solid var(--gold);
}

.closing__inner { max-width: 44rem; }

.closing__inner > p:last-child {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-style: italic;
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background: var(--deep);
  color: var(--deep-ink);
  font-size: 0.875rem;
  padding-block: 2rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-footer p { margin: 0; opacity: 0.75; }

.site-footer nav { display: flex; gap: 1.5rem; }

.site-footer a { color: inherit; opacity: 0.85; text-decoration: none; }

.site-footer a:hover { color: var(--gold); opacity: 1; }

.social {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(243, 239, 230, 0.25);
  border-radius: 999px;
}

.social a:hover,
.social a:focus-visible { border-color: var(--gold); }

/* Legal pages */
.legal {
  max-width: 44rem;
  padding-block: clamp(3rem, 8vw, 5rem);
}

.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }

.legal h2 {
  font-size: 1.375rem;
  margin-top: 2.5rem;
}

.legal__de {
  display: block;
  font-size: 0.5em;
  font-weight: 400;
  color: var(--muted);
  margin-top: 0.25em;
}

.legal ul { padding-left: 1.25rem; margin: 0 0 1em; }

.legal a { overflow-wrap: anywhere; }

.legal__updated {
  margin-top: 3rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.placeholder-note {
  color: var(--muted);
  font-style: italic;
}
