/* Base reset & element defaults — masaimarasafari.co.ke */

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

* {
  margin: 0;
}

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

@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;
    scroll-behavior: auto !important;
  }
}

body {
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  background-color: var(--color-surface-alt);
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: inherit;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-primary-strong);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-4xl);
}

h2 {
  font-size: var(--fs-2xl);
}

h3 {
  font-size: var(--fs-xl);
}

h4 {
  font-size: var(--fs-lg);
}

p {
  text-wrap: pretty;
}

small {
  font-size: var(--fs-sm);
}

/* ---- Focus visibility ---- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---- Selection ---- */
::selection {
  background: var(--color-accent-tint);
  color: var(--color-primary-strong);
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -100px;
  z-index: var(--z-skip-link);
  background: var(--color-primary-strong);
  color: var(--color-text-on-dark);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transition: top var(--duration-base) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-sm);
}

/* ---- Visually hidden (still available to assistive tech) ---- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Prose (long-form editorial content) ---- */
.prose {
  max-width: var(--container-prose);
}

.prose > * + * {
  margin-top: var(--space-md);
}

.prose h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-2xs);
}

.prose h3 {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-2xs);
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: var(--space-2xs);
}

.prose a {
  color: var(--color-primary);
  text-decoration-color: var(--color-border);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: currentColor;
}

.prose strong {
  font-weight: var(--fw-semibold);
}
