/* ============================================
   Matt Haag / The Relic Order — Site Styles
   Dark vintage academia. Roald Dahl x Tim Burton.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;0,900;1,600&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Caveat:wght@600&display=swap');

:root {
  --bg: #15120e;
  --bg-alt: #1c1712;
  --bg-card: #211b14;
  --text: #ece0c6;
  --text-muted: #a8967a;
  --accent-red: #8a2f2b;
  --accent-red-bright: #b5453f;
  --accent-gold: #c7a04a;
  --border: #443a2b;
  --shadow: rgba(0, 0, 0, 0.6);
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'EB Garamond', serif;
  font-size: 1.15rem;
  line-height: 1.7;
}

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

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--text);
}

a { color: var(--accent-gold); text-decoration: none; }
a:hover { color: var(--accent-red-bright); }

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

/* subtle aged-paper grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(21, 18, 14, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
.nav-brand:hover { color: var(--accent-gold); }

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

.nav-links a {
  color: var(--text-muted);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.nav-links a:hover { color: var(--accent-gold); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.3rem;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 3px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 78vh;
  padding: 80px 24px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: grayscale(0.35) sepia(0.45) contrast(1.1) brightness(0.55);
  transform: scale(1.05);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(21,18,14,0.55) 0%, rgba(21,18,14,0.75) 55%, rgba(21,18,14,0.97) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero-eyebrow {
  font-family: 'Caveat', cursive;
  color: var(--accent-gold);
  font-size: 1.5rem;
  margin-bottom: 4px;
}

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

.hero .subhead {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.4rem;
  color: var(--accent-gold);
  margin-bottom: 0.6em;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.2rem;
  max-width: 560px;
  margin: 0 auto 1.8em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  border-radius: 2px;
  transition: all 0.25s ease;
  background: rgba(199, 160, 74, 0.06);
}
.btn:hover {
  background: var(--accent-gold);
  color: var(--bg);
}
.btn-solid {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: var(--text);
}
.btn-solid:hover {
  background: var(--accent-red-bright);
  border-color: var(--accent-red-bright);
  color: #fff;
}

/* ---------- Sections ---------- */
section { padding: 90px 0; }
section.alt { background: var(--bg-alt); }

.section-heading {
  text-align: center;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  max-width: 700px;
  margin: 0 auto 0.4em;
}

.section-kicker {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  color: var(--accent-red-bright);
  font-family: 'EB Garamond', serif;
  font-weight: 600;
  margin-bottom: 14px;
}

.lede {
  max-width: 680px;
  margin: 0 auto 2.5em;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.15rem;
}

.prose {
  max-width: 700px;
  margin: 0 auto;
}
.prose p { margin-bottom: 1.3em; }

/* pull quote */
.pull-quote {
  max-width: 800px;
  margin: 2.2em auto 0;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--accent-gold);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.9em 0;
}

/* ---------- Three-column info block ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.info-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 28px 24px;
  text-align: center;
}
.info-col h3 {
  color: var(--accent-gold);
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.7em;
}
.info-col p { margin: 0.3em 0; color: var(--text-muted); }

/* ---------- Character cards ---------- */
.character-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.character-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.character-art {
  aspect-ratio: 4/5;
  background: linear-gradient(160deg, #2a2118, #17130e);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px dashed var(--border);
}
.character-art.placeholder {
  color: var(--text-muted);
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  text-align: center;
  padding: 20px;
}
.character-card img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.3) sepia(0.35) contrast(1.05) brightness(0.85); }
.character-body { padding: 22px 24px 26px; }
.character-body h3 {
  font-size: 1.4rem;
  color: var(--accent-gold);
}
.character-body p { color: var(--text-muted); margin: 0; }

/* ---------- Book teaser card (home page) ---------- */
.book-teaser {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}
.book-teaser-art {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 50px var(--shadow);
}
.book-teaser-art img { filter: grayscale(0.3) sepia(0.4) contrast(1.1) brightness(0.75); }
.book-teaser-text .tag {
  font-family: 'Caveat', cursive;
  color: var(--accent-red-bright);
  font-size: 1.4rem;
}
.book-teaser-text h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.book-teaser-text p { color: var(--text-muted); }

/* ---------- Email signup ---------- */
.signup-box {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.signup-form {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.signup-form input[type="email"] {
  flex: 1;
  min-width: 240px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  border-radius: 2px;
}
.signup-form input[type="email"]::placeholder { color: var(--text-muted); }
.signup-note { margin-top: 14px; font-size: 0.9rem; color: var(--text-muted); }
.signup-success {
  margin-top: 24px;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--accent-gold);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  background: var(--bg-alt);
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent-gold); }
.footer-note { max-width: 640px; margin: 0 auto 14px; font-style: italic; }

/* ---------- About author (relic order page) ---------- */
.author-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
}
.author-block img { border: 1px solid var(--border); border-radius: 4px; filter: grayscale(0.3) sepia(0.4) contrast(1.1) brightness(0.8); }
.author-block .prose { max-width: none; text-align: left; }
.author-block .prose p { color: var(--text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .info-grid, .character-grid { grid-template-columns: 1fr; }
  .book-teaser, .author-block { grid-template-columns: 1fr; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-top: 1px solid var(--border); }
  .nav-links a { display: block; padding: 16px 24px; }
  .nav-toggle { display: block; }
  section { padding: 60px 0; }
}
