/* ═══════════════════════════════════
   STABIXA — calrwanda UI/UX Design
   ═══════════════════════════════════ */

/* ═══════ RESET & BASE ═══════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: #fff;
  color: #4b5563;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

/* ═══════ DESIGN TOKENS ═══════ */
:root {
  --primary: #059669;
  --primary-light: #34d399;
  --primary-glow: rgba(5, 150, 105, 0.15);
  --surface: #ffffff;
  --heading: #111827;
  --body: #4b5563;
  --muted: #6b7280;
  --dim: #9ca3af;
  --nav-h: 64px;
}

/* ═══════ TYPOGRAPHY ═══════ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.2;
}

h1 { font-size: 1.875rem; }   /* 30px */
h2 { font-size: 1.5rem; }     /* 24px */
h3 { font-size: 1.125rem; }   /* 18px */
p  { font-size: 1rem; color: var(--body); line-height: 1.7; }

@media (min-width: 768px) {
  h1 { font-size: 2.25rem; }  /* 36px */
  h2 { font-size: 1.75rem; }  /* 28px */
}

@media (min-width: 1024px) {
  h1 { font-size: 2.5rem; }   /* 40px */
}

/* ═══════ CONTAINER ═══════ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container { padding: 0 1.5rem; }
}

/* ═══════ NAVIGATION ═══════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--nav-h);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-logo { display: flex; align-items: center; text-decoration: none; position: absolute; left: 1rem; }
.nav-logo img { height: 36px; width: auto; max-width: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  cursor: pointer;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--primary); background: var(--primary-glow); }
.nav-links a.active { color: var(--primary); background: var(--primary-glow); font-weight: 600; }

@media (max-width: 768px) {
  .nav-links a { font-size: 0.8rem; padding: 0.4rem 0.5rem; }
}

@media (max-width: 480px) {
  .nav-links a { font-size: 0.7rem; padding: 0.35rem 0.4rem; }
  .nav-logo img { height: 24px; }
}

@media (max-width: 360px) {
  .nav-links a { font-size: 0.6rem; padding: 0.25rem 0.3rem; }
  .nav-logo img { height: 20px; }
}

/* ═══════ PAGE HERO ═══════ */
.page-hero {
  width: 100%;
  padding: 2rem 1rem 0;
}

.page-hero .hero-content {
  max-width: 896px;
  margin: 0 auto;
  text-align: center;
}

.page-hero .hero-content h1 {
  color: var(--heading);
  margin-bottom: 0.75rem;
}

.page-hero .hero-content h1 .highlight {
  color: var(--primary);
}

.page-hero .hero-content p {
  color: var(--body);
  font-size: 1.125rem;
  max-width: 560px;
  line-height: 1.7;
  margin: 0 auto 1.5rem;
}

@media (min-width: 768px) {
  .page-hero .hero-content p { font-size: 1.25rem; }
}

/* Page hero — image overlay style (about, services, contact) */
.page-hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.page-hero-desc {
  font-size: 1.125rem;
  color: var(--body);
  line-height: 1.7;
  max-width: 560px;
}

@media (min-width: 768px) {
  .page-hero-desc { font-size: 1.25rem; }
}

/* Home page hero */
.page-hero--home {
  padding-top: 3rem;
}

.page-hero--home .hero-content h1 {
  font-size: 1.375rem;
}

@media (min-width: 768px) {
  .page-hero--home .hero-content h1 { font-size: 1.75rem; }
}

@media (min-width: 1024px) {
  .page-hero--home .hero-content h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
  .page-hero--home .hero-content h1 { font-size: 1.25rem; }
}

/* Home intro card — regular white card */
.page-hero--home .intro-section {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 896px;
  width: calc(100% - 2rem);
  margin: 1.5rem auto 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

@media (min-width: 768px) {
  .page-hero--home .intro-section { padding: 2rem; }
}

@media (max-width: 640px) {
  .page-hero--home .intro-section { width: calc(100% - 1.5rem); margin-top: 1rem; }
}

/* Inner page hero — simple header */
.page-hero--inner {
  padding: 2rem 1rem 0;
}

/* Section description (about, services, contact pages) */
.section-desc {
  font-size: 1rem;
  color: var(--body);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

/* Feature visual badge */
.feature-visual-badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
  background: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  display: inline-block;
}

/* Bento style link */
.bento-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.2s;
}
.bento-link:hover { gap: 0.5rem; }

/* ═══════ BUTTONS ═══════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.btn:hover { background: #047857; box-shadow: 0 4px 12px rgba(5,150,105,0.4); transform: translateY(-1px); }

.btn--outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn--outline:hover { background: var(--primary); color: white; border-color: var(--primary); }

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* ═══════ SECTION ═══════ */
.section {
  width: 100%;
  max-width: 896px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

@media (min-width: 768px) {
  .section { padding: 2rem 0; }
}

/* ═══════ CARD ═══════ */
.card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
}

/* ═══════ SECTION TITLE ═══════ */
.section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.section-title .accent-bar {
  width: 3rem;
  height: 4px;
  background: var(--primary);
  border-radius: 999px;
  flex-shrink: 0;
}

.section-title h2 {
  margin: 0;
}

/* ═══════ ANSWER-FIRST SUMMARY ═══════ */
.summary-box {
  background: rgba(5,150,105,0.05);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.summary-box p {
  max-width: 768px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ═══════ GRID ═══════ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ═══════ SERVICE CARD (Bento-style) ═══════ */
.service-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.service-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
  width: 3rem;
  height: 3rem;
  background: rgba(5,150,105,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-card .icon-box svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary);
}

.service-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.service-card p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.service-card .card-cta {
  margin-top: auto;
  padding-top: 0.75rem;
}

.service-card .card-cta a {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.2s;
}
.service-card .card-cta a:hover { gap: 0.5rem; }

/* ═══════ STAT CARD ═══════ */
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
}
.stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--body);
  font-weight: 500;
}

/* ═══════ PARTNER CARD ═══════ */
.partner-card {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  min-height: 160px;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.partner-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-2px); }

.partner-card .logo-frame {
  width: 5rem;
  height: 5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.5rem;
}
.partner-card:hover .logo-frame { transform: scale(1.05); }

.partner-card .logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.partner-card .partner-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--heading);
  line-height: 1.3;
}

.partner-card .partner-sector {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: #f3f4f6;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
}

/* Partner logo text fallback */
.partner-card .logo-frame .fallback-letter {
  font-size: 1.5rem;
  font-weight: 700;
  color: #d1d5db;
}

.contact-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s;
}
.contact-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.contact-card .icon-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(5,150,105,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.contact-card .icon-circle svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary);
}

.contact-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.contact-card a {
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s;
  display: block;
}
.contact-card a:hover { color: var(--primary); }

/* ═══════ VIEW SYSTEM ═══════ */
.view {
  display: none;
}
.view.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════ MAIN LAYOUT ═══════ */
.app-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: 1rem 0 2rem;
}

@media (min-width: 768px) {
  .main-content { padding: 1.5rem 0 3rem; }
}

/* ═══════ FOOTER ═══════ */
.footer {
  background: white;
  padding: 1.5rem 0;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}

.footer-inner p {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-inner p strong { color: var(--heading); }

.footer-inner a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}
.footer-inner a:hover { opacity: 0.8; text-decoration: underline; }

.footer-credit {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--dim);
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(5,150,105,0.08);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ═══════ ABOUT SPECIFIC ═══════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

/* ═══════ PARTNERS SPECIFIC ═══════ */
.partners-stat-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .partners-stat-row { grid-template-columns: repeat(3, 1fr); }
}

.partners-stat-row .stat-box {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.partners-stat-row .stat-box .value {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.partners-stat-row .stat-box .label {
  font-size: 0.85rem;
  color: var(--heading);
  font-weight: 500;
}

/* ═══════ RESPONSIVE HELPERS ═══════ */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-4 { gap: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-6 { margin-top: 1.5rem; }

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 640px) {
  h1 { font-size: 1.625rem; }
  .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .section { padding: 1rem 0.75rem; }
  .card { padding: 1rem; }
}
