/* ==========================================================================
   The Century Tree Reader - Editorial Journal & Literary Review
   Design System: Academic Parchment, Deep Forest, Burgundy & Aged Brass
   ========================================================================== */

:root {
  --bg-parchment: #fcfbf7;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f6f3eb;
  --bg-surface-dark: #121e17;
  --bg-card-hover: #f1ede2;
  
  --primary-deep: #162a21;        /* Deep Historic Forest */
  --primary-forest: #224233;
  --accent-burgundy: #85262c;     /* Academic Burgundy */
  --accent-amber: #c8933e;        /* Aged Brass & Amber */
  --accent-amber-light: #e8ca92;
  
  --text-main: #1f2923;
  --text-muted: #57655d;
  --text-light: #f6f3eb;
  --text-subtle: #7f9087;

  --border-light: rgba(34, 66, 51, 0.12);
  --border-amber: rgba(200, 147, 62, 0.35);
  
  --font-serif: 'Newsreader', 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-display: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-subtle: 0 4px 20px rgba(18, 30, 23, 0.05);
  --shadow-medium: 0 10px 30px rgba(18, 30, 23, 0.08);
  --shadow-elevated: 0 20px 40px rgba(18, 30, 23, 0.12);
}

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

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

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

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

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.25s ease;
}

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

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}

.top-bar {
  background: var(--bg-surface-dark);
  color: var(--text-light);
  font-size: 0.8rem;
  padding: 6px 0;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 1px solid rgba(200, 147, 62, 0.2);
}

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

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

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

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-deep);
  position: relative;
  padding: 6px 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-amber);
  transition: width 0.25s ease;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary-deep);
  color: #ffffff;
  border-color: var(--primary-deep);
}

.btn-primary:hover {
  background: var(--accent-burgundy);
  border-color: var(--accent-burgundy);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(133, 38, 44, 0.25);
}

.btn-accent {
  background: var(--accent-amber);
  color: #121e17;
  border-color: var(--accent-amber);
}

.btn-accent:hover {
  background: #b58130;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-deep);
  border-color: var(--border-light);
}

.btn-outline:hover {
  border-color: var(--accent-amber);
  background: var(--bg-surface-elevated);
}

/* Hero Section */
.hero-editorial {
  padding: 70px 0 80px 0;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-parchment) 100%);
  border-bottom: 1px solid var(--border-light);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-amber);
  border-radius: 99px;
  color: var(--accent-burgundy);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  color: var(--primary-deep);
  margin-bottom: 20px;
  line-height: 1.15;
}

.hero-title span {
  color: var(--accent-burgundy);
  font-style: italic;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 32px;
}

.hero-image-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
  border: 1px solid var(--border-light);
}

.hero-image-frame img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-image-frame:hover img {
  transform: scale(1.03);
}

/* Section Common */
.section {
  padding: 80px 0;
}

.section-title-wrap {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 50px auto;
}

.section-tag {
  color: var(--accent-amber);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  color: var(--primary-deep);
  margin-bottom: 16px;
}

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

/* Article Cards */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 32px;
}

.article-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-color: var(--border-amber);
}

.article-card-img {
  height: 230px;
  overflow: hidden;
  position: relative;
}

.article-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-card-img img {
  transform: scale(1.05);
}

.article-category-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(18, 30, 23, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid rgba(200, 147, 62, 0.4);
}

.article-card-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin-bottom: 12px;
}

.article-card-title {
  font-size: 1.4rem;
  margin-bottom: 14px;
  color: var(--primary-deep);
  line-height: 1.35;
}

.article-card-title a:hover {
  color: var(--accent-burgundy);
}

.article-card-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.article-card-link {
  margin-top: auto;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-burgundy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-card-link:hover {
  color: var(--primary-deep);
  gap: 10px;
}

/* Single Article Content */
.single-article-header {
  background: var(--bg-surface-dark);
  color: #ffffff;
  padding: 70px 0 60px 0;
  border-bottom: 3px solid var(--accent-amber);
}

.single-article-body {
  padding: 60px 0 80px 0;
}

.article-content {
  background: #ffffff;
  padding: 48px 56px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  border: 1px solid var(--border-light);
  font-size: 1.1rem;
  line-height: 1.85;
}

.article-content h2 {
  font-size: 1.85rem;
  color: var(--primary-deep);
  margin: 40px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.article-content p {
  margin-bottom: 24px;
  color: #334155;
}

.article-content ul, .article-content ol {
  margin: 0 0 28px 24px;
  color: #334155;
}

.article-content li {
  margin-bottom: 10px;
}

.editorial-callout {
  background: var(--bg-surface-elevated);
  border-left: 4px solid var(--accent-amber);
  padding: 24px 28px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 36px 0;
}

.editorial-callout h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--primary-deep);
  margin-bottom: 8px;
}

/* Footer */
.site-footer {
  background: var(--bg-surface-dark);
  color: var(--text-light);
  padding: 70px 0 30px 0;
  border-top: 1px solid rgba(200, 147, 62, 0.2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 50px;
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--accent-amber-light);
  margin-bottom: 22px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 0.95rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #94a3b8;
  flex-wrap: wrap;
  gap: 16px;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-content { padding: 32px 24px; }
}

@media (max-width: 640px) {
  .nav-menu { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}