/* ExamMaker Kenya: marketing landing page
   Brand tokens mirror frontend/src/index.css so this page reads as the
   same product, just public-facing. */

:root {
  --color-primary:       #185FA5;
  --color-primary-dark:  #0C447C;
  --color-primary-light: #E6F1FB;
  --color-success:       #3B6D11;

  --color-bg:            #F9FAFB;
  --color-surface:       #FFFFFF;
  --color-surface-alt:   #F3F4F6;
  --color-border:        #E5E7EB;

  --color-body:          #111827;
  --color-muted:         #6B7280;
  --color-faint:         #9CA3AF;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);
  --radius: 14px;
  --container-w: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-primary-light: #1B2D45;
    --color-bg:            #0F1117;
    --color-surface:       #1A1D27;
    --color-surface-alt:   #222535;
    --color-border:        #2E3147;
    --color-body:          #F1F2F6;
    --color-muted:         #9095A8;
    --color-faint:         #5C6070;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--color-body);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 800; letter-spacing: -0.02em; }
p { margin: 0; color: var(--color-muted); }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-ghost {
  background: transparent;
  color: var(--color-body);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover { background: var(--color-surface-alt); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--color-body);
  flex-shrink: 0;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
}
.nav-links a:not(.btn):hover { color: var(--color-primary); }
.nav-login { color: var(--color-muted); }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--color-body);
  margin: 0 auto;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 18px;
  max-width: 52ch;
  margin-bottom: 32px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-visual { justify-self: center; width: 100%; max-width: 380px; }

/* ── Section shells ──────────────────────────────────────── */
section.features, section.how { padding: 88px 0; }
.features h2, .how h2, .cta-band h2 {
  font-size: clamp(26px, 3.6vw, 34px);
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.section-sub {
  text-align: center;
  max-width: 560px;
  margin: 14px auto 0;
  font-size: 16px;
}

/* ── Feature grid ────────────────────────────────────────── */
.feature-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; color: var(--color-body); }
.feature-card p { font-size: 15px; }

/* ── How it works ────────────────────────────────────────── */
.how { background: var(--color-surface-alt); }
.steps {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.steps li { display: flex; flex-direction: column; gap: 14px; }
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps h3 { font-size: 16px; margin-bottom: 6px; color: var(--color-body); }
.steps p { font-size: 14.5px; }

/* ── CTA band ────────────────────────────────────────────── */
.cta-band { padding: 80px 0; }
.cta-inner {
  background: var(--color-primary);
  border-radius: 24px;
  padding: 56px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.cta-band h2 { color: #fff; }
.cta-band .btn-primary { background: #fff; color: var(--color-primary); }
.cta-band .btn-primary:hover { background: var(--color-primary-light); }

/* ── Footer ──────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--color-border); padding: 48px 0; }
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.footer-tagline { font-size: 14px; }
.footer-links { display: flex; gap: 20px; font-size: 14px; font-weight: 600; margin-top: 4px; }
.footer-links a:hover { color: var(--color-primary); }
.footer-copy { font-size: 13px; color: var(--color-faint); margin-top: 8px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--color-border); }
  .nav-links a.btn { margin-top: 12px; border-bottom: none; }

  .hero { padding: 48px 0 64px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { max-width: 300px; order: -1; }

  section.features, section.how { padding: 64px 0; }
  .feature-grid { grid-template-columns: 1fr; margin-top: 40px; }
  .steps { grid-template-columns: 1fr; margin-top: 40px; }

  .cta-inner { padding: 40px 24px; border-radius: 18px; }
}
