/**
 * FRONTEND PROMPT 4 — Homepage sections (below hero)
 * Scoped: body.mg-public .home-*
 */

body.mg-public {
  --shadow-md: 0 8px 30px rgba(10, 22, 40, 0.1);
}

/* ── Section: Problem ────────────────────────────────────────── */
body.mg-public .home-problem {
  background: #f5f7fa;
  padding: var(--section-py) 0;
}

body.mg-public .home-problem-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

body.mg-public .home-problem .home-section-h2 {
  margin-bottom: 48px;
}

body.mg-public .home-problem-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 991px) {
  body.mg-public .home-problem-cards {
    grid-template-columns: 1fr;
  }
}

body.mg-public .home-problem-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: start;
  border-top: 4px solid var(--teal-500);
  box-shadow: none;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

body.mg-public .home-problem-card:hover {
  box-shadow: var(--shadow-md);
}

body.mg-public .home-problem-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-700);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

body.mg-public .home-problem-icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 12px;
}

body.mg-public .home-problem .home-problem-card h3 {
  font-size: 1.125rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
}

body.mg-public .home-problem-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: none;
}

/* ── Section 3: Solution pillars ─────────────────────────────── */
body.mg-public .home-solution {
  background: #fff;
  padding: var(--section-py) 0;
}

body.mg-public .home-solution-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

body.mg-public .home-pillar-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  margin-bottom: clamp(48px, 8vw, 96px);
}

body.mg-public .home-pillar-row:last-child {
  margin-bottom: 0;
}

@media (max-width: 991px) {
  body.mg-public .home-pillar-row {
    grid-template-columns: 1fr;
  }

  body.mg-public .home-pillar-row--flip .home-pillar-visual {
    order: -1;
  }
}

body.mg-public .home-pillar-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-500);
  margin-bottom: 12px;
}

body.mg-public .home-pillar-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
  line-height: 1.15;
}

body.mg-public .home-pillar-text p {
  color: var(--text-secondary);
  max-width: 48ch;
  margin-bottom: 20px;
}

body.mg-public .home-pillar-text a {
  font-weight: 600;
  color: var(--teal-600);
}

body.mg-public .home-pillar-text a:hover {
  color: var(--teal-500);
}

/* Pillar visuals */
body.mg-public .home-viz-phases {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

body.mg-public .home-viz-phase {
  flex: 1 1 72px;
  min-width: 64px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
}

body.mg-public .home-viz-phase.is-done {
  background: rgba(14, 158, 118, 0.12);
  border-color: rgba(14, 158, 118, 0.35);
  color: var(--teal-600);
}

body.mg-public .home-viz-phase.is-active {
  background: rgba(201, 146, 26, 0.12);
  border-color: rgba(224, 168, 32, 0.45);
  color: var(--gold-500);
}

body.mg-public .home-viz-grants {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.mg-public .home-viz-grant {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
}

body.mg-public .home-viz-grant-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  margin-bottom: 8px;
}

body.mg-public .home-viz-grant-name {
  font-weight: 600;
  color: var(--text-primary);
}

body.mg-public .home-viz-grant-pct {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--teal-600);
}

body.mg-public .home-viz-grant-bar {
  height: 6px;
  background: rgba(10, 22, 40, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

body.mg-public .home-viz-grant-fill {
  height: 100%;
  background: var(--teal-400);
  border-radius: 3px;
}

body.mg-public .home-viz-chat {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  font-size: 13px;
}

body.mg-public .home-viz-chat-bubble {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 12px 12px 12px 4px;
  padding: 10px 12px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

body.mg-public .home-viz-chat-bubble.ai {
  background: rgba(14, 158, 118, 0.1);
  border-color: rgba(14, 158, 118, 0.25);
  border-radius: 12px 12px 4px 12px;
  margin-left: 20px;
  color: var(--navy-800);
}

body.mg-public .home-viz-chat-meta {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Section: Feature grid ───────────────────────────────────── */
body.mg-public .home-features {
  background: var(--bg-warm);
  padding: var(--section-py) 0;
}

body.mg-public .home-features-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

body.mg-public .home-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 991px) {
  body.mg-public .home-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  body.mg-public .home-features-grid {
    grid-template-columns: 1fr;
  }
}

body.mg-public .home-feature-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  height: 100%;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

body.mg-public .home-feature-card:hover {
  border-color: var(--teal-400);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

body.mg-public .home-feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--teal-50);
  border-radius: 12px;
  margin-bottom: 20px;
}

body.mg-public .home-feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

body.mg-public .home-feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: none;
}

/* ── Section: AI approach for sustainable development ─────────── */
body.mg-public .home-ai-approach {
  background: #fff;
  padding: var(--section-py) 0;
}

body.mg-public .home-ai-approach-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 48px;
}

body.mg-public .home-ai-approach-lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 16px auto 0;
  max-width: 56ch;
}

body.mg-public .home-ai-approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 991px) {
  body.mg-public .home-ai-approach-grid {
    grid-template-columns: 1fr;
  }
}

body.mg-public .home-ai-approach-card {
  background: var(--bg-light);
  border-radius: var(--radius-xl);
  padding: 32px;
  border-top: 4px solid var(--teal-500);
  box-shadow: none;
  transition: box-shadow 0.25s ease;
}

body.mg-public .home-ai-approach-card:hover {
  box-shadow: var(--shadow-md);
}

body.mg-public .home-ai-approach-step {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-700);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

body.mg-public .home-ai-approach-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
  line-height: 1.25;
}

body.mg-public .home-ai-approach-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0;
  max-width: none;
}

/* ── Section: CTA banner ─────────────────────────────────────── */
body.mg-public .home-cta-banner {
  background: linear-gradient(135deg, #0a7a5c 0%, #0e9e76 100%);
  padding: 80px 0;
  text-align: center;
}

body.mg-public .home-cta-banner h2 {
  color: #fff;
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 16px;
}

body.mg-public .home-cta-banner .home-cta-sub {
  color: rgba(255, 255, 255, 0.7);
  max-width: 52ch;
  margin: 0 auto 28px;
  font-size: 17px;
  line-height: 1.65;
}

body.mg-public .home-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

body.mg-public .home-cta-btn-solid {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 16px;
  background: #fff;
  color: var(--navy-900);
  text-decoration: none;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.mg-public .home-cta-btn-solid:hover {
  color: var(--navy-900);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

body.mg-public .home-cta-banner .btn-outline-white {
  padding: 16px 32px;
}

body.mg-public .home-cta-schedule {
  display: block;
  margin-top: 8px;
  font-size: 15px;
}

body.mg-public .home-cta-schedule a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.mg-public .home-cta-schedule a:hover {
  color: #fff;
}

/* Shared section headings */
body.mg-public .home-section-h2 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

body.mg-public .home-problem .home-section-h2,
body.mg-public .home-solution .home-section-h2,
body.mg-public .home-features .home-section-h2,
body.mg-public .home-ai-approach .home-section-h2 {
  font-size: clamp(28px, 3.5vw, 40px);
}

@media (prefers-reduced-motion: reduce) {
  body.mg-public .home-feature-card:hover {
    transform: none;
  }

  body.mg-public .home-ai-approach-card:hover {
    box-shadow: none;
  }

  body.mg-public .home-cta-btn-solid:hover {
    transform: none;
  }
}

/* ── Section 8 — Public footer (FRONTEND PROMPT 4) ─────────── */
body.mg-public footer.mg-footer-sovereign {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.5);
  padding: 56px 0 24px;
  margin-top: 0;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-sovereign-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 40px 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 991px) {
  body.mg-public footer.mg-footer-sovereign .mg-footer-sovereign-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  body.mg-public footer.mg-footer-sovereign .mg-footer-sovereign-grid {
    grid-template-columns: 1fr;
  }
}

body.mg-public footer.mg-footer-sovereign .mg-footer-wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: inline-block;
  margin-bottom: 12px;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-wordmark:hover {
  color: #fff;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-wordmark-accent {
  color: var(--teal-400);
}

body.mg-public footer.mg-footer-sovereign .mg-footer-tagline {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
  max-width: 28ch;
  margin-bottom: 20px;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-social {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-social a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.1rem;
  transition: background 0.2s ease, color 0.2s ease;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-social a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
}

body.mg-public footer.mg-footer-sovereign .mg-footer-lang {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-lang-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-lang-btn:hover {
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.45);
}

body.mg-public footer.mg-footer-sovereign .mg-footer-lang-btn.is-active {
  background: rgba(14, 158, 118, 0.2);
  border-color: rgba(14, 158, 118, 0.45);
  color: var(--teal-300);
}

body.mg-public footer.mg-footer-sovereign .mg-footer-heading {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 16px;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-links li {
  margin-bottom: 10px;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-links a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-links a:hover {
  color: rgba(255, 255, 255, 0.95);
}

body.mg-public footer.mg-footer-sovereign .footer-disclaimer {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  max-width: 700px;
  margin: 0 auto 16px;
  text-align: center;
  line-height: 1.6;
  padding: 0 20px;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  font-size: 13px;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-copy,
body.mg-public footer.mg-footer-sovereign .mg-footer-status {
  margin: 0;
  color: rgba(255, 255, 255, 0.45);
}

body.mg-public footer.mg-footer-sovereign .mg-footer-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.mg-public footer.mg-footer-sovereign .mg-footer-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 0 4px rgba(14, 158, 118, 0.2);
}

body.mg-public footer.mg-footer-sovereign .mg-footer-logo {
  height: auto;
  max-height: 48px;
  width: auto;
  opacity: 0.85;
}
