/* ============================================================
   THE COACHES APP — BLOG THEME
   Design tokens lifted from thecoaches.app ("Midnight Performance"):
   Inter everywhere, mint #13ec6d on black, #121212 surfaces, zinc borders.
   ============================================================ */

:root {
  --bg: #000000;
  --bg-secondary: #0a0a0a;
  --bg-surface: #121212;
  --bg-surface-light: #1e1e1e;
  --bg-surface-elevated: #282828;
  --text: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --primary: var(--ghost-accent-color, #13ec6d);
  --primary-dark: #00d051;
  --primary-ink: #0d1b0f;
  --primary-muted: rgba(19, 236, 109, 0.16);
  --primary-glow: rgba(19, 236, 109, 0.36);
  --border: #27272a;
  --border-soft: #18181b;
  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --wrap: 1120px;
  --wrap-narrow: 720px;
  --font-base: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  /* Ghost Admin → Design can override fonts; fall back to Inter. */
  --font: var(--gh-font-body, var(--font-base));
  --font-heading: var(--gh-font-heading, var(--font-base));
}

/* ---- Reset-ish ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }
::selection { background: var(--primary); color: var(--primary-ink); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  padding: 8px 14px; background: var(--primary); color: var(--primary-ink); font-weight: 700; border-radius: 999px;
}
.skip-link:focus { left: 8px; }

/* ---- Layout ---- */
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 40px, var(--wrap-narrow)); margin-inline: auto; }
.section { padding: 56px 0 80px; }
.section--related { padding-top: 0; }

.kicker {
  display: inline-block;
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}
.accent { color: var(--primary); }
.dot { display: inline-block; width: 4px; height: 4px; margin: 0 8px; border-radius: 50%; background: var(--text-muted); vertical-align: middle; }

/* ---- Buttons (same shapes as the landing) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; line-height: 1;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 0 25px rgba(19, 236, 109, 0.2); }
.btn--primary:hover { background: var(--primary-dark); box-shadow: 0 0 32px var(--primary-glow); }
.btn--secondary { background: var(--bg-surface); color: var(--text); border-color: var(--border); }
.btn--secondary:hover { border-color: var(--primary); }
.btn--sm { padding: 0.6rem 1.1rem; font-size: 0.85rem; }

/* ---- Header ---- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.site-head-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.01em; }
.logo-mark { display: inline-flex; width: 28px; height: 28px; flex-shrink: 0; }
.logo-mark svg { width: 100%; height: 100%; }
.logo-img { height: 32px; width: auto; }
.logo-text { font-size: 1rem; color: var(--text); }
.logo-text-sub { color: var(--text-muted); font-weight: 600; margin-left: 4px; }

.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav .nav { display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; list-style: none; }
.site-nav .nav a { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); transition: color 0.2s var(--ease); }
.site-nav .nav a:hover, .site-nav .nav .nav-current a { color: var(--text); }

.nav-toggle { display: none; }
.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; cursor: pointer; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s var(--ease), opacity 0.2s var(--ease); }

@media (max-width: 860px) {
  .hamburger { display: flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-soft);
    padding: 12px 20px 20px;
    display: none;
  }
  .site-nav .nav { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav .nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border-soft); font-size: 1rem; }
  .site-nav .btn { margin-top: 16px; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .nav-toggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden;
  padding: 88px 0 40px;
  background: var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: auto -20% -60% auto; width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
  background: radial-gradient(circle, rgba(19, 236, 109, 0.22) 0%, rgba(19, 236, 109, 0) 62%);
  pointer-events: none;
}
.hero--compact { padding: 64px 0 24px; }
.hero .wrap { position: relative; }
.hero-title {
  font-family: var(--font-heading);
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 18ch;
}
.hero-desc { margin: 0; max-width: 60ch; font-size: 1.12rem; line-height: 1.6; color: var(--text-secondary); }

/* ---- Post feed ---- */
.post-feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.post-feed--related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .post-feed, .post-feed--related { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .post-feed, .post-feed--related { grid-template-columns: minmax(0, 1fr); } }

.post-card {
  display: flex; flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.post-card:hover { transform: translateY(-3px); border-color: rgba(19, 236, 109, 0.35); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.post-card-image { display: block; aspect-ratio: 16 / 10; background: var(--bg-surface-light); overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.post-card:hover .post-card-image img { transform: scale(1.03); }
.post-card-image--placeholder { display: grid; place-items: center; background: linear-gradient(135deg, #0f1a14, #121212 60%); }
.post-card-image--placeholder .logo-mark { width: 56px; height: 56px; opacity: 0.9; }
.post-card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.post-card-tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); }
.post-card-title { font-family: var(--font-heading); margin: 0; font-size: 1.2rem; line-height: 1.25; font-weight: 800; letter-spacing: -0.015em; }
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt { margin: 0; font-size: 0.95rem; color: var(--text-secondary); }
.post-card-meta { margin-top: auto; padding-top: 6px; font-size: 0.8rem; color: var(--text-muted); }

.post-card--featured { grid-column: 1 / -1; flex-direction: row; }
.post-card--featured .post-card-image { flex: 0 0 56%; aspect-ratio: auto; min-height: 320px; }
.post-card--featured .post-card-body { padding: 32px 36px; justify-content: center; gap: 14px; }
.post-card--featured .post-card-title { font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.12; }
.post-card--featured .post-card-excerpt { font-size: 1.05rem; }
@media (max-width: 900px) {
  .post-card--featured { flex-direction: column; }
  .post-card--featured .post-card-image { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
  .post-card--featured .post-card-body { padding: 22px; }
}

/* ---- Pagination ---- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; font-size: 0.9rem; color: var(--text-muted); }
.pagination a { padding: 0.6rem 1.1rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text); font-weight: 600; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }

/* ---- Post ---- */
.post-head { padding: 72px 0 32px; }
.post-head-meta { display: flex; flex-wrap: wrap; align-items: center; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 18px; }
.post-head-tag { color: var(--primary); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.75rem; }
.post-title { font-family: var(--font-heading); margin: 0 0 18px; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.06; font-weight: 800; letter-spacing: -0.03em; }
.post-excerpt { margin: 0; font-size: 1.18rem; line-height: 1.6; color: var(--text-secondary); }
.post-feature-image { margin: 36px auto 0; }
.post-feature-image img { width: 100%; border-radius: var(--radius-xl); border: 1px solid var(--border-soft); }
.post-feature-image figcaption { margin-top: 10px; font-size: 0.82rem; color: var(--text-muted); text-align: center; }

.post-content { padding: 24px 0 8px; font-size: 1.08rem; line-height: 1.8; color: rgba(255, 255, 255, 0.86); }
.post-content > * + * { margin-top: 1.35em; }
.post-content h2, .post-content h3, .post-content h4 { color: var(--text); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-top: 2em; }
.post-content h2 { font-size: 1.75rem; }
.post-content h3 { font-size: 1.35rem; }
.post-content h4 { font-size: 1.1rem; }
.post-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-content a:hover { color: var(--primary-dark); }
.post-content strong { color: var(--text); }
.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content li + li { margin-top: 0.4em; }
.post-content li::marker { color: var(--primary); }
.post-content blockquote {
  margin: 2em 0; padding: 4px 0 4px 22px;
  border-left: 3px solid var(--primary);
  font-size: 1.15rem; color: var(--text); font-weight: 500;
}
.post-content hr { border: 0; border-top: 1px solid var(--border); margin: 3em 0; }
.post-content img { border-radius: var(--radius-lg); }
.post-content figure { margin: 2em 0; }
.post-content figcaption { margin-top: 10px; font-size: 0.82rem; color: var(--text-muted); text-align: center; }
.post-content pre {
  padding: 18px 20px; border-radius: var(--radius); overflow-x: auto;
  background: var(--bg-surface); border: 1px solid var(--border-soft);
  font-size: 0.9rem; line-height: 1.6;
}
.post-content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; background: var(--bg-surface-light); padding: 0.1em 0.4em; border-radius: 6px; }
.post-content pre code { background: none; padding: 0; }
.post-content table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.post-content th, .post-content td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.post-content th { color: var(--text); font-weight: 700; }

/* Ghost cards */
.kg-width-wide { width: min(100vw - 40px, 1000px); margin-left: 50%; transform: translateX(-50%); }
.kg-width-full { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.kg-width-full img { border-radius: 0; }
.kg-callout-card { display: flex; gap: 12px; padding: 18px 20px; border-radius: var(--radius); background: var(--bg-surface); border: 1px solid var(--border-soft); }
.kg-callout-card-accent { background: var(--primary-muted); border-color: rgba(19, 236, 109, 0.35); }
.kg-callout-card p { margin: 0; }
.kg-button-card { display: flex; }
.kg-button-card.kg-align-center { justify-content: center; }
.kg-btn { display: inline-flex; align-items: center; padding: 0.8rem 1.4rem; border-radius: 999px; font-weight: 700; text-decoration: none !important; }
.kg-btn-accent { background: var(--primary); color: var(--primary-ink) !important; }
.kg-bookmark-card a, .kg-bookmark-container { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none !important; color: inherit !important; }
.kg-bookmark-content { padding: 16px; flex: 1; }
.kg-bookmark-title { font-weight: 700; }
.kg-bookmark-description { font-size: 0.9rem; color: var(--text-secondary); }
.kg-bookmark-metadata { font-size: 0.8rem; color: var(--text-muted); }
.kg-bookmark-thumbnail img { height: 100%; object-fit: cover; border-radius: 0; }
.kg-toggle-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.kg-toggle-heading-text { font-weight: 700; }
.kg-header-card, .kg-signup-card, .kg-product-card { border-radius: var(--radius-lg); }
.kg-embed-card iframe { max-width: 100%; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 8px; }
.kg-gallery-row { display: flex; gap: 8px; }
.kg-gallery-image { flex: 1 1 0; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }

/* ---- Post footer ---- */
.post-foot { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 24px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.post-tags a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.post-tags a:hover { border-color: var(--primary); color: var(--primary); }
.post-author { display: flex; align-items: center; gap: 14px; }
.post-author img, .post-author-initial { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.post-author-initial { display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); font-weight: 800; }
.post-author-name { margin: 0; font-weight: 700; }
.post-author-bio { margin: 2px 0 0; font-size: 0.9rem; color: var(--text-secondary); }

/* ---- CTA block ---- */
.cta {
  position: relative; overflow: hidden;
  margin: 44px 0 8px;
  padding: 36px 32px;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid rgba(19, 236, 109, 0.3);
}
.cta-glow { position: absolute; right: -25%; top: -60%; width: 60%; padding-bottom: 60%; border-radius: 50%; background: radial-gradient(circle, rgba(19, 236, 109, 0.28) 0%, rgba(19, 236, 109, 0) 62%); pointer-events: none; }
.cta-inner { position: relative; }
.cta-title { margin: 0 0 10px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.cta-text { margin: 0 0 22px; color: var(--text-secondary); max-width: 56ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 600px) { .cta { padding: 28px 22px; } }

/* ---- Footer ---- */
.site-foot { margin-top: 40px; padding: 56px 0 28px; background: var(--bg-secondary); border-top: 1px solid var(--border-soft); }
.site-foot-main { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .site-foot-main { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.site-foot-copy { margin: 14px 0 0; max-width: 34ch; font-size: 0.92rem; color: var(--text-secondary); }
.site-foot-heading { margin: 0 0 12px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.site-foot-nav { display: flex; flex-direction: column; gap: 9px; }
.site-foot-nav a { font-size: 0.9rem; color: var(--text-secondary); }
.site-foot-nav a:hover { color: var(--primary); }
.site-foot-nav .nav { display: contents; list-style: none; margin: 0; padding: 0; }
.site-foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border-soft); font-size: 0.8rem; color: var(--text-muted); }
.site-foot-bottom p { margin: 0; }
.site-foot-bottom a:hover { color: var(--primary); }

/* ---- Error ---- */
.error-wrap { min-height: 50vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.error-code { margin: 0; font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--primary); }
.error-desc { margin: 12px 0 28px; color: var(--text-secondary); }
