/* css/style.css — base, layout and chrome. */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--zari); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--lh-head);
  letter-spacing: -0.005em;
  margin: 0 0 var(--s-4);
}
h1 { font-size: var(--t-3xl); line-height: var(--lh-tight); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
/* Keep the wrap's gutter and centring, and constrain the measure inside it, so
   body text hangs off the same left edge as the h1 above rather than being
   centred three hundred pixels to its right. */
.narrow > * { max-width: var(--wrap-narrow); }
.narrow > .planner-facts, .narrow > .faq, .narrow > .table-scroll { max-width: var(--wrap-narrow); }

.lede {
  font-size: var(--t-md);
  color: var(--muted);
  max-width: 62ch;
}

/* A hairline that reads as the zari border on a kasavu mundu: gold, thin,
   with a sliver of ground above it. Used to separate major bands. */
.zari-rule {
  height: 3px;
  border: 0;
  margin: 0;
  background: linear-gradient(
    to bottom,
    transparent 0, transparent 1px,
    var(--zari) 1px, var(--zari) 2px,
    transparent 2px
  );
  opacity: 0.7;
}

/* ---------------------------------------------------------------- skip link */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--kadappa); color: var(--ivory);
  padding: var(--s-3) var(--s-5);
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--zari);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; gap: var(--s-5);
  min-height: 72px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  margin-right: auto;
  display: flex; align-items: baseline; gap: var(--s-3);
}
.brand b { font-weight: 400; }
.brand span {
  font-family: var(--font-body);
  font-size: var(--t-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--zari);
}

.nav { display: flex; align-items: center; gap: var(--s-5); }
.nav a {
  font-size: var(--t-sm);
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.nav a:hover, .nav a[aria-current='page'] { color: var(--fg); }
.nav a[aria-current='page'] { text-decoration: underline; text-decoration-color: var(--zari); }

.nav-toggle {
  display: none;
  font: inherit; font-size: var(--t-sm);
  background: none; border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: var(--s-2) var(--s-4);
  color: inherit; cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; inset: 72px 0 auto; z-index: 39;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    padding: var(--s-3) 1.25rem var(--s-5);
  }
  .nav[data-open='false'] { display: none; }
  .nav a { padding: var(--s-3) 0; border-bottom: 1px solid var(--rule); }
  .nav .btn { margin-top: var(--s-4); text-align: center; }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--t-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn-primary {
  background: var(--kadappa); color: var(--ivory); border-color: var(--kadappa);
}
.btn-primary:hover { background: var(--zari-deep); border-color: var(--zari-deep); }
.btn-ghost {
  background: transparent; color: inherit; border-color: currentColor;
}
.btn-ghost:hover { border-color: var(--zari); color: var(--zari); }
.btn-gold {
  background: var(--zari); color: #fff; border-color: var(--zari);
}
.btn-gold:hover { background: var(--zari-deep); border-color: var(--zari-deep); }

/* ---------------------------------------------------------------- sections */
.band { padding: var(--s-9) 0; }
.band-tight { padding: var(--s-7) 0; }
.band-dark {
  background: var(--kadappa);
  color: var(--ivory);
}
.band-dark .lede, .band-dark .muted { color: #b9b2a2; }
.band-warm { background: var(--paper-warm); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-5); flex-wrap: wrap;
  margin-bottom: var(--s-6);
}
.eyebrow {
  font-size: var(--t-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--zari);
  margin: 0 0 var(--s-3);
}

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: var(--kadappa);
  color: #cfc8b8;
  padding: var(--s-8) 0 var(--s-6);
  font-size: var(--t-sm);
}
.site-footer a { color: #cfc8b8; text-decoration: none; }
.site-footer a:hover { color: var(--brass); text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--s-6);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 {
  font-family: var(--font-body);
  font-size: var(--t-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: var(--s-4);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: var(--s-2); }
.footer-base {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid #2c3036;
  font-size: var(--t-xs);
  color: #8d8778;
}
.footer-owner { max-width: 78ch; margin-bottom: var(--s-3); }

/* ---------------------------------------------------------------- callbar */
.callbar {
  position: fixed; inset: auto 0 0; z-index: 45;
  display: none; gap: var(--s-3);
  padding: var(--s-3) 1rem calc(var(--s-3) + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--kadappa) 96%, transparent);
  backdrop-filter: blur(8px);
}
.callbar .btn { flex: 1; text-align: center; }
@media (max-width: 780px) { .callbar { display: flex; } body { padding-bottom: 76px; } }

/* ---------------------------------------------------------------- crumbs */
.crumbs {
  font-size: var(--t-xs);
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: var(--s-5);
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- prose */
.prose { max-width: 68ch; }
.prose h2 { margin-top: var(--s-7); }
.prose h3 { margin-top: var(--s-6); }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 var(--s-4); }
.prose li { margin-bottom: var(--s-2); }
.prose > p:first-child { font-size: var(--t-md); }
