/* ==========================================================================
   Curious Weekly — Editorial Magazine Design System
   Aesthetic: Warm Paper Journal, Sophisticated Editorial Serif, Deep Crimson Accent
   ========================================================================== */

:root {
  --bg-page: #fbf9f5;
  --bg-card: #ffffff;
  --bg-alt: #f3efe6;
  --text-main: #1c1a17;
  --text-muted: #68635c;
  --text-faint: #9c968c;
  --primary: #991b1b;
  --primary-hover: #7f1d1d;
  --primary-light: #fef2f2;
  --accent: #b45309;
  --border-light: #e8e3d8;
  --border-dark: #292524;
  --shadow-sm: 0 2px 8px rgba(28,26,23,0.04);
  --shadow-md: 0 8px 24px rgba(28,26,23,0.07);
  --shadow-lg: 0 16px 40px rgba(28,26,23,0.11);
  --font-serif: "Playfair Display", "Georgia", "Cambria", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 1200px;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   MASTHEAD HEADER (Classic High-End Journal Layout)
   ========================================================================== */

.top-bar {
  border-bottom: 1px solid var(--border-light);
  padding: 8px 0;
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left {
  display: flex;
  gap: 16px;
  align-items: center;
}

.edition-badge {
  background: var(--border-dark);
  color: #fff;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 10px;
  letter-spacing: 1px;
}

.masthead {
  text-align: center;
  padding: 28px 0 20px;
}

.masthead-logo {
  font-family: var(--font-serif);
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--text-main);
  line-height: 1.05;
  text-transform: uppercase;
  display: inline-block;
  position: relative;
}

.masthead-logo span {
  color: var(--primary);
}

.masthead-tagline {
  font-size: 13.5px;
  font-style: italic;
  font-family: var(--font-serif);
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: 0.4px;
}

/* Double Line Border Separator */
.masthead-rules {
  border-top: 2px solid var(--text-main);
  border-bottom: 1px solid var(--text-main);
  padding: 4px 0;
  margin-top: 18px;
}

/* Category Navigation Bar */
.category-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 0;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-nav a {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  position: relative;
  padding: 4px 2px;
  white-space: nowrap;
}

.category-nav a:hover,
.category-nav a.active {
  color: var(--primary);
}

.category-nav a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

/* ==========================================================================
   COVER STORY / HERO BANNER (Lead Editorial Feature)
   ========================================================================== */

.hero-cover {
  margin: 32px 0 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cover:hover {
  box-shadow: var(--shadow-md);
}

.hero-cover-img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
}

.hero-cover-content {
  padding: 44px 38px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kicker {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--primary);
  margin-bottom: 12px;
}

.hero-cover-title {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.6px;
  color: var(--text-main);
  margin-bottom: 16px;
}

.hero-cover-excerpt {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.byline-meta {
  font-size: 12.5px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.byline-meta span {
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   EDITORIAL SECTION DIVIDERS & GRID
   ========================================================================== */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--text-main);
  padding-bottom: 10px;
  margin-bottom: 28px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.4px;
  text-transform: uppercase;
  color: var(--text-main);
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 50px;
}

.magazine-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-img-wrap {
  width: 100%;
  height: 210px;
  overflow: hidden;
  position: relative;
  background: var(--bg-alt);
}

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

.magazine-card:hover .card-img {
  transform: scale(1.04);
}

.card-body {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.3px;
  margin-bottom: 10px;
  color: var(--text-main);
}

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

.card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-size: 11.5px;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

/* ==========================================================================
   ARTICLE DETAIL PAGE (Deep-Reading Layout)
   ========================================================================== */

.article-container {
  max-width: 820px;
  margin: 36px auto 60px;
  background: var(--bg-card);
  padding: 48px 54px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.article-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.article-headline {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.8px;
  color: var(--text-main);
  margin: 14px 0 18px;
}

.article-deck {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-style: italic;
  margin-bottom: 22px;
}

.article-cover-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 36px;
}

.article-content {
  font-size: 18px;
  line-height: 1.85;
  color: #2b2825;
}

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

.article-content h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text-main);
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.article-content h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 800;
  margin: 28px 0 12px;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--bg-alt);
  padding: 22px 26px;
  margin: 34px 0;
  border-radius: 0 6px 6px 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-main);
}

/* ==========================================================================
   AD SLOTS & PLACEHOLDERS (Native In-Article Placement)
   ========================================================================== */

.ad-slot {
  margin: 32px auto;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}

.ad-slot:empty {
  display: none;
}

/* ==========================================================================
   LEGAL & COMPLIANCE PAGES
   ========================================================================== */

.legal-box {
  max-width: 860px;
  margin: 40px auto 60px;
  background: var(--bg-card);
  padding: 50px 54px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.legal-box h1 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--text-main);
  padding-bottom: 12px;
}

.legal-box h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 800;
  margin: 30px 0 12px;
  color: var(--text-main);
}

.legal-box p {
  font-size: 16.5px;
  line-height: 1.8;
  color: #38342f;
  margin-bottom: 18px;
}

/* ==========================================================================
   FOOTER (Classic Journal Base)
   ========================================================================== */

footer {
  margin-top: auto;
  background: var(--bg-alt);
  border-top: 2px solid var(--border-dark);
  padding: 46px 0 36px;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.6px;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 16px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-nav a {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

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

.footer-copy {
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ==========================================================================
   GDPR / CCPA BANNER (Refined Minimal Bottom Toast)
   ========================================================================== */

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1c1a17;
  color: #f5f5f4;
  padding: 16px 24px;
  z-index: 99999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
  gap: 20px;
}

.cookie-content {
  font-size: 13px;
  line-height: 1.5;
  color: #d6d3d1;
}

.cookie-content a {
  color: #fca5a5;
  text-decoration: underline;
}

.cookie-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s;
}

.cookie-btn:hover {
  background: var(--primary-hover);
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablets & Mobile Viewports)
   ========================================================================== */

@media (max-width: 900px) {
  .hero-cover {
    grid-template-columns: 1fr;
  }
  .hero-cover-img {
    height: 260px;
  }
  .hero-cover-content {
    padding: 28px 22px;
  }
  .editorial-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .article-container, .legal-box {
    padding: 32px 24px;
    margin: 20px auto 40px;
  }
}

@media (max-width: 640px) {
  .masthead-logo {
    font-size: 34px;
  }
  .editorial-grid {
    grid-template-columns: 1fr;
  }
  .article-headline {
    font-size: 28px;
  }
  .article-content {
    font-size: 16.5px;
    line-height: 1.75;
  }
  .hero-cover-title {
    font-size: 24px;
  }
  #cookie-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-btn {
    text-align: center;
  }
}
