/* Ochieng & Co Ltd — static site styles */

:root {
  --ink: #0d2137;
  --ink-soft: #243b53;
  --muted: #486581;
  --paper: #eef3f6;
  --paper-deep: #d9e4ec;
  --line: #c5d4e0;
  --accent: #0f6e56;
  --accent-hover: #0a5a46;
  --white: #ffffff;
  --max: 68rem;
  --narrow: 38rem;
  --space: clamp(1.25rem, 4vw, 2.5rem);
  --font-display: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.85rem;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  border-radius: 2px;
}

.skip-link:focus {
  top: 1rem;
  color: var(--white);
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.wrap.narrow {
  width: min(100% - 2rem, var(--max));
}

.wrap.narrow > p,
.wrap.narrow > h2 {
  max-width: var(--narrow);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(238, 243, 246, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(197, 212, 224, 0.55);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
  padding-block: 0.65rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.wordmark:hover {
  color: var(--ink);
}

.wordmark .mark {
  flex-shrink: 0;
  color: var(--ink);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  font-size: 0.9375rem;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(78vh, 36rem);
  display: flex;
  align-items: center;
  padding: calc(var(--space) * 1.6) 0 calc(var(--space) * 1.8);
  color: var(--white);
  background: var(--ink);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 85% 15%, rgba(15, 110, 86, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 10% 90%, rgba(72, 101, 129, 0.35), transparent 50%),
    linear-gradient(165deg, #0a1a2b 0%, #12304a 48%, #0d2137 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 30%, transparent 95%);
}

.hero-inner {
  animation: rise 0.7s ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.brand-line {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3.35rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
}

.hero h1 {
  margin: 0 0 0.85rem;
  max-width: 22ch;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 400;
  line-height: 1.25;
  color: #d9e8f0;
}

.lede {
  margin: 0;
  max-width: 40ch;
  font-size: 1.125rem;
  color: #b8cddb;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.975rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

.btn-ghost {
  background: transparent;
  border-color: color-mix(in srgb, var(--white) 45%, transparent);
  color: var(--white);
}

.btn-ghost:hover {
  background: color-mix(in srgb, var(--white) 10%, transparent);
  color: var(--white);
  border-color: var(--white);
}

/* Sections */

.section {
  padding: calc(var(--space) * 1.55) 0;
}

.section h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.about {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--paper-deep) 55%, var(--paper)), var(--paper));
  border-block: 1px solid var(--line);
}

.about p {
  margin: 0;
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.companies h2 {
  margin-bottom: 1.5rem;
}

.company-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.company-list li {
  display: grid;
  gap: 0.35rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  animation: rise 0.6s ease-out both;
}

.company-list li:nth-child(1) { animation-delay: 0.05s; }
.company-list li:nth-child(2) { animation-delay: 0.12s; }
.company-list li:nth-child(3) { animation-delay: 0.19s; }

.company-list h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}

.company-list h3 a {
  color: var(--ink);
  text-decoration: none;
}

.company-list h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.company-list p {
  margin: 0;
  max-width: 42ch;
  color: var(--muted);
}

.contact {
  background: var(--ink);
  color: #d5e3ed;
}

.contact h2 {
  color: var(--white);
}

.email {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--white) 40%, transparent);
}

.email:hover {
  color: var(--white);
  border-bottom-color: var(--white);
}

/* Footer */

.site-footer {
  flex-shrink: 0;
  padding: 1.75rem 0 2.25rem;
  background: #081722;
  color: #8fa6b8;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0 0 0.5rem;
  max-width: 42rem;
}

.copyright {
  margin-top: 0.75rem !important;
  color: #6d8599;
}

/* 404 page */

.page-404 .hero {
  min-height: 60vh;
}

.page-404 .lede {
  margin-bottom: 0.25rem;
}

/* Mobile nav tweak */

@media (max-width: 540px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
    padding-block: 0.85rem;
  }

  .nav {
    width: 100%;
    padding-top: 0.15rem;
  }

  .brand-line {
    font-size: clamp(1.85rem, 9vw, 2.4rem);
  }
}

@media (min-width: 720px) {
  .company-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 0 1.5rem;
    border-top: none;
  }

  .company-list li {
    border-bottom: none;
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
  }
}
