/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --rust:       #D05B2A;
  --rust-wash:  rgba(208, 91, 42, 0.10);
  --sage:       #7D9E65;
  --sage-wash:  rgba(125, 158, 101, 0.13);
  --forest:     #2C3A20;
  --peach:      #FAF0E8;
  --white:      #FFFFFF;
  --fog:        #F5F3EF;
  --ink:        #1E2818;
  --muted:      #6B7260;
  --border:     rgba(44, 58, 32, 0.14);

  --ff-h: 'DM Serif Display', Georgia, serif;
  --ff-b: 'DM Sans', system-ui, sans-serif;

  --ease: 0.2s ease;
  --r:    10px;

  --sp1: 0.5rem;
  --sp2: 1rem;
  --sp3: 1.75rem;
  --sp4: 3rem;
  --sp5: 5rem;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; scroll-behavior: smooth; }
body  {
  font-family: var(--ff-b);
  background: var(--fog);
  color: var(--ink);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
img   { display: block; max-width: 100%; height: auto; }
a     { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 2px solid var(--rust);
  box-shadow: 0 2px 12px rgba(44, 58, 32, 0.07);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--sp3);
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: var(--sp3);
  flex-wrap: wrap;
}

.topbar-brand { display: flex; align-items: center; flex-shrink: 0; }
.topbar-logo  { height: 50px; width: auto; }

.menu-check { display: none; }
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  margin-left: auto;
  padding: var(--sp1);
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--rust);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}

.topbar-nav { margin-left: auto; }
.topbar-links {
  display: flex;
  gap: 2px;
  align-items: center;
}
.topbar-link {
  font-family: var(--ff-b);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--forest);
  padding: 7px 14px;
  border-radius: var(--r);
  transition: color var(--ease), background var(--ease);
}
.topbar-link:hover {
  color: var(--rust);
  background: var(--rust-wash);
}

@media (max-width: 719px) {
  .menu-toggle { display: flex; }
  .topbar-nav {
    display: none;
    width: 100%;
    order: 10;
    padding: var(--sp1) 0 var(--sp2);
    border-top: 1px solid var(--border);
  }
  .menu-check:checked ~ .topbar-nav { display: block; }
  .menu-check:checked ~ .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-check:checked ~ .menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  .menu-check:checked ~ .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  .topbar-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .topbar-link { padding: 10px 4px; font-size: 0.95rem; }
}

/* ── BEACON — HOME SPLIT HERO ───────────────────────────── */
.beacon {
  background: var(--forest);
}
.beacon-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 440px;
}

.beacon-text {
  padding: var(--sp5) var(--sp4) var(--sp5) var(--sp3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp3);
}

.beacon-title {
  font-family: var(--ff-h);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 400;
  font-style: italic;
  color: var(--white);
  line-height: 1.15;
}

.beacon-sub {
  font-family: var(--ff-b);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
}

.beacon-visual {
  overflow: hidden;
}
.beacon-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 719px) {
  .beacon-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .beacon-text  { padding: var(--sp4) var(--sp2) var(--sp3); }
  .beacon-visual { height: 220px; }
}

/* ── INTRO BAND ──────────────────────────────────────────── */
.intro-band {
  background: var(--white);
  padding-block: var(--sp5);
  border-bottom: 1px solid var(--border);
}
.intro-prose {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 var(--sp3);
  font-size: 1.05rem;
  line-height: 1.82;
  color: var(--ink);
}
.intro-prose > * + * { margin-top: var(--sp2); }
.intro-prose h2,
.intro-prose h3 {
  font-family: var(--ff-h);
  color: var(--forest);
  line-height: 1.25;
}

/* ── STRIP HEADER (shared section heading) ───────────────── */
.strip-head {
  display: flex;
  align-items: center;
  gap: var(--sp2);
  margin-bottom: var(--sp4);
}
.strip-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rust);
  flex-shrink: 0;
}
.strip-label {
  font-family: var(--ff-b);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--forest);
  white-space: nowrap;
  flex-shrink: 0;
}
.strip-line {
  display: block;
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── TOPIC STRIP ─────────────────────────────────────────── */
.topic-strip { padding-block: var(--sp5); }
.topic-strip-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--sp3);
}

/* ── TILE GRID ───────────────────────────────────────────── */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp3);
}

@media (max-width: 991px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 479px) {
  .tile-grid { grid-template-columns: 1fr; gap: var(--sp2); }
}

/* ── TILE (overlay card) ─────────────────────────────────── */
.tile {
  position: relative;
  background-color: var(--forest);
  background-size: cover;
  background-position: center;
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  transition: transform var(--ease), box-shadow var(--ease);
}
.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(44, 58, 32, 0.22);
}

.tile-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(28, 38, 18, 0.92) 0%,
    rgba(28, 38, 18, 0.55) 45%,
    rgba(28, 38, 18, 0.06) 100%
  );
  display: flex;
  align-items: flex-end;
}

.tile-content {
  padding: var(--sp3);
  display: flex;
  flex-direction: column;
  gap: var(--sp1);
  width: 100%;
}

.tile-tag {
  font-family: var(--ff-b);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--rust);
  padding: 2px 10px;
  border-radius: 20px;
  align-self: flex-start;
}

.tile-title {
  font-family: var(--ff-h);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.28;
  color: var(--white);
}
.tile-link { color: inherit; transition: opacity var(--ease); }
.tile-link:hover { opacity: 0.85; }

.tile-excerpt {
  font-family: var(--ff-b);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tile-foot {
  display: flex;
  gap: var(--sp2);
  align-items: center;
  margin-top: var(--sp1);
}
.tile-date,
.tile-read {
  font-family: var(--ff-b);
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ── CATALOG PAGE (listing) ──────────────────────────────── */
.catalog {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--sp5) var(--sp3);
}
.catalog-head { margin-bottom: var(--sp4); }
.catalog-title {
  font-family: var(--ff-h);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-style: italic;
  color: var(--forest);
  margin-bottom: var(--sp2);
}
.catalog-rule {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--rust);
  border-radius: 2px;
}

/* ── PAGE NAV (pagination) ───────────────────────────────── */
.page-nav {
  margin-top: var(--sp5);
  display: flex;
  justify-content: center;
}
.page-nav ul,
.page-nav ol {
  display: flex;
  gap: var(--sp1);
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
}
.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 8px;
  font-family: var(--ff-b);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--forest);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.page-btn:hover {
  background: var(--rust);
  color: var(--white);
  border-color: var(--rust);
}
.page-btn--active {
  background: var(--rust);
  color: var(--white);
  border-color: var(--rust);
  pointer-events: none;
}

/* ── ARTICLE FRAME ───────────────────────────────────────── */
.article-frame { background: var(--white); }

/* breadcrumb */
.article-crumbs { background: var(--fog); }
.article-crumbs-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--sp2) var(--sp3);
}
.article-crumbs ol,
.article-crumbs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  font-family: var(--ff-b);
  font-size: 0.78rem;
  color: var(--muted);
}
.article-crumbs li + li::before {
  content: "›";
  margin-right: 4px;
  color: var(--rust);
}
.article-crumbs a           { color: var(--sage); }
.article-crumbs a:hover     { text-decoration: underline; }

/* banner with thumbnail as background */
.article-banner {
  position: relative;
  min-height: 420px;
  background-size: cover;
  background-position: center;
  background-color: var(--forest);
  display: flex;
  align-items: flex-end;
}
.article-banner-veil {
  width: 100%;
  background: linear-gradient(
    to top,
    rgba(28, 38, 18, 0.90) 0%,
    rgba(28, 38, 18, 0.48) 52%,
    transparent 100%
  );
  padding: var(--sp5) 0 var(--sp4);
}
.article-banner-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--sp3);
}

.article-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp2);
  margin-bottom: var(--sp2);
}
.badge-cat {
  font-family: var(--ff-b);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--rust);
  padding: 3px 12px;
  border-radius: 20px;
}
.badge-date,
.badge-read {
  font-family: var(--ff-b);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
}

.article-title {
  font-family: var(--ff-h);
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-style: italic;
  font-weight: 400;
  color: var(--white);
  line-height: 1.18;
  max-width: 760px;
}

@media (max-width: 479px) {
  .article-banner    { min-height: 280px; }
  .article-banner-veil { padding: var(--sp4) 0 var(--sp3); }
}

/* article content wrapper */
.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--sp5) var(--sp3);
}

/* table of contents */
.article-outline {
  margin-bottom: var(--sp4);
  padding: var(--sp3);
  background: var(--sage-wash);
  border-left: 3px solid var(--sage);
  border-radius: 0 8px 8px 0;
}
.outline-label {
  font-family: var(--ff-b);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: var(--sp2);
}
.article-outline ul,
.article-outline ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.article-outline a {
  font-family: var(--ff-b);
  font-size: 0.9rem;
  color: var(--forest);
  transition: color var(--ease);
}
.article-outline a:hover { color: var(--rust); }

/* article prose */
.chapter {
  font-size: 1.05rem;
  line-height: 1.88;
  color: var(--ink);
}
.chapter > * + * { margin-top: var(--sp3); }

.chapter h2 {
  font-family: var(--ff-h);
  font-size: 1.6rem;
  font-style: italic;
  font-weight: 400;
  color: var(--forest);
  margin-top: var(--sp5);
  padding-bottom: var(--sp1);
  border-bottom: 2px solid var(--rust-wash);
  line-height: 1.22;
}
.chapter h3 {
  font-family: var(--ff-h);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--forest);
  margin-top: var(--sp4);
}
.chapter a {
  color: var(--rust);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--ease);
}
.chapter a:hover { color: var(--forest); }
.chapter ul,
.chapter ol {
  list-style: revert;
  padding-left: 1.5rem;
}
.chapter li + li { margin-top: 5px; }
.chapter blockquote {
  padding: var(--sp2) var(--sp3);
  border-left: 3px solid var(--sage);
  font-style: italic;
  color: var(--muted);
  background: var(--sage-wash);
  border-radius: 0 8px 8px 0;
}
.chapter strong { color: var(--forest); font-weight: 500; }
.chapter img    { border-radius: var(--r); margin-block: var(--sp4); }

/* signatory */
.article-author {
  margin-top: var(--sp5);
  padding-top: var(--sp4);
  border-top: 1px solid var(--border);
}

/* ── RELATED ZONE ────────────────────────────────────────── */
.related-zone {
  background: var(--peach);
  padding-block: var(--sp5);
  border-top: 1px solid var(--border);
}
.related-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--sp3);
}

/* ── BASE FOOTER ─────────────────────────────────────────── */
.base-footer {
  background: var(--forest);
  color: rgba(255, 255, 255, 0.65);
  padding-block: var(--sp5);
}
.base-footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--sp3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp2);
}
.base-footer-name {
  font-family: var(--ff-h);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--white);
}
.base-footer-tagline {
  font-family: var(--ff-b);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  opacity: 0.85;
}
.base-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp3);
  list-style: none;
}
.base-footer-link {
  font-family: var(--ff-b);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--ease);
}
.base-footer-link:hover { color: rgba(255, 255, 255, 0.95); }
.base-footer-copy {
  font-family: var(--ff-b);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.28);
}

/* ── FOCUS ───────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-radius: 4px;
}
