/* ============================================================
   Mwanga - marketing site v2 (redesign)
   Structure: hero (big logo + tagline) -> Who we are -> Contact
   Palette: Ink #1A1714 / Gold #CE9A3C / Light #D8A845 / Paper #FBF8F2
   Type: Inter for ALL text (via Google Fonts). The only Fraunces on the
         page is the logo wordmark, which is outlined to paths in the SVGs.
   Accent lock: gold is the only accent. No gradients, no stock-template feel.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --ink: #1a1714;
  --ink-surface: #221e19;
  --ink-deep: #141009;
  --gold: #ce9a3c;
  --gold-light: #d8a845;
  --gold-deep: #b9852c;        /* bright accent + large display text */
  --gold-text: #8a6217;        /* small gold text on paper, WCAG AA (>=5:1) */
  --gold-tint: #f5e7c9;
  --paper: #fbf8f2;
  --paper-deep: #eae2d3;
  --paper-warm: #f4efe6;
  --cream: #f4efe6;

  --text: #3a332b;            /* body on paper */
  --muted: #6b6157;           /* secondary on paper */
  --line: #e2d9c8;            /* hairline on paper */
  --cream-muted: #c3b9ad;     /* secondary on ink (AA on ink) */
  --line-dark: rgba(244, 239, 230, 0.16);

  /* Inter for everything. Logo wordmark = Fraunces, but that lives inside the SVG. */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(26, 23, 20, 0.05), 0 4px 14px rgba(26, 23, 20, 0.05);
  --shadow-md: 0 6px 18px rgba(26, 23, 20, 0.08), 0 24px 60px rgba(26, 23, 20, 0.1);

  --container: 1100px;
  --pad-x: clamp(1.25rem, 5vw, 2.5rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --header-h: 72px;

  --step-h2: clamp(2rem, 1.4rem + 2.6vw, 3.1rem);
  --step-lead: clamp(1.1rem, 1.02rem + 0.5vw, 1.32rem);
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-sans);
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 700; color: inherit; }

::selection {
  background: rgba(206, 154, 60, 0.28);
  color: var(--ink);
}

:focus-visible {
  outline: 2.5px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.7rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  background: var(--btn-bg);
  color: var(--btn-fg);
  transition: transform 0.18s ease, background-color 0.2s ease,
    color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0) scale(0.985); }

.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-deep); }

.btn-ghost-light {
  background: transparent;
  color: var(--cream);
  border-color: rgba(244, 239, 230, 0.45);
}
.btn-ghost-light:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 242, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(26, 23, 20, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { height: 30px; width: auto; }

.nav { display: flex; align-items: center; }
.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2.4vw, 2.1rem);
}
.nav-menu a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.96rem;
  color: var(--ink);
  opacity: 0.82;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.nav-menu a:hover { opacity: 1; color: var(--gold-text); }
.nav-menu .nav-cta {
  padding: 0.6rem 1.15rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-pill);
  opacity: 1;
  font-weight: 600;
}
.nav-menu .nav-cta:hover { background: #2c2620; color: var(--paper); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  margin-inline: auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* ---------- Shared bits ---------- */
section { scroll-margin-top: calc(var(--header-h) + 14px); }
.eyebrow {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1A1714;
  margin: 0 0 1.25rem;
}
.eyebrow-light { color: #CE9A3C; }

/* ---------- Hero (big centered logo + tagline) ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: clamp(3rem, 10vh, 7rem) clamp(5rem, 12vh, 8rem);
  overflow: hidden;
}
/* very soft warm radial behind the logo - flat colors, no gradient banding feel */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 55% at 50% 42%, var(--paper-warm) 0%, var(--paper) 70%);
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-logo {
  margin: 0 auto;
  line-height: 1;
  width: clamp(20rem, 70vw, 48rem);
}
.hero-logo img {
  width: 100%;
  height: auto;
  display: block;
}
.hero-tagline {
  width: clamp(20rem, 70vw, 48rem);
  margin: clamp(1rem, 2.5vw, 1.75rem) auto 0;
}
.hero-tagline svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.hero-sub {
  margin-top: 0.9rem;
  font-size: var(--step-lead);
  color: var(--muted);
  max-width: 32rem;
}
/* Always-visible (NOT .reveal) one-line purpose statement for the hero — also satisfies
   Google's OAuth homepage check that the app's purpose is stated plainly up front. */
.hero-purpose {
  margin-top: clamp(1rem, 2.5vw, 1.6rem);
  max-width: 40rem;
  font-size: var(--step-lead);
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(1.5rem, 4vh, 2.75rem);
  width: max-content;
  margin-inline: auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--muted);
}
.scroll-cue-text {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.scroll-cue-arrow {
  display: block;
  animation: cue-bob 1.8s ease-in-out infinite;
}
.scroll-cue:hover { color: var(--ink); }
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); opacity: 0.65; }
  50%      { transform: translateY(4px); opacity: 1; }
}

/* ---------- Who we are ---------- */
.who { padding-block: var(--section-y); }
.who-inner { max-width: 52rem; margin-inline: auto; }
.who-title {
  font-size: var(--step-h2);
  font-weight: 700;
}
.who-title em { font-style: italic; color: var(--gold-deep); }
.who-body {
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.who-body p {
  font-size: 1.12rem;
  color: var(--text);
  max-width: 46rem;
}
.who-lead {
  font-size: var(--step-lead) !important;
  color: var(--ink) !important;
  font-weight: 500;
}

/* ---------- Contact (dark band) ---------- */
.contact {
  background: var(--ink);
  color: var(--cream);
  padding-block: clamp(5rem, 10vw, 8rem);
}
.contact-inner { max-width: 44rem; margin-inline: auto; text-align: center; }
.contact-title { font-size: var(--step-h2); color: var(--cream); font-weight: 700; }
.contact-lead {
  font-size: var(--step-lead);
  color: var(--cream-muted);
  margin-top: 1.25rem;
  margin-inline: auto;
  max-width: 38rem;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 2.5rem;
}
.contact-meta { margin-top: 1.9rem; font-size: 0.95rem; color: var(--cream-muted); }
.contact-meta strong { color: var(--cream); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-deep);
  color: var(--cream);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}
.footer-logo { height: 46px; width: auto; margin-bottom: 1.1rem; }
.footer-tagline {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--cream);
  max-width: 22rem;
}
.footer-nav { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-nav a { text-decoration: none; color: var(--cream-muted); font-size: 0.95rem; transition: color 0.2s ease; }
.footer-nav a:hover { color: var(--gold-light); }
.footer-contact a { color: var(--cream); text-decoration: none; font-weight: 600; transition: color 0.2s ease; }
.footer-contact a:hover { color: var(--gold-light); }
.footer-legal { margin-top: 1.1rem; font-size: 0.8rem; color: var(--cream-muted); line-height: 1.6; }
.footer-legal-links { margin-top: 0.45rem; white-space: nowrap; }
.footer-legal-links a { color: var(--cream-muted); font-weight: 400; text-decoration: none; }
.footer-legal-links a:hover { color: var(--gold-light); }

/* ---------- Legal pages (privacy / terms / cookies) ---------- */
.legal-page { padding-block: clamp(2.25rem, 5vw, 3.75rem) var(--section-y); }
.legal-container { max-width: 760px; }
.legal-eyebrow { color: var(--gold-text); margin-bottom: 0.7rem; }
.legal-title { font-size: var(--step-h2); font-weight: 700; }
.legal-meta { margin-top: 0.55rem; color: var(--muted); font-size: 0.95rem; }
.legal-body { margin-top: clamp(1.6rem, 4vw, 2.4rem); }
.legal-body h2 { font-size: 1.28rem; font-weight: 700; letter-spacing: -0.01em; margin: 2.1rem 0 0.65rem; }
.legal-body h3 { font-size: 1.06rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.legal-body p { margin: 0 0 1rem; color: var(--text); }
.legal-body ul { margin: 0 0 1rem; padding-left: 1.3rem; list-style: disc; }
.legal-body li { margin: 0 0 0.55rem; }
.legal-body li::marker { color: var(--gold-deep); }
.legal-body a { color: var(--gold-text); text-decoration: underline; text-underline-offset: 2px; }
.legal-body a:hover { color: var(--gold-deep); }
.legal-body strong { color: var(--ink); }

/* ---------- Reveal animation ---------- */
/* Progressive enhancement: content is fully visible by default, so no-JS agents and
   crawlers (incl. Google's OAuth homepage check) can read all of it. The fade-in only
   applies once the inline <head> script marks <html class="js">. */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
html.js .reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  :root { --header-h: 62px; }

  /* Mobile nav */
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 0.5rem var(--pad-x) 1.1rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-menu a { padding: 0.9rem 0.25rem; font-size: 1.05rem; opacity: 1; border-bottom: 1px solid var(--line); }
  .nav-menu li:last-child a { border-bottom: 0; }
  .nav-menu .nav-cta {
    margin-top: 0.9rem;
    padding: 0.9rem 1.05rem;
    text-align: center;
    justify-content: center;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child { transform: translateY(-3.5px) rotate(-45deg); }

  .who-body p { font-size: 1.08rem; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .hero { min-height: calc(100svh - var(--header-h)); }
  .hero-logo, .hero-tagline { width: min(88vw, 30rem); }
  .contact-actions .btn { flex: 1 1 auto; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  .scroll-cue-arrow { animation: none; }
  .btn:hover { transform: none; }
}
