/* ═════════════════════════════════════════
   BASE: variables, reset, utilities, buttons
   ═════════════════════════════════════════ */

:root {
  /* rangi */
  --bg: #0b0b0c;
  --bg-2: #131315;
  --fg: #f2efe9;
  --muted: #8a8782;
  --line: rgba(242, 239, 233, 0.14);
  --accent: #c6ff3d; /* ya muda, tutaamua pamoja */

  /* mwendo */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* nafasi */
  --pad: clamp(20px, 5vw, 72px);

  /* fonts (sans na display ni za muda hadi tuchague) */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: var(--font-sans);
  --font-mono:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --title-weight: 700;
  --title-tracking: -0.04em;
}

/* ───── mpito laini kati ya pages ───── */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: 0.3s var(--ease) both vt-out;
}
::view-transition-new(root) {
  animation: 0.5s var(--ease) both vt-in;
}
@keyframes vt-out {
  to {
    opacity: 0;
  }
}
@keyframes vt-in {
  from {
    opacity: 0;
  }
}

/* ───── reset ───── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}
html.menu-open {
  overflow: hidden;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}
button {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
main:focus {
  outline: none;
}

/* ───── utilities ───── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -64px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
}

/* ───── buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: 99px;
  border: 1px solid var(--line);
  font-weight: 500;
  font-size: 15px;
  line-height: 1;
  transition:
    transform 0.4s var(--ease),
    border-color 0.3s;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.btn-ghost:hover {
  border-color: var(--fg);
}
.btn-small {
  padding: 11px 18px;
  font-size: 14px;
}

/* ───── reduced motion ───── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: 0.01ms !important;
  }
}
