/*
Theme Name: Immanuel SF
Theme URI: https://immanuelsf.com
Author: Custom theme for The Immanuel Approach San Francisco
Author URI: https://immanuelsf.com
Description: A contemplative, accessible, ADA-compliant theme for The Immanuel Approach San Francisco prayer ministry. Pastel color palette, devotional typography (Fraunces + Manrope), full WCAG 2.1 AA compliance, structured data for SEO, and explicit support for AI/LLM crawlers.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: immanuel-sf
Tags: pastel, accessibility-ready, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, blog, religion
*/

/* ============================================
   Design tokens
   ============================================ */
:root {
  --cream: #F8F4ED;
  --cream-light: #FCF9F4;
  --cream-deep: #EFE7D8;
  --parchment: #F2EAD8;

  --ink: #2A2620;
  --ink-soft: #5C544A;
  --ink-faint: #8A8074;

  --sage: #6E8268;
  --sage-deep: #4A5D45;
  --sage-pale: #DCE4D6;

  --lavender: #8B7AA1;
  --lavender-deep: #5E4F73;
  --lavender-pale: #E4DEEC;

  --blush: #D4A797;
  --blush-pale: #F2DDD3;

  --gold: #B8924A;
  --gold-deep: #8C6B2C;

  --border: #E5DDD0;
  --border-soft: #EFE9DD;

  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 4px;
  --radius-lg: 16px;
  --max: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================
   Reset & base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.14  0 0 0 0 0.12  0 0 0 0.04 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  opacity: 0.6;
  mix-blend-mode: multiply;
}

img, svg { max-width: 100%; display: block; height: auto; }
a { color: var(--sage-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--lavender-deep); }

:focus-visible {
  outline: 3px solid var(--lavender);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--ink);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  z-index: 1000;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; color: var(--cream); }

.sr-only,
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
  font-variation-settings: "opsz" 144;
}

.display {
  font-size: clamp(2.5rem, 6vw + 1rem, 5.5rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.02;
}
.display em {
  font-style: italic;
  font-variation-settings: "opsz" 144;
  color: var(--sage-deep);
}

h2 { font-size: clamp(1.75rem, 3vw + 0.5rem, 2.75rem); }
h3 { font-size: 1.375rem; font-weight: 500; }
h4 { font-size: 1.125rem; font-weight: 500; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold-deep);
  margin: 0 0 1rem;
}
.eyebrow-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 0.5rem;
  vertical-align: middle;
}

p { margin: 0 0 1em; }
.lede {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 60ch;
}

blockquote {
  border-left: 3px solid var(--sage);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
}

code, pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--cream-deep);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
pre {
  padding: 1rem;
  overflow-x: auto;
}
pre code { background: transparent; padding: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.35rem; }

/* ============================================
   Layout helpers
   ============================================ */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  position: relative;
  z-index: 1;
}
.container-narrow {
  max-width: 720px;
}
main { position: relative; z-index: 1; }
section { padding: clamp(4rem, 8vw, 7rem) 0; }

/* ============================================
   Header / Nav
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 244, 237, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 0;
}
.brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 32px; height: 32px;
  flex-shrink: 0;
}
.brand-text { line-height: 1.1; }
.brand-text small {
  display: block;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Custom logo support */
.custom-logo-link { display: inline-flex; }
.custom-logo {
  max-height: 48px;
  width: auto;
}

.primary-nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0; padding: 0;
  align-items: center;
}
.primary-nav li { margin: 0; position: relative; }
.primary-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
  display: inline-block;
}
.primary-nav a:hover { background: var(--cream-deep); color: var(--ink); }
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav a[aria-current="page"] {
  color: var(--sage-deep);
  background: var(--sage-pale);
}

/* Submenu (dropdown) */
.primary-nav .sub-menu,
.primary-nav .children {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--cream-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  list-style: none;
  margin: 0.25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 8px 30px rgba(42, 38, 32, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s var(--ease), visibility 0.2s, transform 0.2s var(--ease);
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu,
.primary-nav li:hover > .children,
.primary-nav li:focus-within > .children {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav .sub-menu a,
.primary-nav .children a {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink);
  align-items: center;
  gap: 0.5rem;
}
.nav-toggle:hover { background: var(--cream-deep); }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--cream-light);
    border-bottom: 1px solid var(--border);
    padding: 1rem var(--gutter) 1.5rem;
    display: none;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  .primary-nav[data-open="true"] { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0.125rem; }
  .primary-nav a { padding: 0.75rem 1rem; }

  .primary-nav .sub-menu,
  .primary-nav .children {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--cream);
    margin-left: 1rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 0;
  }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  line-height: 1.2;
}
.btn-primary {
  background: var(--sage-deep);
  color: var(--cream-light);
}
.btn-primary:hover {
  background: var(--ink);
  color: var(--cream-light);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--cream-light); }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 7rem);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-bg::before {
  content: '';
  position: absolute;
  top: -10%; right: -10%;
  width: 60%; aspect-ratio: 1;
  background: radial-gradient(circle at center, var(--blush-pale), transparent 70%);
  filter: blur(20px);
}
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -20%; left: -5%;
  width: 50%; aspect-ratio: 1;
  background: radial-gradient(circle at center, var(--sage-pale), transparent 70%);
  filter: blur(20px);
}
.hero-bg .lavender-mist {
  position: absolute;
  top: 30%; left: 40%;
  width: 40%; aspect-ratio: 1;
  background: radial-gradient(circle at center, var(--lavender-pale), transparent 70%);
  filter: blur(30px);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.hero-meta strong { color: var(--ink); font-weight: 600; }

.hero-art {
  position: relative;
  aspect-ratio: 4/5;
  max-width: 460px;
  margin-left: auto;
  width: 100%;
}
.hero-art-frame {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--lavender-pale) 0%, var(--blush-pale) 50%, var(--cream-deep) 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hero-art-frame svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
}
.hero-art-caption {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--cream-light);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  max-width: 80%;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
  box-shadow: 0 8px 30px rgba(42, 38, 32, 0.06);
}
.hero-art-caption cite {
  display: block;
  margin-top: 0.25rem;
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================
   Pillars
   ============================================ */
.pillars {
  background: var(--cream-light);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.pillars-header {
  max-width: 38rem;
  margin: 0 auto 4rem;
  text-align: center;
}
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 880px) { .pillars-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

.pillar {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.pillar:hover { transform: translateY(-2px); border-color: var(--sage); }
.pillar-icon {
  width: 48px; height: 48px;
  margin-bottom: 1.5rem;
  color: var(--sage-deep);
}
.pillar:nth-child(2) .pillar-icon { color: var(--lavender-deep); }
.pillar:nth-child(3) .pillar-icon { color: var(--gold-deep); }
.pillar h3 { margin-bottom: 0.5rem; }
.pillar p { margin: 0; color: var(--ink-soft); }

/* ============================================
   Process (4-step)
   ============================================ */
.process { position: relative; }
.process-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
@media (max-width: 880px) { .process-grid { grid-template-columns: 1fr; } }

.process-aside { position: sticky; top: 6rem; }
@media (max-width: 880px) { .process-aside { position: static; } }
.process-aside .lede { margin-bottom: 1.5rem; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.step {
  counter-increment: step;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: baseline;
  margin: 0;
}
.step:first-child { padding-top: 0.5rem; }
.step:last-child { border-bottom: none; }
.step-num {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1;
  color: var(--sage-deep);
  font-style: italic;
}
.step-num::before { content: counter(step, decimal-leading-zero); }
.step h3 { margin: 0 0 0.5rem; font-size: 1.25rem; font-weight: 500; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.9375rem; }

/* ============================================
   Verse pull
   ============================================ */
.verse {
  background: var(--sage-deep);
  color: var(--cream-light);
  padding: clamp(4rem, 8vw, 6rem) 0;
  text-align: center;
  position: relative;
}
.verse::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--serif);
  font-size: 8rem;
  line-height: 1;
  color: var(--cream-light);
  opacity: 0.2;
}
.verse-text {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw + 0.5rem, 2.25rem);
  line-height: 1.4;
  max-width: 38ch;
  margin: 0 auto 1.5rem;
  letter-spacing: -0.01em;
}
.verse cite {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.8125rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage-pale);
  font-weight: 500;
}

/* ============================================
   Resources / Books
   ============================================ */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
@media (max-width: 700px) { .resources-grid { grid-template-columns: 1fr; } }

.resource {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--cream-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.resource:hover { border-color: var(--sage); transform: translateY(-1px); color: inherit; }
.resource-cover {
  width: 64px;
  flex-shrink: 0;
  aspect-ratio: 2/3;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--lavender-pale), var(--cream-deep));
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
  font-size: 0.75rem;
  text-align: center;
  padding: 0.25rem;
  box-shadow: 2px 2px 0 var(--border);
}
.resource:nth-child(2) .resource-cover {
  background: linear-gradient(135deg, var(--sage-pale), var(--blush-pale));
}
.resource h3 { font-family: var(--serif); font-size: 1.0625rem; margin-bottom: 0.25rem; line-height: 1.3; }
.resource p { margin: 0; font-size: 0.875rem; color: var(--ink-soft); }
.resource-author { display: block; font-size: 0.8125rem; color: var(--ink-soft); font-style: italic; margin-bottom: 0.5rem; }

/* ============================================
   Contact / CTA
   ============================================ */
.contact {
  background: var(--parchment);
  border-top: 1px solid var(--border);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.contact h2 { max-width: 18ch; }
.contact-info dl {
  margin: 0;
  display: grid;
  gap: 1.25rem;
}
.contact-info dt {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.25rem;
}
.contact-info dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--ink);
}
.contact-info dd a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.contact-info dd a:hover { text-decoration-color: var(--ink); }

/* ============================================
   Page templates (for inner pages)
   ============================================ */
.page-header {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  background: var(--cream-light);
  border-bottom: 1px solid var(--border-soft);
}
.page-header .container { text-align: center; }
.page-header h1 {
  font-size: clamp(2rem, 4vw + 0.5rem, 3.5rem);
  margin-bottom: 0.5rem;
  font-weight: 300;
  letter-spacing: -0.02em;
}
.page-header .lede {
  margin: 0 auto;
  text-align: center;
}

.page-content {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

/* Post / page typography flow */
.entry-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.7;
}
.entry-content > * + * { margin-top: 1.25em; }
.entry-content h2 {
  font-size: clamp(1.5rem, 2vw + 0.5rem, 2rem);
  margin-top: 2.5em !important;
  margin-bottom: 0.5em !important;
  font-weight: 400;
}
.entry-content h2:first-child { margin-top: 0 !important; }
.entry-content h3 {
  font-size: 1.375rem;
  margin-top: 2em !important;
  margin-bottom: 0.4em !important;
}
.entry-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}
.entry-content figure { margin: 2rem 0; }
.entry-content figcaption {
  font-size: 0.875rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}
.entry-content a { color: var(--sage-deep); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--lavender-deep); }
.entry-content ul, .entry-content ol {
  padding-left: 1.5rem;
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}
.entry-content th, .entry-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}
.entry-content th { background: var(--cream-deep); font-weight: 600; }

.entry-content iframe,
.entry-content embed,
.entry-content object {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

/* WP video embeds responsive */
.wp-block-embed-youtube .wp-block-embed__wrapper,
.entry-content .wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 1.5rem 0;
}
.wp-block-embed-youtube .wp-block-embed__wrapper iframe,
.entry-content .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0;
}

/* Post meta */
.post-meta {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.post-meta a { color: var(--ink-soft); }

/* Archive listing */
.archive-list {
  display: grid;
  gap: 2.5rem;
  max-width: 720px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
}
.archive-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2.5rem;
  margin: 0;
}
.archive-item:last-child { border-bottom: none; }
.archive-item h2 {
  font-size: 1.625rem;
  margin: 0 0 0.5rem;
}
.archive-item h2 a {
  color: var(--ink);
  text-decoration: none;
}
.archive-item h2 a:hover { color: var(--sage-deep); }
.archive-item .post-meta { justify-content: flex-start; margin-bottom: 0.5rem; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0 0;
  flex-wrap: wrap;
}
.pagination a, .pagination .current {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--border);
  background: var(--cream-light);
  font-size: 0.9375rem;
}
.pagination .current {
  background: var(--sage-deep);
  color: var(--cream-light);
  border-color: var(--sage-deep);
}
.pagination a:hover { background: var(--cream-deep); }

/* Search form */
.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
  margin: 0 auto;
}
.search-form label { flex: 1; }
.search-form input[type="search"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--cream-light);
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink);
}
.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--sage);
}
.search-form input[type="submit"] {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 999px;
  background: var(--sage-deep);
  color: var(--cream-light);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}
.search-form input[type="submit"]:hover { background: var(--ink); }

/* 404 */
.error-404 {
  text-align: center;
  padding: clamp(4rem, 10vw, 8rem) 0;
}
.error-404 .display { color: var(--sage-deep); }

/* Comments */
.comments-area {
  max-width: 720px;
  margin: 4rem auto 0;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}
.comment-list li { margin: 0 0 1.5rem; padding: 1.25rem; background: var(--cream-light); border: 1px solid var(--border); border-radius: var(--radius); }
.comment-author { font-weight: 600; }
.comment-meta { font-size: 0.8125rem; color: var(--ink-soft); margin-bottom: 0.5rem; }
.comment-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream-light);
  font-family: var(--sans);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}
.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: var(--sage); }

/* WP alignment classes */
.alignleft { float: left; margin: 0.5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.5rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: 1080px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: 100%; }
.wp-caption-text { font-size: 0.875rem; color: var(--ink-soft); text-align: center; font-style: italic; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: clamp(3rem, 5vw, 4rem) 0 2rem;
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }

.site-footer h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.6;
  margin-bottom: 1rem;
}
.site-footer p {
  color: var(--cream);
  opacity: 0.75;
  font-size: 0.9375rem;
  max-width: 32ch;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer li { margin: 0; }
.site-footer a {
  color: var(--cream);
  text-decoration: none;
  opacity: 0.85;
  font-size: 0.9375rem;
}
.site-footer a:hover {
  color: var(--cream);
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 0.75rem;
  display: block;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(248, 244, 237, 0.15);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--cream);
  opacity: 0.6;
}

/* ============================================
   Motion (with reduced-motion respect)
   ============================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 0.8s var(--ease) both; }
.rise-d1 { animation-delay: 0.1s; }
.rise-d2 { animation-delay: 0.2s; }
.rise-d3 { animation-delay: 0.3s; }
.rise-d4 { animation-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body::before, .hero-bg, .site-header, .site-footer { display: none !important; }
  a { color: var(--ink); text-decoration: underline; }
  body { background: white; color: black; }
}
