/* ============================================
   TableTalk Discussions — MVF Church
   Shared styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Brand colors pulled from MVF logo */
  --brand-blue: #2e8dd1;
  --brand-blue-dark: #1f6ea8;
  --brand-navy: #1b2a44;

  /* Warm neutrals */
  --bg: #faf6ef;
  --surface: #ffffff;
  --surface-alt: #f3ece0;
  --ink: #25252b;
  --ink-soft: #555562;
  --ink-mute: #8a8a94;
  --border: #e8e0d1;

  /* Accents */
  --accent: #c87b3b;
  --accent-soft: #e8b98a;
  --success: #5a8a5f;

  /* Layout */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(27, 42, 68, 0.06);
  --shadow: 0 6px 24px rgba(27, 42, 68, 0.08);
  --shadow-lg: 0 18px 50px rgba(27, 42, 68, 0.12);
  --max-width: 1100px;

  /* Type */
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--brand-navy);
  letter-spacing: -0.01em;
  margin: 0 0 0.5em 0;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; }
h3 { font-size: 1.3rem; line-height: 1.3; }

p { margin: 0 0 1em 0; color: var(--ink-soft); }

a { color: var(--brand-blue-dark); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent); }

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

/* ============================================
   HEADER / NAV
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brand-navy);
  font-weight: 700;
}

.brand img { width: 40px; height: 40px; object-fit: contain; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--brand-navy);
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

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

.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.nav-links a:hover { color: var(--brand-navy); background: var(--surface-alt); }
.nav-links a.active { color: var(--brand-navy); background: var(--surface-alt); }

.nav-cta {
  background: var(--brand-blue);
  color: #fff !important;
  padding: 9px 18px !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--brand-blue-dark); color: #fff !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--brand-navy);
  font-size: 1.2rem;
}

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px;
    gap: 2px;
    display: none;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: var(--radius-sm); }
  .nav-cta { text-align: center; margin-top: 4px; }
}

/* ============================================
   LAYOUT HELPERS
   ============================================ */

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

.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-blue);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-blue);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-blue-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-secondary {
  background: var(--surface);
  color: var(--brand-navy);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-alt); color: var(--brand-navy); }

.btn-ghost {
  background: transparent;
  color: var(--brand-navy);
  padding: 10px 16px;
}
.btn-ghost:hover { background: var(--surface-alt); color: var(--brand-navy); }

/* ============================================
   HERO
   ============================================ */

.hero {
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text h1 { margin-bottom: 18px; }
.hero-text .lead { margin-bottom: 28px; font-size: 1.2rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-art {
  position: relative;
  aspect-ratio: 1;
  max-width: 420px;
  justify-self: end;
  background:
    radial-gradient(circle at 30% 20%, rgba(46, 141, 209, 0.10) 0%, transparent 55%),
    radial-gradient(circle at 75% 85%, rgba(200, 123, 59, 0.12) 0%, transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--surface-alt) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-art img {
  width: 58%;
  max-width: 220px;
  height: auto;
  position: relative;
  z-index: 1;
}

.hero-art-label {
  position: relative;
  z-index: 1;
  color: var(--brand-navy);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  font-style: italic;
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.hero-art-label::before,
.hero-art-label::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--brand-blue);
  vertical-align: middle;
  margin: 0 10px;
  opacity: 0.5;
}

@media (max-width: 800px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { max-width: 320px; justify-self: center; }
}

/* ============================================
   PAGE HEADER (non-home pages)
   ============================================ */

.page-header {
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--bg) 100%);
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
}

.page-header .eyebrow { color: var(--brand-blue); }

/* ============================================
   CARDS / EPISODE GRID
   ============================================ */

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent-soft);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--ink-mute);
  font-weight: 500;
}

.card-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--brand-navy);
  margin: 0;
  line-height: 1.3;
}

.card-desc { color: var(--ink-soft); font-size: 0.95rem; flex: 1; margin: 0; }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.card-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: baseline;
  padding: 10px 14px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.5;
}

.card-refs-label {
  font-weight: 600;
  color: var(--brand-navy);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-right: 2px;
}

.ref-link {
  color: var(--brand-blue-dark);
  font-weight: 500;
  border-bottom: 1px dotted var(--brand-blue);
}

.ref-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.card-resources {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9rem;
}

.card-resources-label {
  font-weight: 600;
  color: var(--brand-navy);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.card-resources ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-resources li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.res-icon {
  flex-shrink: 0;
  font-size: 1rem;
  margin-top: 1px;
}

.res-body { min-width: 0; }

.res-link {
  color: var(--brand-navy);
  font-weight: 600;
  border-bottom: 1px dotted var(--brand-blue);
}
.res-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

.res-link-dead {
  color: var(--brand-navy);
  font-weight: 600;
}

.res-author {
  color: var(--ink-mute);
  font-weight: 400;
  font-style: italic;
}

.res-note {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-top: 2px;
  line-height: 1.4;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--surface-alt);
  color: var(--brand-navy);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.tag:hover { background: var(--accent-soft); color: var(--brand-navy); }
.tag.active {
  background: var(--brand-blue);
  color: #fff;
}

.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-blue-dark);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}
.card-link:hover { background: var(--accent-soft); color: var(--brand-navy); }
.card-link.youtube { background: #fee2e2; color: #b91c1c; }
.card-link.youtube:hover { background: #fca5a5; color: #7f1d1d; }

/* ============================================
   FILTERS
   ============================================ */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 32px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search-input {
  flex: 1;
  min-width: 220px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--ink);
  transition: all 0.15s;
}
.search-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(46, 141, 209, 0.15);
}

.topic-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.topic-label {
  font-size: 0.82rem;
  color: var(--ink-mute);
  font-weight: 500;
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   FEATURE CALLOUTS (home)
   ============================================ */

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 800px) {
  .feature-row { grid-template-columns: 1fr; }
}

.feature {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent-soft);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  color: var(--brand-blue);
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.feature h3 { margin-bottom: 8px; }
.feature p { font-size: 0.95rem; margin-bottom: 14px; }

.feature a {
  font-weight: 600;
  font-size: 0.9rem;
}

/* ============================================
   RESOURCES
   ============================================ */

.resource-group {
  margin-bottom: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.resource-group h3 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.resource-group > p {
  margin-bottom: 20px;
  color: var(--ink-soft);
}

.resource-list { list-style: none; padding: 0; margin: 0; }

.resource-list li {
  padding: 14px 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.resource-list li:first-child { border-top: none; padding-top: 0; }

.resource-list a {
  font-weight: 600;
  color: var(--brand-navy);
  font-size: 1rem;
}
.resource-list a:hover { color: var(--brand-blue); }

.resource-list .resource-meta {
  font-size: 0.85rem;
  color: var(--ink-mute);
}

/* ============================================
   FORM
   ============================================ */

.form-wrap {
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 22px; }

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--brand-navy);
  font-size: 0.95rem;
}

.form-group .help-text {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin-top: 4px;
  font-weight: 400;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  transition: all 0.15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46, 141, 209, 0.15);
}

.form-group textarea { min-height: 140px; resize: vertical; }

.form-note {
  padding: 14px 18px;
  background: var(--surface-alt);
  border-left: 3px solid var(--brand-blue);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

/* ============================================
   ABOUT / PURPOSE
   ============================================ */

.prose {
  max-width: 68ch;
  margin: 0 auto;
}

.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.8em; color: var(--brand-blue-dark); }
.prose p { font-size: 1.05rem; }

.pullquote {
  border-left: 3px solid var(--brand-blue);
  padding: 10px 24px;
  margin: 32px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--brand-navy);
  line-height: 1.5;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--brand-navy);
  color: rgba(255,255,255,0.85);
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-brand img { width: 44px; height: 44px; background: #fff; padding: 6px; border-radius: var(--radius-sm); }

.footer-brand-text {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: #fff;
  font-weight: 600;
}

.site-footer p { color: rgba(255,255,255,0.7); font-size: 0.92rem; }

.footer-heading {
  color: #fff;
  font-family: var(--sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.92rem;
}
.footer-links a:hover { color: var(--accent-soft); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
}

/* ============================================
   UTILS
   ============================================ */

.text-center { text-align: center; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }
.mb-2 { margin-bottom: 16px; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-mute);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
