/* ==========================================================
   TASPO – Tanzania Student Plan Organization
   Main stylesheet
   ========================================================== */

:root {
  --ink: #1f3b4d;
  --ink-deep: #16303f;
  --ink-soft: #4a6272;
  --sand: #faf6ef;
  --sand-deep: #f2eadc;
  --ochre: #e8a33d;
  --ochre-deep: #b8741a;
  --leaf: #2f7d5b;
  --line: #e6ddcf;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 14px 34px rgba(31, 59, 77, 0.10);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--sand);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--ink); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, 0.94);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.mark {
  width: 42px; height: 42px; border-radius: 12px; background: var(--ink);
  display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--serif); font-weight: 700; font-size: 21px; color: var(--ochre);
}
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 21px; letter-spacing: 0.04em; line-height: 1.1; display: block; }
.brand-sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-soft); letter-spacing: 0.02em; }

.nav { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav a {
  text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink);
  padding: 8px 14px; border-radius: 8px; transition: background .15s ease;
}
.nav a:hover { background: var(--sand-deep); }
.nav a[aria-current="page"] { color: var(--ochre-deep); }
.nav .nav-cta { background: var(--ink); color: var(--white); margin-left: 8px; }
.nav .nav-cta:hover { background: var(--ink-deep); }

.menu-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 10px; color: var(--ink);
}
.menu-toggle svg { margin: 0 auto; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--sand); border-bottom: 1px solid var(--line);
    padding: 8px 16px 20px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 12px; font-size: 17px; }
  .nav .nav-cta { margin: 10px 0 0; text-align: center; }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.9rem); }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); }
h3 { font-size: 1.35rem; }
.eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ochre-deep); background: rgba(232, 163, 61, 0.14); padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.lead { font-size: clamp(1.07rem, 2vw, 1.22rem); color: var(--ink-soft); max-width: 60ch; }
.muted { color: var(--ink-soft); }
em.accent { font-style: normal; color: var(--ochre-deep); }

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 15.5px; font-family: var(--sans);
  padding: 14px 26px; border-radius: 10px; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--ink-deep); }
.btn-ochre { background: var(--ochre); color: var(--ink-deep); }
.btn-ochre:hover { background: #f0b458; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-light { border-color: rgba(255,255,255,.6); color: var(--white); background: transparent; }
.btn-light:hover { background: var(--white); color: var(--ink); }
.text-link { font-weight: 600; color: var(--ochre-deep); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head p { margin-top: 16px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.bg-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bg-ink { background: var(--ink); color: var(--white); }
.bg-ink .lead, .bg-ink .muted { color: #c9d6de; }
.bg-ink .eyebrow { background: rgba(232,163,61,.18); color: var(--ochre); }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 88px; }
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 56px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.15fr 1fr; } }
.hero h1 { max-width: 14ch; }
.hero .lead { margin-top: 24px; }

.page-hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { margin-top: 20px; }

/* ---------- Illustrations ---------- */
.illustration {
  background: var(--white); border: 1px solid var(--line); border-radius: 24px;
  padding: 28px; box-shadow: var(--shadow);
}

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2, .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column;
}
.card h3 { margin: 18px 0 10px; }
.card p { color: var(--ink-soft); }
.card .text-link { margin-top: auto; padding-top: 18px; }
.icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: rgba(232, 163, 61, 0.14); color: var(--ochre-deep);
}
.icon.leaf { background: rgba(47, 125, 91, 0.12); color: var(--leaf); }
.icon.ink { background: rgba(31, 59, 77, 0.08); color: var(--ink); }

/* Split feature */
.split { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split.reverse > :first-child { order: 2; } }
.split p + p { margin-top: 14px; }
.split p { color: var(--ink-soft); }
.bg-ink .split p { color: #c9d6de; }

.checklist { list-style: none; margin-top: 22px; }
.checklist li { position: relative; padding-left: 34px; margin-top: 12px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 12px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--serif); font-weight: 700; font-size: 2.4rem; color: var(--ochre);
  display: block; line-height: 1; margin-bottom: 14px;
}
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { color: #c9d6de; font-size: 16px; }

/* Values */
.value { border-top: 3px solid var(--ochre); padding-top: 20px; }
.value h3 { font-size: 1.2rem; margin-bottom: 8px; }
.value p { color: var(--ink-soft); font-size: 16px; }

/* Team */
.person { text-align: left; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; background: var(--ink); color: var(--ochre);
  display: grid; place-items: center; font-family: var(--serif); font-size: 24px; font-weight: 700; margin-bottom: 16px;
}
.person h3 { font-size: 1.15rem; margin: 0; }
.person .role { color: var(--ochre-deep); font-weight: 600; font-size: 14px; margin: 4px 0 10px; }

/* Status badge */
.badge {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; background: rgba(47,125,91,.12); color: var(--leaf);
}
.badge.soon { background: rgba(232,163,61,.16); color: var(--ochre-deep); }

/* CTA band */
.cta-band { background: var(--ink); color: var(--white); border-radius: 26px; padding: clamp(36px, 6vw, 64px); text-align: center; }
.cta-band h2 { max-width: 22ch; margin: 0 auto; }
.cta-band p { color: #c9d6de; max-width: 56ch; margin: 18px auto 0; }
.cta-band .btn-row { justify-content: center; }

/* FAQ */
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--ochre-deep); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 12px; color: var(--ink-soft); }

/* Contact */
.contact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.contact-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.contact-card p { color: var(--ink-soft); font-size: 16px; }
.contact-card a { font-weight: 600; }

/* ---------- Blog ---------- */
.post-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-thumb { aspect-ratio: 16 / 9; display: grid; place-items: center; }
.post-thumb.t1 { background: linear-gradient(135deg, #1f3b4d, #2c5670); }
.post-thumb.t2 { background: linear-gradient(135deg, #e8a33d, #d48a22); }
.post-thumb.t3 { background: linear-gradient(135deg, #2f7d5b, #3f9a72); }
.post-body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.post-meta { font-size: 13.5px; color: var(--ink-soft); display: flex; gap: 10px; flex-wrap: wrap; }
.post-meta .cat { color: var(--ochre-deep); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.post-card h3 { margin: 10px 0 10px; font-size: 1.3rem; }
.post-card p { color: var(--ink-soft); font-size: 16px; }
.post-card .more { margin-top: auto; padding-top: 16px; font-weight: 600; color: var(--ochre-deep); }

.article-hero { padding: 64px 0 40px; }
.article-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); margin-top: 14px; }
.article-hero .lead { margin-top: 18px; }
.back { font-size: 15px; text-decoration: none; font-weight: 600; color: var(--ink-soft); }
.back:hover { color: var(--ochre-deep); }
.article-banner { aspect-ratio: 21 / 9; border-radius: 22px; display: grid; place-items: center; margin-bottom: 48px; }
.prose { padding-bottom: 72px; }
.prose h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin: 44px 0 14px; }
.prose h3 { margin: 30px 0 10px; }
.prose p { margin-top: 16px; }
.prose ul, .prose ol { margin: 16px 0 0 22px; }
.prose li { margin-top: 8px; }
.prose blockquote {
  margin: 32px 0; padding: 22px 26px; border-left: 4px solid var(--ochre);
  background: var(--white); border-radius: 0 14px 14px 0; font-family: var(--serif); font-size: 1.2rem; line-height: 1.5;
}
.prose .note { background: var(--sand-deep); border-radius: 14px; padding: 20px 24px; margin-top: 28px; font-size: 15.5px; color: var(--ink-soft); }
.prose a { color: var(--ochre-deep); font-weight: 600; }
.author-box { display: flex; gap: 16px; align-items: center; border-top: 1px solid var(--line); padding-top: 28px; margin-top: 48px; }
.author-box .avatar { margin: 0; width: 56px; height: 56px; font-size: 20px; }
.author-box p { margin: 0; font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-deep); color: #c9d6de; padding: 64px 0 32px; font-size: 15.5px; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.site-footer .brand { color: var(--white); }
.site-footer .brand-sub { color: #9fb3c0; }
.site-footer h4 { font-family: var(--sans); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--white); margin-bottom: 14px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #c9d6de; text-decoration: none; }
.site-footer a:hover { color: var(--ochre); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 48px; padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: #9fb3c0; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0 !important; }
.mt-s { margin-top: 12px; }
.mt-m { margin-top: 28px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--white); padding: 10px 16px; border-radius: 8px; z-index: 100; }
