@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,600;0,700;1,600&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #faf7f2;
  --bg-card: #fffdf9;
  --bg-warm: #f3ebe0;
  --text: #2c2416;
  --text-muted: #7a6f62;
  --primary: #b85c38;
  --primary-dark: #9a4a2b;
  --accent: #3d5a45;
  --border: #e8ddd0;
  --shadow: 0 12px 40px rgba(44, 36, 22, 0.08);
  --radius: 4px;
  --font: 'DM Sans', system-ui, sans-serif;
  --display: 'Cormorant Garamond', Georgia, serif;
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: min(1160px, calc(100% - 36px)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo em { font-style: italic; color: var(--primary); font-weight: 600; }

.main-nav {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.header-actions { display: flex; gap: 8px; align-items: center; }

.icon-btn {
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: var(--text);
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border: 1.5px solid var(--text); color: var(--text); }

/* Hero magazine */
.hero-mag {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--border);
}

.hero-mag-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-mag-text .issue {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-mag-text h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 20px;
  font-weight: 700;
}

.hero-mag-text p {
  color: var(--text-muted);
  font-size: 17px;
  margin: 0 0 28px;
  max-width: 440px;
}

.hero-mag-img {
  position: relative;
}

.hero-mag-img img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
}

.hero-mag-img::after {
  content: '';
  position: absolute;
  inset: 12px -12px -12px 12px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  z-index: -1;
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}

.stat-item {
  padding: 28px 24px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stat-item:last-child { border-right: none; }

.stat-item strong {
  display: block;
  font-family: var(--display);
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-item span { font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em; }

/* Section titles */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  padding-top: 56px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: 2rem;
  margin: 0;
}

.section-head a { font-size: 13px; font-weight: 600; color: var(--primary); letter-spacing: 0.04em; }

/* Article cards */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-bottom: 56px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
  overflow: hidden;
}

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

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-card-body { padding: 20px 22px 24px; }

.article-card .cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.article-card h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 0 0 8px;
  line-height: 1.25;
}

.article-card p { font-size: 14px; color: var(--text-muted); margin: 0; line-height: 1.55; }

.topics-grid .article-card.hidden { display: none; }

/* Featured row */
.featured-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  padding-bottom: 56px;
}

.featured-large {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid var(--border);
}

.featured-large img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-large .overlay {
  position: relative;
  z-index: 1;
  padding: 32px;
  background: linear-gradient(transparent, rgba(44,36,22,0.85));
  color: #fff;
  width: 100%;
}

.featured-large .cat { color: #f3c4a8; }
.featured-large h3 { font-family: var(--display); font-size: 1.8rem; margin: 8px 0; }

.featured-stack { display: flex; flex-direction: column; gap: 28px; }

.featured-small {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 12px;
  align-items: center;
  transition: box-shadow 0.2s;
}

.featured-small:hover { box-shadow: var(--shadow); }
.featured-small img { width: 120px; height: 90px; object-fit: cover; }
.featured-small h4 { font-family: var(--display); font-size: 1.1rem; margin: 4px 0 0; }

/* Filter chips */
.filter-chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0 32px; }

.chip {
  padding: 8px 20px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.chip.active, .chip:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Article page */
.page-hero-sm {
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.page-hero-sm .meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.page-hero-sm h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 12px;
  max-width: 720px;
}

.page-hero-sm .lead { color: var(--text-muted); font-size: 18px; margin: 0; max-width: 600px; }

.article-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 48px;
  padding-bottom: 80px;
}

.article-content img.featured {
  width: 100%;
  height: 400px;
  object-fit: cover;
  margin-bottom: 32px;
}

.article-content p {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.article-content h2 {
  font-family: var(--display);
  font-size: 1.5rem;
  margin: 36px 0 14px;
  color: var(--text);
}

.article-sidebar .widget {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 20px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.widget-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin-bottom: 8px; }
.toc-list a { font-size: 14px; color: var(--text-muted); }
.toc-list a:hover { color: var(--primary); }

/* FAQ */
.faq-item { border: 1px solid var(--border); margin-bottom: 10px; background: var(--bg-card); }
.faq-q {
  width: 100%; padding: 18px 22px; background: none; border: none;
  text-align: left; font-family: var(--font); font-size: 15px; font-weight: 600;
  cursor: pointer; display: flex; justify-content: space-between;
}
.faq-q::after { content: '+'; color: var(--primary); font-size: 20px; }
.faq-item.open .faq-q::after { content: '−'; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s; }
.faq-item.open .faq-a { max-height: 300px; }
.faq-a-inner { padding: 0 22px 18px; color: var(--text-muted); font-size: 15px; line-height: 1.7; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 40px 0 80px; }
.contact-form .field { margin-bottom: 18px; }
.contact-form label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; color: var(--text-muted); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 14px; border: 1.5px solid var(--border);
  background: var(--bg-card); font-family: var(--font); color: var(--text);
}
.contact-form textarea { min-height: 140px; resize: vertical; }

/* Newsletter */
.newsletter-box {
  background: var(--accent);
  color: #fff;
  padding: 48px;
  text-align: center;
  margin: 56px 0;
}

.newsletter-box h2 { font-family: var(--display); font-size: 2rem; margin: 0 0 8px; }
.newsletter-box p { opacity: 0.85; margin: 0 0 24px; }
.newsletter-box form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.newsletter-box input {
  flex: 1; min-width: 200px; padding: 14px 18px; border: none;
  font-family: var(--font); background: rgba(255,255,255,0.95);
}
.newsletter-box .btn { background: var(--primary); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(44,36,22,0.5);
  z-index: 2000; display: none; align-items: flex-start; justify-content: center;
  padding: 80px 20px; overflow-y: auto;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--bg-card); width: min(520px, 100%);
  padding: 32px; border: 1px solid var(--border); position: relative;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-muted);
}
.search-input {
  width: 100%; padding: 14px; border: 1.5px solid var(--border);
  font-family: var(--font); font-size: 16px; margin-bottom: 16px;
}
.search-results a {
  display: block; padding: 12px 0; border-bottom: 1px solid var(--border);
  font-size: 15px; color: var(--text);
}
.search-results a:hover { color: var(--primary); }

/* Cookie bar */
#cookieBar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 3000;
  background: var(--text); color: #faf7f2; padding: 18px 24px;
  transform: translateY(100%); transition: transform 0.35s;
}
#cookieBar.show { transform: translateY(0); }
.cookie-inner { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cookie-inner p { margin: 0; font-size: 14px; flex: 1; min-width: 240px; }
.cookie-inner a { color: #f3c4a8; }
.cookie-btns { display: flex; gap: 10px; }
.cookie-btns button {
  padding: 10px 20px; font-family: var(--font); font-size: 13px; font-weight: 600;
  cursor: pointer; border: none;
}
#cookieAccept { background: var(--primary); color: #fff; }
#cookieDecline { background: transparent; color: #faf7f2; border: 1px solid rgba(255,255,255,0.3); }

/* Toast */
#toastContainer { position: fixed; bottom: 24px; right: 24px; z-index: 2500; }
.toast {
  background: var(--text); color: #faf7f2; padding: 14px 22px;
  margin-top: 8px; font-size: 14px; animation: slideIn 0.3s;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }

/* Back to top */
#backTop {
  position: fixed; bottom: 24px; left: 24px; width: 48px; height: 48px;
  background: var(--primary); color: #fff; border: none; border-radius: 50%;
  cursor: pointer; font-size: 20px; opacity: 0; pointer-events: none;
  transition: opacity 0.3s; z-index: 800;
}
#backTop.show { opacity: 1; pointer-events: auto; }

/* Footer */
.site-footer {
  background: var(--text);
  color: #d4c9bc;
  padding: 56px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-grid .logo { color: #faf7f2; margin-bottom: 12px; display: block; }
.footer-grid p { font-size: 14px; line-height: 1.7; margin: 0; }

.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #faf7f2;
  margin: 0 0 16px;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 14px; color: #d4c9bc; transition: color 0.2s; }
.footer-col a:hover { color: #f3c4a8; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

@media (max-width: 992px) {
  .hero-mag-grid, .featured-row, .article-layout, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr 1fr; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .stat-item:nth-child(2) { border-right: none; }
}

@media (max-width: 768px) {
  .main-nav {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-card); flex-direction: column; padding: 24px;
    border-bottom: 1px solid var(--border); gap: 16px;
  }
  .main-nav.open { display: flex; }
  .articles-grid, .stats-strip { grid-template-columns: 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .hero-mag-img img { height: 280px; }
}
