/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

/* Design Tokens */
:root {
  /* Colors - Liturgical & Classic Professional */
  --color-primary: #8a1538;
  /* Deep Anglican Red */
  --color-primary-light: #a92044;
  --color-primary-dark: #630823;

  --color-surface: #fdfbf7;
  /* Off-white / parchment feel */
  --color-surface-alt: #f4f0e6;
  --color-background: #ffffff;

  --color-text-main: #1e293b;
  --color-text-muted: #475569;

  --color-border: #e2e8f0;

  /* Typography */
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  --spacing-2xl: 8rem;

  /* Shadows & Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background-color: var(--color-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-main);
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--color-text-muted);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

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

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

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

/* Header & Navigation */
.site-header {
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.logo img {
  height: 92px;
  width: auto;
  max-width: none;
}

.logo:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
  list-style: none;
}

.nav-links a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
  text-decoration: none;
}

/* Hero Section */
.hero {
  position: relative;
  background-color: var(--color-background);
  /* Fallback */
  background-image: url('../img/hero-bg.webp');
  /* We will assume an image named hero-bg.webp */
  background-size: cover;
  background-position: center;
  padding: var(--spacing-2xl) 0;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  color: #ffffff;
  /* Make text white so it contrasts with a darker background image */
}

/* Add a dark overlay so the text is always readable regardless of the image */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(30, 41, 59, 0.75);
  /* Dark slate overlay with 75% opacity */
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  /* Ensure text sits above the overlay */
  max-width: 700px;
  margin: 0 auto;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: #ffffff;
  /* Lighter shade of red/primary for contrast against dark bg */
  margin-bottom: var(--spacing-md);
  display: block;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: var(--spacing-md);
  color: #ffffff;
}

.hero p {
  font-size: 1.125rem;
  margin-bottom: var(--spacing-lg);
  color: #e2e8f0;
  /* Light gray for readability */
}

.btn {
  display: inline-block;
  background-color: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: background-color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  background-color: var(--color-primary-dark);
  text-decoration: none;
  transform: translateY(-2px);
  color: #fff;
}

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

.btn-outline:hover {
  background-color: var(--color-primary);
  color: #fff;
}

/* Featured Section (Latest Audio/Posts) */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}

.card {
  background: var(--color-background);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card-img {
  width: 100%;
  height: 200px;
  background-color: var(--color-surface-alt);
  object-fit: cover;
}

.card-content {
  padding: var(--spacing-md);
}

.card-meta {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-xs);
  display: block;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

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

.card-title a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* Footer */
.site-footer {
  background-color: var(--color-text-main);
  color: var(--color-surface);
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  text-align: center;
}

.site-footer a {
  color: var(--color-surface-alt);
}

.site-footer a:hover {
  color: #fff;
}

.footer-content {
  margin-bottom: var(--spacing-lg);
}

.footer-text {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-surface);
}

.footer-bottom {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-md);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Responsive */
@media (max-width: 768px) {
  .logo img {
    height: 76px;
  }

  .nav-links {
    position: fixed;
    top: 96px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 96px);
    background-color: var(--color-background);
    flex-direction: column;
    align-items: center;
    padding-top: var(--spacing-xl);
    gap: var(--spacing-xl);
    transition: left 0.3s ease;
    box-shadow: var(--shadow-md);
    display: flex;
    /* Override display: none if needed, but we control via toggle class */
  }

  .nav-links.active {
    left: 0;
  }

  .menu-toggle {
    display: block !important;
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 1.5rem;
    cursor: pointer;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 var(--spacing-md);
  }
}

/* Menu Toggle Button Style (hidden on desktop) */
.menu-toggle {
  display: none;
}
