/* ─────────────────────────────────────────────────────────────────────────────
   FOUNDER INTEL THEME — Dark Gold Edition
   Black #0a0a0a · Gold #d4a843 · Cream #f5f4f0 · Navy #1B2A4A
───────────────────────────────────────────────────────────────────────────── */

:root {
  --black:       #0a0a0a;
  --black-mid:   #111111;
  --black-soft:  #1a1a1a;
  --black-card:  #141414;
  --black-border:#222222;
  --cream:       #f5f4f0;
  --cream-mid:   #eceae6;
  --cream-dark:  #dddad5;
  --gold:        #d4a843;
  --gold-dim:    #b08a2e;
  --gold-faint:  rgba(212,168,67,0.15);
  --navy:        #1B2A4A;
  --blue:        #2173BE;
  --teal:        #7EB5A0;
  --text:        #1a1a1a;
  --text-mid:    #555550;
  --text-muted:  #888884;
  --font-serif:  'DM Serif Display', Georgia, serif;
  --font-mono:   'DM Mono', 'Courier New', monospace;
  --font-sans:   'DM Sans', Arial, sans-serif;
  --max-width:   760px;
  --wide-width:  1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

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

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

/* ── SITE HEADER ─────────────────────────────────────────────────────────── */

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

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

.header-gold-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
  opacity: 0.4;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon { flex-shrink: 0; }
.site-logo-text { line-height: 1; }

.logo-sup {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #444;
  display: block;
  margin-bottom: 2px;
}

.logo-name {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--cream);
  display: block;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-link:hover, .nav-link--active { color: var(--cream); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(212,168,67,0.4);
  border-radius: 20px;
  padding: 5px 14px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.nav-cta:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

/* ── FEED HERO ───────────────────────────────────────────────────────────── */

.feed-hero {
  background: var(--black);
  padding: 80px 32px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--black-border);
}

/* Radial gold glow */
.feed-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 110%, rgba(212,168,67,0.09) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 20% 50%, rgba(212,168,67,0.03) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 80% 50%, rgba(212,168,67,0.03) 0%, transparent 60%);
  pointer-events: none;
}

/* Subtle grid texture */
.feed-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212,168,67,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,168,67,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.feed-hero-inner {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.feed-hero-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  opacity: 0.8;
}

.feed-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(42px, 6vw, 64px);
  color: var(--cream);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.feed-hero-desc {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 36px;
  font-weight: 300;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.feed-hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-block;
  background: var(--gold);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: 2px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 0 0 rgba(212,168,67,0);
}
.cta-btn:hover {
  background: #e6b84f;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212,168,67,0.25);
}

.cta-note {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ── FEED SECTION ────────────────────────────────────────────────────────── */

.feed-section {
  background: var(--cream);
  padding: 48px 32px 80px;
}

.feed-container {
  max-width: var(--wide-width);
  margin: 0 auto;
}

.feed-welcome {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--cream-dark);
}

.welcome-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}

/* Feed grid */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1px;
  background: var(--cream-dark);
  border: 1px solid var(--cream-dark);
  border-radius: 4px;
  overflow: hidden;
}

/* Feed card */
.feed-card {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  transition: background 0.2s;
  position: relative;
}

.feed-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
  opacity: 0;
  transition: opacity 0.2s;
}

.feed-card--friday::before { background: var(--blue); opacity: 1; }
.feed-card--tuesday::before { background: var(--gold); opacity: 0.6; }

.feed-card:hover { background: #fdfcfa; }
.feed-card:hover::before { opacity: 1; }

/* Card image */
.feed-card-image-wrap {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/7;
}

.feed-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  filter: grayscale(20%);
}
.feed-card:hover .feed-card-image {
  transform: scale(1.04);
  filter: grayscale(0%);
}

/* Card body */
.feed-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.feed-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.feed-card-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 20px;
}

.feed-card-tag--tuesday {
  background: rgba(212,168,67,0.12);
  color: var(--gold);
  border: 1px solid rgba(212,168,67,0.2);
}

.feed-card-tag--friday {
  background: rgba(33,115,190,0.12);
  color: #5a9fd4;
  border: 1px solid rgba(33,115,190,0.2);
}

.feed-card-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.feed-card-title {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.35;
  color: var(--black);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.feed-card-title a { color: inherit; }
.feed-card:hover .feed-card-title a { color: var(--gold-dim); }

.feed-card-excerpt {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-mid);
  margin-bottom: 20px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-card-read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: auto;
  transition: gap 0.2s, color 0.2s;
}
.feed-card:hover .feed-card-read { gap: 10px; color: var(--gold); }

/* Pagination */
.feed-pagination { text-align: center; margin-top: 40px; }

.pagination-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--cream-dark);
  border-radius: 2px;
  padding: 10px 24px;
  transition: border-color 0.2s, color 0.2s;
}
.pagination-btn:hover { border-color: var(--gold); color: var(--gold-dim); }

/* ── SUBSCRIBE SECTION ───────────────────────────────────────────────────── */

.feed-subscribe {
  background: var(--black-card);
  border-top: 1px solid var(--black-border);
  padding: 72px 32px;
  position: relative;
  overflow: hidden;
}

.feed-subscribe::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(27,42,74,0.6) 0%, transparent 70%);
  pointer-events: none;
}

.subscribe-inner {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.subscribe-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}

.subscribe-title {
  font-family: var(--font-serif);
  font-size: 30px;
  color: var(--cream);
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.subscribe-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 32px;
}

.subscribe-form .gh-subscribe-form {
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
}

.subscribe-form .gh-subscribe-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--black-border);
  border-radius: 2px;
  padding: 11px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--cream);
  outline: none;
  transition: border-color 0.2s;
}
.subscribe-form .gh-subscribe-input::placeholder { color: var(--text-muted); }
.subscribe-form .gh-subscribe-input:focus { border-color: var(--gold); }

.subscribe-form .gh-subscribe-btn {
  background: var(--gold);
  color: var(--black);
  border: none;
  border-radius: 2px;
  padding: 11px 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.subscribe-form .gh-subscribe-btn:hover { background: #e6b84f; }

/* ── POST / ARTICLE ──────────────────────────────────────────────────────── */

.post-hero-image {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
}
.post-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.post-content { padding: 0; }
.post-content .kg-card { margin: 0; }
.post-content .kg-html-card { overflow: visible; }

/* Pages */
.page-article .post-content h1,
.page-article .post-content h2,
.page-article .post-content h3 {
  font-family: var(--font-serif);
  color: var(--cream);
  margin: 32px 0 16px;
  line-height: 1.3;
}
.page-article .post-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-mid);
  margin-bottom: 20px;
}
.page-article .post-content a { color: var(--gold); text-decoration: underline; }

.page-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--cream-dark);
  margin-bottom: 40px;
}
.page-title {
  font-family: var(--font-serif);
  font-size: 36px;
  color: var(--black);
  line-height: 1.25;
}

/* Post footer */
.post-footer {
  border-top: 1px solid var(--cream-dark);
  margin-top: 48px;
  padding-top: 32px;
  padding-bottom: 64px;
}

.post-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--cream-dark);
  border-radius: 20px;
  padding: 3px 10px;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid var(--cream-dark);
  border-radius: 3px;
  transition: border-color 0.2s, background 0.2s;
}
.post-nav-link:hover {
  border-color: var(--gold);
  background: #fdfcfa;
}
.post-nav-link--next { text-align: right; }

.post-nav-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.post-nav-title {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--black);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── SITE FOOTER ─────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--black);
  border-top: 1px solid var(--black-border);
}

.footer-gold-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--gold) 70%, transparent);
  opacity: 0.3;
}

.site-footer-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 40px 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  margin-bottom: 10px;
}

.footer-logo-sup {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #333;
  margin-bottom: 2px;
}

.footer-logo-name {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--cream);
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #444;
  letter-spacing: 0.04em;
  line-height: 1.7;
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #555;
  line-height: 2;
  letter-spacing: 0.04em;
  text-align: right;
}
.footer-meta a { color: #666; transition: color 0.2s; }
.footer-meta a:hover { color: var(--cream); }

/* ── ERROR PAGE ──────────────────────────────────────────────────────────── */

.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 32px;
}
.error-inner { text-align: center; }
.error-code {
  font-family: var(--font-mono);
  font-size: 80px;
  font-weight: 500;
  color: var(--black-border);
  line-height: 1;
  margin-bottom: 16px;
}
.error-title {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--text-mid);
  margin-bottom: 32px;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .site-header-inner { padding: 0 20px; }
  .site-nav .nav-link { display: none; }
  .feed-hero { padding: 52px 20px 48px; }
  .feed-section { padding: 32px 20px 64px; }
  .feed-grid { grid-template-columns: 1fr; }
  .feed-subscribe { padding: 48px 20px; }
  .post-container { padding: 0 20px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-link--next { text-align: left; }
  .site-footer-inner { flex-direction: column; gap: 24px; padding: 32px 20px; }
  .footer-meta { text-align: left; }
  .subscribe-form .gh-subscribe-form { flex-direction: column; }
}

@media (max-width: 480px) {
  .feed-hero-title { font-size: 36px; }
  .feed-hero-cta { flex-direction: column; align-items: center; }
}

/* ── GHOST KOENIG REQUIRED CLASSES ───────────────────────────────────────── */

.kg-width-wide {
  margin-left: calc(50% - 50vw + 32px);
  margin-right: calc(50% - 50vw + 32px);
  max-width: none;
}

.kg-width-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: none;
}

.kg-card { margin: 0; }
.kg-html-card { overflow: visible; }
.kg-image-card img { width: 100%; height: auto; }
.kg-gallery-card .kg-gallery-container { display: flex; flex-direction: column; }
.kg-gallery-row { display: flex; gap: 4px; }
.kg-gallery-image img { width: 100%; object-fit: cover; }
.kg-bookmark-card { border: 1px solid var(--black-border); border-radius: 3px; }
.kg-embed-card iframe { width: 100%; }
.kg-callout-card { padding: 16px 20px; border-radius: 3px; background: var(--black-mid); }
.kg-toggle-card { border: 1px solid var(--black-border); border-radius: 3px; }
.kg-video-card video { width: 100%; }
.kg-audio-card audio { width: 100%; }
.kg-button-card a { display: inline-block; }
.kg-header-card { padding: 40px; text-align: center; background: var(--black-card); color: var(--cream); }
.kg-header-card h2 { font-family: var(--font-serif); font-size: 32px; color: var(--cream); }
