/* ==========================================================================
   K.G. WEAVER - OFFICIAL AUTHOR WEBSITE STYLESHEET
   Clean, Modern, Responsive & Optimized for Plesk Hosting
   ========================================================================== */

:root {
  --bg-primary: #0a0f1d;
  --bg-secondary: #0f172a;
  --bg-card: #162036;
  --bg-card-hover: #1e293b;
  --accent-gold: #d4af37;
  --accent-gold-light: #f3e5ab;
  --accent-gold-dark: #aa7c11;
  --accent-amazon: #ff9900;
  --accent-amazon-hover: #e88b00;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: rgba(212, 175, 55, 0.2);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 25px rgba(212, 175, 55, 0.15);
  --font-heading: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1200px;
}

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

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmospheric Glow */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 15%, rgba(30, 58, 138, 0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

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

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

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

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

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 15, 29, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo img {
  height: 48px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
}

.brand-tag {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--accent-gold);
  text-transform: uppercase;
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-gold-light);
}

.nav-link.active::after,
.nav-link:hover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), transparent);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent-amazon), var(--accent-amazon-hover));
  color: #111;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.25);
}

.nav-btn:hover {
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 153, 0, 0.35);
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}

/* ==========================================================================
   BUTTONS & UI COMPONENTS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-amazon {
  background: linear-gradient(135deg, #ff9900, #e68a00);
  color: #0a0f1d;
  box-shadow: 0 8px 20px rgba(255, 153, 0, 0.25);
}

.btn-amazon:hover {
  background: linear-gradient(135deg, #ffaa1d, #ff9900);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(255, 153, 0, 0.35);
}

.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: #0a0f1d;
  box-shadow: var(--shadow-glow);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
  color: #000;
  transform: translateY(-2px);
}

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

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

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--accent-gold-light);
  border: 1px solid var(--border-color);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  padding: 5rem 0 4rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge-wrap {
  margin-bottom: 1.25rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: 1px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-meta {
  display: flex;
  gap: 2rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
}

.meta-item h4 {
  font-size: 1.25rem;
  color: var(--accent-gold);
  font-family: var(--font-heading);
}

.meta-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Book Cover 3D Display */
.hero-book-card {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

.book-cover-wrap {
  position: relative;
  max-width: 340px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transition: var(--transition);
  transform: rotateY(-8deg) rotateX(4deg);
  border: 1px solid var(--border-color);
}

.book-cover-wrap:hover {
  transform: rotateY(0deg) rotateX(0deg) translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 35px rgba(212, 175, 55, 0.3);
}

.book-cover-wrap img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

/* ==========================================================================
   FEATURED / BOOKS GRID SECTION
   ========================================================================== */

.section {
  padding: 5rem 0;
}

.section-dark {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.book-card-image-wrap {
  position: relative;
  background: #0d1322;
  padding: 2rem 1.5rem;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border-subtle);
}

.book-card-image {
  max-width: 200px;
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.book-card:hover .book-card-image {
  transform: scale(1.03);
}

.book-card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.book-card-genre {
  font-size: 0.8rem;
  color: var(--accent-gold);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.book-card-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.book-card-title a {
  color: var(--text-primary);
}

.book-card-title a:hover {
  color: var(--accent-gold-light);
}

.book-card-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.book-card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}

/* ==========================================================================
   BOOK DETAIL VIEW
   ========================================================================== */

.book-detail-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 4rem;
  align-items: start;
}

.book-detail-cover {
  position: sticky;
  top: 100px;
}

.book-detail-cover img {
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  width: 100%;
}

.book-detail-content h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
}

.book-detail-subtitle {
  font-size: 1.25rem;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
}

.book-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.synopsis-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  white-space: pre-line;
}

.excerpt-box {
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent-gold);
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  margin-bottom: 2.5rem;
  color: var(--text-primary);
}

.buy-buttons-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ==========================================================================
   AUTHOR BIO & ABOUT SECTION
   ========================================================================== */

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '"';
  position: absolute;
  top: -20px;
  right: 20px;
  font-family: var(--font-heading);
  font-size: 160px;
  color: rgba(212, 175, 55, 0.05);
  line-height: 1;
  pointer-events: none;
}

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

.about-lead {
  font-size: 1.2rem;
  color: var(--accent-gold-light);
  font-weight: 500;
  line-height: 1.7;
}

/* ==========================================================================
   NEWSLETTER & CONTACT
   ========================================================================== */

.newsletter-box {
  background: linear-gradient(135deg, #131b2e 0%, #0d1424 100%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 3.5rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-glow);
}

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 2rem auto 0;
  gap: 0.75rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group.full {
  grid-column: span 2;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

.alert {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background: #070a14;
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
}

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 1rem;
  max-width: 350px;
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  letter-spacing: 1px;
}

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

.footer-links li {
  margin-bottom: 0.75rem;
}

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

.footer-links a:hover {
  color: var(--accent-gold-light);
  padding-left: 4px;
}

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

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

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

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

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

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

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

  .book-detail-cover {
    max-width: 320px;
    margin: 0 auto;
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .site-header .container {
    height: 70px;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-150%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .mobile-toggle {
    display: block;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full {
    grid-column: span 1;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
