/* journal.css — Sanctuary Journal styles */

/* ── Design tokens ────────────────────────────────────────────────────────── */
:root {
  --j-cream: #f9f5ef;
  --j-linen: #eee7da;
  --j-sand: #d8cfc3;
  --j-ink: #2c2c2c;
  --j-muted: #7a7067;
  --j-accent-faith: #c9a96e;
  --j-accent-serenity: #8fa8a0;
  --j-accent-health: #8b9e87;
  --j-accent-il: #b8a89a;
}

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

body {
  background: var(--j-cream);
  color: var(--j-ink);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Navigation ────────────────────────────────────────────────────────────── */
.j-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--j-linen);
  background: var(--j-cream);
  position: sticky;
  top: 0;
  z-index: 100;
}

.j-nav-logo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--j-ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.j-nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.j-nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--j-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.j-nav-links a:hover,
.j-nav-links a.active {
  color: var(--j-ink);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.j-hero {
  text-align: center;
  padding: 5rem 2rem 3rem;
  max-width: 760px;
  margin: 0 auto;
}

.j-hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--j-muted);
  margin-bottom: 1.25rem;
}

.j-hero-headline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--j-ink);
  margin-bottom: 1.25rem;
}

.j-hero-sub {
  font-size: 1.05rem;
  color: var(--j-muted);
  font-style: italic;
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* ── Pillar filters ─────────────────────────────────────────────────────────── */
.j-pillar-filters {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  padding: 0 2rem 2.5rem;
  flex-wrap: wrap;
}

.j-filter {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.4rem 1.1rem;
  border: 1px solid var(--j-sand);
  border-radius: 999px;
  color: var(--j-muted);
  transition: all 0.2s;
}

.j-filter:hover,
.j-filter.active {
  background: var(--j-ink);
  border-color: var(--j-ink);
  color: var(--j-cream);
}

/* ── Featured card ──────────────────────────────────────────────────────────── */
.j-featured-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto 4rem;
  text-decoration: none;
  color: inherit;
  background: #fff;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  overflow: hidden;
}

.j-featured-img-wrap {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.j-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.j-featured-img-placeholder {
  background: var(--j-linen);
}

.j-featured-card:hover .j-featured-img {
  transform: scale(1.03);
}

.j-pillar-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: #fff;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.j-featured-body {
  padding: 2.5rem 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.j-pillar-tag {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.j-featured-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--j-ink);
}

.j-featured-subtitle {
  font-size: 0.95rem;
  color: var(--j-muted);
  line-height: 1.5;
  font-style: italic;
}

.j-featured-date {
  font-size: 0.8rem;
  color: var(--j-sand);
  letter-spacing: 0.02em;
}

/* ── Article grid ────────────────────────────────────────────────────────────── */
.j-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}

.j-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  box-shadow: 0 2px 14px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}

.j-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.j-card-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

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

.j-card-img-placeholder {
  background: var(--j-linen);
}

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

.j-card-body {
  padding: 1.5rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.j-card-pillar {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.j-card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--j-ink);
}

.j-card-subtitle {
  font-size: 0.85rem;
  color: var(--j-muted);
  font-style: italic;
  line-height: 1.45;
}

.j-card-date {
  font-size: 0.78rem;
  color: var(--j-sand);
  margin-top: auto;
  padding-top: 0.75rem;
}

/* ── Empty state ────────────────────────────────────────────────────────────── */
.j-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--j-muted);
}

.j-empty a {
  display: inline-block;
  margin-top: 1rem;
  color: var(--j-ink);
  font-weight: 500;
}

/* ── Article page ──────────────────────────────────────────────────────────── */
.ja-layout {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.ja-breadcrumb {
  padding: 1.5rem 0;
  font-size: 0.82rem;
  color: var(--j-muted);
}

.ja-breadcrumb a {
  color: var(--j-muted);
  text-decoration: none;
}

.ja-breadcrumb a:hover {
  color: var(--j-ink);
}

.ja-header {
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--j-linen);
  margin-bottom: 2.5rem;
}

.ja-pillar-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.ja-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--j-ink);
  margin-bottom: 1rem;
}

.ja-subtitle {
  font-size: 1.05rem;
  color: var(--j-muted);
  font-style: italic;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.ja-meta {
  font-size: 0.82rem;
  color: var(--j-sand);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.ja-meta-sep { color: var(--j-sand); }

/* ── Article body ────────────────────────────────────────────────────────────── */
.ja-body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--j-ink);
}

.ja-body h1,
.ja-body h2,
.ja-body h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--j-ink);
  line-height: 1.2;
}

.ja-body h1 { font-size: 2.2rem; margin: 2rem 0 1rem; font-weight: 500; }
.ja-body h2 { font-size: 1.7rem; margin: 2.5rem 0 1rem; font-weight: 500; }
.ja-body h3 { font-size: 1.3rem; margin: 2rem 0 0.75rem; font-weight: 500; font-style: italic; }

.ja-body p { margin-bottom: 1.25rem; color: #3a3530; }
.ja-body hr { border: none; border-top: 1px solid var(--j-sand); margin: 2.5rem 0; }

.ja-body ul,
.ja-body ol {
  margin: 0 0 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ja-body a {
  color: var(--j-accent-faith);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ja-body a:hover { color: var(--j-ink); }

.ja-body strong { font-weight: 600; color: var(--j-ink); }
.ja-body em { font-style: italic; }

.ja-body blockquote {
  border-left: 3px solid var(--j-sand);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--j-muted);
  font-style: italic;
}

.ja-body code {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  background: var(--j-linen);
  padding: 0.1em 0.4em;
  border-radius: 3px;
}

.ja-author {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--j-linen);
  font-size: 0.8rem;
  color: var(--j-sand);
  letter-spacing: 0.03em;
}

/* ── Related articles ──────────────────────────────────────────────────────── */
.ja-related {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--j-linen);
}

.ja-related-headline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--j-ink);
  margin-bottom: 2rem;
  text-align: center;
}

.ja-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.ja-related-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  overflow: hidden;
}

.ja-related-img-wrap { aspect-ratio: 4/3; overflow: hidden; }
.ja-related-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.ja-related-img-placeholder { width: 100%; height: 100%; background: var(--j-linen); }
.ja-related-card:hover .ja-related-img { transform: scale(1.04); }

.ja-related-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.ja-related-pillar {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--j-sand);
  font-weight: 600;
}

.ja-related-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--j-ink);
}

.ja-related-date { font-size: 0.75rem; color: var(--j-sand); }

/* ── Pillar-matched product strip ─────────────────────────────────────────── */
.ja-product-strip {
  padding: 2.5rem 0 1rem;
  border-top: 1px solid var(--j-linen);
  margin-top: 2rem;
}
.ja-product-strip-headline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--j-ink);
  margin: 0 0 1.25rem;
  text-align: center;
}
.ja-product-strip-sub {
  font-size: 0.9rem;
  color: var(--j-muted);
  text-align: center;
  margin: 0 0 1rem;
}
.ja-product-strip-link {
  display: block;
  text-align: center;
  font-size: 0.88rem;
  color: #5C7A62;
  text-decoration: none;
  font-weight: 500;
}
.ja-product-strip-link:hover { text-decoration: underline; }
.ja-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.ja-product-card {
  background: #fff;
  border: 1px solid var(--j-linen);
  border-radius: 6px;
  overflow: hidden;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.ja-product-card:hover {
  box-shadow: 0 4px 16px rgba(44,41,38,.12);
  transform: translateY(-2px);
}
.ja-product-card-inner { display: block; text-decoration: none; color: inherit; flex: 1; }
.ja-product-card-inner:hover .ja-product-name { color: #5C7A62; }
.ja-product-img { width: 100%; height: 140px; object-fit: cover; display: block; }
.ja-product-img-placeholder { width: 100%; height: 140px; background: var(--j-linen); }
.ja-product-body { padding: 0.85rem; }
.ja-product-name { font-size: 0.82rem; font-weight: 500; color: var(--j-ink); margin: 0 0 0.3rem; line-height: 1.35; transition: color 0.15s; }
.ja-product-price { font-size: 0.78rem; color: var(--j-muted); margin: 0 0 0.5rem; }
.ja-product-cta { font-size: 0.75rem; color: #5C7A62; font-weight: 500; margin: 0; }
.ja-product-shop-link { display: block; text-align: center; padding: 0.5rem; background: #2D3E33; color: #F5F0E8; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.05em; text-decoration: none; transition: background 0.2s; }
.ja-product-shop-link:hover { background: #3D5444; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.j-footer {
  border-top: 1px solid var(--j-linen);
  padding: 2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--j-muted);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.j-footer a { color: var(--j-muted); text-decoration: none; }
.j-footer a:hover { color: var(--j-ink); }
.j-footer-sep { color: var(--j-sand); }

/* ── Index: Intro ────────────────────────────────────────────────────────────── */
.j-intro {
  text-align: center;
  padding: 5rem 2rem 2rem;
  max-width: 650px;
  margin: 0 auto;
}

.j-intro-brand {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--j-muted);
  margin-bottom: 1.5rem;
}

.j-intro-headline {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--j-ink);
  font-style: italic;
}

/* ── Index: Section label ────────────────────────────────────────────────────── */
.j-section-label {
  text-align: center;
  padding: 0.5rem 2rem 1.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--j-sand);
}

/* ── Index: Article card grid ───────────────────────────────────────────────── */
.j-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}

/* ── Index: Article card ─────────────────────────────────────────────────────── */
.j-article-card {
  display: flex;
  flex-direction: column;
}

.j-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
  background: #fff;
  box-shadow: 0 2px 14px rgba(0,0,0,0.05);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}

.j-card-link:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.j-article-card--coming-soon .j-card-link:hover {
  box-shadow: 0 2px 14px rgba(0,0,0,0.05);
  transform: none;
}

.j-card-coming-soon {
  cursor: default;
}

.j-card-img-wrap {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
}

.j-card-img-placeholder {
  width: 100%;
  height: 100%;
}

.j-article-card:hover .j-card-img-placeholder {
  transform: scale(1.03);
  transition: transform 0.4s;
}

.j-card-body {
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.j-card-pillar {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.j-card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--j-ink);
}

.j-card-dek {
  font-size: 0.85rem;
  color: var(--j-muted);
  font-style: italic;
  line-height: 1.5;
}

.j-card-read-time {
  font-size: 0.75rem;
  color: var(--j-sand);
  margin-top: auto;
  padding-top: 0.75rem;
}

/* ── Index: Footer CTAs ──────────────────────────────────────────────────────── */
.j-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 640px;
  margin: 0 auto 5rem;
  padding: 0 2rem;
}

.j-cta-item {
  flex: 1;
  text-align: center;
  padding: 2rem 1.5rem;
}

.j-cta-divider {
  width: 1px;
  height: 60px;
  background: var(--j-linen);
  flex-shrink: 0;
}

.j-cta-label {
  font-size: 0.82rem;
  color: var(--j-muted);
  margin-bottom: 1rem;
  font-style: italic;
}

.j-cta-btn {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border: 1.5px solid var(--j-ink);
  color: var(--j-ink);
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.j-cta-btn:hover {
  background: var(--j-ink);
  color: var(--j-cream);
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .j-card-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

@media (max-width: 600px) {
  .j-card-grid { grid-template-columns: 1fr; padding: 0 1.25rem; gap: 1.5rem; }
  .j-ctas { flex-direction: column; gap: 0; }
  .j-cta-divider { width: 80px; height: 1px; margin: 0 auto; }
  .j-intro { padding: 3rem 1.25rem 2rem; }
}

@media (max-width: 768px) {
  .j-featured-card { grid-template-columns: 1fr; }
  .j-featured-img-wrap { aspect-ratio: 16/9; }
  .j-grid { grid-template-columns: 1fr; padding: 0 1.25rem; }
  .j-hero { padding: 3rem 1.25rem 2rem; }
  .ja-layout { padding: 0 1.25rem 4rem; }
  .j-nav-links { gap: 1.25rem; }
  .j-nav-links a { font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .j-nav { padding: 1rem 1.25rem; }
  .j-nav-links { gap: 1rem; }
}