/* ==========================================================================
   elicify.ai — AI-Native Enterprise Blog
   Thought leadership platform for C-level & transformation leaders

   Brand: Deep Space Navy, Electric Cyan, Neural Purple
   Fonts: Space Grotesk (headings), Inter (body)
   Tone: Authoritative, forward-thinking, clean
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ---------- Variables ---------- */
:root {
  --deep-space: #0B132B;
  --deep-space-95: rgba(11,19,43,0.95);
  --electric-cyan: #00E5FF;
  --electric-cyan-soft: rgba(0,229,255,0.12);
  --neural-purple: #6A0DAD;
  --neural-purple-soft: rgba(106,13,173,0.08);
  --crisp-white: #FFFFFF;
  --off-white: #F0F2F5;
  --slate: #8D99AE;
  --slate-light: #C5CDD8;
  --surface: #141B33;
  --surface-elevated: #1C2541;
  --border: rgba(141,153,174,0.15);
  --border-hover: rgba(0,229,255,0.3);
  --text-primary: #E8ECF1;
  --text-body: #B0B8C8;
  --text-muted: #6B7A94;
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --max-w: 1120px;
  --content-w: 680px;
  --r: 6px;
  --transition: 0.2s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 62.5%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.7rem;
  line-height: 1.75;
  color: var(--text-body);
  background: var(--deep-space);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--electric-cyan); text-decoration: none; transition: color var(--transition); }
a:hover { color: #66EFFF; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
h1 { font-size: 4.2rem; }
h2 { font-size: 2.8rem; }
h3 { font-size: 2.2rem; }
h4 { font-size: 1.8rem; }

/* ---------- Layout ---------- */
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.site-content { flex: 1; }
.inner { max-width: var(--max-w); margin: 0 auto; padding: 0 2.4rem; }
.content-inner { max-width: var(--content-w); margin: 0 auto; }

/* ==========================================================================
   HEADER — Minimal, sticky, authoritative
   ========================================================================== */
.site-header {
  padding: 1.6rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--deep-space-95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: -0.02em;
}
.site-logo .ai { color: var(--electric-cyan); }
.site-logo img { height: 32px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 2.8rem; }
.site-nav a {
  color: var(--text-muted);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--transition);
}
.site-nav a:hover { color: var(--text-primary); }

/* ==========================================================================
   HERO — Bold positioning statement
   ========================================================================== */
.site-banner {
  padding: 10rem 0 6rem;
  position: relative;
}

.site-banner::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--electric-cyan-soft) 0%, transparent 70%);
  pointer-events: none;
}

.site-banner::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--neural-purple-soft) 0%, transparent 70%);
  pointer-events: none;
}

.site-banner .inner { position: relative; z-index: 1; max-width: 800px; }

.site-banner .eyebrow {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--electric-cyan);
  margin-bottom: 2rem;
}

.site-banner h1 {
  font-size: 5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2.4rem;
  color: var(--crisp-white);
}

.site-banner p {
  font-size: 1.9rem;
  color: var(--slate);
  line-height: 1.6;
  max-width: 600px;
}

.site-banner .separator {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--electric-cyan), var(--neural-purple));
  margin: 4rem 0 0;
  border-radius: 2px;
}

/* ==========================================================================
   POST FEED — Clean editorial grid
   ========================================================================== */
.post-feed {
  padding: 4rem 0 6rem;
}

.post-feed-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

/* Featured / first post — full width */
.post-card:first-child {
  grid-column: 1 / -1;
}

.post-card:first-child .post-card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.post-card:first-child .post-card-image { aspect-ratio: 4/3; }

/* Regular cards — 2 columns */
.post-feed-grid {
  grid-template-columns: 1fr 1fr;
}

.post-card {
  background: var(--surface);
  transition: background var(--transition);
}

.post-card:hover { background: var(--surface-elevated); }

.post-card-inner { display: flex; flex-direction: column; }

.post-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card-image img {
  transform: scale(1.03);
}

.post-card-body {
  padding: 2.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-tag {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--electric-cyan);
  margin-bottom: 1.2rem;
}

.post-card-title {
  font-size: 2rem;
  margin-bottom: 1.2rem;
  line-height: 1.3;
}
.post-card-title a { color: var(--text-primary); }
.post-card-title a:hover { color: var(--electric-cyan); }

.post-card:first-child .post-card-title { font-size: 2.6rem; }

.post-card-excerpt {
  font-size: 1.5rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.3rem;
  color: var(--text-muted);
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-card-meta .author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

/* ==========================================================================
   SINGLE POST — Long-form editorial
   ========================================================================== */
.post-header {
  padding: 8rem 0 4rem;
  text-align: center;
}

.post-header .inner { max-width: 760px; }

.post-header .post-tag {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--electric-cyan);
  margin-bottom: 2rem;
  display: inline-block;
}

.post-header h1 {
  font-size: 4.4rem;
  margin-bottom: 2.4rem;
  line-height: 1.1;
}

.post-meta {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.post-feature-image {
  max-width: 960px;
  margin: 0 auto 4rem;
  border-radius: var(--r);
  overflow: hidden;
}

/* Post body */
.post-content { padding: 0 0 8rem; }

.post-content p {
  margin-bottom: 2.4rem;
  color: var(--text-body);
  font-size: 1.8rem;
  line-height: 1.8;
}

.post-content h2 {
  margin: 5rem 0 2rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.post-content h3 { margin: 3.6rem 0 1.6rem; }
.post-content h4 { margin: 2.8rem 0 1.2rem; }

.post-content strong { color: var(--text-primary); }

.post-content blockquote {
  border-left: 3px solid var(--electric-cyan);
  padding: 0.4rem 0 0.4rem 2.4rem;
  margin: 3.2rem 0;
  font-size: 2rem;
  font-style: italic;
  color: var(--slate-light);
  line-height: 1.6;
}

.post-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2.4rem;
  overflow-x: auto;
  font-size: 1.4rem;
  line-height: 1.6;
  margin: 3.2rem 0;
}

.post-content code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.88em;
}

.post-content p code {
  background: var(--surface);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--electric-cyan);
}

.post-content ul, .post-content ol {
  padding-left: 2.4rem;
  margin-bottom: 2.4rem;
}

.post-content li {
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.post-content img { border-radius: var(--r); margin: 3.2rem 0; }

.post-content a {
  color: var(--electric-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.post-content a:hover { text-decoration-thickness: 2px; }

.post-content hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 4rem 0;
}

.post-content figure { margin: 3.2rem 0; }
.post-content figcaption {
  text-align: center;
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Ghost Koenig editor width classes */
.kg-width-wide {
  margin-left: -80px;
  margin-right: -80px;
  width: calc(100% + 160px);
}

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

.kg-width-wide img,
.kg-width-full img { width: 100%; }

/* Ghost cards */
.kg-image-card, .kg-gallery-card, .kg-embed-card, .kg-bookmark-card { margin: 3.2rem 0; }
.kg-image-card img { border-radius: var(--r); }

.kg-bookmark-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.kg-bookmark-container { display: flex; text-decoration: none; color: inherit; }
.kg-bookmark-content { flex: 1; padding: 2rem; }
.kg-bookmark-title { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.6rem; }
.kg-bookmark-description { font-size: 1.4rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kg-bookmark-metadata { display: flex; align-items: center; gap: 0.8rem; margin-top: 1rem; font-size: 1.2rem; color: var(--text-muted); }
.kg-bookmark-icon { width: 16px; height: 16px; }
.kg-bookmark-thumbnail { width: 180px; min-height: 140px; object-fit: cover; }

.kg-gallery-container { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.kg-gallery-row { display: flex; gap: 0.6rem; width: 100%; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); }

/* ==========================================================================
   TAG / AUTHOR PAGES
   ========================================================================== */
.tag-header, .author-header {
  padding: 8rem 0 3rem;
}

.tag-header .inner, .author-header .inner { max-width: 600px; }

.tag-header h1, .author-header h1 {
  font-size: 3.4rem;
  margin-bottom: 1.2rem;
}

.tag-header p, .author-header p {
  color: var(--text-muted);
  font-size: 1.7rem;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  padding: 2rem 0 6rem;
}

.pagination a {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem 2.4rem;
  border-radius: var(--r);
  color: var(--text-muted);
  font-size: 1.4rem;
  font-weight: 500;
  transition: all var(--transition);
}

.pagination a:hover {
  border-color: var(--border-hover);
  color: var(--electric-cyan);
}

/* ==========================================================================
   FOOTER — Clean, minimal
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 4rem 0;
}

.site-footer .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-footer .footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.site-footer .footer-brand {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}
.site-footer .footer-brand .ai { color: var(--electric-cyan); }

.site-footer .footer-tagline {
  color: var(--text-muted);
  font-size: 1.3rem;
}

.site-footer nav { display: flex; gap: 2rem; }
.site-footer nav a { color: var(--text-muted); font-size: 1.3rem; }
.site-footer nav a:hover { color: var(--text-primary); }

.site-footer .copyright {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-top: 0.4rem;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .post-feed-grid { grid-template-columns: 1fr; }
  .post-card:first-child .post-card-inner { grid-template-columns: 1fr; }
  .kg-width-wide { margin-left: -1.2rem; margin-right: -1.2rem; width: calc(100% + 2.4rem); }
}

@media (max-width: 768px) {
  h1 { font-size: 3rem; }
  .site-banner { padding: 6rem 0 4rem; }
  .site-banner h1 { font-size: 3.4rem; }
  .post-header h1 { font-size: 3rem; }
  .post-content p, .post-content li { font-size: 1.7rem; }
  .site-header .inner { flex-wrap: wrap; gap: 1rem; }
  .site-footer .inner { flex-direction: column; text-align: center; gap: 2rem; }
}

@media (max-width: 480px) {
  html { font-size: 58%; }
  .inner { padding: 0 1.6rem; }
  .site-banner { padding: 4rem 0 3rem; }
  .post-card-body { padding: 2rem; }
}
