/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --cream:       #faf6ed;
  --cream-dark:  #e8ddd0;
  --brown:       #5c3d2e;
  --brown-light: #7a5240;
  --brown-pale:  #c4a882;
  --amber:       #b8894a;
  --amber-pale:  #d4b07a;
  --amber-dim:   rgba(184,137,74,.15);
  --ink:         #2a1c0e;
  --ink-soft:    #4e3828;
  --ink-dim:     #896854;
  --rust:        #9b4a2a;
  --rust-hover:  #7d3820;
  --warm-white:  #fdfaf6;

  /* keep --gold aliased for backward compat with any inline refs */
  --gold:        var(--amber);
  --gold-pale:   var(--amber-pale);
  --gold-dim:    var(--amber-dim);

  --serif:  'Playfair Display', Georgia, serif;
  --sans:   'Nunito', system-ui, sans-serif;
  --body:   'Lora', Georgia, serif;

  --max-w: 1120px;
  --gutter: 2rem;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--cream);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.015'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ─── Focus rings (accessibility) ───────────────────────── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--serif);
  line-height: 1.25;
  color: var(--ink);
}
em { font-style: italic; color: var(--brown); }
p { margin-bottom: 1rem; }

/* ─── Layout helpers ─────────────────────────────────────── */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem var(--gutter);
}

/* ─── Header ─────────────────────────────────────────────── */
.site-header {
  background: var(--brown);
  background-image: linear-gradient(to bottom, rgba(0,0,0,.12) 0%, transparent 100%);
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(184,137,74,.18), 0 3px 16px rgba(20,10,4,.35);
}

/* Logo */
.site-logo {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  text-decoration: none;
}
.logo-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--cream);
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.logo-prefix {
  font-size: 0.78em;
  font-weight: 400;
  color: var(--brown-pale);
  opacity: 0.8;
}
.logo-name em {
  font-size: 1.15em;
  font-weight: 600;
  color: var(--gold-pale);
  font-style: italic;
  letter-spacing: -0.01em;
}
.logo-tag {
  font-family: var(--sans);
  font-size: 0.64rem;
  color: var(--brown-pale);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.75;
}

/* Nav */
.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cream-dark);
  padding: 0.4rem 0.75rem;
  border-radius: 5px;
  letter-spacing: 0.04em;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--cream); background: rgba(255,255,255,.09); }
.nav-cta {
  background: var(--gold) !important;
  color: var(--ink) !important;
  padding: 0.4rem 1rem !important;
  border-radius: 5px;
  font-weight: 700 !important;
  transition: background .15s !important;
}
.nav-cta:hover { background: var(--gold-pale) !important; color: var(--ink) !important; }
.nav-search {
  display: flex !important;
  align-items: center;
  padding: 0.4rem 0.6rem !important;
}
.nav-account {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem !important;
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,.22);
  font-size: 0.8rem !important;
  font-weight: 600;
  color: var(--cream-dark) !important;
  transition: border-color .15s, color .15s !important;
}
.nav-account:hover {
  border-color: var(--gold-pale) !important;
  color: var(--cream) !important;
  background: transparent !important;
}
.nav-account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

/* ─── Mobile nav ─────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cream-dark);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 680px) {
  .nav-hamburger { display: flex; }
  .site-header nav { display: none; }
  .site-header nav.open {
    display: block;
    position: fixed;
    inset: 0;
    top: 0;
    background: var(--brown);
    z-index: 200;
    padding: 5rem 2rem 2rem;
    overflow-y: auto;
  }
  .site-header nav.open .nav-links {
    flex-direction: column;
    gap: 0.25rem;
  }
  .site-header nav.open .nav-links a {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    display: block;
  }
  .site-header nav.open .nav-links .nav-cta {
    margin-top: 0.5rem;
  }
  .nav-hamburger { z-index: 201; position: relative; }
}

/* ─── SVG Logo mark ──────────────────────────────────────── */
.logo-mark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.logo-mark svg {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  background: var(--brown);
  background-image:
    radial-gradient(ellipse at 20% 85%, rgba(184,137,74,.28) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(155,74,42,.20)  0%, transparent 45%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c4a882' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  padding: 6rem var(--gutter) 5.5rem;
  text-align: center;
  color: var(--cream);
  position: relative;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-dim), rgba(184,137,74,.25), var(--gold-dim), transparent);
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 500;
  color: var(--cream);
  max-width: 720px;
  margin: 0 auto 1.35rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.hero h1 em {
  color: var(--gold-pale);
  font-style: italic;
}
.hero-desc {
  font-family: var(--body);
  font-size: 1.125rem;
  color: rgba(245,240,232,.72);
  max-width: 520px;
  margin: 0 auto 0.75rem;
  line-height: 1.75;
}
.hero-rule {
  width: 48px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-pale), transparent);
  margin: 1.5rem auto;
  opacity: 0.6;
}
.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-main {
  background: var(--gold);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.8rem 1.85rem;
  border-radius: 5px;
  transition: background .15s, box-shadow .15s;
  box-shadow: 0 2px 12px rgba(184,137,74,.35);
}
.btn-main:hover {
  background: var(--gold-pale);
  box-shadow: 0 4px 20px rgba(184,137,74,.45);
}
.btn-outline {
  border: 1.5px solid rgba(184,137,74,.5);
  color: var(--gold-pale);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.8rem 1.85rem;
  border-radius: 5px;
  transition: border-color .15s, color .15s;
}
.btn-outline:hover { border-color: var(--gold-pale); color: var(--cream); }

/* ─── Section heads ──────────────────────────────────────── */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--cream-dark);
  position: relative;
}
.sec-head::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.sec-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--brown);
}
.sec-more {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  transition: color .15s;
}
.sec-more:hover { color: var(--rust); }

/* ─── Home grid ──────────────────────────────────────────── */
.home-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 4rem;
}
@media (max-width: 820px) {
  .home-grid { grid-template-columns: 1fr; gap: 3rem; }
}

/* ─── Article card ───────────────────────────────────────── */
.art-item {
  display: block;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--cream-dark);
  transition: background .18s, transform .18s, padding-left .18s;
  position: relative;
}
.art-item:first-of-type { padding-top: 0; }
.art-item:hover {
  background: rgba(250,246,240,.85);
  transform: translateX(4px);
  padding-left: 0.5rem;
  border-radius: 0 6px 6px 0;
}
.art-item:hover .art-title { color: var(--gold); }
.art-item--featured {
  background: var(--warm-white);
  padding: 1.5rem;
  border-radius: 6px;
  border: none;
  border-left: 3px solid var(--gold);
  margin-bottom: 1rem;
  box-shadow: 0 1px 6px rgba(30,22,13,.08);
  transition: box-shadow .2s, transform .2s;
}
.art-item--featured:hover {
  box-shadow: 0 8px 28px rgba(30,22,13,.13);
  transform: translateY(-2px);
  padding-left: 1.5rem;
  border-radius: 6px;
  background: var(--warm-white);
}
.feat-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  margin-bottom: 0.5rem;
  opacity: 0.85;
}
.art-kicker {
  display: flex;
  gap: 0.75rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-dim);
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
}
.art-tag {
  color: var(--brown-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.art-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.5rem;
  transition: color .15s;
  line-height: 1.3;
}
.art-excerpt {
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}
.art-author {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--brown-pale);
  letter-spacing: 0.03em;
}

/* ─── Podcast card ───────────────────────────────────────── */
.pod-card {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--cream-dark);
  align-items: flex-start;
  transition: background .15s;
}
.pod-card:hover .pod-title { color: var(--gold); }
.pod-thumb {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  background: var(--brown);
  background-image: linear-gradient(135deg, rgba(184,137,74,.22) 0%, transparent 60%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.pod-thumb.vid { background: var(--rust); background-image: linear-gradient(135deg, rgba(255,200,120,.2) 0%, transparent 60%); }
.pod-play {
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 16px solid rgba(255,255,255,.85);
  margin-left: 3px;
}
.pod-type-badge {
  position: absolute;
  bottom: 3px;
  right: 4px;
  font-family: var(--sans);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
}
.pod-title {
  font-family: var(--serif);
  font-size: 1.0rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.25rem;
  line-height: 1.35;
  transition: color .15s;
}
.pod-meta {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--brown-pale);
  letter-spacing: 0.03em;
}
.pod-desc {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
  line-height: 1.6;
}

/* ─── Submit page ────────────────────────────────────────── */
.submit-wrap {
  max-width: 680px;
  margin: 0 auto;
}
.sub-kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.sub-h {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 500;
  color: var(--brown);
  margin-bottom: 0.85rem;
  line-height: 1.2;
}
.sub-desc {
  font-size: 1rem;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.f-group { display: flex; flex-direction: column; gap: 0.35rem; }
.f-group.full { grid-column: 1 / -1; }
.f-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brown-light);
}
.f-input, .f-select, .f-textarea {
  background: var(--warm-white);
  border: 1.5px solid var(--cream-dark);
  border-radius: 5px;
  padding: 0.6rem 0.85rem;
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.f-input:focus, .f-select:focus, .f-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,137,74,.12);
}
.f-textarea { min-height: 120px; resize: vertical; }
.sub-btn {
  background: var(--gold);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 2.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  box-shadow: 0 2px 10px rgba(184,137,74,.3);
}
.sub-btn:hover {
  background: var(--gold-pale);
  box-shadow: 0 4px 18px rgba(184,137,74,.4);
}
.sub-note {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-soft);
  text-align: center;
  min-height: 1.5rem;
}
@media (max-width: 600px) {
  :root { --gutter: 1rem; }
  .form-grid { grid-template-columns: 1fr; }
  .f-group.full { grid-column: 1; }
}

/* ─── Article hero image ─────────────────────────────────── */
.article-hero-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 24px rgba(30,22,13,.12);
}

/* ─── Article body (slug page) ───────────────────────────── */
.article-wrap {
  max-width: 720px;
  margin: 0 auto;
}
.article-header { margin-bottom: 2.5rem; }
.article-kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.article-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 500;
  color: var(--brown);
  line-height: 1.18;
  margin-bottom: 1rem;
}
.article-byline {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-dim);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.article-byline span::before { content: '·'; margin-right: 0.5rem; }
.article-byline span:first-child::before { content: ''; margin: 0; }
.article-body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink);
}
.article-body h2 { font-size: 1.5rem; color: var(--brown); margin: 2rem 0 0.75rem; }
.article-body h3 { font-size: 1.2rem; color: var(--brown); margin: 1.5rem 0 0.5rem; }
.article-body p { margin-bottom: 1.25rem; }
.article-body blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 1.25rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: 1.5rem 0;
}
.article-body ul, .article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}
.article-body li { margin-bottom: 0.35rem; }
.article-body a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--rust); }
.article-body code {
  font-family: 'Menlo', 'Consolas', 'Courier New', monospace;
  font-size: 0.875em;
  background: rgba(184,137,74,.1);
  border-radius: 3px;
  padding: 0.1em 0.4em;
}
.article-body pre {
  background: var(--ink);
  color: var(--cream);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.75rem 0;
  font-size: 0.875rem;
  line-height: 1.7;
}
.article-body pre code { background: none; padding: 0; font-size: inherit; color: inherit; }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  background: var(--brown);
  background-image: linear-gradient(to bottom, rgba(0,0,0,.15) 0%, transparent 50%);
  color: var(--cream-dark);
  text-align: center;
  padding: 3.5rem var(--gutter) 2.5rem;
  border-top: 1px solid rgba(184,137,74,.2);
}
.foot-logo {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--cream);
  margin-bottom: 0.2rem;
  letter-spacing: 0.02em;
}
.foot-tag {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brown-pale);
  margin-bottom: 1.75rem;
  opacity: 0.7;
}
.foot-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  list-style: none;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.foot-links a {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(245,240,232,.55);
  transition: color .15s;
}
.foot-links a:hover { color: var(--gold-pale); }
.foot-admin-link { opacity: 0.25 !important; }
.foot-admin-link:hover { opacity: 0.55 !important; color: var(--brown-pale) !important; }
.foot-copy {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: rgba(245,240,232,.3);
  margin: 0;
  letter-spacing: 0.04em;
}

/* ─── Divider ornament ───────────────────────────────────── */
.ornament {
  text-align: center;
  color: var(--gold-pale);
  font-size: 1rem;
  letter-spacing: 0.6rem;
  margin: 2.5rem 0;
  user-select: none;
  opacity: 0.5;
}
