/* ============================================================
   JENNIFER WELLS | ASHEN ECHOES DESIGN SYSTEM
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Space+Grotesk:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Design Tokens --- */
:root {
  /* Colors */
  --void: #0e0e0e;
  --surface: #0e0e0e;
  --surface-container: #191a1a;
  --surface-container-high: #1f2020;
  --surface-container-highest: #252626;
  --surface-variant: rgba(37, 38, 38, 0.75);
  --amber: #ffba38;
  --amber-dim: #c98e1a;
  --amber-glow: rgba(255, 186, 56, 0.15);
  --violet: #ceb1ff;
  --violet-dim: #9b7ec4;
  --on-surface: #e8e4dc;
  --on-surface-dim: #a09890;
  --on-surface-faint: #5a5550;
  --error: #ff6b6b;

  /* Typography */
  --font-headline: 'Newsreader', Georgia, serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --gap-xs: 0.5rem;
  --gap-sm: 1rem;
  --gap-md: 1.5rem;
  --gap-lg: 2.5rem;
  --gap-xl: 4rem;
  --gap-2xl: 6rem;

  /* Nav height */
  --nav-h: 64px;
  --mobile-nav-h: 60px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background-color: var(--void);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}
ul { list-style: none; }

/* --- Grain Overlay --- */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* --- Scanline --- */
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.03) 3px,
    rgba(0,0,0,0.03) 4px
  );
}

/* --- Ash Fall Canvas --- */
#ash-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0.5;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: 400;
  line-height: 1.2;
  color: var(--on-surface);
}
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }

.label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--on-surface-dim);
}
.label-amber {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gap-md);
}
.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--gap-md);
}
.section {
  padding: var(--gap-2xl) 0;
}
.section-sm {
  padding: var(--gap-xl) 0;
}

/* --- Top Navigation --- */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(14, 14, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 186, 56, 0.08);
}
.topnav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gap-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topnav-logo {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--on-surface);
  letter-spacing: 0.02em;
}
.topnav-logo span { color: var(--amber); }
.topnav-links {
  display: flex;
  align-items: center;
  gap: var(--gap-lg);
}
.topnav-links a {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--on-surface-dim);
  transition: color 0.2s;
}
.topnav-links a:hover,
.topnav-links a.active { color: var(--amber); }
.topnav-cta {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--void) !important;
  background: var(--amber);
  padding: 0.5rem 1rem;
  transition: background 0.2s;
}
.topnav-cta:hover { background: var(--amber-dim) !important; color: var(--void) !important; }

/* --- Mobile Bottom Nav --- */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--mobile-nav-h);
  background: var(--surface-container);
  border-top: 1px solid rgba(255,186,56,0.08);
  z-index: 1000;
  padding: 0 var(--gap-sm);
}
.mobile-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--on-surface-dim);
  font-size: 0.6rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
  padding: 0.25rem 0.5rem;
}
.mobile-nav-item svg { width: 20px; height: 20px; }
.mobile-nav-item:hover,
.mobile-nav-item.active { color: var(--amber); }

/* Page offset for fixed nav */
.page-body { padding-top: var(--nav-h); }

/* --- Footer --- */
.footer {
  background: var(--surface-container);
  padding: var(--gap-xl) 0 var(--gap-md);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--gap-lg);
  padding-bottom: var(--gap-lg);
  border-bottom: 1px solid rgba(255,186,56,0.06);
  margin-bottom: var(--gap-md);
}
.footer-brand p {
  font-size: 0.875rem;
  color: var(--on-surface-dim);
  margin-top: var(--gap-sm);
  max-width: 260px;
  line-height: 1.7;
}
.footer-logo {
  font-family: var(--font-headline);
  font-size: 1.2rem;
  color: var(--on-surface);
}
.footer-logo span { color: var(--amber); }
.footer-col h6 {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--gap-sm);
}
.footer-col ul li {
  margin-bottom: 0.4rem;
}
.footer-col ul li a {
  font-size: 0.85rem;
  color: var(--on-surface-dim);
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--on-surface); }
.footer-social {
  display: flex;
  gap: var(--gap-sm);
  margin-top: var(--gap-sm);
}
.footer-social a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-container-high);
  color: var(--on-surface-dim);
  transition: background 0.2s, color 0.2s;
}
.footer-social a:hover {
  background: var(--amber-glow);
  color: var(--amber);
}
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
}
.footer-copyright {
  font-size: 0.75rem;
  color: var(--on-surface-faint);
  font-family: var(--font-mono);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--amber) 0%, #e8a420 100%);
  color: var(--void);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ffc84f 0%, var(--amber) 100%);
  box-shadow: 0 0 24px rgba(255,186,56,0.3);
}
.btn-secondary {
  background: var(--surface-container-high);
  color: var(--on-surface-dim);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), inset 0 -1px 0 rgba(0,0,0,0.3);
}
.btn-secondary:hover {
  background: var(--surface-container-highest);
  color: var(--on-surface);
}
.btn-ghost {
  background: transparent;
  color: var(--amber);
  border: 1px solid rgba(255,186,56,0.3);
}
.btn-ghost:hover {
  background: var(--amber-glow);
  border-color: var(--amber);
}
.btn svg { width: 16px; height: 16px; fill: currentColor; }

/* --- Cards --- */
.card {
  background: var(--surface-container);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s;
}
.card:hover { transform: translateY(-2px); }
.card-high {
  background: var(--surface-container-high);
}
.card-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.card-img-wide { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.card-body { padding: var(--gap-md); }
.card-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.5rem;
}
.card-title {
  font-family: var(--font-headline);
  font-size: 1.2rem;
  color: var(--on-surface);
  margin-bottom: 0.5rem;
}
.card-subtitle {
  font-size: 0.8rem;
  color: var(--on-surface-dim);
  margin-bottom: var(--gap-sm);
}

/* --- Book Cover Grid --- */
.books-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--gap-md);
  align-items: start;
}
/* Staggered float: even-position covers drop down for visual rhythm */
.books-grid .book-card-cover:nth-child(even) {
  margin-top: 2rem;
}
.book-card-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--surface-container);
  transition: transform 0.3s;
}
.book-card-cover:hover { transform: scale(1.02); }
.book-card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.book-card-cover:hover img { transform: scale(1.05); }
.book-card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(14,14,14,0.95));
  padding: var(--gap-sm);
  transform: translateY(100%);
  transition: transform 0.3s;
}
.book-card-cover:hover .book-card-overlay { transform: translateY(0); }
.book-card-number {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--amber);
  letter-spacing: 0.15em;
}
.book-card-title {
  font-family: var(--font-headline);
  font-size: 0.95rem;
  color: var(--on-surface);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.25;
}
.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(14,14,14,0.6) 60%,
    var(--void) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 20;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--gap-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--amber);
}
.hero-title {
  font-family: var(--font-headline);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: var(--gap-md);
}
.hero-title em {
  font-style: italic;
  color: var(--amber);
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--on-surface-dim);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: var(--gap-lg);
}
.hero-actions {
  display: flex;
  gap: var(--gap-sm);
  flex-wrap: wrap;
}

/* --- Section Headers --- */
.section-header {
  margin-bottom: var(--gap-lg);
}
.section-header h2 {
  font-style: italic;
  margin-bottom: 0.5rem;
}
.section-header p {
  color: var(--on-surface-dim);
  max-width: 600px;
}

/* --- Deckled Edge --- */
.deckled-top {
  clip-path: polygon(
    0% 8px, 2% 0%, 4% 6px, 6% 1px, 8% 7px, 10% 2px,
    12% 8px, 14% 0%, 16% 5px, 18% 1px, 20% 7px,
    22% 2px, 24% 8px, 26% 0%, 28% 6px, 30% 1px,
    32% 7px, 34% 2px, 36% 8px, 38% 0%, 40% 5px,
    42% 1px, 44% 7px, 46% 2px, 48% 8px, 50% 0%,
    52% 6px, 54% 1px, 56% 7px, 58% 2px, 60% 8px,
    62% 0%, 64% 5px, 66% 1px, 68% 7px, 70% 2px,
    72% 8px, 74% 0%, 76% 6px, 78% 1px, 80% 7px,
    82% 2px, 84% 8px, 86% 0%, 88% 5px, 90% 1px,
    92% 7px, 94% 2px, 96% 8px, 98% 0%, 100% 6px,
    100% 100%, 0% 100%
  );
}

/* --- CTA / Newsletter Section --- */
.cta-section {
  background: var(--surface-container);
  padding: var(--gap-xl) var(--gap-md);
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,186,56,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.cta-inner h2 {
  font-style: italic;
  margin-bottom: var(--gap-sm);
}
.cta-inner p {
  color: var(--on-surface-dim);
  margin-bottom: var(--gap-lg);
  font-size: 1.05rem;
}

/* --- MailerLite Form Override --- */
.ml-subscribe-wrap {
  max-width: 480px;
  margin: 0 auto;
}
#mlb2-39435083.ml-form-embedContainer {
  background: transparent !important;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-embedWrapper {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-embedWrapper.embedForm {
  max-width: 100%;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-embedBody {
  padding: 0 !important;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-embedContent {
  display: none !important;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-fieldRow input {
  background: var(--surface-container-high) !important;
  color: var(--on-surface) !important;
  border: 1px solid rgba(255,186,56,0.2) !important;
  border-radius: 0 !important;
  font-family: var(--font-body) !important;
  font-size: 0.95rem !important;
  padding: 0.85rem 1rem !important;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-fieldRow input::placeholder {
  color: var(--on-surface-faint) !important;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-fieldRow input:focus {
  outline: none !important;
  border-color: var(--amber) !important;
  box-shadow: 0 0 0 3px rgba(255,186,56,0.1) !important;
}
/* Inline row: email input + button side by side */
#mlb2-39435083.ml-form-embedContainer .ml-block-form {
  display: flex !important;
  align-items: stretch !important;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-formContent {
  flex: 1 !important;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-fieldRow {
  margin-bottom: 0 !important;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-embedSubmit {
  margin-top: 0 !important;
  flex-shrink: 0 !important;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-embedSubmit button.primary {
  background: linear-gradient(135deg, var(--amber) 0%, #e8a420 100%) !important;
  color: var(--void) !important;
  border: none !important;
  border-radius: 0 !important;
  font-family: var(--font-mono) !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  padding: 0.85rem 1.5rem !important;
  white-space: nowrap !important;
  height: 100% !important;
  transition: all 0.2s !important;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-embedSubmit button.primary:hover {
  background: linear-gradient(135deg, #ffc84f 0%, var(--amber) 100%) !important;
  box-shadow: 0 0 24px rgba(255,186,56,0.3) !important;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-successBody {
  padding: 0 !important;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-successContent h4 {
  color: var(--amber) !important;
  font-family: var(--font-headline) !important;
  font-size: 1.5rem !important;
  font-style: italic !important;
}
#mlb2-39435083.ml-form-embedContainer .ml-form-successContent p {
  color: var(--on-surface-dim) !important;
  font-family: var(--font-body) !important;
}

/* --- Buy Links --- */
.buy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--gap-sm);
}
.buy-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-container-high);
  color: var(--on-surface-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  transition: all 0.2s;
}
.buy-link:hover {
  background: var(--amber-glow);
  color: var(--amber);
}
.buy-link svg { width: 14px; height: 14px; fill: currentColor; }

/* --- Series Banner --- */
.series-banner {
  position: relative;
  overflow: hidden;
  aspect-ratio: 21/9;
  background: var(--surface-container);
}
.series-banner img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.5;
}
.series-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(14,14,14,0.95) 0%, rgba(14,14,14,0.4) 100%);
  display: flex;
  align-items: center;
}

/* --- Archive / Flicker Effect --- */
.flicker-hover {
  transition: opacity 0.15s;
}
.flicker-hover:hover {
  animation: flicker 0.3s ease;
}
@keyframes flicker {
  0%   { opacity: 1; }
  20%  { opacity: 0.7; }
  40%  { opacity: 1; }
  60%  { opacity: 0.8; }
  80%  { opacity: 1; }
  100% { opacity: 1; }
}

/* --- Bento Grid --- */
.bento-grid {
  display: grid;
  gap: var(--gap-sm);
}
.bento-2col { grid-template-columns: repeat(2, 1fr); }
.bento-3col { grid-template-columns: repeat(3, 1fr); }
.bento-span-2 { grid-column: span 2; }

/* --- Cookie Banner --- */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: var(--gap-md);
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 2rem));
  background: var(--surface-container-high);
  border: 1px solid rgba(255,186,56,0.12);
  padding: var(--gap-md) var(--gap-lg);
  z-index: 9000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.cookie-banner.show { display: flex; gap: var(--gap-md); align-items: center; flex-wrap: wrap; }
.cookie-banner p {
  font-size: 0.85rem;
  color: var(--on-surface-dim);
  flex: 1;
  min-width: 200px;
}
.cookie-banner p a {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-color: rgba(255,186,56,0.4);
}
.cookie-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* --- About Page --- */
.about-hero {
  padding: var(--gap-2xl) 0 var(--gap-xl);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--gap-xl);
  align-items: start;
}
.about-photo {
  position: relative;
}
.about-photo-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--surface-container);
}
.about-photo-accent {
  position: absolute;
  bottom: -16px; right: -16px;
  width: 80%; height: 80%;
  border: 2px solid rgba(255,186,56,0.2);
  z-index: -1;
}
.about-text h1 {
  font-style: italic;
  margin-bottom: var(--gap-sm);
}
.about-text .pen-names {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-bottom: var(--gap-md);
}
.about-text p {
  color: var(--on-surface-dim);
  margin-bottom: var(--gap-md);
  line-height: 1.8;
  font-size: 1.05rem;
}

/* --- Book Detail Page --- */
.book-hero {
  padding: var(--gap-xl) 0;
}
.book-hero-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--gap-xl);
  align-items: start;
}
.book-cover-wrap {
  position: sticky;
  top: calc(var(--nav-h) + var(--gap-md));
}
.book-cover-img {
  width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 80px rgba(255,186,56,0.05);
}
.book-meta {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}
.book-series-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--amber-glow);
  border: 1px solid rgba(255,186,56,0.2);
  padding: 0.3rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  width: fit-content;
}
.book-title {
  font-family: var(--font-headline);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-style: italic;
  line-height: 1.1;
}
.book-subtitle {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--on-surface-dim);
  font-style: normal;
}
.book-desc p {
  color: var(--on-surface-dim);
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: var(--gap-sm);
}
.book-formats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.book-format-item {
  background: var(--surface-container);
  padding: var(--gap-sm);
  text-align: center;
}
.book-format-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.25rem;
}
.book-format-asin {
  font-size: 0.75rem;
  color: var(--on-surface-dim);
  font-family: var(--font-mono);
}

/* --- Contact Page --- */
.contact-form {
  background: var(--surface-container);
  padding: var(--gap-xl) var(--gap-lg);
}
.form-group {
  margin-bottom: var(--gap-md);
}
.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.5rem;
}
.form-input, .form-textarea {
  width: 100%;
  background: var(--surface-container-high);
  color: var(--on-surface);
  border: 1px solid rgba(255,186,56,0.15);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(255,186,56,0.08);
}
.form-textarea {
  min-height: 160px;
  resize: vertical;
}
.form-note {
  font-size: 0.8rem;
  color: var(--on-surface-faint);
  margin-top: 0.35rem;
}

/* --- Landing Page --- */
.landing-hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.landing-left {
  padding: var(--gap-2xl) var(--gap-lg) var(--gap-2xl) 0;
  padding-left: max(var(--gap-md), calc((100vw - 1200px) / 2));
}
.landing-right {
  background: var(--surface-container);
  padding: var(--gap-2xl) var(--gap-lg);
  min-height: 100svh;
  display: flex;
  align-items: center;
}
.landing-form-wrap {
  width: 100%;
  max-width: 480px;
}
.landing-form-wrap h3 {
  font-style: italic;
  margin-bottom: 0.5rem;
}
.landing-form-wrap p {
  color: var(--on-surface-dim);
  font-size: 0.95rem;
  margin-bottom: var(--gap-lg);
}

/* --- Amber Decoration --- */
.amber-line {
  width: 48px;
  height: 2px;
  background: var(--amber);
  margin-bottom: var(--gap-md);
}
.amber-dot::before {
  content: '◆';
  color: var(--amber);
  margin-right: 0.5rem;
  font-size: 0.6rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .book-hero-grid { grid-template-columns: 220px 1fr; gap: var(--gap-lg); }
  .landing-hero { grid-template-columns: 1fr; }
  .landing-right { min-height: auto; }
  .landing-left { padding: var(--gap-xl) var(--gap-md); }
}

@media (max-width: 768px) {
  .topnav-links { display: none; }
  .topnav-cta { display: none; }
  .mobile-nav { display: block; }
  .page-body { padding-top: var(--nav-h); padding-bottom: var(--mobile-nav-h); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--gap-md); }
  .footer-bottom { flex-direction: column; text-align: center; }
  .bento-2col, .bento-3col { grid-template-columns: 1fr; }
  .bento-span-2 { grid-column: span 1; }
  .about-grid { grid-template-columns: 1fr; }
  .book-hero-grid { grid-template-columns: 1fr; }
  .book-cover-wrap { position: static; max-width: 240px; margin: 0 auto; }
  .book-formats { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: clamp(2.5rem, 10vw, 4rem); }
  .series-banner { aspect-ratio: 4/3; }
  .about-photo-accent { display: none; }
  .books-grid { grid-template-columns: repeat(3, 1fr); }
  .books-grid .book-card-cover:nth-child(even) { margin-top: 1.25rem; }
  #mlb2-39435083.ml-form-embedContainer .ml-block-form { flex-direction: column !important; }
  #mlb2-39435083.ml-form-embedContainer .ml-form-embedSubmit { margin-top: 0.5rem !important; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--gap-sm); }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .books-grid .book-card-cover:nth-child(even) { margin-top: 1rem; }
  .buy-links { flex-direction: column; }
  .buy-link { justify-content: center; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; justify-content: center; }
  .cookie-banner { bottom: calc(var(--mobile-nav-h) + var(--gap-sm)); }
}

/* --- Utility --- */
.text-amber { color: var(--amber); }
.text-violet { color: var(--violet); }
.text-dim { color: var(--on-surface-dim); }
.text-faint { color: var(--on-surface-faint); }
.italic { font-style: italic; }
.mono { font-family: var(--font-mono); }
.headline { font-family: var(--font-headline); }
.mt-xs { margin-top: var(--gap-xs); }
.mt-sm { margin-top: var(--gap-sm); }
.mt-md { margin-top: var(--gap-md); }
.mt-lg { margin-top: var(--gap-lg); }
.mt-xl { margin-top: var(--gap-xl); }
.mb-sm { margin-bottom: var(--gap-sm); }
.mb-md { margin-bottom: var(--gap-md); }
.mb-lg { margin-bottom: var(--gap-lg); }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: var(--gap-sm); }
.gap-md { gap: var(--gap-md); }
.w-full { width: 100%; }
.text-center { text-align: center; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }