/* ── elieschulman.com — Shared Stylesheet ── */

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

:root {
  --midnight: #0f1b2d;
  --deep-navy: #1a2744;
  --warm-ivory: #f5f0e8;
  --cream: #faf7f2;
  --gold: #c9a84c;
  --gold-dim: #a88a3a;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-light: #8a8a8a;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--text-primary);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--deep-navy); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ── Skip Link ── */
.skip-link {
  position: fixed; top: 0.5rem; left: 0.5rem; z-index: 200;
  padding: 0.65rem 1rem; border-radius: 4px;
  background: white; color: var(--midnight);
  transform: translateY(-150%); transition: transform 0.2s;
}
.skip-link:focus { transform: translateY(0); }

/* ── Navigation ── */
nav.site-nav, .site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15, 27, 45, 0.95);
  backdrop-filter: blur(10px);
  padding: 0.75rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.site-nav .logo {
  font-family: var(--serif);
  font-size: 1.25rem; font-weight: 600;
  color: var(--warm-ivory);
  text-decoration: none;
}
.site-nav .nav-links { display: flex; gap: 2rem; }
.site-nav .nav-links a {
  color: rgba(245,240,232,0.7);
  text-decoration: none; font-size: 0.875rem;
  font-weight: 500; letter-spacing: 0.02em;
  transition: color 0.2s;
}
.site-nav .nav-links a:hover { color: var(--gold); }
.site-nav .nav-links a[aria-current="page"] { color: var(--gold); }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--midnight) 0%, var(--deep-navy) 50%, #1e3050 100%);
  padding: 6rem 2rem 4rem;
  text-align: center;
}
.hero-inner { max-width: 680px; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--warm-ivory);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.hero .subtitle {
  font-size: 1.125rem;
  color: rgba(245,240,232,0.7);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}
.hero .eyebrow {
  color: var(--gold); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero .cta {
  display: inline-block;
  background: var(--gold);
  color: var(--midnight);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.875rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.hero .cta:hover { background: var(--gold-dim); transform: translateY(-1px); }
.hero .cta-secondary {
  display: block; margin-top: 1rem;
  color: rgba(245,240,232,0.6); font-size: 0.9rem;
  text-decoration: none;
}
.hero .cta-secondary:hover { color: var(--gold); }

/* ── Page Header (subpages) ── */
.page-header {
  background: linear-gradient(135deg, var(--midnight), var(--deep-navy));
  color: var(--warm-ivory);
  padding: 6rem 2rem 4rem;
  text-align: center;
}
.page-header-inner { max-width: 760px; margin: 0 auto; }
.page-header .eyebrow {
  color: var(--gold); text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 600;
}
.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700; line-height: 1.15;
  margin: 0.75rem 0 1.25rem;
}
.page-header .lede {
  color: rgba(245,240,232,0.78);
  font-size: 1.1rem; max-width: 640px; margin: 0 auto;
  line-height: 1.8;
}

/* ── Sections ── */
section { padding: 5rem 2rem; }
.section-inner { max-width: 960px; margin: 0 auto; }
.section-label {
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700; line-height: 1.2;
  margin-bottom: 1.5rem;
}
.section-intro {
  color: var(--text-secondary); font-size: 1rem;
  max-width: 640px; margin-bottom: 2.5rem;
}

/* ── Content Area ── */
.content {
  max-width: 860px; margin: 0 auto;
  padding: 4rem 2rem;
}
.content h2 {
  font-family: var(--serif);
  font-size: 1.6rem; font-weight: 700;
  margin-top: 2.5rem; margin-bottom: 1rem;
}
.content h3 {
  font-family: var(--serif);
  font-size: 1.25rem; font-weight: 600;
  margin-top: 1.5rem; margin-bottom: 0.5rem;
}
.content p {
  color: var(--text-secondary); font-size: 0.95rem;
  line-height: 1.8; margin-bottom: 1rem;
}
.content ul { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.content li { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 0.5rem; }

/* ── Book Cards ── */
.book-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: start;
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  margin-bottom: 2rem;
}
.book-cover {
  width: 100%;
  border-radius: 4px;
  box-shadow: 4px 6px 20px rgba(0,0,0,0.15);
}
.book-info h3 {
  font-family: var(--serif);
  font-size: 1.5rem; font-weight: 700;
  margin-bottom: 0.25rem;
}
.book-info .book-author {
  font-size: 0.85rem; color: var(--text-light);
  margin-bottom: 0.75rem;
}
.book-info .book-desc {
  color: var(--text-secondary); font-size: 0.9rem;
  line-height: 1.7; margin-bottom: 1rem;
}
.book-info .book-meta {
  font-size: 0.8rem; color: var(--text-light);
  margin-bottom: 0.75rem;
}

/* ── Download Panel ── */
.download-panel {
  background: var(--warm-ivory);
  border-radius: 8px;
  padding: 1.25rem;
}
.download-panel p { font-size: 0.85rem; font-weight: 500; margin-bottom: 0.5rem; }
.download-button {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background: var(--midnight);
  color: var(--warm-ivory);
  border: none; border-radius: 6px;
  font-size: 0.85rem; font-weight: 600;
  font-family: var(--sans);
  text-decoration: none;
  transition: background 0.2s;
}
.download-button:hover { background: var(--deep-navy); }

/* ── Resource Cards (essays, source sheets, etc.) ── */
.resource-card {
  background: white;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.resource-card .eyebrow {
  color: var(--gold); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.resource-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem; font-weight: 600;
  margin-bottom: 0.5rem;
}
.resource-card h3 a { text-decoration: none; color: var(--text-primary); }
.resource-card h3 a:hover { color: var(--gold-dim); }
.resource-card p {
  font-size: 0.88rem; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 0.75rem;
}

/* ── Theme Tags / Chips ── */
.tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.tag {
  display: inline-block;
  font-size: 0.7rem; font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  letter-spacing: 0.03em;
}
.tag-torah { background: rgba(201,168,76,0.15); color: var(--gold-dim); }
.tag-sitting { background: rgba(15,27,45,0.1); color: var(--midnight); }
.tag-group { background: rgba(245,240,232,0.8); color: var(--text-secondary); border: 1px solid rgba(0,0,0,0.08); }
.tag-ai { background: rgba(0,128,128,0.1); color: #006666; }

/* ── Taxonomy Arc (Writing Map) ── */
.arc {
  display: flex; flex-wrap: wrap; align-items: stretch;
  gap: 0; justify-content: center;
  margin: 2rem 0;
}
.arc-item {
  flex: 1; min-width: 150px;
  background: white;
  padding: 1.5rem 1rem;
  text-align: center;
  border-right: 1px solid rgba(0,0,0,0.06);
  transition: background 0.2s;
  text-decoration: none;
}
.arc-item:last-child { border-right: none; border-radius: 0 8px 8px 0; }
.arc-item:first-child { border-radius: 8px 0 0 8px; }
.arc-item:hover { background: var(--warm-ivory); }
.arc-item .arc-label {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: 0.25rem;
}
.arc-item .arc-count {
  font-size: 0.75rem; color: var(--text-light);
}
.arc-item .arc-desc {
  font-size: 0.75rem; color: var(--text-light);
  margin-top: 0.5rem; line-height: 1.4;
}
.arc-arrow {
  display: flex; align-items: center;
  color: var(--gold); font-size: 1.2rem;
  padding: 0 0.25rem;
}

/* ── Foundations Volume Grid ── */
.volume-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.volume-item {
  display: flex; align-items: center; justify-content: space-between;
  background: white;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  border-left: 3px solid var(--gold);
  transition: background 0.15s;
}
.volume-item:hover { background: var(--warm-ivory); }
.volume-item .vol-label {
  font-size: 0.9rem; color: var(--text-primary);
}
.volume-item .vol-ref {
  font-size: 0.75rem; color: var(--text-light);
  margin-right: 0.75rem;
}
.volume-item .vol-link {
  font-size: 0.8rem; color: var(--gold-dim);
  text-decoration: none; font-weight: 500;
}
.volume-item .vol-link:hover { text-decoration: underline; }

/* ── Reading Path Cards ── */
.path-card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-top: 3px solid var(--gold);
}
.path-card h3 {
  font-family: var(--serif); font-size: 1.3rem; font-weight: 600;
  margin-bottom: 0.5rem;
}
.path-card .path-desc {
  color: var(--text-secondary); font-size: 0.9rem;
  line-height: 1.7; margin-bottom: 1rem;
}
.path-card ol { padding-left: 1.25rem; }
.path-card ol li {
  font-size: 0.88rem; color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

/* ── Category Preview (home page) ── */
.category-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  margin: 2rem 0;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}
.category-preview a {
  display: block;
  padding: 1.5rem 1rem;
  text-decoration: none;
  border-right: 1px solid rgba(0,0,0,0.06);
  transition: background 0.2s;
}
.category-preview a:last-child { border-right: none; }
.category-preview a:hover { background: var(--warm-ivory); }
.category-preview .cat-label {
  font-family: var(--serif); font-size: 1.05rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: 0.25rem;
}
.category-preview .cat-count {
  font-size: 0.72rem; color: var(--text-light);
}
.category-preview .cat-desc {
  font-size: 0.72rem; color: var(--text-light);
  margin-top: 0.4rem; line-height: 1.4;
}

/* ── Featured Books Grid ── */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.featured-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}
.featured-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.featured-card h4 {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 600;
  margin-bottom: 0.5rem;
}
.featured-card .featured-type {
  font-size: 0.72rem; color: var(--text-light);
  margin-bottom: 0.5rem;
}
.featured-card .featured-link {
  font-size: 0.82rem; color: var(--gold-dim);
  text-decoration: none; font-weight: 500;
}

/* ── Links ── */
.work-link {
  color: var(--deep-navy); font-weight: 600;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.note { color: var(--text-light); font-size: 0.85rem; }
.button {
  display: inline-block;
  background: var(--midnight); color: white;
  text-decoration: none; border-radius: 6px;
  padding: 0.7rem 1.3rem; font-weight: 600;
  font-size: 0.88rem;
}

/* ── Back Link ── */
.back-link {
  display: inline-block;
  font-size: 0.85rem; color: var(--text-light);
  text-decoration: none; margin-bottom: 1.5rem;
}
.back-link:hover { color: var(--gold-dim); }

/* ── Footer ── */
footer {
  background: var(--midnight);
  color: rgba(245,240,232,0.5);
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: 0.8rem;
}
footer a { color: var(--gold); text-decoration: none; }
footer .footer-links {
  display: flex; justify-content: center; gap: 1.5rem;
  margin-bottom: 0.75rem;
}

/* ── Section Backgrounds ── */
.bg-cream { background: var(--cream); }
.bg-white { background: white; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .site-nav {
    padding: 0.65rem 1rem;
    flex-direction: column;
    gap: 0.35rem;
  }
  .site-nav .nav-links { gap: 1rem; width: 100%; flex-wrap: wrap; }
  .site-nav .nav-links a { font-size: 0.78rem; }
  .hero { padding-top: 8.5rem; min-height: 90vh; }
  section { padding: 3.5rem 1.25rem; }
  .content { padding: 3rem 1.25rem; }
  .book-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 1.5rem;
    gap: 1.5rem;
  }
  .book-cover { max-width: 200px; margin: 0 auto; }
  .download-button { width: 100%; text-align: center; }
  .arc { flex-direction: column; }
  .arc-item { border-right: none; border-bottom: 1px solid rgba(0,0,0,0.06); border-radius: 0; }
  .arc-item:first-child { border-radius: 8px 8px 0 0; }
  .arc-item:last-child { border-radius: 0 0 8px 8px; border-bottom: none; }
  .arc-arrow { display: none; }
  .category-preview { grid-template-columns: 1fr; }
  .category-preview a { border-right: none; border-bottom: 1px solid rgba(0,0,0,0.06); }
  .featured-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
