/* Chave Editorial — academic-stone palette, longform journal */

:root {
  --stone-50: #f6f4ef;
  --stone-100: #ebe7de;
  --stone-200: #d6cfc2;
  --stone-300: #b5ab9a;
  --stone-400: #8f8474;
  --stone-500: #6f6558;
  --stone-600: #544d43;
  --stone-700: #3d3832;
  --stone-800: #2a2622;
  --stone-900: #1a1815;
  --accent-sage: #5c6b58;
  --accent-clay: #9a7359;
  --accent-ink: #2c3e42;
  --white: #fdfcfa;
  --border: #cfc8bb;
  --border-light: #e2ddd3;
  --shadow-soft: 0 2px 12px rgba(42, 38, 34, 0.06);
  --radius-soft: 6px;
  --container: 1140px;
  --gutter: 24px;
  --font-serif: "Georgia", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --font-display: "Times New Roman", Times, var(--font-serif);
  --line-height: 1.72;
  --line-height-tight: 1.35;
  --header-height: 88px;
  --header-height-shrink: 60px;
  --transition: 0.28s ease;
}

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

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

body {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--stone-800);
  background: var(--stone-50);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-clay);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--stone-900);
  margin-top: 0;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.75em; }
h3 { font-size: 1.25rem; margin-bottom: 0.5em; }

p {
  margin: 0 0 1.25em;
}

ul, ol {
  margin: 0 0 1.25em;
  padding-left: 1.35em;
}

li + li {
  margin-top: 0.4em;
}

/* Grid */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

@media (max-width: 900px) {
  .col-8, .col-7, .col-6, .col-5, .col-4, .col-3 {
    grid-column: span 12;
  }
}

/* Header — centered logo, sticky shrink */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  transition: padding var(--transition), box-shadow var(--transition);
}

.site-header.is-shrunk {
  box-shadow: var(--shadow-soft);
}

.site-header.is-shrunk .header-inner {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.35rem 0 1rem;
  transition: padding var(--transition);
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--stone-900);
  text-decoration: none;
  transition: font-size var(--transition);
}

.site-header.is-shrunk .site-logo {
  font-size: 1.35rem;
}

.site-tagline {
  font-size: 0.78rem;
  color: var(--stone-500);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.25rem;
  transition: opacity var(--transition), max-height var(--transition);
  max-height: 2rem;
  overflow: hidden;
}

.site-header.is-shrunk .site-tagline {
  opacity: 0;
  max-height: 0;
  margin: 0;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2rem;
  margin-top: 1rem;
  list-style: none;
  padding: 0;
}

.site-nav a {
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--stone-600);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent-clay);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-soft);
  padding: 0.5rem 0.85rem;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--stone-700);
  cursor: pointer;
  margin-top: 0.75rem;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding-bottom: 0.5rem;
  }

  .site-nav.is-open {
    display: flex;
  }
}

/* Tags — bracket labels */

.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-500);
}

.tag::before { content: "["; margin-right: 0.15em; }
.tag::after { content: "]"; margin-left: 0.15em; }

/* Buttons — text link only */

.btn-link {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-serif);
  font-size: inherit;
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.btn-link:hover {
  color: var(--accent-clay);
}

/* Cards — bordered */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-soft);
  padding: 1.75rem;
  transition: border-color var(--transition);
}

.card:hover {
  border-color: var(--stone-300);
}

/* Hero — text only lead */

.hero-lead {
  padding: 4rem 0 3.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.hero-lead .eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-sage);
  margin-bottom: 1.25rem;
}

.hero-lead h1 {
  max-width: 18ch;
  margin: 0 auto 1.25rem;
}

.hero-lead .lead {
  font-size: 1.15rem;
  color: var(--stone-600);
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.65;
}

/* Featured story */

.featured-story {
  padding: 3.5rem 0;
}

.featured-story .grid-12 {
  align-items: start;
}

.featured-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-clay);
  margin-bottom: 1rem;
}

.featured-story h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  margin-bottom: 0.85em;
}

.featured-story h2 a {
  color: inherit;
  text-decoration: none;
}

.featured-story h2 a:hover {
  color: var(--accent-clay);
}

.featured-meta {
  font-size: 0.88rem;
  color: var(--stone-500);
  margin-bottom: 1.25rem;
}

.featured-excerpt {
  font-size: 1.05rem;
  color: var(--stone-700);
}

/* Editorial image 3:2 */

.img-editorial {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-soft);
  background: var(--stone-100);
}

/* Magazine columns article list */

.magazine-columns {
  padding: 2.5rem 0 4rem;
  border-top: 1px solid var(--border-light);
}

.section-heading {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-500);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

.feed-item {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
}

.feed-item:nth-child(4),
.feed-item:nth-child(5) {
  grid-column: span 6;
}

@media (max-width: 900px) {
  .feed-item,
  .feed-item:nth-child(4),
  .feed-item:nth-child(5) {
    grid-column: span 12;
  }
}

.feed-item .card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.feed-item .thumb {
  margin-bottom: 1.15rem;
}

.feed-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.feed-item h3 a {
  color: inherit;
  text-decoration: none;
}

.feed-item h3 a:hover {
  color: var(--accent-clay);
}

.feed-item .feed-meta {
  font-size: 0.82rem;
  color: var(--stone-500);
  margin-bottom: 0.75rem;
}

.feed-item .feed-excerpt {
  font-size: 0.95rem;
  color: var(--stone-600);
  flex: 1;
  margin-bottom: 1rem;
}

.feed-item .read-more {
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--accent-ink);
  margin-top: auto;
}

/* Article layout */

.article-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border-light);
}

.article-header h1 {
  max-width: 20ch;
  margin-bottom: 0.75rem;
}

.article-meta {
  font-size: 0.9rem;
  color: var(--stone-500);
}

.article-body-wrap {
  padding: 2.5rem 0 4rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
}

/* Pull quote led */

.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  line-height: 1.45;
  color: var(--stone-700);
  border-left: 3px solid var(--accent-sage);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 0 0 2rem;
  font-style: italic;
}

.article-content h2 {
  margin-top: 2.25rem;
}

.article-content .img-wrap {
  margin: 2rem 0;
}

/* Sticky TOC sidebar */

.article-sidebar {
  position: sticky;
  top: calc(var(--header-height-shrink) + 1.5rem);
}

.toc-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-soft);
  padding: 1.35rem 1.25rem;
}

.toc-card h2 {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-500);
  margin-bottom: 1rem;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.88rem;
}

.toc-list li + li {
  margin-top: 0.55rem;
}

.toc-list a {
  color: var(--stone-600);
  text-decoration: none;
}

.toc-list a:hover {
  color: var(--accent-clay);
}

/* Footer author note */

.author-note {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.author-note img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-soft);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.author-note .author-text {
  font-size: 0.92rem;
  color: var(--stone-600);
}

.author-note strong {
  display: block;
  color: var(--stone-800);
  margin-bottom: 0.25rem;
}

/* Editorial masthead footer */

.site-footer {
  background: var(--stone-800);
  color: var(--stone-200);
  padding: 3.5rem 0 2rem;
  margin-top: auto;
}

.masthead {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--stone-600);
}

.masthead-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.masthead-tagline {
  font-size: 0.85rem;
  color: var(--stone-300);
  max-width: 32rem;
  margin: 0 auto;
  line-height: 1.6;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.footer-col h3 {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-400);
  margin-bottom: 0.85rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.footer-col li + li {
  margin-top: 0.45rem;
}

.footer-col a {
  color: var(--stone-200);
  text-decoration: none;
}

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

.footer-bottom {
  text-align: center;
  font-size: 0.82rem;
  color: var(--stone-400);
  padding-top: 1.5rem;
  border-top: 1px solid var(--stone-600);
}

.cookie-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--stone-400);
  line-height: 1.55;
}

.cookie-note.is-hidden {
  display: none;
}

/* Page sections */

.page-header {
  padding: 2.75rem 0 2rem;
  border-bottom: 1px solid var(--border-light);
}

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

.page-content {
  padding: 2.5rem 0 4rem;
}

.page-content .prose {
  max-width: 42rem;
}

.page-content .prose-wide {
  max-width: 52rem;
}

/* Articles listing */

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.article-list-item {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-light);
}

@media (max-width: 720px) {
  .article-list-item {
    grid-template-columns: 1fr;
  }
}

.article-list-item h2 {
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
}

.article-list-item h2 a {
  color: inherit;
  text-decoration: none;
}

.article-list-item h2 a:hover {
  color: var(--accent-clay);
}

/* Contact */

.contact-block {
  max-width: 36rem;
}

.contact-email {
  font-size: 1.1rem;
  margin: 1.5rem 0;
}

/* Utility */

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

.text-muted {
  color: var(--stone-500);
}

.mt-0 { margin-top: 0; }
.mb-lg { margin-bottom: 2rem; }

main {
  min-height: 50vh;
}
