/* ============================================================
   MasterPodcaster.com – Design System
   ============================================================ */

:root {
  /* Colour palette */
  --clr-bg:        #ffffff;
  --clr-surface:   #f7faf7;
  --clr-border:    #e2e8e0;
  --clr-text:      #1a2118;
  --clr-muted:     #5a6b56;
  --clr-green:     #3a7d44;
  --clr-green-lt:  #4ea358;
  --clr-green-dk:  #2a5c32;
  --clr-accent:    #d4edda;
  --clr-header-bg: #1a2118;
  --clr-header-fg: #e8f0e6;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --text-sm:   0.875rem;
  --text-base: 1.0625rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  1.875rem;
  --text-3xl:  2.5rem;
  --text-4xl:  3.25rem;
  --lh-prose:  1.75;
  --lh-tight:  1.2;

  /* Spacing */
  --space-xs:  0.375rem;
  --space-sm:  0.75rem;
  --space-md:  1.25rem;
  --space-lg:  2rem;
  --space-xl:  3.5rem;
  --space-2xl: 6rem;

  /* Layout */
  --max-w:       1120px;
  --max-w-prose: 740px;
  --radius:      6px;
  --radius-lg:   12px;

  /* Transitions */
  --transition: 180ms ease;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-prose);
  color: var(--clr-text);
  background: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--clr-green); text-decoration: none; }
a:hover { color: var(--clr-green-lt); text-decoration: underline; }

/* ── Container ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--clr-header-bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
}
.site-logo-main {
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.site-logo-sub {
  font-size: 0.7rem;
  color: var(--clr-header-fg);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}
.site-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--clr-header-fg);
  letter-spacing: 0.02em;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity var(--transition);
}
.site-nav a:hover { opacity: 1; color: #ffffff; }

.nav-cta {
  background: var(--clr-green);
  color: #fff !important;
  opacity: 1 !important;
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  font-weight: 600 !important;
  transition: background var(--transition) !important;
}
.nav-cta:hover { background: var(--clr-green-lt) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: var(--clr-header-fg);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 4px 0;
  transition: var(--transition);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--clr-green-dk) 0%, #1a3a22 100%);
  color: #fff;
  padding: var(--space-2xl) 0;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-text { max-width: 540px; }

.hero-eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a8d5a2;
  margin-bottom: var(--space-md);
}

.hero h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: var(--text-lg);
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
  margin-bottom: var(--space-lg);
}

.hero-image {
  display: flex;
  justify-content: center;
}
.hero-image img {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* ── Prose section headings (bold_text ttfm1 converted to h2) ── */
.prose h2.resource-section {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-green);
  border-top: 2px solid var(--clr-green);
  padding-top: 1.25rem;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none !important;
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--clr-green);
  color: #fff;
  border-color: var(--clr-green);
}
.btn-primary:hover {
  background: var(--clr-green-lt);
  border-color: var(--clr-green-lt);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(58,125,68,0.4);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  color: #fff;
  transform: translateY(-1px);
}

.btn-group {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: center;
}

/* ── Section chrome ─────────────────────────────────────── */
.section {
  padding: var(--space-2xl) 0;
}
.section-alt { background: var(--clr-surface); }

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}
.section-header h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}
.section-header p {
  font-size: var(--text-lg);
  color: var(--clr-muted);
  max-width: 560px;
  margin-inline: auto;
}

/* ── Post cards ─────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.post-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.post-card-body {
  flex: 1;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}
.post-date {
  font-size: var(--text-sm);
  color: var(--clr-muted);
}
.post-tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--clr-green);
  background: var(--clr-accent);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.post-card-body h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}
.post-card-body h3 a {
  color: var(--clr-text);
  text-decoration: none;
}
.post-card-body h3 a:hover { color: var(--clr-green); }

.post-card-body p {
  font-size: var(--text-sm);
  color: var(--clr-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: var(--space-md);
}

.post-card-body .read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--clr-green);
}
.post-card-body .read-more::after {
  content: '→';
  transition: transform var(--transition);
}
.post-card-body .read-more:hover::after { transform: translateX(3px); }

/* ── Prose content ──────────────────────────────────────── */
.content-wrap {
  max-width: var(--max-w-prose);
  margin-inline: auto;
  padding: var(--space-2xl) var(--space-lg);
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  margin-top: 2em;
  margin-bottom: 0.6em;
  color: var(--clr-text);
}
.prose h1 { font-size: var(--text-3xl); margin-top: 0; }
.prose h2 { font-size: var(--text-2xl); }
.prose h3 { font-size: var(--text-xl); }
.prose h4 { font-size: var(--text-lg); }

.prose p { margin-bottom: 1.4em; }

.prose ul, .prose ol {
  padding-left: 1.5em;
  margin-bottom: 1.4em;
}
.prose li { margin-bottom: 0.4em; }

.prose a { font-weight: 500; }

.prose strong { font-weight: 700; }
.prose em { font-style: italic; }

.prose blockquote {
  border-left: 3px solid var(--clr-green);
  margin: 1.8em 0;
  padding: 0.75rem var(--space-lg);
  background: var(--clr-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--clr-muted);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--clr-surface);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--clr-border);
}

.prose pre {
  background: var(--clr-header-bg);
  color: #e8f0e6;
  padding: var(--space-lg);
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.8em 0;
}
.prose pre code { background: none; border: none; color: inherit; }

.prose img {
  border-radius: var(--radius);
  margin: 1.8em auto;
  max-width: 100%;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.prose hr {
  border: none;
  border-top: 1px solid var(--clr-border);
  margin: 2.5em 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: var(--text-sm);
}
.prose th, .prose td {
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--clr-border);
}
.prose th {
  font-weight: 600;
  background: var(--clr-surface);
}

/* ── Page header ────────────────────────────────────────── */
.page-header {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  padding: var(--space-xl) 0;
}
.page-header h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: var(--lh-tight);
  margin-bottom: var(--space-xs);
}
.page-header-meta {
  font-size: var(--text-sm);
  color: var(--clr-muted);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}
.page-header-meta a { color: var(--clr-muted); }
.page-header-meta a:hover { color: var(--clr-green); }

/* ── Video embed ────────────────────────────────────────── */
.embed-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: 1.8em 0;
}
.embed-container iframe,
.embed-container object,
.embed-container embed {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* ── Contact form ───────────────────────────────────────── */
.form-wrap {
  max-width: 560px;
  margin-inline: auto;
}

.form-group { margin-bottom: var(--space-md); }

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--clr-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius);
  background: var(--clr-bg);
  color: var(--clr-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--clr-green);
  box-shadow: 0 0 0 3px rgba(58,125,68,0.15);
}
.form-group textarea { min-height: 140px; resize: vertical; }

/* ── Callout box ────────────────────────────────────────── */
.callout {
  background: var(--clr-accent);
  border: 1px solid var(--clr-green);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  margin: var(--space-xl) 0;
  text-align: center;
}
.callout h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}
.callout p {
  color: var(--clr-muted);
  margin-bottom: var(--space-md);
}

/* ── Features grid ──────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}
.feature-card {
  padding: var(--space-lg);
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--clr-accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: var(--space-md);
}
.feature-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.feature-card p {
  font-size: var(--text-sm);
  color: var(--clr-muted);
  line-height: 1.6;
}

/* ── Blog listing page ──────────────────────────────────── */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  max-width: var(--max-w-prose);
  margin-inline: auto;
}

.blog-list-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--clr-border);
}
.blog-list-item:last-child { border-bottom: none; }

.blog-list-item h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.blog-list-item h2 a {
  color: var(--clr-text);
  text-decoration: none;
}
.blog-list-item h2 a:hover { color: var(--clr-green); }

.blog-list-item p {
  color: var(--clr-muted);
  line-height: 1.6;
}

/* ── 404 ────────────────────────────────────────────────── */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}
.error-page h1 {
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  color: var(--clr-green);
  letter-spacing: -0.05em;
  margin-bottom: var(--space-sm);
}
.error-page h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
}
.error-page p {
  color: var(--clr-muted);
  margin-bottom: var(--space-lg);
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--clr-header-bg);
  color: var(--clr-header-fg);
  padding: var(--space-xl) 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-xl);
  align-items: start;
}

.footer-brand .site-logo-main { font-size: 1rem; }
.footer-brand p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  margin-top: var(--space-xs);
  max-width: 300px;
}

.footer-nav {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
}
.footer-nav-col h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--space-sm);
}
.footer-nav-col ul { list-style: none; }
.footer-nav-col li { margin-bottom: var(--space-xs); }
.footer-nav-col a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-nav-col a:hover { color: #fff; }

.footer-bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.footer-bottom p {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.35);
}
.footer-bottom a {
  color: rgba(255,255,255,0.5);
  font-size: var(--text-sm);
}
.footer-bottom a:hover { color: #fff; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --text-4xl: 2.25rem;
    --text-3xl: 1.875rem;
    --space-2xl: 4rem;
  }

  .site-nav { display: none; gap: var(--space-md); flex-direction: column; }
  .site-nav.open {
    display: flex;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--clr-header-bg);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .nav-toggle { display: block; }

  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-image { order: -1; }
  .hero-image img { width: 180px; height: 180px; }
  .btn-group { justify-content: center; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav { gap: var(--space-lg); }
  .footer-bottom { flex-direction: column; text-align: center; }

  .content-wrap { padding-inline: var(--space-md); }
}

@media (max-width: 480px) {
  .posts-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
}
