/* ==========================================================================
   Paideia & Structura — base editorial system (Ghost-style)
   ========================================================================== */

:root {
  --ink: #14161a;
  --ink-soft: #4a4e57;
  --paper: #fbfaf7;
  --paper-dim: #f1efe9;
  --line: #e3e0d8;
  --max: 1180px;

  /* neutral chrome font */
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* section defaults (overridden per-section below) */
  --accent: #14161a;
  --accent-soft: #14161a1a;
  --section-bg: var(--paper);
  --section-ink: var(--ink);
  --section-heading-font: var(--font-ui);
  --section-body-font: var(--font-ui);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* ==========================================================================
   Site header
   ========================================================================== */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  max-width: var(--max);
  margin: 0 auto;
}

.site-logo {
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.site-logo .logo-and { font-family: var(--font-ui); font-size: 0.9rem; color: var(--ink-soft); margin: 0 6px; font-weight: 400; }
.site-logo .logo-paideia { color: #1b3a5c; }
.site-logo .logo-structura { color: #7a2e2e; }

.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.nav-paideia:hover { color: #1b3a5c; border-color: #c1622d; }
.site-nav a.nav-structura:hover { color: #7a2e2e; border-color: #b8860b; }

body.home-template .site-nav a.nav-home,
body.tag-paideia .site-nav a.nav-paideia,
body.tag-structura .site-nav a.nav-structura,
body.page-about .site-nav a.nav-about {
  color: var(--ink);
}
body.tag-paideia .site-nav a.nav-paideia { color: #1b3a5c; border-color: #c1622d; }
body.tag-structura .site-nav a.nav-structura { color: #7a2e2e; border-color: #b8860b; }

/* ==========================================================================
   Homepage split hero
   ========================================================================== */

.split-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
}

.split-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 56px;
  overflow: hidden;
  isolation: isolate;
}

.split-panel .eyebrow {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 18px;
  opacity: 0.85;
}

.split-panel h1 {
  margin: 0 0 18px;
  font-size: 3rem;
  line-height: 1.05;
}

.split-panel p.tagline {
  font-size: 1.08rem;
  max-width: 42ch;
  margin: 0 0 30px;
  opacity: 0.92;
}

.split-panel .enter-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  padding: 13px 26px;
  border-radius: 2px;
  width: fit-content;
  transition: transform .15s ease;
}
.split-panel .enter-link:hover { transform: translateX(4px); }

/* --- Paideia panel --- */
.panel-paideia {
  background: linear-gradient(160deg, #14324d 0%, #1b3a5c 55%, #234a72 100%);
  color: #f4ede0;
  font-family: "EB Garamond", serif;
}
.panel-paideia .eyebrow { color: #d98c4a; }
.panel-paideia h1 { font-family: "Playfair Display", serif; font-weight: 700; }
.panel-paideia .enter-link { background: #c1622d; color: #fff8ef; }
.panel-paideia::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='16' viewBox='0 0 64 16'%3E%3Cpath d='M0 16V4h4V0h4v4h4V0h4v8h4V4h4V0h4v4h4V0h4v8h4V4h4V0h4v4h4V0h4v8h4V4h4V0h4v16z' fill='%23f4ede0' fill-opacity='0.08'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: bottom;
  z-index: -1;
  opacity: 0.6;
}

/* --- Structura panel --- */
.panel-structura {
  background:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(184,134,11,0.10) 40px),
    linear-gradient(160deg, #f4f0e8 0%, #ece5d8 100%);
  color: #2b2b28;
  font-family: "Source Serif 4", "Georgia", serif;
  border-left: 1px solid var(--line);
}
.panel-structura .eyebrow { color: #8c2f39; }
.panel-structura h1 { font-family: "Cinzel", serif; font-weight: 600; letter-spacing: 0.01em; }
.panel-structura .enter-link { background: #7a2e2e; color: #f6ece3; }
.panel-structura::after {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 10px;
  background: linear-gradient(180deg, #b8860b, #7a2e2e, #b8860b);
  opacity: 0.85;
}

@media (max-width: 860px) {
  .split-hero { grid-template-columns: 1fr; min-height: 0; }
  .split-panel { padding: 48px 28px; }
  .split-panel h1 { font-size: 2.2rem; }
}

/* ==========================================================================
   Homepage content rails
   ========================================================================== */

.rail {
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}
.rail.rail-paideia { background: #fbf8f2; }
.rail.rail-structura { background: #faf7f0; }

.rail-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 34px;
}
.rail-header h2 {
  font-size: 1.6rem;
  margin: 0;
}
.rail-paideia .rail-header h2 { font-family: "Playfair Display", serif; color: #1b3a5c; }
.rail-structura .rail-header h2 { font-family: "Cinzel", serif; color: #7a2e2e; }

.rail-header .see-all { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.03em; }
.rail-paideia .see-all { color: #c1622d; }
.rail-structura .see-all { color: #b8860b; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Post cards
   ========================================================================== */

.post-card {
  background: var(--paper);
  border: 1px solid var(--line);
}
.post-card-image { aspect-ratio: 16/10; background: var(--paper-dim); overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; }
.post-card-content { padding: 20px; }
.post-card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}
.post-card h3 { margin: 0 0 8px; font-size: 1.2rem; line-height: 1.3; }
.post-card p.excerpt { margin: 0 0 12px; font-size: 0.92rem; color: var(--ink-soft); }
.post-card .meta { font-size: 0.78rem; color: var(--ink-soft); font-family: var(--font-ui); }

.rail-paideia .post-card, body.tag-paideia .post-card { border-color: #e3d9c8; }
.rail-paideia .post-card-tag, body.tag-paideia .post-card-tag { color: #c1622d; }
.rail-paideia .post-card h3, body.tag-paideia .post-card h3 { font-family: "Playfair Display", serif; color: #1b3a5c; }

.rail-structura .post-card, body.tag-structura .post-card { border-color: #ded6c2; border-top: 3px solid #b8860b; }
.rail-structura .post-card-tag, body.tag-structura .post-card-tag { color: #8c2f39; }
.rail-structura .post-card h3, body.tag-structura .post-card h3 { font-family: "Cinzel", serif; font-size: 1.05rem; color: #7a2e2e; }

/* ==========================================================================
   Tag archive banners (Paideia / Structura)
   ========================================================================== */

.archive-banner {
  padding: 90px 32px 70px;
  text-align: center;
  position: relative;
}
.archive-banner .eyebrow {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.archive-banner h1 { margin: 0 0 20px; font-size: 3rem; }
.archive-banner .desc { max-width: 60ch; margin: 0 auto; font-size: 1.1rem; opacity: 0.9; }

.banner-paideia {
  background: linear-gradient(180deg, #14324d 0%, #1b3a5c 100%);
  color: #f4ede0;
}
.banner-paideia .eyebrow { color: #d98c4a; }
.banner-paideia h1 { font-family: "Playfair Display", serif; }
.banner-paideia .desc { font-family: "EB Garamond", serif; }
.banner-paideia { border-bottom: 6px solid #c1622d; }

.banner-structura {
  background: linear-gradient(180deg, #ece5d8 0%, #f4f0e8 100%);
  color: #2b2b28;
}
.banner-structura .eyebrow { color: #8c2f39; }
.banner-structura h1 { font-family: "Cinzel", serif; }
.banner-structura .desc { font-family: "Source Serif 4", serif; }
.banner-structura { border-bottom: 6px solid #b8860b; }

.archive-body { padding: 60px 0 80px; }

/* ==========================================================================
   Single post (styled by tag- body class from Ghost's body_class helper)
   ========================================================================== */

.post-hero { padding: 70px 32px 40px; text-align: center; }
.post-hero .post-tag-label {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 18px; display: inline-block;
}
.post-hero h1 { font-size: 2.6rem; line-height: 1.15; margin: 0 0 18px; max-width: 850px; margin-left: auto; margin-right: auto; }
.post-hero .post-excerpt { font-size: 1.15rem; color: var(--ink-soft); max-width: 65ch; margin: 0 auto 20px; }
.post-hero .post-meta { font-size: 0.85rem; color: var(--ink-soft); }

.post-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 32px 90px;
  font-size: 1.15rem;
  line-height: 1.75;
}
.post-content h2, .post-content h3 { margin-top: 2.2em; }
.post-content p { margin: 0 0 1.4em; }
.post-content a { text-decoration: underline; text-underline-offset: 3px; }
.post-content blockquote {
  margin: 2em 0; padding: 4px 0 4px 26px; border-left: 4px solid var(--accent);
  font-style: italic; font-size: 1.2rem;
}
.post-content img { margin: 2.2em auto; border-radius: 2px; }
.post-content figcaption { text-align: center; font-size: 0.85rem; color: var(--ink-soft); margin-top: 10px; }
.post-content hr { border: none; border-top: 1px solid var(--line); margin: 3em 0; }
.post-content ul, .post-content ol { padding-left: 1.4em; margin: 0 0 1.4em; }

.post-content .kg-width-wide { width: 100%; max-width: 1000px; margin-left: 50%; transform: translateX(-50%); }
.post-content .kg-width-full { width: 100%; max-width: var(--max); margin-left: 50%; transform: translateX(-50%); }

body.tag-paideia .post-hero { background: #fbf8f2; }
body.tag-paideia .post-tag-label { color: #c1622d; }
body.tag-paideia .post-hero h1 { font-family: "Playfair Display", serif; color: #1b3a5c; }
body.tag-paideia .post-content { font-family: "EB Garamond", serif; }
body.tag-paideia .post-content h2, body.tag-paideia .post-content h3 { font-family: "Playfair Display", serif; color: #1b3a5c; }
body.tag-paideia .post-content blockquote { border-color: #c1622d; }
body.tag-paideia .post-content a { color: #1b3a5c; }

body.tag-structura .post-hero { background: #faf7f0; }
body.tag-structura .post-tag-label { color: #8c2f39; }
body.tag-structura .post-hero h1 { font-family: "Cinzel", serif; color: #7a2e2e; }
body.tag-structura .post-content { font-family: "Source Serif 4", "Georgia", serif; }
body.tag-structura .post-content h2, body.tag-structura .post-content h3 { font-family: "Cinzel", serif; color: #7a2e2e; }
body.tag-structura .post-content blockquote { border-color: #b8860b; }
body.tag-structura .post-content a { color: #8c2f39; }

/* ==========================================================================
   Generic page template (About, etc.)
   ========================================================================== */

.page-hero { padding: 80px 32px 30px; text-align: center; }
.page-hero h1 { font-family: "Cormorant Garamond", serif; font-size: 2.8rem; margin: 0; }
.page-content { max-width: 720px; margin: 0 auto; padding: 20px 32px 90px; font-size: 1.1rem; line-height: 1.75; }
.page-content p { margin: 0 0 1.4em; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 32px;
  background: var(--ink);
  color: #cfd1d6;
}
.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a { font-weight: 600; }
.site-footer .footer-nav { display: flex; gap: 22px; }
.site-footer .footer-nav a:hover { color: #fff; }

/* ==========================================================================
   Empty states / misc
   ========================================================================== */

.no-posts { padding: 60px 32px; text-align: center; color: var(--ink-soft); }
.pagination { display: flex; justify-content: center; gap: 20px; padding: 30px 0 10px; font-size: 0.85rem; font-weight: 600; }
