/* סיפורים מהקצה — stylesheet */
:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --ink: #1d1b18;
  --muted: #6f675f;
  --line: #e4ddd2;
  --accent: #a4502a;
  --accent-soft: #f3e3d9;
  --hero-1: #101c33;
  --hero-2: #1d3358;
  --radius: 14px;
  --maxw: 1080px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Heebo", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  font-size: 17px;
}

h1, h2, h3, .site-title, .card-title {
  font-family: "Frank Ruhl Libre", "Heebo", serif;
  line-height: 1.3;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.site-title {
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.2px;
}
.site-title span { color: var(--accent); }
.main-nav ul {
  display: flex;
  gap: 26px;
  list-style: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.main-nav a { padding: 6px 2px; border-bottom: 2px solid transparent; transition: border-color .15s, color .15s; }
.main-nav a:hover { color: var(--accent); border-color: var(--accent); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- featured ---------- */
.featured {
  margin: 34px auto 10px;
}
.featured-card {
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2));
  color: #f5f1e8;
  border-radius: var(--radius);
  padding: 56px 48px;
  position: relative;
  overflow: hidden;
}
.featured-card::after {
  content: "✦";
  position: absolute;
  left: 34px;
  bottom: -30px;
  font-size: 9rem;
  color: rgba(255,255,255,0.05);
  pointer-events: none;
}
.tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.featured-card h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 900;
  margin-bottom: 14px;
  max-width: 22ch;
}
.featured-hook {
  font-size: 1.15rem;
  color: #d9d2c2;
  max-width: 52ch;
  margin-bottom: 26px;
}
.btn {
  display: inline-block;
  background: #f5f1e8;
  color: var(--hero-1);
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 999px;
  transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); background: #fff; }
.featured-meta { margin-top: 20px; font-size: 0.85rem; color: #a8a192; }

/* ---------- sections ---------- */
.section { padding: 44px 0 8px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
}
.section-head h2 { font-size: 1.6rem; font-weight: 900; }

/* ---------- story grid ---------- */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.story-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s, transform .18s;
}
.story-card:hover { box-shadow: 0 10px 28px rgba(29,27,24,0.10); transform: translateY(-3px); }
.story-card .cat {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}
.story-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.story-card p { font-size: 0.95rem; color: var(--muted); flex: 1; }
.story-card .meta { margin-top: 16px; font-size: 0.8rem; color: var(--muted); }
.story-card.coming { border-style: dashed; background: transparent; align-items: flex-start; justify-content: center; }
.story-card.coming h3 { color: var(--muted); }

/* ---------- categories ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.cat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  transition: border-color .15s, box-shadow .15s;
}
.cat-card:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(164,80,42,0.12); }
.cat-card .icon {
  width: 52px; height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: "Frank Ruhl Libre", serif;
  font-size: 1.5rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.cat-card p { font-size: 0.85rem; color: var(--muted); }

/* ---------- article page ---------- */
.article-hero {
  background: linear-gradient(135deg, var(--hero-1), var(--hero-2));
  color: #f5f1e8;
  padding: 64px 0 54px;
  margin-bottom: 40px;
}
.article-hero .tag { margin-bottom: 16px; }
.article-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; max-width: 20ch; margin-bottom: 16px; }
.article-hero .hook { font-size: 1.25rem; color: #d9d2c2; max-width: 48ch; font-weight: 500; }
.article-hero .meta { margin-top: 24px; font-size: 0.88rem; color: #a8a192; }

.article-body { max-width: 720px; margin: 0 auto; padding: 0 20px 60px; }
.article-body h2 {
  font-size: 1.55rem;
  font-weight: 900;
  margin: 46px 0 16px;
  padding-top: 10px;
}
.article-body h3 { font-size: 1.2rem; font-weight: 700; margin: 30px 0 8px; }
.article-body p { margin-bottom: 18px; }
.article-body strong { font-weight: 700; }
.pull-quote {
  font-family: "Frank Ruhl Libre", serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  border-right: 4px solid var(--accent);
  padding: 6px 22px 6px 0;
  margin: 30px 0;
}
.closing-question {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 30px 28px;
  margin: 44px 0;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
}
.sources {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--muted);
}
.sources h4 { font-size: 0.95rem; color: var(--ink); margin-bottom: 6px; }
.back-link { display: inline-block; margin-bottom: 26px; font-weight: 600; color: var(--accent); }
.back-link:hover { text-decoration: underline; }

/* progress bar */
.progress-bar {
  position: fixed; top: 0; right: 0; height: 3px;
  background: var(--accent); width: 0; z-index: 100;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding: 40px 0 30px;
  background: var(--surface);
}
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; flex-wrap: wrap; }
.footer-brand { max-width: 340px; }
.footer-brand .site-title { font-size: 1.3rem; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.footer-links { display: flex; gap: 40px; }
.footer-links h4 { font-size: 0.9rem; margin-bottom: 10px; }
.footer-links ul { list-style: none; font-size: 0.88rem; color: var(--muted); }
.footer-links li { margin-bottom: 6px; }
.footer-links a:hover { color: var(--accent); }
.copyright { text-align: center; margin-top: 34px; font-size: 0.8rem; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 0; }
  .main-nav a { display: block; padding: 12px 22px; border-bottom: none; }
  .main-nav a:hover { background: var(--bg); }
  .featured-card { padding: 38px 26px; }
  .story-grid, .cat-grid { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 1.35rem; }
}

/* ---------- figures ---------- */
.article-body figure { margin: 30px 0; }
.article-body figure img {
  width: 100%;
  border-radius: var(--radius);
  display: block;
}
.article-body figure.narrow img { max-width: 340px; margin: 0 auto; }
.article-body figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
  text-align: center;
}
.article-body figcaption .credit { font-size: 0.75rem; color: #9a928a; }

/* ---------- footnotes & theory index ---------- */
.article-body .footnotes { font-size: 0.92rem; color: var(--ink); padding-right: 1.2em; }
.article-body .footnotes li { margin-bottom: 10px; line-height: 1.6; }
.article-body sup a { color: var(--accent); text-decoration: none; font-size: 0.75em; }
.article-body sup a:hover { text-decoration: underline; }
.article-body .theory-index { background: #f5f1ea; border-radius: var(--radius); padding: 18px 22px; margin: 10px 0 34px; }
.article-body .theory-index ol { margin: 0; padding-right: 1.3em; line-height: 2; }
.article-body .theory-index a { color: var(--accent); text-decoration: none; font-weight: 500; }
.article-body .theory-index a:hover { text-decoration: underline; }
.article-body h3 { scroll-margin-top: 20px; }
