/* ==========================================================================
   Book of Kegan — site stylesheet
   ========================================================================== */

:root {
  --ink: #232c41;
  --ink-soft: #4a5468;
  --paper: #faf7f1;
  --card: #ffffff;
  --line: #e4ddd0;
  --gold: #dac777;
  --gold-dark: #a98414;

  --stage1: #c0564f;
  --stage2: #d08a2e;
  --stage3: #5d9e6b;
  --stage4: #2e7f8f;
  --stage5: #5a4f9e;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.5em;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 1.9rem; margin-top: 1.6em; }
h3 { font-size: 1.35rem; margin-top: 1.4em; }

p { margin: 0 0 1.1em; }

a { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow { max-width: 760px; }

/* --------------------------------------------------------------------------
   Header & navigation
   -------------------------------------------------------------------------- */

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand img { width: 44px; height: 44px; }

.brand-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--ink);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand-name em {
  font-style: italic;
  color: var(--gold-dark);
  font-size: 0.85em;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1.3rem;
  padding: 4px 12px;
  cursor: pointer;
  color: var(--ink);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav > ul > li { position: relative; }

.site-nav > ul > li > a {
  display: block;
  padding: 24px 16px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}
.site-nav > ul > li > a:hover { color: var(--gold-dark); text-decoration: none; }

.has-dropdown > a::after {
  content: " ▾";
  font-size: 0.75em;
  color: var(--gold-dark);
}

.site-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 12px 28px rgba(35, 44, 65, 0.12);
  padding: 8px 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown { display: flex; }

.dropdown li a {
  display: block;
  padding: 9px 20px;
  color: var(--ink);
  font-size: 0.95rem;
}
.dropdown li a:hover {
  background: var(--paper);
  color: var(--gold-dark);
  text-decoration: none;
}
.dropdown .dropdown-sep { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  background: linear-gradient(180deg, #122336 0%, #232c41 100%);
  color: #f2eddf;
  text-align: center;
  padding: 62px 24px 42px;
}

.hero img.hero-logo { display:none;width: 130px; height: 130px; margin-bottom: 18px; }

.hero h1 {
  color: #fdfaf2;
  font-size: 3rem;
  margin-bottom: 0.25em;
}
.hero h1 em { color: var(--gold); font-style: italic; }

.hero .tagline {
  font-size: 1.25rem;
  color: #cfd4e2;
  max-width: 640px;
  margin: 0 auto 32px;
}

.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  margin: 6px 8px;
  transition: transform 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-gold { background: var(--gold); color: #232c41; }
.btn-gold:hover { background: #f1d168; }

.btn-ghost { border: 2px solid #cfd4e2; color: #f2eddf; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* Page hero (interior pages) */
.page-hero {
  padding: 52px 24px 44px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.page-hero h1 { margin-bottom: 0.2em; }
.page-hero .kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 10px;
}
.page-hero .lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 700px;
  margin: 0 auto;
}

/* Stage-tinted page heroes */
.page-hero.s1 { border-top: 6px solid var(--stage1); }
.page-hero.s2 { border-top: 6px solid var(--stage2); }
.page-hero.s3 { border-top: 6px solid var(--stage3); }
.page-hero.s4 { border-top: 6px solid var(--stage4); }
.page-hero.s5 { border-top: 6px solid var(--stage5); }

/* --------------------------------------------------------------------------
   Sections & cards
   -------------------------------------------------------------------------- */

.section { padding: 56px 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-title {
  text-align: center;
  margin-bottom: 8px;
}
.section-sub {
  text-align: center;
  color: var(--ink-soft);
  max-width: 680px;
  margin: 0 auto 40px;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.stage-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: block;
  color: var(--ink);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.stage-card:hover {
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(35, 44, 65, 0.12);
  transform: translateY(-3px);
}

.stage-card .card-art { background: #f4f0e6; padding: 18px 18px 6px; }

.stage-card .card-body { padding: 16px 22px 22px; }

.stage-card .stage-num {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.stage-card h3 { margin: 4px 0 6px; font-size: 1.3rem; }
.stage-card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

.s1-text { color: var(--stage1); }
.s2-text { color: var(--stage2); }
.s3-text { color: var(--stage3); }
.s4-text { color: var(--stage4); }
.s5-text { color: var(--stage5); }

/* --------------------------------------------------------------------------
   Article layout
   -------------------------------------------------------------------------- */

.article { padding: 48px 0 72px; }

.article .figure {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  margin: 28px 0;
  text-align: center;
}
.article .figure figcaption {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 12px;
  font-style: italic;
}

.subject-object-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin: 28px 0;
  background: var(--card);
}
.subject-object-box > div { padding: 20px 24px; }
.subject-object-box > div:first-child { border-right: 1px solid var(--line); }
.subject-object-box h4 {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold-dark);
}
.subject-object-box p { margin: 0; font-size: 0.98rem; }

.callout {
  border-left: 4px solid var(--gold);
  background: var(--card);
  padding: 18px 24px;
  border-radius: 0 10px 10px 0;
  margin: 28px 0;
}
.callout p:last-child { margin-bottom: 0; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

ul.spaced li { margin-bottom: 0.6em; }

table.simple {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--card);
  font-size: 0.95rem;
}
table.simple th, table.simple td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
table.simple th { background: #f4f0e6; font-family: var(--serif); }

/* --------------------------------------------------------------------------
   Blog
   -------------------------------------------------------------------------- */

.page-hero.blog { border-top: 6px solid var(--gold); }

.post-byline {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 10px 0 0;
}

.post-list { max-width: 760px; margin: 0 auto; }

.post-entry {
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.post-entry:first-child { padding-top: 4px; }
.post-entry:last-child { border-bottom: none; }

.post-meta {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-dark);
  margin-bottom: 8px;
}

.post-entry h2 { margin: 0 0 8px; font-size: 1.6rem; }
.post-entry h2 a { color: var(--ink); }
.post-entry h2 a:hover { color: var(--gold-dark); text-decoration: none; }

.post-entry p { color: var(--ink-soft); margin: 0 0 12px; }

blockquote { margin: 40px 0 40px 40px; padding-left:10px; border-left: 1px solid #535a68; font-style: italic;}

.read-more { font-weight: 700; font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: #122336;
  color: #b9c0d2;
  padding: 48px 0 32px;
  margin-top: 72px;
  font-size: 0.92rem;
}
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.site-footer h4 {
  color: #fdfaf2;
  font-family: var(--serif);
  margin-bottom: 12px;
}
.site-footer a { color: #d8c98a; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-note {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 36px;
  padding-top: 20px;
  color: #8b93a8;
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 820px) {
  h1 { font-size: 2.1rem; }
  .hero h1 { font-size: 2.3rem; }

  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(35, 44, 65, 0.15);
  }
  .site-nav.open { display: block; }

  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav > ul > li > a { padding: 14px 24px; border-top: 1px solid var(--line); }

  .site-nav .dropdown {
    position: static;
    display: flex;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0 0 8px;
    background: var(--paper);
  }
  .dropdown li a { padding-left: 40px; }

  .subject-object-box { grid-template-columns: 1fr; }
  .subject-object-box > div:first-child { border-right: none; border-bottom: 1px solid var(--line); }

  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
}
