/* Susan Mac Nicol — site styles.
   Colour and radius tokens are taken from the previous 10Web theme so the coded site
   keeps the same look. Type is Great Vibes (wordmark), Cormorant Garamond (headings)
   and Plus Jakarta Sans (body), self-hosted in assets/fonts. */

:root {
  --background: #f8f6f2;
  --foreground: #241d19;
  --muted-foreground: #6b6259;
  --primary: #78172a;
  --primary-dark: #5e1121;
  --primary-foreground: #f9f8f5;
  --secondary: #ebe3d6;
  --secondary-foreground: #671424;
  --accent: #f4e1e5;
  --accent-foreground: #671424;
  --card: #fbfaf8;
  --border: #ded7cf;
  --radius: 0.5rem;

  --shadow-sm: 0 1px 3px rgb(32 23 19 / 0.10), 0 1px 2px -1px rgb(32 23 19 / 0.10);
  --shadow-md: 0 1px 3px rgb(32 23 19 / 0.10), 0 2px 4px -1px rgb(32 23 19 / 0.10);
  --shadow-lg: 0 1px 3px rgb(32 23 19 / 0.10), 0 8px 10px -1px rgb(32 23 19 / 0.10);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --script: "Great Vibes", "Cormorant Garamond", cursive;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: 1rem;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  color: var(--foreground);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

/* An italic word or phrase in burgundy inside a heading — used throughout the site. */
.em { font-style: italic; color: var(--primary); font-weight: 400; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--primary); color: var(--primary-foreground);
  padding: 0.7rem 1.1rem; border-radius: 0 0 var(--radius) 0; font-weight: 600;
}
.skip-link:focus { left: 0; color: var(--primary-foreground); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(248 246 242 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px;
}
.brand {
  font-family: var(--script);
  font-size: 1.75rem;
  color: var(--primary);
  text-decoration: none;
  line-height: 1;
  padding-block: 0.35rem;
}
.brand:hover { color: var(--primary-dark); }

.site-nav ul {
  list-style: none; display: flex; flex-wrap: wrap;
  gap: 0.25rem 1.35rem; margin: 0; padding: 0;
}
.site-nav a {
  color: var(--foreground); text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  padding: 0.4rem 0; display: inline-block;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--primary); border-bottom-color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--primary); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.45rem 0.6rem; cursor: pointer;
  color: var(--foreground); font: inherit; line-height: 1;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--background); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .site-nav a { padding: 0.65rem 0; width: 100%; border-bottom: 1px solid var(--border); }
}

/* ---------------------------------------------------------------- shared --- */

section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
section + section { padding-top: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--secondary-foreground);
  background: var(--accent);
  border-radius: 999px; padding: 0.35rem 0.9rem;
  margin-bottom: 1rem;
}
.eyebrow--plain {
  background: none; padding: 0; color: var(--muted-foreground);
  letter-spacing: 0.16em;
}

.lede { font-size: 1.08rem; color: var(--muted-foreground); max-width: 62ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 600;
  padding: 0.75rem 1.4rem; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn--primary { background: var(--primary); color: var(--primary-foreground); }
.btn--primary:hover { background: var(--primary-dark); color: var(--primary-foreground); }
.btn--outline { background: transparent; color: var(--foreground); border-color: var(--border); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }
.btn--small { padding: 0.5rem 0.9rem; font-size: 0.82rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.pill {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  background: var(--secondary); color: var(--secondary-foreground);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.25rem 0.65rem;
}
.pill--solid { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-block; font-size: 0.82rem; font-weight: 500;
  color: var(--foreground); text-decoration: none;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.4rem 0.8rem;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }

/* ------------------------------------------------------------------ hero --- */

.hero { text-align: center; padding-block: clamp(2.5rem, 7vw, 5rem) clamp(2rem, 5vw, 3.5rem); }
.hero h1 {
  font-family: var(--script); font-weight: 400;
  font-size: clamp(3rem, 9vw, 5.5rem); color: var(--primary);
  letter-spacing: 0; line-height: 1.05; margin-bottom: 0.3em;
}
.hero .hero-sub {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-foreground);
  margin-bottom: 1.2rem;
}
.hero .hero-tagline { font-family: var(--serif); font-size: clamp(1.2rem, 2.6vw, 1.6rem); font-style: italic; }
.hero .btn-row { justify-content: center; }

/* -------------------------------------------------------------- spotlight --- */

.spotlight {
  background: var(--card); border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.spotlight-grid { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); padding: clamp(1.5rem, 4vw, 2.5rem); align-items: start; }
@media (max-width: 800px) { .spotlight-grid { grid-template-columns: 1fr; } }

.spotlight-cover {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg);
  aspect-ratio: 2 / 3; background: var(--secondary);
}
.spotlight-cover img { width: 100%; height: 100%; object-fit: cover; }

.spotlight h2 { margin-bottom: 0.35em; }
.spotlight .quote {
  font-family: var(--serif); font-style: italic; font-size: 1.15rem;
  border-left: 3px solid var(--accent); padding-left: 1rem; margin: 1.2rem 0;
  color: var(--foreground);
}
.meta-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }

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

.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.stats {
  display: flex; flex-wrap: wrap; gap: 2.5rem;
  padding-top: 2rem; margin-top: 2rem; border-top: 1px solid var(--border);
}
.stat { display: flex; align-items: baseline; gap: 0.6rem; }
.stat b { font-family: var(--serif); font-size: 1.9rem; color: var(--primary); font-weight: 700; }
.stat span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-foreground); line-height: 1.3; }

/* ----------------------------------------------------------- series cards --- */

.series-card { display: flex; flex-direction: column; height: 100%; }
.series-card .pill { align-self: flex-start; margin-bottom: 0.9rem; }
.series-card h3 { margin-bottom: 0.2em; }
.series-card .count {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 0.8rem;
}
.series-card .tropes { font-size: 0.85rem; color: var(--muted-foreground); margin-bottom: 0.8rem; }
.series-card .theme {
  font-size: 0.82rem; font-style: italic; color: var(--muted-foreground);
  margin-top: auto; padding-top: 1rem;
}
.series-card .btn { margin-top: 1rem; align-self: flex-start; }

/* ------------------------------------------------------------ book cards --- */

.book-card { display: flex; flex-direction: column; height: 100%; position: relative; }
.book-card .cover-frame {
  position: relative; background: rgb(235 231 224 / 0.5);
  border: 1px solid rgb(222 215 207 / 0.6); border-radius: var(--radius);
  padding: 0.75rem; margin-bottom: 1.25rem; display: flex; justify-content: center;
}
.book-card .cover {
  width: 12rem; max-width: 100%; aspect-ratio: 2 / 3;
  border-radius: calc(var(--radius) * 0.75); overflow: hidden; box-shadow: var(--shadow-lg);
  transition: transform 0.3s;
}
.book-card:hover .cover { transform: scale(1.02); }
.book-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card .badge {
  position: absolute; top: 1.25rem; left: 1.25rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em;
  background: var(--primary); color: var(--primary-foreground);
  border-radius: calc(var(--radius) * 0.75); padding: 0.2rem 0.5rem; box-shadow: var(--shadow-sm);
}
.book-card .series-name {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted-foreground);
}
.book-card h3 { font-size: 1.4rem; margin: 0.2rem 0 0.6rem; }
.book-card h3 a { text-decoration: none; color: var(--foreground); }
.book-card:hover h3 a { color: var(--primary); }
.book-card .genre { margin-bottom: 0.5rem; }
.book-card .tag-line { font-size: 0.78rem; color: var(--muted-foreground); font-style: italic; margin: 0 0 0.2rem; }
.book-card .tag-line b { font-style: normal; font-weight: 600; }
.book-card .blurb { font-size: 0.9rem; margin: 0.8rem 0 1.1rem; }
.book-card .buy { margin-top: auto; padding-top: 0.5rem; }
.book-card .buy-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-foreground); margin-bottom: 0.5rem; }

/* --------------------------------------------------------------- filters --- */

.filters {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end;
  padding: 1.25rem; margin-bottom: 2rem;
  background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.5);
}
.filter-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 210px; flex: 1 1 210px; }
.filter-field label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--secondary-foreground);
}
.filter-field select {
  font: inherit; font-size: 0.9rem; color: var(--foreground);
  background: var(--background); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.6rem 0.75rem; width: 100%;
}
.series-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.series-tabs button {
  font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer;
  background: var(--card); color: var(--foreground);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 0.45rem 0.9rem;
}
.series-tabs button:hover { border-color: var(--primary); color: var(--primary); }
.series-tabs button[aria-pressed="true"] {
  background: var(--primary); color: var(--primary-foreground); border-color: var(--primary);
}
.result-count { font-size: 0.85rem; color: var(--muted-foreground); margin-bottom: 1.5rem; }
.no-results { padding: 3rem 1rem; text-align: center; color: var(--muted-foreground); }

/* ------------------------------------------------------------- book page --- */

.book-hero { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 760px) { .book-hero { grid-template-columns: 1fr; max-width: 420px; } }
.book-hero .cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 2 / 3; }
.book-hero .cover img { width: 100%; height: 100%; object-fit: cover; }
.book-hero h1 { margin-bottom: 0.2em; }
.book-hero .series-line {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 0.6rem;
}
.detail-list { display: grid; gap: 0.6rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.detail-list div { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.9rem; }
.detail-list dt { font-weight: 600; min-width: 5.5rem; color: var(--muted-foreground); }
.detail-list dd { margin: 0; }

/* -------------------------------------------------------------- newsletter --- */

.signup {
  background: var(--card); border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2); padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-md);
}
.perks { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 1.75rem 0; }
.perk { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; background: var(--background); }
.perk h4 { margin-bottom: 0.3em; }
.perk p { font-size: 0.86rem; color: var(--muted-foreground); margin: 0; }

/* The EmailOctopus sign-up form renders inside a cross-origin <iframe>, so nothing in
   this stylesheet can reach its inputs or button. Its colours and font are set in
   EmailOctopus itself (Grow → Forms → VIP Reader Club → Style, and the Form block on
   the Content tab) — see README. All this wrapper does is give it room. */
.eo-form-wrap { margin-top: 1.5rem; max-width: 560px; }
.eo-form-wrap iframe { width: 100%; border: 0; }
.form-note { font-size: 0.8rem; color: var(--muted-foreground); margin-top: 1rem; }

/* ------------------------------------------------------------------ prose --- */

.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.8rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose blockquote {
  margin: 1.5rem 0; padding: 0.4rem 0 0.4rem 1.2rem;
  border-left: 3px solid var(--accent);
  font-family: var(--serif); font-style: italic; font-size: 1.1rem;
}

.post-meta { font-size: 0.85rem; color: var(--muted-foreground); margin-bottom: 1.5rem; }
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
.post-list h3 { margin-bottom: 0.3em; }
.post-list h3 a { text-decoration: none; }

/* ----------------------------------------------------------------- search --- */

.search-form { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 2rem; }
.search-form input[type="search"] {
  font: inherit; flex: 1 1 260px; padding: 0.7rem 0.9rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
  color: var(--foreground);
}
.search-results { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.search-results h3 { margin-bottom: 0.2em; font-size: 1.2rem; }
.search-results p { font-size: 0.9rem; color: var(--muted-foreground); margin: 0; }
mark { background: var(--accent); color: inherit; padding: 0 0.15em; }

/* ----------------------------------------------------------------- footer --- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-block: 1.75rem;
  font-size: 0.85rem;
  color: var(--muted-foreground);
}
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  align-items: center; justify-content: space-between;
}
.site-footer nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin: 0; padding: 0; }
.site-footer a { color: var(--muted-foreground); text-decoration: none; }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }
.site-footer .copyright { margin: 0; }

/* ------------------------------------------------------------------- 404 --- */

.error-page { text-align: center; padding-block: clamp(3rem, 10vw, 6rem); }
.error-page .code { font-family: var(--serif); font-size: 5rem; color: var(--primary); line-height: 1; margin: 0; }
