/*
 Theme Name:  Famerlio Twenty Twenty-Four Child
 Theme URI:   https://famerlio.org
 Description: Child theme for Famerlio using Twenty Twenty-Four as parent.
 Author:      Famerlio
 Template:    twentytwentyfour
 Version:     1.0
*/

/* ========== Design Tokens (Global) ========== */

:root {
  --fl-bg: #ffffff;
  --fl-surface: #ffffff;
  --fl-surface-muted: #f9fafb;
  --fl-surface-soft: #f3f4f6;
  --fl-primary: #0f766e;
  --fl-primary-dark: #0d5b54;
  --fl-accent: #22c55e;
  --fl-accent-soft: #e0f2fe;
  --fl-border-subtle: #e5e7eb;
  --fl-border-soft: #d1d5db;
  --fl-border-strong: #cbd5f5;
  --fl-text-main: #0f172a;
  --fl-text-muted: #4b5563;
  --fl-text-soft: #6b7280;
  --fl-radius-lg: 24px;
  --fl-radius-md: 16px;
  --fl-radius-sm: 12px;
  --fl-radius-pill: 999px;
  --fl-shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.04);
  --fl-shadow-header: 0 10px 30px rgba(15, 23, 42, 0.03);
  --fl-container-max: 1160px;
  --fl-transition-fast: 0.18s ease;
}

/* ========== Base Reset & Typography (Site-wide) ========== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--fl-text-main);
  background-color: var(--fl-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* Keep WordPress content readable everywhere */
body,
.entry-content,
.wp-site-blocks {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fl-text-main);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fl-text-main);
  margin-top: 0;
  margin-bottom: 0.6em;
}

h1 {
  font-size: clamp(28px, 3.2vw + 8px, 42px);
  line-height: 1.1;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 18px;
}

p {
  margin-top: 0;
  margin-bottom: 1em;
  color: var(--fl-text-muted);
}

a {
  text-decoration: none;
  color: var(--fl-primary);
  transition: color var(--fl-transition-fast);
}

a:hover,
a:focus {
  color: var(--fl-primary-dark);
}

/* Make images and videos responsive */
img,
iframe {
  max-width: 100%;
  height: auto;
}

/* ========== Layout helpers (used by homepage + reusable) ========== */

.container {
  width: 100%;
  max-width: var(--fl-container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 72px 0;
}

@media (min-width: 768px) {
  .section {
    padding: 88px 0;
  }
}

/* ========== Generic UI Primitives ========== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--fl-radius-pill);
  font-size: 12px;
  font-weight: 500;
  background: var(--fl-accent-soft);
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--fl-radius-pill);
  background: var(--fl-accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

/* Buttons – also applied to WP buttons for consistency */
.btn,
.wp-element-button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--fl-radius-pill);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color var(--fl-transition-fast),
    color var(--fl-transition-fast),
    border-color var(--fl-transition-fast),
    box-shadow var(--fl-transition-fast),
    transform 0.08s ease;
  white-space: nowrap;
}

/* Default WP button = primary */
.wp-block-button__link,
.btn-primary {
  background: var(--fl-primary);
  color: #f9fafb;
  border-color: var(--fl-primary);
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.25);
}

.wp-block-button__link:hover,
.btn-primary:hover {
  background: var(--fl-primary-dark);
  border-color: var(--fl-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(13, 91, 84, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--fl-text-main);
  border-color: #cbd5f5;
}

.btn-outline:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: var(--fl-radius-pill);
  font-size: 11px;
  font-weight: 500;
  background: #e5e7eb;
  color: #374151;
}

/* ========== Cards + Sections (used everywhere) ========== */

.section-heading {
  max-width: 640px;
  margin-bottom: 28px;
}

.section-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--fl-text-muted);
  margin: 0;
}

/* Generic card grid utilities */
.card-grid-3,
.card-grid-4 {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

@media (min-width: 768px) {
  .card-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .card-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.card {
  border-radius: var(--fl-radius-md);
  border: 1px solid var(--fl-border-subtle);
  background: var(--fl-surface);
  padding: 16px 18px;
  box-shadow: var(--fl-shadow-soft);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: #cbd5f5;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-body {
  font-size: 13px;
  color: var(--fl-text-muted);
  line-height: 1.7;
}

.card-list {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--fl-text-muted);
  line-height: 1.7;
}

.card-list li {
  margin-bottom: 4px;
}

.muted-box {
  border-radius: var(--fl-radius-md);
  border: 1px dashed var(--fl-border-subtle);
  background: var(--fl-surface-muted);
  padding: 16px 18px;
  font-size: 13px;
  color: var(--fl-text-muted);
  line-height: 1.7;
  box-shadow: var(--fl-shadow-soft);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.split {
  display: grid;
  gap: 28px;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: start;
  }
}

/* ========== Header / Footer (used on homepage template – also safe globally) ========== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--fl-border-subtle);
  backdrop-filter: blur(14px);
  box-shadow: var(--fl-shadow-header);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 25% 20%, #bbf7d0, #4ade80 40%, #0f766e 80%);
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.45);
}

.nav {
  display: none;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
}

.nav a {
  position: relative;
  padding-bottom: 4px;
  color: inherit;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: var(--fl-radius-pill);
  background: var(--fl-primary);
  transition: width 0.16s ease;
}

.nav a:hover::after {
  width: 100%;
}

.header-cta {
  display: none;
  align-items: center;
  gap: 10px;
}

.menu-toggle {
  border: none;
  background: transparent;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: var(--fl-radius-pill);
  background: var(--fl-text-main);
  position: relative;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  width: 20px;
  height: 2px;
  border-radius: var(--fl-radius-pill);
  background: var(--fl-text-main);
  position: absolute;
  left: 0;
  transition: transform 0.18s ease;
}

.menu-toggle span::before {
  top: -6px;
}

.menu-toggle span::after {
  top: 6px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px 0 16px;
  border-top: 1px solid var(--fl-border-subtle);
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  background: #ffffff;
}

.mobile-nav a {
  padding: 6px 0;
}

.mobile-nav a:hover {
  color: var(--fl-primary);
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
  .header-cta {
    display: flex;
  }
  .menu-toggle {
    display: none;
  }
  .mobile-nav {
    display: none !important;
  }
}

/* Footer basics */
footer {
  border-top: 1px solid var(--fl-border-subtle);
  padding: 18px 0 26px;
  font-size: 12px;
  color: var(--fl-text-soft);
  background: var(--fl-bg);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: var(--fl-text-soft);
}

.footer-links a:hover {
  color: var(--fl-primary);
}

/* ========== Homepage-specific helpers (sections) ========== */

.hero {
  padding: 56px 0 48px;
  background: var(--fl-bg);
}

@media (min-width: 768px) {
  .hero {
    padding: 80px 0 64px;
  }
}

.hero-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center;
    gap: 44px;
  }
}

.hero-title {
  font-size: clamp(28px, 3.2vw + 8px, 42px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 18px 0 12px;
}

.hero-subtitle {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fl-text-muted);
  max-width: 540px;
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  margin-bottom: 16px;
}

.hero-note {
  font-size: 12px;
  color: var(--fl-text-soft);
  margin: 0;
}

.hero-media {
  border-radius: var(--fl-radius-lg);
  border: 1px solid var(--fl-border-subtle);
  padding: 18px;
  background:
    radial-gradient(circle at 0 0, #ecfeff, #ffffff 55%, #f9fafb 100%);
  box-shadow: var(--fl-shadow-soft);
}

.hero-media-inner {
  border-radius: var(--fl-radius-md);
  border: 1px dashed #bae6fd;
  padding: 16px;
  background: rgba(255, 255, 255, 0.96);
}

.hero-media-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.hero-media-text {
  font-size: 13px;
  color: var(--fl-text-muted);
  margin-bottom: 16px;
}

.hero-media-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  font-size: 11px;
}

.hero-media-metric strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
  color: var(--fl-text-main);
}

/* Stats strip */
.stats-strip {
  background: var(--fl-surface-muted);
  border-top: 1px solid var(--fl-border-subtle);
  border-bottom: 1px solid var(--fl-border-subtle);
  padding: 20px 0;
}

.stats-row {
  display: grid;
  gap: 16px;
}

@media (min-width: 768px) {
  .stats-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat-item {
  font-size: 13px;
  color: var(--fl-text-muted);
}

.stat-item strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--fl-text-main);
  margin-bottom: 2px;
}

/* Impact section grid */
.impact-metrics {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .impact-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, #020617, #020617 55%, #020617);
  color: #e5e7eb;
  border-radius: var(--fl-radius-lg);
  padding: 28px 20px;
  box-shadow: var(--fl-shadow-soft);
}

@media (min-width: 768px) {
  .cta-band {
    padding: 32px 32px;
  }
}

.cta-band-header {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.cta-band-sub {
  font-size: 14px;
  color: #cbd5f5;
  margin-bottom: 18px;
}

.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cta-band .btn-primary {
  background: var(--fl-accent);
  border-color: var(--fl-accent);
  color: #022c22;
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.35);
}

.cta-band .btn-primary:hover {
  background: #16a34a;
  border-color: #16a34a;
}

.cta-band .btn-outline {
  border-color: #475569;
  color: #e5e7eb;
}

.cta-band .btn-outline:hover {
  background: #111827;
  border-color: #64748b;
}

.cta-band-note {
  margin-top: 8px;
  font-size: 12px;
  color: #9ca3af;
}
