/* Aeternum Hub Static Blog Styles
   Matches React app design system: Deep Navy + Champagne Gold
*/

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Roboto+Condensed:wght@300;400;500;700&display=swap');

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

/* CSS Variables - matching React app's design tokens */
:root {
  /* Core Colors */
  --navy: hsl(225, 30%, 14%);
  --navy-light: hsl(225, 25%, 22%);
  --navy-dark: hsl(225, 35%, 10%);
  --gold: hsl(43, 45%, 59%);
  --gold-light: hsl(43, 50%, 75%);
  --gold-dark: hsl(43, 40%, 45%);
  --cream: hsl(40, 30%, 96%);
  --cream-dark: hsl(40, 20%, 92%);
  --background: hsl(40, 20%, 98%);
  --foreground: hsl(220, 20%, 15%);
  --muted: hsl(220, 10%, 45%);
  --border: hsl(220, 15%, 88%);
  
  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Roboto Condensed', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px -2px rgba(30, 36, 51, 0.08);
  --shadow-md: 0 8px 24px -4px rgba(30, 36, 51, 0.12);
  --shadow-lg: 0 16px 48px -8px rgba(30, 36, 51, 0.16);
  
  /* Border Radius */
  --radius: 0.625rem;
  --radius-lg: 1rem;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: rgba(201, 168, 87, 0.3);
  color: var(--navy);
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
  color: var(--foreground);
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; margin-top: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-top: 2rem; margin-bottom: 0.75rem; }

p {
  margin-bottom: 1rem;
  color: var(--muted);
}

.lead {
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}

/* Header/Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

@media (min-width: 1024px) {
  .nav { height: 5rem; }
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-img {
  width: 36px;
  height: 36px;
  min-width: 36px;
  max-width: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
}

.logo-text span {
  color: var(--gold);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
}

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

.nav-links a:hover {
  color: var(--navy);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gold) !important;
  color: var(--navy) !important;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--gold-dark) !important;
  color: var(--navy) !important;
}

/* Mobile menu */
.mobile-menu-btn {
  display: flex;
  padding: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--navy);
}

@media (min-width: 1024px) {
  .mobile-menu-btn { display: none; }
}

/* Main Content */
main {
  padding-top: 6rem;
  padding-bottom: 4rem;
}

@media (min-width: 1024px) {
  main {
    padding-top: 8rem;
    padding-bottom: 6rem;
  }
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.breadcrumbs a {
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--gold);
}

.breadcrumbs span {
  color: var(--muted);
}

.breadcrumbs .current {
  color: var(--foreground);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid rgba(201, 168, 87, 0.3);
  color: var(--gold);
  background: transparent;
}

/* Article Meta */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 1.5rem;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.article-meta svg {
  width: 1rem;
  height: 1rem;
}

/* Article Content */
.article-content {
  max-width: 65ch;
}

.article-content ul, .article-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--muted);
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content li strong {
  color: var(--foreground);
}

.article-content li::marker {
  color: var(--gold);
}

/* Two-column layout */
.article-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .article-grid {
    grid-template-columns: 1fr 300px;
  }
}

/* Sidebar/TOC */
.sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .sidebar {
    display: block;
    position: sticky;
    top: 7rem;
    align-self: start;
  }
}

.toc {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.toc h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
  font-family: var(--font-sans);
}

.toc ul {
  list-style: none;
}

.toc li {
  margin-bottom: 0.5rem;
}

.toc a {
  font-size: 0.875rem;
  color: var(--muted);
  display: block;
  padding: 0.25rem 0;
}

.toc a:hover {
  color: var(--gold);
}

/* CTA Box */
.cta-box {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 3rem 0;
  text-align: center;
}

.cta-box h3 {
  color: white;
  margin-bottom: 0.5rem;
}

.cta-box p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Disclaimer */
.disclaimer {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-top: 2rem;
}

.disclaimer p {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.disclaimer strong {
  color: var(--foreground);
}

/* Related Posts */
.related-posts {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.related-posts h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.posts-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Card */
.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.card-content {
  padding: 1.5rem;
}

.card .badge {
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.card h3 a {
  color: var(--foreground);
}

.card h3 a:hover {
  color: var(--gold);
}

.card p {
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Footer */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 3rem 0;
}

.footer-content {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  max-width: 20rem;
}

.footer h4 {
  color: var(--gold);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  font-family: var(--font-sans);
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 0.5rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

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

.footer-bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-disclaimer {
  font-size: 0.75rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-copyright {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Blog Index Specific */
.blog-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-header h1 {
  margin-bottom: 0.5rem;
}

.blog-header p {
  max-width: 40rem;
  margin: 0 auto;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: white;
}

.search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 87, 0.1);
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: white;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.category-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
}

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-gold { color: var(--gold); }
.text-muted { color: var(--muted); }
.mb-4 { margin-bottom: 1rem; }
.mt-6 { margin-top: 1.5rem; }
