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

:root {
  --stone: #f7f5f2;
  --stone-dark: #ebe7e0;
  --sage: #6b8f71;
  --sage-dark: #4f6f54;
  --sage-light: #e8f0e9;
  --terra: #c4715b;
  --terra-soft: #e8a090;
  --ink: #2a2a28;
  --muted: #6e6b65;
  --white: #fff;
  --sidebar: 260px;
  --font: 'DM Sans', system-ui, sans-serif;
  --serif: 'Libre Baskerville', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); background: var(--stone); color: var(--ink); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.layout { display: flex; min-height: 100vh; }

/* Fixed left sidebar */
.sidebar {
  width: var(--sidebar); flex-shrink: 0; background: var(--sage-light);
  border-right: 1px solid rgba(107,143,113,0.2); padding: 36px 28px;
  position: fixed; top: 0; left: 0; bottom: 0; display: flex; flex-direction: column;
  z-index: 100;
}
.sidebar .logo {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--ink);
  margin-bottom: 6px; letter-spacing: -0.02em;
}
.sidebar .logo em { font-style: italic; color: var(--sage-dark); }
.sidebar .tagline { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 36px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar-nav a {
  padding: 11px 14px; font-size: 14px; font-weight: 500; color: var(--muted);
  border-radius: 8px; border-left: 3px solid transparent; transition: all 0.2s;
}
.sidebar-nav a:hover { color: var(--ink); background: rgba(255,255,255,0.5); }
.sidebar-nav a.active { color: var(--sage-dark); background: var(--white); border-left-color: var(--terra); font-weight: 600; }
.sidebar-footer { font-size: 11px; color: var(--muted); padding-top: 24px; border-top: 1px solid rgba(107,143,113,0.15); }
.sidebar-actions { display: flex; gap: 8px; margin-bottom: 20px; }
.search-btn {
  width: 36px; height: 36px; border: 1px solid rgba(107,143,113,0.25);
  background: var(--white); border-radius: 8px; cursor: pointer; font-size: 15px;
}
.mobile-bar { display: none; }

.main { margin-left: var(--sidebar); flex: 1; min-width: 0; }
.main-inner { max-width: 880px; margin: 0 auto; padding: 48px 40px 80px; }

.btn {
  display: inline-block; padding: 12px 24px; font-size: 14px; font-weight: 600;
  border-radius: 8px; border: none; cursor: pointer; font-family: var(--font); transition: all 0.2s;
}
.btn-sage { background: var(--sage); color: var(--white); }
.btn-sage:hover { background: var(--sage-dark); }
.btn-terra { background: var(--terra); color: var(--white); }
.btn-terra:hover { background: #a85e4a; }
.btn-outline { background: transparent; border: 2px solid var(--sage); color: var(--sage-dark); }

.section-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--terra); margin-bottom: 10px;
}
.section-h {
  font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700;
  margin: 0 0 28px; color: var(--ink); letter-spacing: -0.02em; line-height: 1.15;
}

/* Text hero — no full bleed image */
.hero-text { padding: 20px 0 48px; border-bottom: 1px solid var(--stone-dark); margin-bottom: 48px; }
.hero-text h1 {
  font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 700;
  line-height: 1.08; margin: 0 0 20px; letter-spacing: -0.03em;
}
.hero-text h1 span { color: var(--sage-dark); font-style: italic; }
.hero-text .deck { font-size: 18px; color: var(--muted); max-width: 540px; line-height: 1.7; margin: 0 0 28px; }
.hero-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-pills span {
  padding: 7px 14px; font-size: 12px; font-weight: 600; background: var(--white);
  border: 1px solid var(--stone-dark); border-radius: 999px; color: var(--muted);
}

/* Wide horizontal article cards */
.stack-list { display: flex; flex-direction: column; gap: 20px; margin-bottom: 48px; }
.stack-card {
  display: grid; grid-template-columns: 1fr 220px; gap: 28px; align-items: center;
  background: var(--white); border-radius: 12px; padding: 24px 28px;
  border-left: 4px solid var(--terra); box-shadow: 0 2px 12px rgba(42,42,40,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}
.stack-card:hover { transform: translateX(6px); box-shadow: 0 8px 28px rgba(42,42,40,0.08); }
.stack-card .cat { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage); margin-bottom: 8px; }
.stack-card h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; margin: 0 0 8px; line-height: 1.3; }
.stack-card p { font-size: 14px; color: var(--muted); margin: 0 0 10px; line-height: 1.6; }
.stack-card .meta { font-size: 12px; color: var(--muted); font-weight: 500; }
.stack-card img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; }
.stack-card.hidden { display: none; }

/* Featured reads mosaic */
.mosaic-section {
  background: linear-gradient(160deg, var(--sage-light) 0%, var(--white) 100%);
  border-radius: 16px; padding: 36px 32px 40px; margin: 56px 0;
  border: 1px solid rgba(107,143,113,0.15);
}
.mosaic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mosaic-item {
  background: var(--white); border-radius: 12px; overflow: hidden;
  border: 1px solid var(--stone-dark); transition: transform 0.2s;
}
.mosaic-item:hover { transform: translateY(-4px); }
.mosaic-item.featured { grid-column: span 1; grid-row: span 1; }
.mosaic-item img { width: 100%; height: 160px; object-fit: cover; }
.mosaic-item.featured img { height: 200px; }
.mosaic-body { padding: 16px 18px 20px; }
.mosaic-body .num { font-family: var(--serif); font-size: 1.8rem; color: var(--stone-dark); line-height: 1; margin-bottom: 6px; }
.mosaic-body h3 { font-family: var(--serif); font-size: 1rem; font-weight: 700; margin: 0 0 6px; line-height: 1.35; }
.mosaic-body p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.5; }

/* Journal page grid */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-btn {
  padding: 8px 16px; font-size: 12px; font-weight: 600; border: 1px solid var(--stone-dark);
  background: var(--white); border-radius: 999px; cursor: pointer; color: var(--muted); font-family: var(--font);
}
.filter-btn.active, .filter-btn:hover { background: var(--sage); border-color: var(--sage); color: var(--white); }

.journal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.j-card {
  background: var(--white); border-radius: 12px; overflow: hidden;
  border: 1px solid var(--stone-dark); transition: box-shadow 0.2s;
}
.j-card:hover { box-shadow: 0 12px 32px rgba(42,42,40,0.08); }
.j-card img { width: 100%; height: 180px; object-fit: cover; }
.j-card-body { padding: 18px 20px 22px; }
.j-card .cat { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--terra); margin-bottom: 6px; }
.j-card h3 { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; line-height: 1.3; }
.j-card p { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.j-card .meta { font-size: 11px; color: var(--muted); }
.j-card.hidden { display: none; }

/* Article page */
.article-header { padding-bottom: 32px; border-bottom: 1px solid var(--stone-dark); margin-bottom: 36px; }
.article-header .cat { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--terra); margin-bottom: 10px; }
.article-header h1 { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; margin: 0 0 14px; line-height: 1.12; }
.article-header .lead { font-size: 18px; color: var(--muted); line-height: 1.7; margin: 0 0 10px; }
.article-header .byline { font-size: 13px; color: var(--muted); }

.article-content { max-width: 640px; }
.article-content .lead-img { width: 100%; height: 380px; object-fit: cover; border-radius: 12px; margin-bottom: 32px; border: 1px solid var(--stone-dark); }
.article-content h2 { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; margin: 36px 0 12px; color: var(--sage-dark); }
.article-content p { font-size: 17px; line-height: 1.85; margin-bottom: 18px; }
.article-content .quote {
  font-family: var(--serif); font-size: 1.35rem; font-style: italic; color: var(--ink);
  border-left: 3px solid var(--terra); padding: 12px 0 12px 24px; margin: 28px 0; line-height: 1.5;
}

.about-block { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.about-block img { border-radius: 12px; height: 340px; object-fit: cover; border: 1px solid var(--stone-dark); }

.contact-form input, .contact-form textarea {
  width: 100%; padding: 13px 16px; border: 1px solid var(--stone-dark); border-radius: 8px;
  font-family: var(--font); margin-bottom: 12px; background: var(--white);
}
.contact-form textarea { min-height: 120px; resize: vertical; }

.faq-item { background: var(--white); border-radius: 10px; margin-bottom: 10px; border: 1px solid var(--stone-dark); overflow: hidden; }
.faq-q { width: 100%; padding: 16px 20px; background: none; border: none; text-align: left; font-weight: 600; font-size: 14px; cursor: pointer; display: flex; justify-content: space-between; color: var(--ink); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s; }
.faq-item.open .faq-a { max-height: 200px; }
.faq-a-inner { padding: 0 20px 16px; color: var(--muted); font-size: 14px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(42,42,40,0.45); z-index: 2000; display: none; align-items: flex-start; justify-content: center; padding: 80px 20px; }
.modal-overlay.show { display: flex; }
.modal-box { background: var(--white); border-radius: 12px; padding: 28px; width: min(420px,100%); position: relative; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 22px; cursor: pointer; }
.search-input { width: 100%; padding: 12px; border: 1px solid var(--stone-dark); border-radius: 8px; margin-bottom: 10px; font-family: var(--font); }
.search-results a { display: block; padding: 10px 0; border-bottom: 1px solid var(--stone-dark); font-size: 14px; }

#cookieBar { position: fixed; bottom: 0; left: var(--sidebar); right: 0; z-index: 3000; background: var(--ink); color: var(--white); padding: 14px 24px; transform: translateY(100%); transition: transform 0.3s; }
#cookieBar.show { transform: translateY(0); }
.cookie-inner { max-width: 880px; margin: 0 auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cookie-inner p { margin: 0; font-size: 13px; flex: 1; }
.cookie-inner a { color: var(--terra-soft); }
.cookie-btns button { padding: 8px 16px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; border-radius: 6px; margin-left: 8px; }
#cookieAccept { background: var(--terra); color: var(--white); }
#cookieDecline { background: transparent; border: 1px solid rgba(255,255,255,0.35); color: var(--white); }

#toastContainer { position: fixed; bottom: 24px; right: 24px; z-index: 2500; }
.toast { background: var(--sage-dark); color: var(--white); padding: 12px 20px; font-size: 13px; border-radius: 8px; margin-top: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }

.site-foot { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--stone-dark); font-size: 12px; color: var(--muted); }

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; background: var(--sage-light); border-bottom: 1px solid rgba(107,143,113,0.2);
    position: sticky; top: 0; z-index: 99;
  }
  .mobile-bar .logo { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }
  .menu-btn { padding: 8px 14px; border: 1px solid rgba(107,143,113,0.3); background: var(--white); border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 12px; }
  .main-inner { padding: 32px 20px 64px; }
  .stack-card { grid-template-columns: 1fr; }
  .stack-card img { height: 180px; order: -1; }
  .mosaic-grid, .journal-grid, .about-block { grid-template-columns: 1fr; }
  #cookieBar { left: 0; }
}
