/* ============================================
   BOOK SITE TEMPLATE - MASTER STYLESHEET
   Dr. Hines Inc. Book Empire
   ============================================ */

/* CSS Variables - Easy to customize per book */
:root {
  --primary-bg: #0d0d0d;
  --secondary-bg: #1a1a1a;
  --card-bg: #242424;
  --accent: #8B0000;
  --accent-hover: #a50000;
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #666;
  --border-color: #333;
  --success: #22c55e;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans Pro', -apple-system, sans-serif;
  --max-width: 1200px;
  --header-height: 80px;
}

/* 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(--primary-bg);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(13, 13, 13, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.header__logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

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

.nav__cta {
  background: var(--accent) !important;
  color: var(--text-primary) !important;
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
}

.nav__cta:hover {
  background: var(--accent-hover) !important;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: 0.3s ease;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--primary-bg);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }
  
  .nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  background: linear-gradient(180deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(139, 0, 0, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__content {
  max-width: 600px;
}

.hero__subtitle {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero__title span {
  color: var(--accent);
}

.hero__description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__book {
  position: relative;
}

.hero__book img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s ease;
}

.hero__book:hover img {
  transform: translateY(-10px);
}

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero__content {
    max-width: 100%;
  }
  
  .hero__buttons {
    justify-content: center;
  }
  
  .hero__book {
    max-width: 300px;
    margin: 0 auto;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--text-primary);
}

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(139, 0, 0, 0.3);
}

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn--secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Sections */
.section {
  padding: 6rem 0;
}

.section--alt {
  background: var(--secondary-bg);
}

.section__header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section__subtitle {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

/* Problem/Solution Section */
.problem-solution {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

.problem-solution__card {
  padding: 2.5rem;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.problem-solution__card h3 {
  margin-bottom: 1.5rem;
}

.problem-solution__card ul {
  list-style: none;
}

.problem-solution__card li {
  padding: 0.75rem 0;
  padding-left: 1.75rem;
  position: relative;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.problem-solution__card li:last-child {
  border-bottom: none;
}

.problem-solution__card li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.problem-solution__card--solution li::before {
  content: '✓';
  color: var(--success);
}

@media (max-width: 768px) {
  .problem-solution {
    grid-template-columns: 1fr;
  }
}

/* Who It's For */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.audience-card {
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.audience-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
}

.audience-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.audience-card h4 {
  margin-bottom: 0.5rem;
}

.audience-card p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* Chapters Section */
.chapters-list {
  max-width: 800px;
  margin: 0 auto;
}

.chapter-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.chapter-item__number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 60px;
}

.chapter-item__content h4 {
  margin-bottom: 0.25rem;
}

.chapter-item__content p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

/* Author Section */
.author {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  align-items: center;
}

.author__image {
  position: relative;
}

.author__image img {
  width: 100%;
  border-radius: 8px;
  filter: grayscale(20%);
}

.author__image::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: -20px;
  bottom: -20px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  z-index: -1;
}

.author__credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.author__credential {
  padding: 0.5rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.author__links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .author {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .author__image {
    max-width: 250px;
    margin: 0 auto;
  }
  
  .author__credentials {
    justify-content: center;
  }
  
  .author__links {
    justify-content: center;
  }
}

/* CTA Section */
.cta {
  text-align: center;
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--secondary-bg) 0%, var(--primary-bg) 100%);
  position: relative;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, rgba(139, 0, 0, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta__content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.cta h2 {
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

/* Email Form */
.email-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.email-form input {
  flex: 1;
  padding: 1rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
}

.email-form input::placeholder {
  color: var(--text-muted);
}

.email-form input:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 600px) {
  .email-form {
    flex-direction: column;
  }
}

/* Footer */
.footer {
  padding: 4rem 0 2rem;
  background: var(--primary-bg);
  border-top: 1px solid var(--border-color);
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer__brand p {
  font-size: 0.9rem;
  margin-top: 1rem;
}

.footer__links h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.footer__links ul {
  list-style: none;
}

.footer__links li {
  margin-bottom: 0.75rem;
}

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

.footer__links a:hover {
  color: var(--text-primary);
}

.footer__bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer__bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 500px) {
  .footer__inner {
    grid-template-columns: 1fr;
  }
}

/* Articles / Blog */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.article-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
}

.article-card__image {
  height: 200px;
  background: var(--secondary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--accent);
}

.article-card__content {
  padding: 1.5rem;
}

.article-card__category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.article-card__title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.article-card__title a {
  color: var(--text-primary);
}

.article-card__title a:hover {
  color: var(--accent);
}

.article-card__excerpt {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.article-card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Single Article */
.article-single {
  max-width: 800px;
  margin: 0 auto;
  padding-top: calc(var(--header-height) + 4rem);
}

.article-single__header {
  margin-bottom: 3rem;
}

.article-single__category {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.article-single__title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
}

.article-single__meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-single__content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-single__content h2 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
}

.article-single__content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-single__content p {
  color: var(--text-secondary);
}

.article-single__content ul,
.article-single__content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.article-single__content li {
  margin-bottom: 0.75rem;
}

.article-single__content blockquote {
  margin: 2rem 0;
  padding: 1.5rem 2rem;
  background: var(--card-bg);
  border-left: 4px solid var(--accent);
  font-style: italic;
  color: var(--text-secondary);
}

/* Article CTA Box */
.article-cta {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--accent);
  border-radius: 8px;
  text-align: center;
}

.article-cta h3 {
  margin-bottom: 1rem;
}

.article-cta p {
  margin-bottom: 1.5rem;
}

/* Author Box */
.author-box {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-top: 4rem;
}

.author-box__image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

.author-box__content h4 {
  margin-bottom: 0.5rem;
}

.author-box__content p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.author-box__link {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Resources Page */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.resource-card {
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
}

.resource-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
}

.resource-card__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.resource-card h3 {
  margin-bottom: 0.75rem;
}

.resource-card p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Buy Page */
.buy-hero {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 4rem;
  align-items: center;
  padding-top: calc(var(--header-height) + 4rem);
  min-height: 80vh;
}

.buy-hero__book img {
  width: 100%;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.5));
}

.buy-hero__formats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.format-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.format-option:hover {
  border-color: var(--accent);
}

.format-option__info {
  display: flex;
  flex-direction: column;
}

.format-option__type {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.format-option__price {
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .buy-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .buy-hero__book {
    max-width: 300px;
    margin: 0 auto;
  }
}

/* Page Header (for internal pages) */
.page-header {
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 4rem;
  text-align: center;
  background: linear-gradient(180deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
}

.page-header__subtitle {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
