/* Custom properties mapping to Stitch design tokens */
:root {
  --bg-color: #fbf9f4; /* Soft Cream */
  --surface-color: #fbf9f4;
  --surface-low: #f5f3ee; /* Nested section container */
  --surface-lowest: #ffffff; /* Elevated cards */
  --surface-bright: #eae8e3;
  --primary: #4441c4; /* Electric Indigo */
  --primary-container: #5d5cde;
  --secondary: #5f5e5e; /* Deep Charcoal */
  --text-color: #1b1c19; /* Almost Black */
  --text-secondary: #464554;
  --outline: #777585;
  --outline-variant: rgba(199, 196, 214, 0.15); /* Ghost border fallback at 15% opacity */
  --radius-full: 9999px;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 4px;
}

/* Base styles and fonts */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Manrope', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .serif-text {
  font-family: 'Newsreader', serif;
  font-weight: 500;
  color: var(--text-color);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(251, 249, 244, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background-color 0.3s;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-container));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(68, 65, 196, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(68, 65, 196, 0.3);
}

.btn-secondary {
  background-color: var(--surface-low);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: var(--surface-bright);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  padding: 8rem 0 6rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
}

.hero-ctas {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

/* Curated Shelf Section - Enforcing No-Line Rule */
.shelf-section {
  background-color: var(--surface-low);
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* Asymmetric Grid layout for premium feel */
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
}

.book-card {
  background-color: var(--surface-lowest);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 12px 40px rgba(27, 28, 25, 0.04);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(27, 28, 25, 0.08);
}

.book-cover-container {
  width: 100%;
  aspect-ratio: 2/3;
  background-color: var(--surface-low);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.book-cover-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-cover-fallback {
  text-align: center;
  padding: 2rem;
}

.book-cover-fallback .icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  display: block;
}

.book-title {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.book-author {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.book-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  background-color: var(--surface-low);
  color: var(--primary);
}

/* Pricing Section - Single tier concept */
.pricing-section {
  padding: 8rem 0;
  text-align: center;
}

.pricing-card {
  max-width: 500px;
  margin: 0 auto;
  background-color: var(--surface-low);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.02);
}

.pricing-price {
  font-size: 3.5rem;
  font-family: 'Newsreader', serif;
  margin: 1.5rem 0;
  color: var(--primary);
}

.pricing-price span {
  font-size: 1.25rem;
  font-family: 'Manrope', sans-serif;
  color: var(--text-secondary);
}

.pricing-features {
  list-style: none;
  margin-bottom: 2.5rem;
  text-align: left;
  display: inline-block;
}

.pricing-features li {
  margin-bottom: 0.8rem;
  position: relative;
  padding-left: 1.5rem;
}

.pricing-features li::before {
  content: "✓";
  color: var(--primary);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Footer style */
footer {
  background-color: var(--bg-color);
  padding: 4rem 0 3rem 0;
  border-top: 1px solid var(--outline-variant);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--primary);
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Responsive constraints */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.75rem;
  }
  .nav-links {
    display: none; /* simple burger menu / mobile layout fallback */
  }
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .footer-nav {
    flex-direction: column;
    gap: 1rem;
  }
}
