/* ================================
   Mero — author site stylesheet
   Warm editorial palette, serif display + clean sans body
   ================================ */

:root {
  --cream: #f6f1e7;
  --paper: #fbf8f2;
  --ink: #2b2420;
  --ink-soft: #5a4c40;
  --ink-faint: #8a7c6d;
  --burgundy: #7c2d2d;
  --burgundy-deep: #5c1f1f;
  --gold: #b1812f;
  --border: #e3d8c5;
  --shadow: rgba(43, 36, 32, 0.12);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1100px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--burgundy);
  text-decoration: none;
}
a:hover { color: var(--burgundy-deep); }

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

.title-link {
  color: inherit;
  transition: color 0.2s ease;
}
.title-link:hover {
  color: var(--burgundy);
}

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 241, 231, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px var(--shadow);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.brand:hover { color: var(--burgundy); }

.nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-soft);
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--burgundy);
  transition: width 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active { color: var(--ink); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    transition: max-height 0.3s ease;
  }

  .nav-links.is-open { max-height: 300px; }

  .nav-links li { border-top: 1px solid var(--border); }
  .nav-links a { display: block; padding: 1rem 1.5rem; }
  .nav-links a::after { display: none; }
}

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

.hero {
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(124,45,45,0.06), transparent 45%),
    radial-gradient(circle at 85% 60%, rgba(177,129,47,0.08), transparent 50%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 720px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 0.6em;
}

.hero .lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 55ch;
}

.button-row {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 3px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--burgundy);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--burgundy-deep);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px var(--shadow);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--burgundy);
  color: var(--burgundy);
  transform: translateY(-2px);
}

/* ---------- Sections ---------- */

section { padding: 4.5rem 0; }

.section-label {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: block;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ---------- Reveal-on-scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.is-visible > * {
  transition-delay: calc(var(--i, 0) * 0.1s);
}

/* ---------- Featured book card ---------- */

.book-feature {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 720px) {
  .book-feature { grid-template-columns: 1fr; }
}

.book-cover {
  aspect-ratio: 2 / 3;
  border-radius: 4px;
  background: linear-gradient(160deg, var(--burgundy) 0%, var(--burgundy-deep) 100%);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  box-shadow: 0 20px 40px var(--shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.book-cover:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 28px 50px var(--shadow);
}

.book-cover .cover-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.25;
}

.book-cover .cover-author {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.status-pill {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--burgundy-deep);
  background: rgba(124,45,45,0.1);
  border: 1px solid rgba(124,45,45,0.25);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1rem;
}

/* ---------- Cards / grid ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
}

/* ---------- Author page ---------- */

.author-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
}

@media (max-width: 720px) {
  .author-layout { grid-template-columns: 1fr; }
}

.author-portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 20px 40px var(--shadow);
}

/* ---------- Forms ---------- */

form { max-width: 560px; }

.form-group { margin-bottom: 1.4rem; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
  color: var(--ink-soft);
}

input, textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(124,45,45,0.12);
}

textarea { min-height: 160px; resize: vertical; }

.hidden-field { display: none; }

.form-status {
  margin-top: 1rem;
  font-weight: 600;
}
.form-status.success { color: #3f6b3f; }
.form-status.error { color: var(--burgundy-deep); }

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a { color: var(--ink-faint); }
.footer-links a:hover { color: var(--burgundy); }

/* ---------- Utility ---------- */

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.small { font-size: 0.9rem; color: var(--ink-faint); }
