/* 
 * Covenant Breach Trilogy Website
 * Main Stylesheet
 * Author: Alan Dinall
 */

/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Source+Sans+Pro:wght@300;400;600&display=swap');

/* ===== VARIABLES ===== */
:root {
  /* Colors */
  --deep-space-blue: #0A1128;
  --parchment: #E8D0A9;
  --covenant-red: #8B0000;
  --starlight-silver: #E0E1E2;
  --nebula-purple: #614685;
  --ship-gray: #2D3142;
  
  /* Typography */
  --heading-font: 'Cinzel', serif;
  --body-font: 'Source Sans Pro', sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --section-padding: 6rem;
  
  /* Other */
  --border-radius: 8px;
  --transition-standard: all 0.3s ease;
  --max-width: 1200px;
  --header-height: 80px;
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--body-font);
  font-weight: 400;
  line-height: 1.6;
  color: var(--starlight-silver);
  background-color: var(--deep-space-blue);
  background-image: url('../images/stars-bg.jpg');
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
}

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

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

a:hover {
  color: var(--starlight-silver);
}

ul, ol {
  list-style-position: inside;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--parchment);
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 2rem;
}

h4 {
  font-size: 1.5rem;
}

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

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

.subtitle {
  font-family: var(--body-font);
  font-weight: 300;
  font-size: 1.25rem;
  color: var(--starlight-silver);
  margin-bottom: var(--space-lg);
}

.book-title {
  font-family: var(--heading-font);
  font-weight: 700;
  color: var(--parchment);
}

.quote {
  font-family: var(--body-font);
  font-weight: 300;
  font-style: italic;
  font-size: 1.25rem;
  border-left: 4px solid var(--covenant-red);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--section-padding) 0;
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg);
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(10, 17, 40, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(232, 208, 169, 0.1);
}

.header-content {
  height: var(--header-height);
}

.logo {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--parchment);
}

.logo span {
  color: var(--covenant-red);
}

.nav-list {
  display: flex;
  list-style: none;
}

.nav-item {
  margin-left: var(--space-lg);
}

.nav-link {
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 1rem;
  color: var(--starlight-silver);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--covenant-red);
  transition: var(--transition-standard);
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--parchment);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--parchment);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(10, 17, 40, 0.7), rgba(10, 17, 40, 0.9));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  animation: fadeInUp 1s ease;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: var(--space-xl);
  animation: fadeInUp 1s ease 0.2s forwards;
  opacity: 0;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  animation: fadeInUp 1s ease 0.4s forwards;
  opacity: 0;
}

/* ===== BOOK SHOWCASE ===== */
.book-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.book-card {
  background-color: var(--ship-gray);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: var(--transition-standard);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.book-cover {
  position: relative;
  overflow: hidden;
  padding-top: 150%; /* 2:3 aspect ratio */
}

.book-cover img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-standard);
}

.book-info {
  padding: var(--space-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.book-info h3 {
  margin-bottom: var(--space-sm);
}

.book-info p {
  margin-bottom: var(--space-md);
}

.book-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--starlight-silver);
}

.book-status {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--covenant-red);
  color: var(--starlight-silver);
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.book-status.coming-soon {
  background-color: var(--nebula-purple);
}

/* ===== FEATURED BOOK ===== */
.featured-book {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.featured-book-cover {
  position: relative;
}

.featured-book-cover img {
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.featured-book-info h2 {
  margin-bottom: var(--space-sm);
}

.featured-book-subtitle {
  font-family: var(--body-font);
  font-weight: 300;
  font-size: 1.25rem;
  color: var(--covenant-red);
  margin-bottom: var(--space-md);
}

.featured-book-description {
  margin-bottom: var(--space-lg);
}

/* ===== AUTHOR SECTION ===== */
.author-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-xl);
  align-items: center;
}

.author-image {
  border-radius: var(--border-radius);
  overflow: hidden;
}

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

.author-subtitle {
  font-family: var(--body-font);
  font-weight: 300;
  font-size: 1.25rem;
  color: var(--covenant-red);
  margin-bottom: var(--space-md);
}

/* ===== CONSTITUTIONAL CONNECTION ===== */
.connection-section {
  background-color: rgba(45, 49, 66, 0.7);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
}

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

.connection-item {
  text-align: center;
  padding: var(--space-lg);
}

.connection-icon {
  font-size: 2.5rem;
  color: var(--covenant-red);
  margin-bottom: var(--space-md);
}

/* ===== NEWSLETTER ===== */
.newsletter {
  background-color: rgba(10, 17, 40, 0.8);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  text-align: center;
}

.newsletter-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--space-md);
}

.input-group {
  display: flex;
}

.newsletter-input {
  flex-grow: 1;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(232, 208, 169, 0.3);
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--starlight-silver);
  border-radius: 4px 0 0 4px;
  font-family: var(--body-font);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--parchment);
}

.newsletter-button {
  padding: 0.75rem 1.5rem;
  background-color: var(--covenant-red);
  color: var(--starlight-silver);
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-family: var(--body-font);
  font-weight: 600;
  transition: var(--transition-standard);
}

.newsletter-button:hover {
  background-color: #a50000;
}

.privacy-text {
  font-size: 0.875rem;
  color: var(--starlight-silver);
  opacity: 0.7;
  margin-top: var(--space-md);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-family: var(--body-font);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-standard);
}

.btn-primary {
  background-color: var(--parchment);
  color: var(--deep-space-blue);
  border: none;
}

.btn-primary:hover {
  background-color: #f0e0c0;
  color: var(--deep-space-blue);
  transform: scale(1.05);
}

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

.btn-secondary:hover {
  background-color: rgba(232, 208, 169, 0.1);
  color: var(--parchment);
  transform: scale(1.05);
}

.btn-accent {
  background-color: var(--covenant-red);
  color: var(--starlight-silver);
  border: none;
}

.btn-accent:hover {
  background-color: #a50000;
  color: var(--starlight-silver);
  transform: scale(1.05);
}

/* ===== FOOTER ===== */
.footer {
  background-color: rgba(10, 17, 40, 0.9);
  padding: var(--space-xl) 0;
  border-top: 1px solid rgba(232, 208, 169, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
}

.footer-column h4 {
  margin-bottom: var(--space-md);
  font-size: 1.25rem;
}

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

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

.footer-link a {
  color: var(--starlight-silver);
  transition: var(--transition-standard);
}

.footer-link a:hover {
  color: var(--parchment);
}

.social-links {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(232, 208, 169, 0.1);
  color: var(--parchment);
  transition: var(--transition-standard);
}

.social-link:hover {
  background-color: var(--parchment);
  color: var(--deep-space-blue);
  transform: translateY(-3px);
}

.footer-bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(232, 208, 169, 0.1);
  text-align: center;
  font-size: 0.875rem;
  color: var(--starlight-silver);
  opacity: 0.7;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.fade-in {
  animation: fadeIn 1s ease forwards;
}

.fade-in-up {
  animation: fadeInUp 1s ease forwards;
}

/* ===== UTILITIES ===== */
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.text-center { text-align: center; }
.text-right { text-align: right; }

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1023px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.75rem; }
  
  .hero-title { font-size: 3rem; }
  
  .featured-book {
    grid-template-columns: 1fr;
  }
  
  .featured-book-cover {
    max-width: 350px;
    margin: 0 auto;
  }
  
  .author-section {
    grid-template-columns: 1fr;
  }
  
  .author-image {
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  :root {
    --section-padding: 4rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 1.25rem; }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .nav-list {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: rgba(10, 17, 40, 0.95);
    flex-direction: column;
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(232, 208, 169, 0.1);
  }
  
  .nav-list.active {
    display: flex;
  }
  
  .nav-item {
    margin: 0;
    text-align: center;
    padding: var(--space-sm) 0;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }
}

