/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Color Variables */
:root {
  --bg-color: #0c0e12;
  --bg-card: rgba(22, 26, 36, 0.7);
  --bg-card-hover: rgba(30, 36, 50, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(212, 175, 55, 0.3);
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent-gold: #d4af37;
  --accent-glow: rgba(245, 166, 35, 0.1);
  
  --btn-amazon: linear-gradient(135deg, #f5a623 0%, #d4af37 100%);
  --btn-amazon-hover: linear-gradient(135deg, #ffb63b 0%, #e5c158 100%);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Ambient background glows */
body::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.04) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: '';
  position: absolute;
  bottom: 10%;
  right: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.03) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Layout Containers */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
}

header {
  padding: 3rem 0 2rem 0;
  text-align: center;
}

/* Author Brand */
.author-brand h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
}

.author-brand .tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Unified Cards Grid Flow */
.cards-grid {
  display: flex;
  flex-flow: row wrap;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
  align-items: stretch;
}

/* Card base styles */
.book-card, .newsletter-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.book-card {
  flex: 1 1 calc(50% - 1rem); /* 2 columns on desktop */
  min-width: 280px;
  justify-content: space-between;
}

.newsletter-card {
  width: 100%;
  max-width: 600px;
  justify-content: center;
}

.book-card:hover, .newsletter-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-color-hover);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25), 0 0 20px var(--accent-glow);
}

/* Featured Badge */
.featured-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent-gold);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  margin-bottom: 1rem;
}

/* Book Cover Styling */
.book-cover-container {
  flex-shrink: 0;
  width: 150px;
  height: 225px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.35);
  background: #1c202a;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1.25rem;
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.book-card:hover .book-cover {
  transform: scale(1.02);
}

.book-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 1rem;
  background: linear-gradient(135deg, #1b212f 0%, #0d1016 100%);
  border-left: 4px solid var(--accent-gold);
}

.fallback-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fallback-author {
  font-size: 0.75rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* Book Details content */
.book-details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  width: 100%;
  flex-grow: 1;
}

.book-info-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}

.book-info-header h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.book-info-header h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
}

.book-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.book-description p {
  margin-bottom: 0.5rem;
}

.book-description p:last-child {
  margin-bottom: 0;
}

/* Purchase Button (Styled Span inside Card Link) */
.buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-amazon);
  color: #000000;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
  width: 100%;
  margin-top: auto;
}

.book-card:hover .buy-button {
  background: var(--btn-amazon-hover);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.3);
}

.buy-button svg {
  margin-right: 0.5rem;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Email Signup Section specific spacing */
.newsletter-section {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 3.5rem;
}

.newsletter-card h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.newsletter-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.signup-form-wrapper {
  width: 100%;
  margin-top: auto;
  display: flex;
  justify-content: center;
}

/* Override ConvertKit/Kit.com widget spacing and duplicate elements */
.signup-form-wrapper form,
.signup-form-wrapper .formkit-form,
.signup-form-wrapper .seva-form,
.signup-form-wrapper .formkit-background {
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}


.signup-form-wrapper .formkit-header,
.signup-form-wrapper .formkit-subheader,
.signup-form-wrapper .formkit-guarantee {
  display: none !important;
}

.signup-form-wrapper .formkit-input {
  margin-bottom: 0.5rem !important;
}

/* About Author card */
.about-author {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  padding: 1.75rem;
  margin-bottom: 4rem;
}

.about-author-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.75rem;
}

.about-avatar {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  padding: 4px;
}

.about-avatar svg {
  width: 100%;
  height: 100%;
  fill: var(--accent-gold);
}

.about-bio {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about-bio h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

.about-bio p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.social-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  width: fit-content;
}

.social-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* Footer Section */
footer {
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  background: rgba(12, 14, 18, 0.8);
}

footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.footer-disclosure {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Responsive Overrides */
@media (max-width: 920px) {
  .book-card, .newsletter-card {
    flex: 1 1 calc(50% - 1rem); /* 2 columns on tablet screens */
  }
}

@media (max-width: 768px) {
  header {
    padding: 2.5rem 0 1.5rem 0;
  }
  
  .author-brand h1 {
    font-size: 2.5rem;
  }
  
  .book-card, .newsletter-card {
    flex: 1 1 100%; /* Stacks 1 column wide on mobile */
    padding: 1.5rem;
  }
  
  .about-author-content {
    flex-direction: column;
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .author-brand h1 {
    font-size: 2rem;
  }
  
  .newsletter-card h2, .book-info-header h3 {
    font-size: 1.45rem;
  }
}
