/* ============================================================
   MATRICBASE — HOMEPAGE DESIGN LANGUAGE (v1)
   Scope: homepage only. All selectors are namespaced with "mb-"
   so nothing here touches the existing site-wide header/footer
   or any other page's styles.
   ============================================================ */

:root{
  --mb-bg:        #FBF9F2;
  --mb-surface:   #FFFFFF;
  --mb-ink:       #16241C;
  --mb-body:      #4B5348;
  --mb-muted:     #7C8577;
  --mb-line:      #E6E2D3;

  --mb-green:      #4C7A0E;
  --mb-green-dark: #365607;
  --mb-green-tint: #EEF3E1;

  --mb-gold:       #B9812A;
  --mb-gold-tint:  #F6ECD9;

  --mb-radius-sm: 10px;
  --mb-radius-md: 16px;
  --mb-radius-lg: 24px;

  --mb-shadow: 0 12px 32px rgba(22, 36, 28, 0.08);
}

.mb-home{
  background: var(--mb-bg);
  color: var(--mb-ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mb-home *{ box-sizing: border-box; }

.mb-home .mb-shell{
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.mb-home h1, .mb-home h2, .mb-home h3{
  font-family: "Fraunces", Georgia, serif;
  color: var(--mb-ink);
  line-height: 1.12;
  margin: 0;
}

.mb-eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mb-green-dark);
  font-weight: 600;
  margin-bottom: 14px;
}

.mb-eyebrow::before{
  content: "";
  width: 16px;
  height: 2px;
  background: var(--mb-gold);
  display: inline-block;
}

/* ---------- Buttons ---------- */

.mb-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: var(--mb-radius-sm);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.mb-btn i{ font-size: 13px; }

.mb-btn-primary{
  background: var(--mb-green);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(76, 122, 14, 0.28);
}

.mb-btn-primary:hover{
  background: var(--mb-green-dark);
  transform: translateY(-1px);
}

.mb-btn-primary:active{
  background: var(--mb-green-dark);
  transform: scale(0.97);
  transition: background 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.mb-btn-secondary{
  background: transparent;
  color: var(--mb-ink);
  border: 1.5px solid var(--mb-ink);
}

.mb-btn-secondary:hover{
  background: var(--mb-ink);
  color: #ffffff;
}

.mb-btn-secondary:active{
  background: var(--mb-ink);
  color: #ffffff;
  transform: scale(0.97);
  transition: background 0.12s ease, transform 0.12s ease, color 0.12s ease;
}

.mb-btn-block{ width: 100%; }

/* ============================================================
   1. HERO
   ============================================================ */

.mb-hero{
  padding: 44px 0 40px;
}

.mb-hero-inner{
  display: grid;
  gap: 28px;
}

.mb-hero-title{
  font-size: clamp(34px, 8vw, 52px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.mb-hero-title em{
  font-style: normal;
  color: var(--mb-green);
}

.mb-hero-sub{
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--mb-body);
  max-width: 46ch;
}

.mb-hero-subnote{
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--mb-muted);
  max-width: 44ch;
}

.mb-hero-actions{
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.mb-hero-visual{
  display: flex;
  flex-direction: column;
}

.mb-hero-visual-frame{
  position: relative;
  border-radius: var(--mb-radius-lg);
  overflow: visible;
}

.mb-hero-visual-frame img{
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  border-radius: var(--mb-radius-lg);
  box-shadow: var(--mb-shadow);
}

.mb-hero-badge{
  position: absolute;
  left: 16px;
  bottom: -16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--mb-surface);
  border: 1px solid var(--mb-line);
  border-radius: 999px;
  padding: 9px 14px;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--mb-ink);
  box-shadow: 0 6px 16px rgba(22, 36, 28, 0.08);
  white-space: nowrap;
}

.mb-hero-badge i{
  color: var(--mb-green);
  font-size: 11px;
}

.mb-hero-stats{
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--mb-surface);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius-lg);
  box-shadow: 0 2px 10px rgba(22, 36, 28, 0.05);
  overflow: hidden;
}

.mb-hero-stat{
  padding: 16px 8px;
  text-align: center;
  border-right: 1px solid var(--mb-line);
}

.mb-hero-stat:last-child{ border-right: none; }

.mb-hero-stat-num{
  display: block;
  font-family: "Fraunces", serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--mb-green);
  line-height: 1.2;
}

.mb-hero-stat-label{
  display: block;
  margin-top: 3px;
  font-family: "Inter", sans-serif;
  font-size: 11px;
  color: var(--mb-muted);
  line-height: 1.3;
}

@media (min-width: 860px){
  .mb-hero-inner{
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 48px;
  }
  .mb-hero-visual-frame img{ height: 380px; }
  .mb-hero-stat-label{ font-size: 11.5px; }
}

/* ============================================================
   1B. APP PROMO — past papers & study tools live in the app
   ============================================================ */

.mb-app-promo{
  padding: 8px 0 36px;
}

.mb-app-promo-inner{
  display: grid;
  gap: 24px;
  align-items: center;
  background: var(--mb-ink);
  border-radius: var(--mb-radius-lg);
  padding: 28px 26px;
  box-shadow: var(--mb-shadow);
}

.mb-app-promo-eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #96D61E;
  font-weight: 600;
  margin-bottom: 10px;
}

.mb-home .mb-app-promo-title{
  color: #FBF9F2;
  font-size: clamp(19px, 4vw, 23px);
  font-weight: 600;
  line-height: 1.28;
  margin: 0;
}

.mb-app-promo-sub{
  margin-top: 10px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(251,249,242,0.72);
  max-width: 52ch;
}

.mb-app-promo-features{
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mb-app-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(251,249,242,0.08);
  border: 1px solid rgba(251,249,242,0.16);
  color: #FBF9F2;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
}

.mb-app-chip i{
  color: #96D61E;
  font-size: 11px;
}

.mb-app-promo-cta{
  display: flex;
  justify-content: flex-start;
}

.mb-play-badge{
  display: inline-flex;
  line-height: 0;
}

.mb-play-badge img{
  height: 54px;
  width: auto;
  display: block;
}

@media (min-width: 760px){
  .mb-app-promo-inner{
    grid-template-columns: 1fr auto;
    padding: 32px 40px;
    gap: 32px;
  }
  .mb-app-promo-cta{
    justify-content: flex-end;
  }
}

/* ============================================================
   2. JOURNEY TRACKER (signature element)
   ============================================================ */

.mb-journey{
  background: var(--mb-ink);
  padding: 22px 0;
}

.mb-journey-track{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(64px, 1fr));
  gap: 4px;
  position: relative;
}

.mb-journey-track::before{
  content: "";
  position: absolute;
  top: 15px;
  left: 32px;
  right: 32px;
  height: 1px;
  background-image: linear-gradient(to right, rgba(251,249,242,0.35) 0 6px, transparent 6px 12px);
  background-size: 12px 1px;
  z-index: 0;
}

.mb-step{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  text-align: center;
}

.mb-step-num{
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--mb-ink);
  border: 1.5px solid rgba(251,249,242,0.4);
  color: #FBF9F2;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mb-step:hover .mb-step-num,
.mb-step:focus-visible .mb-step-num{
  background: var(--mb-gold);
  border-color: var(--mb-gold);
  color: var(--mb-ink);
}

.mb-step:active .mb-step-num{
  background: var(--mb-gold);
  border-color: var(--mb-gold);
  color: var(--mb-ink);
  transform: scale(0.92);
  transition: transform 0.1s ease;
}

.mb-step-label{
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(251,249,242,0.75);
  font-weight: 600;
}

@media (min-width: 640px){
  .mb-step-num{ width: 34px; height: 34px; font-size: 13px; }
  .mb-step-label{ font-size: 12.5px; }
}

/* ============================================================
   Generic section scaffolding
   ============================================================ */

.mb-section{ padding: 56px 0; }
.mb-section-alt{ background: var(--mb-surface); }

.mb-section-head{
  max-width: 56ch;
  margin-bottom: 28px;
}

.mb-section-head h2{
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 600;
}

.mb-section-head p{
  margin-top: 10px;
  color: var(--mb-body);
  font-size: 15px;
  line-height: 1.6;
}

/* ============================================================
   3. APS CALCULATOR
   ============================================================ */

.mb-aps-card{
  background: var(--mb-ink);
  border-radius: var(--mb-radius-lg);
  padding: 32px 24px;
  display: grid;
  gap: 24px;
  color: #FBF9F2;
}

.mb-aps-score{
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: "IBM Plex Mono", monospace;
}

.mb-aps-score .num{
  font-size: 64px;
  font-weight: 600;
  color: var(--mb-gold);
  line-height: 1;
}

.mb-aps-disclaimer{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 14px;
  border: 1px solid var(--mb-gold);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mb-gold);
  background: rgba(185, 129, 42, 0.12);
}

.mb-aps-disclaimer i{ font-size: 12px; }

.mb-aps-bars{
  display: grid;
  gap: 8px;
}

.mb-aps-bar-row{
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: rgba(251,249,242,0.65);
}

.mb-aps-bar-track{
  height: 6px;
  border-radius: 4px;
  background: rgba(251,249,242,0.15);
  overflow: hidden;
}

.mb-aps-bar-fill{
  height: 100%;
  background: var(--mb-green-tint);
  border-radius: 4px;
}

.mb-aps-copy p{
  color: rgba(251,249,242,0.8);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 18px;
}

@media (min-width: 780px){
  .mb-aps-card{
    grid-template-columns: 0.9fr 1.1fr;
    padding: 40px;
  }
}

/* ============================================================
   4. EXPLORE UNIVERSITIES — premium province explorer
   Reusable component: .mb-uni-grid / .mb-uni-card / .mb-uni-cta
   Drop this same markup+classes into any province page's
   "browse other provinces" block to share the component.
   ============================================================ */

.mb-uni-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.mb-uni-card{
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--mb-surface);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius-lg);
  padding: 16px 18px;
  text-decoration: none;
  color: var(--mb-ink);
  box-shadow: 0 2px 10px rgba(22, 36, 28, 0.05);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.mb-uni-card-icon{
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mb-green-tint);
  color: var(--mb-green);
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease;
}

.mb-uni-card-body{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mb-uni-card-name{
  font-family: "Fraunces", serif;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--mb-ink);
}

.mb-uni-card-count{
  font-family: "Inter", sans-serif;
  font-size: 12.5px;
  color: var(--mb-muted);
}

.mb-uni-card-count strong{
  color: var(--mb-green);
  font-weight: 600;
}

.mb-uni-card-arrow{
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--mb-line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mb-green);
  font-size: 11px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

/* Desktop / hover interactions live behind a hover-capable-pointer
   check so touch devices never get a stuck hover state. */
@media (hover: hover) and (pointer: fine){
  .mb-uni-card:hover{
    border-color: var(--mb-green);
    transform: translateY(-2px);
    box-shadow: var(--mb-shadow);
  }

  .mb-uni-card:hover .mb-uni-card-icon{
    background: var(--mb-green);
    color: #ffffff;
  }

  .mb-uni-card:hover .mb-uni-card-arrow{
    background: var(--mb-green);
    border-color: var(--mb-green);
    color: #ffffff;
    transform: translateX(2px);
  }
}

/* Press feedback for touch devices */
.mb-uni-card:active{
  border-color: var(--mb-green);
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(22, 36, 28, 0.08);
  transition: border-color 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.mb-uni-card:active .mb-uni-card-icon{
  background: var(--mb-green);
  color: #ffffff;
}

.mb-uni-card:active .mb-uni-card-arrow{
  background: var(--mb-green);
  border-color: var(--mb-green);
  color: #ffffff;
}

@media (min-width: 640px){
  .mb-uni-card{ padding: 18px 22px; }
  .mb-uni-card-icon{ width: 48px; height: 48px; font-size: 16px; }
}

@media (min-width: 900px){
  .mb-uni-grid{ grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* ---------- Bottom CTA card ---------- */

.mb-uni-cta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--mb-ink);
  border-radius: 20px;
  padding: 24px 26px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) and (pointer: fine){
  .mb-uni-cta:hover{
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(22, 36, 28, 0.22);
  }
}

.mb-uni-cta:active{
  transform: scale(0.98);
  box-shadow: 0 8px 20px rgba(22, 36, 28, 0.22);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.mb-uni-cta:active .mb-uni-cta-btn{
  background: var(--mb-green-dark);
}

.mb-uni-cta-left{
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.mb-uni-cta-icon{
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(76, 122, 14, 0.22);
  color: var(--mb-green);
  font-size: 18px;
}

.mb-uni-cta-copy{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mb-uni-cta-title{
  font-family: "Fraunces", serif;
  font-size: 17px;
  font-weight: 600;
  color: #FBF9F2;
}

.mb-uni-cta-text{
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(251, 249, 242, 0.65);
}

.mb-uni-cta-btn{
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--mb-green);
  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 22px;
  border-radius: var(--mb-radius-sm);
  white-space: nowrap;
  transition: background 0.2s ease;
}

.mb-uni-cta:hover .mb-uni-cta-btn{
  background: var(--mb-green-dark);
}

@media (max-width: 480px){
  .mb-uni-cta{ padding: 20px; }
  .mb-uni-cta-btn{ width: 100%; justify-content: center; }
}

/* ============================================================
   5 & 6 — Course Connect / Bursaries (feature strip cards)
   ============================================================ */

.mb-feature-grid{
  display: grid;
  gap: 16px;
}

.mb-feature-card{
  background: var(--mb-surface);
  border: 1px solid var(--mb-line);
  border-radius: var(--mb-radius-lg);
  padding: 28px 24px;
  display: grid;
  gap: 14px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.mb-feature-card:active{
  transform: scale(0.98);
  border-color: var(--mb-green);
  box-shadow: 0 6px 16px rgba(22, 36, 28, 0.1);
}

.mb-feature-icon{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mb-green-tint);
  color: var(--mb-green-dark);
  font-size: 17px;
}

.mb-feature-card.gold .mb-feature-icon{
  background: var(--mb-gold-tint);
  color: var(--mb-gold);
}

.mb-feature-card h3{
  font-size: 19px;
  font-weight: 600;
}

.mb-feature-card p{
  color: var(--mb-body);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0;
}

.mb-feature-card .mb-btn{ margin-top: 4px; justify-self: start; }

@media (min-width: 780px){
  .mb-feature-grid{ grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   7. TRUST STRIP
   ============================================================ */

.mb-trust{
  border-top: 1px solid var(--mb-line);
  padding: 20px 0;
}

.mb-trust-row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 12.5px;
  color: var(--mb-muted);
}

.mb-trust-row span{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mb-trust-row i{ color: var(--mb-green); font-size: 11px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .mb-btn, .mb-uni-card, .mb-uni-cta, .mb-uni-card-icon, .mb-uni-card-arrow, .mb-uni-cta-btn, .mb-feature-card{ transition: none; }
}
