/* =========================================================
   Wayne du Toit — author site
   Clean, light, literary. Deliberately independent of any one
   book's own brand (see assets/css/brand.css for The Last Ember) —
   this is the neutral home base that future books get added to.
   ========================================================= */

:root {
  --bg: #faf7f2;
  --bg-raised: #ffffff;
  --ink: #211e1a;
  --ink-dim: #635c53;
  --ink-faint: #9a9187;
  --accent: #a35a3a;
  --accent-dim: #c98f6e;
  --border: rgba(33, 30, 26, 0.12);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-w: 720px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

a:hover,
a:focus-visible {
  border-bottom-color: var(--accent-dim);
}

h1, h2, h3 {
  font-family:"Marcellus" var(--serif);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1.2em;
  color: var(--ink-dim);
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Site header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 0;
  padding: 28px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: none;
}

.wordmark:hover {
  color: var(--accent);
}

.site-nav a {
  margin-left: 22px;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--ink-dim);
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--accent);
}

/* ---------- Footer ---------- */

.site-footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
}

.site-footer small {
  color: var(--ink-faint);
  font-size: 0.78rem;
}

.social-row {
  display: flex;
  gap: 18px;
}

.social-row a {
  font-size: 0.82rem;
  color: var(--ink-dim);
}

/* ---------- Hero ---------- */

.hero {
  padding: 40px 24px 20px;
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}

.portrait {
  width: 148px;
  height: 148px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cinzel Decorative", var(--serif);
  font-weight: 700;
  font-size: 2.5rem;
  letter-spacing: 0.03em;
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(33, 30, 26, 0.04);
}

/* Swap .portrait for an <img class="portrait-photo"> once a real photo exists */
.portrait-photo {
  width: 148px;
  height: 148px;
  margin: 0 auto 28px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--border);
}

.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 0.2em;
}

.hero .tagline {
  color: var(--ink-dim);
  font-size: 1rem;
  letter-spacing: 0.02em;
  margin-bottom: 0;
}

/* ---------- Bio ---------- */

.bio {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px 10px;
}

.bio p {
  font-size: 1.05rem;
}

.bio p:first-of-type::first-letter {
  font-family: "Cinzel Decorative", var(--serif);
  font-size: 3.4rem;
  line-height: 0.8;
  float: left;
  padding: 4px 8px 0 0;
  color: var(--accent);
}

/* ---------- Books ----------
   A section, not a one-off callout — built to hold more than one
   card once there's more than one book. */

.books {
  max-width: var(--max-w);
  margin: 44px auto 0;
  padding: 0 24px;
}

.section-heading {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 18px;
  text-align: center;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.book-card {
  display: block;
  padding: 28px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.book-card:hover,
.book-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -14px rgba(33, 30, 26, 0.22);
  border-color: rgba(33, 30, 26, 0.2);
}

.book-card .book-card-status {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.book-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.3em;
}

.book-card p {
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.book-card .book-card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.book-card:hover .book-card-link {
  color: var(--accent);
}

@media (max-width: 480px) {
  .site-header {
    padding: 22px 20px;
    justify-content: center;
    text-align: center;
  }
  .wordmark {
    width: 100%;
    text-align: center;
  }
  .site-nav a:first-child {
    margin-left: 0;
  }
  .hero h1 {
    font-size: 1.9rem;
  }
}
