/* ============================================================
   Ava Knightly Author Website - Complete Stylesheet
   Typography: Cinzel (display), Lora (body), Cormorant Garamond (accent)
   Color System: Warm cream + deep purple-black alternating sections
   ============================================================ */

:root {
  /* Light palette */
  --cream: #FDF8F3;
  --warm-cream: #F5EDE4;
  --cream-text: #F0E8DF;

  /* Dark palette */
  --dark: #1C1526;
  --dark-mid: #241D30;
  --dark-surface: #2E2540;

  /* Accent colors */
  --gold: #C9A227;
  --gold-light: #E8D48A;
  --gold-dark: #9A7B1A;
  --gold-glow: rgba(201, 162, 39, 0.15);

  /* Purple range */
  --purple: #6B5B7A;
  --purple-light: #8E7D9C;
  --purple-dark: #4A3D5C;

  /* Text colors */
  --text-dark: #2D2422;
  --text-mid: #5C4A3D;
  --text-light: #7A6B5E;
  --text-on-dark: #F0E8DF;
  --text-on-dark-muted: rgba(240, 232, 223, 0.7);

  /* Neutral */
  --white: #FFFFFF;

  /* Typography */
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Lora', Georgia, serif;
  --font-accent: 'Cormorant Garamond', Georgia, serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Borders & Shadows */
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-soft: 0 2px 8px rgba(44, 36, 34, 0.06), 0 4px 20px rgba(44, 36, 34, 0.08);
  --shadow-medium: 0 4px 12px rgba(44, 36, 34, 0.1), 0 8px 30px rgba(44, 36, 34, 0.12);
  --shadow-lifted: 0 8px 24px rgba(44, 36, 34, 0.12), 0 16px 48px rgba(44, 36, 34, 0.16);
  --shadow-dark: 0 4px 16px rgba(0, 0, 0, 0.3), 0 8px 32px rgba(0, 0, 0, 0.2);

  /* Motion */
  --transition: 0.3s ease;
  --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
}


/* ──── Reset & Base ──── */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  color: var(--purple-dark);
  letter-spacing: 0.04em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: var(--space-md);
  font-size: 1.05rem;
  line-height: 1.8;
}

a {
  color: var(--purple);
  text-decoration: none;
  transition: color var(--transition);
}

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

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-narrow {
  max-width: 800px;
}


/* ──── Subtle entrance animation (CSS-only, no JS observer) ──── */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-in {
  animation: fadeInUp 0.6s var(--ease-out-cubic) both;
}

.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }
.animate-in-delay-4 { animation-delay: 0.4s; }


/* ──── Header ──── */

header {
  background: var(--white);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo img {
  height: 50px;
  width: auto;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--purple-dark);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
  align-items: center;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  padding: var(--space-sm) 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.4s var(--ease-out-cubic);
}

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

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--purple);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out-cubic), opacity 0.25s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}


/* ──── Buttons ──── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-cubic);
  border: 2px solid transparent;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  min-height: 44px;
}

.btn-primary {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 162, 39, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--purple);
  border-color: var(--purple);
}

.btn-secondary:hover {
  background: var(--purple);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-amazon {
  background: #FF9900;
  color: var(--white);
  border-color: #FF9900;
  font-weight: 600;
}

.btn-amazon:hover {
  background: #E88B00;
  border-color: #E88B00;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.35);
}

.btn-large {
  padding: 0.875rem 2rem;
  font-size: 1.1rem;
}

/* Button on dark backgrounds */
.section-dark .btn-secondary {
  color: var(--gold-light);
  border-color: var(--gold-light);
}

.section-dark .btn-secondary:hover {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
}


/* ──── Section System: Light / Dark Alternating ──── */

section {
  padding: var(--space-3xl) 0;
}

.section-light {
  background: var(--cream);
  color: var(--text-dark);
}

.section-warm {
  background: var(--warm-cream);
  color: var(--text-dark);
}

.section-white {
  background: var(--white);
  color: var(--text-dark);
}

.section-dark {
  background: var(--dark);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}

.section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(107, 91, 122, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(201, 162, 39, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--gold-light);
}

.section-dark p {
  color: var(--text-on-dark);
}

.section-dark a {
  color: var(--gold-light);
}

.section-dark a:hover {
  color: var(--gold);
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-title h2 {
  margin-bottom: var(--space-sm);
}

.section-title p {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-dark .section-title p {
  color: var(--text-on-dark-muted);
}


/* ──── Section Divider ──── */

.section-divider {
  text-align: center;
  padding: var(--space-md) 0;
  color: var(--gold-light);
  opacity: 0.5;
}

.section-divider svg {
  width: 60px;
  height: 20px;
}


/* ──── Hero Section ──── */

.hero {
  background: linear-gradient(160deg, var(--dark) 0%, #2A1F38 50%, var(--dark-mid) 100%);
  padding: var(--space-3xl) 0;
  position: relative;
  overflow: hidden;
  color: var(--text-on-dark);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 80%, rgba(201, 162, 39, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 20%, rgba(107, 91, 122, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  margin-bottom: var(--space-md);
  color: var(--white);
  letter-spacing: 0.03em;
}

.hero-text .tagline {
  font-family: var(--font-accent);
  font-size: 1.35rem;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--space-lg);
  font-style: italic;
  line-height: 1.8;
}

.hero-text p {
  color: var(--text-on-dark);
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.hero .btn-secondary {
  color: var(--gold-light);
  border-color: var(--gold-light);
}

.hero .btn-secondary:hover {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dark);
}


/* ──── Author Section ──── */

.author-section {
  background: var(--warm-cream);
}

.author-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.author-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-medium);
}

.author-bio h2 {
  margin-bottom: var(--space-md);
}

.author-bio p {
  margin-bottom: var(--space-md);
}


/* ──── Book Feature (Homepage) ──── */

.book-feature {
  background: var(--dark);
  position: relative;
  overflow: hidden;
}

.book-feature::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(201, 162, 39, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(107, 91, 122, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.book-feature .section-title h2 {
  color: var(--gold-light);
}

.book-feature .section-title p {
  color: var(--text-on-dark-muted);
}

.book-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-xl);
  align-items: start;
  background: var(--dark-surface);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(201, 162, 39, 0.15);
  position: relative;
  z-index: 1;
}

.book-cover {
  position: relative;
  perspective: 600px;
}

.book-cover img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-dark);
  transition: transform 0.4s var(--ease-out-cubic), box-shadow 0.4s var(--ease-out-cubic);
}

.book-cover:hover img {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.book-info h3 {
  font-size: 1.75rem;
  margin-bottom: var(--space-xs);
  color: var(--gold-light);
}

.book-series {
  font-family: var(--font-accent);
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

.book-description {
  color: var(--text-on-dark);
  margin-bottom: var(--space-lg);
}

.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.book-tag {
  background: rgba(142, 125, 156, 0.25);
  color: var(--purple-light);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid rgba(142, 125, 156, 0.3);
}

/* Light section tags */
.section-light .book-tag,
.section-warm .book-tag,
.section-white .book-tag {
  background: rgba(107, 91, 122, 0.1);
  color: var(--purple);
  border-color: rgba(107, 91, 122, 0.2);
}

.book-vibes {
  font-style: italic;
  color: var(--text-on-dark-muted);
  margin-bottom: var(--space-md);
}

.book-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.book-info p {
  color: var(--text-on-dark);
}


/* ──── More Books Grid (Homepage) ──── */

.more-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  position: relative;
  z-index: 1;
}

.more-book-card {
  background: var(--dark-surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(142, 125, 156, 0.15);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out-cubic), box-shadow 0.4s var(--ease-out-cubic);
}

.more-book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.more-book-card-inner {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg);
  align-items: start;
}

.more-book-card .mini-cover {
  width: 120px;
  flex-shrink: 0;
}

.more-book-card .mini-cover img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.more-book-card .mini-info h4 {
  color: var(--gold-light);
  margin-bottom: var(--space-xs);
  font-size: 1.1rem;
}

.more-book-card .mini-info .mini-series {
  font-family: var(--font-accent);
  color: var(--text-on-dark-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.more-book-card .mini-info p {
  color: var(--text-on-dark-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.more-book-card .btn {
  margin-top: var(--space-sm);
}


/* ──── Books Page: Series Sections ──── */

.series-section {
  padding: var(--space-3xl) 0;
}

.series-header {
  margin-bottom: var(--space-xl);
  text-align: center;
}

.series-header h2 {
  margin-bottom: var(--space-xs);
  letter-spacing: 0.08em;
}

.series-header .series-tagline {
  font-family: var(--font-accent);
  font-size: 1.15rem;
  font-style: italic;
}

.section-dark .series-header h2 {
  color: var(--gold-light);
}

.section-dark .series-header .series-tagline {
  color: var(--text-on-dark-muted);
}

.section-light .series-header .series-tagline,
.section-warm .series-header .series-tagline {
  color: var(--text-light);
}

/* Book showcase (large single book) */
.book-showcase {
  background: var(--dark-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-dark);
  border: 1px solid rgba(201, 162, 39, 0.1);
}

.section-light .book-showcase,
.section-warm .book-showcase {
  background: var(--white);
  box-shadow: var(--shadow-medium);
  border: 1px solid rgba(107, 91, 122, 0.1);
}

.book-showcase-content {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
}

.book-showcase-cover {
  background: var(--dark);
  padding: var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 600px;
}

.section-light .book-showcase-cover,
.section-warm .book-showcase-cover {
  background: var(--dark);
}

.book-showcase-cover img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s var(--ease-out-cubic), box-shadow 0.4s var(--ease-out-cubic);
}

.book-showcase-info {
  padding: var(--space-xl);
}

.section-dark .book-showcase-info h2,
.section-dark .book-showcase-info h3 {
  color: var(--gold-light);
}

.section-dark .book-showcase-info p {
  color: var(--text-on-dark);
}

.section-dark .book-showcase-info .book-tagline {
  color: var(--gold);
}

.section-dark .book-showcase-info .book-vibes {
  color: var(--text-on-dark-muted);
}

.section-light .book-showcase-info,
.section-warm .book-showcase-info {
  padding: var(--space-xl);
}

.book-tagline {
  font-family: var(--font-accent);
  font-size: 1.2rem;
  color: var(--gold-dark);
  font-style: italic;
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

/* Status badge */
.book-status {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  margin-bottom: var(--space-md);
  letter-spacing: 0.03em;
}

.book-status.available {
  background: rgba(39, 174, 96, 0.15);
  color: #27ae60;
  border: 1px solid rgba(39, 174, 96, 0.3);
}

.book-status.coming-soon {
  background: var(--gold-glow);
  color: var(--gold);
  border: 1px solid rgba(201, 162, 39, 0.3);
}

/* Companion books (smaller cards within a series) */
.companion-books {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.companion-card {
  background: var(--dark-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid rgba(142, 125, 156, 0.15);
  transition: transform 0.3s var(--ease-out-cubic), box-shadow 0.3s var(--ease-out-cubic);
}

.section-light .companion-card,
.section-warm .companion-card {
  background: var(--white);
  border: 1px solid rgba(107, 91, 122, 0.1);
  box-shadow: var(--shadow-soft);
}

.companion-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-dark);
}

.section-light .companion-card:hover,
.section-warm .companion-card:hover {
  box-shadow: var(--shadow-lifted);
}

.companion-card h3 {
  margin-bottom: var(--space-sm);
}

.section-dark .companion-card h3 {
  color: var(--gold-light);
}

.section-dark .companion-card p {
  color: var(--text-on-dark);
}

.section-dark .companion-card .book-series {
  color: var(--text-on-dark-muted);
}


/* ──── Features Grid ──── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  text-align: center;
  border: 1px solid rgba(107, 91, 122, 0.08);
  transition: transform 0.4s var(--ease-out-cubic), box-shadow 0.4s var(--ease-out-cubic);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lifted);
}

.section-dark .feature-card {
  background: var(--dark-surface);
  border-color: rgba(142, 125, 156, 0.15);
  box-shadow: none;
}

.section-dark .feature-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.section-dark .feature-card h4 {
  color: var(--cream-text);
}

.section-dark .feature-card p {
  color: var(--text-on-dark-muted);
}

.feature-icon {
  font-size: 2.25rem;
  margin-bottom: var(--space-md);
}

.feature-card h4 {
  margin-bottom: var(--space-sm);
}

.feature-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
}


/* ──── Testimonials ──── */

.testimonials {
  /* Can be on light or dark background depending on usage */
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.testimonial-card {
  background: var(--white);
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--gold);
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--ease-out-cubic), box-shadow 0.4s var(--ease-out-cubic);
}

.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.section-dark .testimonial-card {
  background: var(--dark-surface);
  border-left-color: var(--gold);
  box-shadow: none;
}

.section-dark .testimonial-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.testimonial-card blockquote {
  font-family: var(--font-accent);
  font-size: 1.25rem;
  font-style: italic;
  margin-bottom: var(--space-md);
  line-height: 1.6;
  position: relative;
  padding-left: var(--space-lg);
}

.testimonial-card blockquote::before {
  content: '\201C';
  position: absolute;
  left: -0.1em;
  top: -0.2em;
  font-size: 3rem;
  color: var(--gold-light);
  font-family: var(--font-accent);
  line-height: 1;
}

.section-dark .testimonial-card blockquote {
  color: var(--text-on-dark);
}

.testimonial-card cite {
  color: var(--text-light);
  font-size: 0.9rem;
}

.section-dark .testimonial-card cite {
  color: var(--text-on-dark-muted);
}


/* ──── Newsletter Section ──── */

.newsletter-section {
  background: linear-gradient(135deg, var(--purple-dark) 0%, #3D2D52 50%, var(--purple) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(201, 162, 39, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.newsletter-section h2 {
  color: var(--white);
}

.newsletter-section p {
  color: rgba(255, 255, 255, 0.9);
}

.signup-box {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.signup-form {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.signup-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.signup-form input[type="email"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.25);
}

.signup-form .btn {
  flex-shrink: 0;
}

.signup-note {
  margin-top: var(--space-md);
  font-size: 0.9rem;
  color: var(--gold-light);
}


/* ──── Page Header (Books, About, Newsletter sub-pages) ──── */

.page-header {
  background: linear-gradient(160deg, var(--dark) 0%, #2A1F38 50%, var(--dark-mid) 100%);
  padding: var(--space-2xl) 0 var(--space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  color: var(--text-on-dark);
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(201, 162, 39, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.page-header h1 {
  margin-bottom: var(--space-sm);
  color: var(--white);
}

.page-header .subtitle {
  font-family: var(--font-accent);
  font-size: 1.25rem;
  color: var(--text-on-dark-muted);
}


/* ──── Content Sections (About page) ──── */

.content-section {
  background: var(--white);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(107, 91, 122, 0.06);
}

.content-section h2 {
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
}

.content-section h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  font-size: 1.2rem;
  color: var(--purple);
}

.styled-list {
  list-style: none;
  margin: var(--space-md) 0;
}

.styled-list li {
  padding-left: 1.5rem;
  margin-bottom: var(--space-sm);
  position: relative;
}

.styled-list li::before {
  content: '\2726';
  position: absolute;
  left: 0;
  color: var(--gold);
}


/* ──── About Page ──── */

.about-intro {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-xl);
  align-items: start;
  margin-bottom: var(--space-xl);
}

.about-portrait img {
  width: 100%;
  max-width: 350px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-medium);
}

.about-text h2 {
  margin-bottom: var(--space-md);
}

.about-text p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 0.85;
  padding-right: 0.1em;
  color: var(--gold-dark);
  font-weight: 700;
}


/* ──── FAQ ──── */

.faq-block {
  margin-top: var(--space-md);
}

.faq-item {
  margin-bottom: var(--space-lg);
}

.faq-item h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
  color: var(--purple);
}

.faq-item p {
  margin-bottom: 0;
}


/* ──── Newsletter Page ──── */

.newsletter-hero {
  background: linear-gradient(160deg, var(--dark) 0%, #2A1F38 50%, var(--purple-dark) 100%);
  color: var(--white);
  padding: var(--space-3xl) 0;
  position: relative;
  overflow: hidden;
}

.newsletter-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(201, 162, 39, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.newsletter-hero h1,
.newsletter-hero h2,
.newsletter-hero h3 {
  color: var(--white);
}

.newsletter-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.benefit-card {
  background: rgba(255, 255, 255, 0.07);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.4s var(--ease-out-cubic), background 0.3s ease;
}

.benefit-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.12);
}

.benefit-icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}

.benefit-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
}

.benefit-card p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0;
}

.newsletter-form-large {
  max-width: 500px;
  margin: var(--space-xl) auto 0;
  position: relative;
  z-index: 1;
}

.newsletter-form-large input {
  width: 100%;
  padding: 0.75rem 1.25rem;
  margin-bottom: var(--space-md);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.newsletter-form-large input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.25);
}

.newsletter-form-large .btn {
  width: 100%;
  justify-content: center;
}

.privacy-note {
  text-align: center;
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}


/* ──── Footer ──── */

footer {
  background: var(--dark);
  color: var(--white);
  padding: var(--space-xl) 0 var(--space-lg);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand .logo-text {
  color: var(--white);
  margin-bottom: var(--space-md);
}

.footer-brand p {
  color: var(--text-on-dark-muted);
  font-size: 0.95rem;
}

.footer-links h4,
.footer-social h4 {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: var(--space-md);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-sm);
}

.footer-links a {
  color: var(--text-on-dark-muted);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--gold);
}

.social-icons {
  display: flex;
  gap: var(--space-md);
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: var(--white);
  transition: all 0.3s var(--ease-out-cubic);
}

.social-icons a:hover {
  background: var(--gold);
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-on-dark-muted);
  font-size: 0.9rem;
}


/* ──── Form Messages ──── */

.form-message {
  padding: var(--space-md);
  border-radius: var(--radius);
  margin-top: var(--space-md);
  text-align: center;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s ease, transform 0.4s var(--ease-out-cubic);
}

.form-message.visible {
  opacity: 1;
  transform: translateY(0);
}

.form-message.success {
  background: rgba(39, 174, 96, 0.1);
  color: #27ae60;
  border: 1px solid rgba(39, 174, 96, 0.3);
}

.form-message.error {
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}


/* ──── Loading Spinner for Buttons ──── */

.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ──── Success Checkmark ──── */

@keyframes checkmark-draw {
  to { stroke-dashoffset: 0; }
}

.form-success-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: var(--space-sm);
}

.form-success-icon .check-path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: checkmark-draw 0.4s 0.2s var(--ease-out-cubic) forwards;
}


/* ──── Responsive ──── */

@media (max-width: 968px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    order: -1;
  }

  .hero-image img {
    max-width: 300px;
  }

  .book-card {
    grid-template-columns: 1fr;
  }

  .book-cover {
    text-align: center;
  }

  .book-cover img {
    max-width: 220px;
  }

  .author-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .author-image img {
    max-width: 250px;
    margin: 0 auto;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  .about-intro {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-portrait img {
    margin: 0 auto var(--space-lg);
  }

  .about-text p:first-of-type::first-letter {
    float: none;
    font-size: inherit;
    line-height: inherit;
    padding: 0;
    color: inherit;
    font-weight: inherit;
  }

  .book-showcase-content {
    grid-template-columns: 1fr;
  }

  .book-showcase-cover {
    padding: var(--space-lg);
  }

  .book-showcase-cover img {
    max-width: 220px;
  }

  .more-books-grid {
    grid-template-columns: 1fr;
  }

  .more-book-card-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .companion-books {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    box-shadow: var(--shadow-medium);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease-out-cubic), opacity 0.3s ease;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .menu-toggle {
    display: flex;
  }

  .signup-form {
    flex-direction: column;
  }

  section {
    padding: var(--space-2xl) 0;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .testimonial-card blockquote {
    font-size: 1.1rem;
  }
}


/* ──── Reduced Motion ──── */

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

  .btn-primary::before {
    display: none;
  }

  .animate-in {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
