/*!
 * Echo Rise Africa Ltd - echoriseafrica.tech
 * Hand-written stylesheet. Mobile-first. No frameworks, no external font or
 * script requests.
 *
 * Contents
 *  1. Design tokens        10. Call to action band
 *  2. Reset and base       11. Footer
 *  3. Typography           12. Forms
 *  4. Layout helpers       13. Long-form prose (legal pages)
 *  5. Header and nav       14. 404 page
 *  6. Buttons              15. Utilities and accessibility
 *  7. Hero and page hero   16. Larger screens
 *  8. Trust bar            17. Motion and print
 *  9. Cards and features
 */

/* ------------------------------------------------------------------ 1. Tokens */
:root {
  /* Brand */
  --navy-950: #04121f;
  --navy-900: #081d30;
  --navy-800: #0c2941;
  --navy-700: #14395a;
  --accent: #14a97e;
  --accent-dark: #0c7f5f;   /* AA-safe on white for text and buttons */
  --accent-darker: #096a4f;
  --accent-light: #5bd3ac;  /* AA-safe on navy for text */
  --accent-soft: #e8f6f1;

  /* Neutrals */
  --ink: #0c1a24;
  --text: #2a3b47;
  --muted: #5a6c79;
  --line: #e3e9ee;
  --surface: #ffffff;
  --surface-alt: #f5f8fa;

  /* Type scale */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md: clamp(1.125rem, 2.2vw, 1.3rem);
  --fs-lg: clamp(1.375rem, 3vw, 1.75rem);
  --fs-xl: clamp(1.75rem, 4.4vw, 2.5rem);
  --fs-2xl: clamp(2.125rem, 6vw, 3.5rem);

  /* Space */
  --space-2xs: 0.35rem;
  --space-xs: 0.6rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.25rem;
  --space-xl: 3.25rem;

  /* Shape */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1120px;
  --container-narrow: 760px;

  --shadow-sm: 0 1px 2px rgba(4, 18, 31, 0.07), 0 2px 6px rgba(4, 18, 31, 0.05);
  --shadow-md: 0 18px 40px -20px rgba(4, 18, 31, 0.35);
  --ring: 0 0 0 3px rgba(20, 169, 126, 0.4);
}

/* ------------------------------------------------------- 2. Reset and base */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }

ul, ol { padding: 0; list-style: none; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

button, input, textarea, select { font: inherit; color: inherit; }

/* ------------------------------------------------------------ 3. Typography */
h1, h2, h3 { color: var(--ink); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); line-height: 1.25; }
h4 { color: var(--ink); font-size: 1.0625rem; font-weight: 600; }

p { max-width: 68ch; }

.lede { color: var(--muted); font-size: var(--fs-md); max-width: 60ch; line-height: 1.6; }

.eyebrow {
  display: inline-block;
  margin-bottom: 0.6rem;
  color: var(--accent-dark);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ------------------------------------------------------ 4. Layout helpers */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section { padding-block: var(--space-xl); }
.section--tight { padding-block: var(--space-lg); }
.section--alt { background: var(--surface-alt); border-block: 1px solid var(--line); }
.section-head { margin-bottom: var(--space-lg); max-width: 68ch; }
.section-head > p { margin-top: 0.75rem; }

.grid { display: grid; gap: var(--space-md); }

.stack > * + * { margin-top: var(--space-sm); }

.text-center { text-align: center; }
.text-center p { margin-inline: auto; }

/* ------------------------------------------------------ 5. Header and nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }

.brand-mark { width: 34px; height: 34px; flex: 0 0 auto; }

.brand-text { display: flex; flex-direction: column; line-height: 1.05; font-size: 1.0625rem; }
.brand-text small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--navy-800); }

.nav-toggle-bars { position: relative; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: none;
  padding: 0.5rem 1.25rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.site-nav.is-open { display: block; }

.site-nav ul { display: flex; flex-direction: column; }

.site-nav a {
  display: block;
  padding: 0.7rem 0.15rem;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.site-nav li:last-child a { border-bottom: 0; }
.site-nav a:hover { color: var(--accent-dark); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent-dark); font-weight: 700; }

/* ------------------------------------------------------------- 6. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; }

.btn--primary { background: var(--accent-dark); color: #fff; }
.btn--primary:hover { background: var(--accent-darker); }

.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--navy-800); }

.btn--on-dark { background: #fff; color: var(--navy-900); }
.btn--on-dark:hover { background: var(--accent-soft); }

.btn--outline-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.btn--outline-dark:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }

.btn--block { width: 100%; }

.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn-row { margin-top: var(--space-lg); }

/* --------------------------------------------------- 7. Hero and page hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 9vw, 6rem);
  color: #fff;
  background:
    radial-gradient(115% 85% at 88% -12%, rgba(20, 169, 126, 0.3), transparent 62%),
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-800) 62%, var(--navy-900) 100%);
}

.hero > .container { position: relative; z-index: 1; }

/* Subtle grid lines: pure CSS, no image request. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 88%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 88%);
  pointer-events: none;
}

/* Abstract geometric accent: concentric rings, no photography. */
.hero::after {
  content: "";
  position: absolute;
  top: -26%;
  right: -22%;
  width: min(40rem, 118%);
  aspect-ratio: 1;
  border: 1px solid rgba(91, 211, 172, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 0 64px rgba(91, 211, 172, 0.05);
  pointer-events: none;
}

.hero h1 { color: #fff; max-width: 24ch; }
.hero .lede { color: #c6d6e2; max-width: 56ch; }
.hero .eyebrow { color: var(--accent-light); }
.hero-inner { max-width: 58rem; }

.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 7vw, 4.25rem);
  color: #fff;
  background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-800) 70%, var(--navy-900) 100%);
}
.page-hero > .container { position: relative; z-index: 1; }
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 92%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 92%);
  pointer-events: none;
}
.page-hero h1 { color: #fff; max-width: 26ch; }
.page-hero .lede { color: #c6d6e2; }
.page-hero .eyebrow { color: var(--accent-light); }

.breadcrumb { margin-bottom: 0.9rem; color: #9fb4c4; font-size: var(--fs-xs); }
.breadcrumb a { color: #c6d6e2; }
.breadcrumb a:hover { color: #fff; }

/* ------------------------------------------------------------ 8. Trust bar */
.trustbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.trustbar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  justify-content: center;
  padding-block: 0.95rem;
}
.trustbar li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.trustbar li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: var(--accent);
  border-radius: 50%;
}

/* --------------------------------------------------- 9. Cards and features */
.card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: var(--space-lg) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card:hover { border-color: #d2dce4; box-shadow: var(--shadow-md); }

.card-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.card h3 { margin-bottom: 0.15rem; }
.card-tagline { color: var(--accent-dark); font-size: var(--fs-sm); font-weight: 600; }
.card p { color: var(--text); }
.card-actions { margin-top: auto; padding-top: 0.85rem; }
.card-note { color: var(--muted); font-size: var(--fs-xs); }

.product-panel {
  padding: var(--space-lg) var(--space-md);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.feature { display: flex; gap: 1rem; }
.feature-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.feature h3 { font-size: 1.0625rem; margin-bottom: 0.25rem; }
.feature p { color: var(--muted); font-size: var(--fs-sm); max-width: 46ch; }

/* Checked feature list used on the products page. */
.checks { display: grid; gap: 0.6rem; }
.checks li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  color: var(--text);
  font-size: var(--fs-sm);
}
.checks li svg { flex: 0 0 auto; margin-top: 0.2rem; color: var(--accent-dark); }

.split-list { display: grid; gap: var(--space-md); }
.split-list h3 { font-size: 1.0625rem; }
.split-list p { color: var(--muted); font-size: var(--fs-sm); }

/* --------------------------------------------------- 10. Call to action band */
.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(1.75rem, 5vw, 3rem);
  color: #fff;
  background: linear-gradient(150deg, var(--navy-950) 0%, var(--navy-800) 100%);
  border-radius: var(--radius-lg);
}
.cta > * { position: relative; z-index: 1; }
.cta::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -60%;
  width: min(26rem, 90%);
  aspect-ratio: 1;
  border: 1px solid rgba(91, 211, 172, 0.2);
  border-radius: 50%;
  pointer-events: none;
}
.cta h2 { color: #fff; max-width: 24ch; }
.cta p { color: #c6d6e2; max-width: 58ch; }
.cta .btn-group { margin-top: var(--space-md); }

/* ------------------------------------------------------------- 11. Footer */
.site-footer {
  padding-block: var(--space-xl) var(--space-md);
  background: var(--navy-950);
  color: #b9c9d6;
  font-size: var(--fs-sm);
}
.site-footer a { color: #d7e3ec; }
.site-footer a:hover { color: var(--accent-light); }
.site-footer .brand { color: #fff; }
.site-footer .brand-text small { color: #8fa6b7; }
.site-footer .brand-mark { --accent: #5bd3ac; }

.footer-grid { display: grid; gap: var(--space-lg); }

.footer-heading {
  margin-bottom: 0.85rem;
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-list { display: grid; gap: 0.55rem; }
.footer-brand p { margin-top: 0.9rem; max-width: 34ch; color: #9fb4c4; }
.footer-brand .footer-list { margin-top: 0.9rem; }
.footer-note { margin-top: 0.9rem; color: #8fa6b7; font-size: var(--fs-xs); max-width: 34ch; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  justify-content: space-between;
  margin-top: var(--space-lg);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #8fa6b7;
  font-size: var(--fs-xs);
}

/* -------------------------------------------------------------- 12. Forms */
.form { display: grid; gap: 1.1rem; }

.field { display: grid; gap: 0.4rem; }
.field label { color: var(--ink); font-size: var(--fs-sm); font-weight: 600; }
.field .hint { color: var(--muted); font-size: var(--fs-xs); }
.field .req { color: var(--accent-dark); }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #ccd7de;
  border-radius: 10px;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
  border-color: var(--accent-dark);
  box-shadow: var(--ring);
  outline: none;
}
textarea { min-height: 9rem; resize: vertical; }

.field-error { color: #a51d24; font-size: var(--fs-xs); font-weight: 600; }
.field-error:empty { display: none; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #a51d24; }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.form-actions .hint { color: var(--muted); font-size: var(--fs-xs); }

.notice {
  padding: 0.95rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: var(--fs-sm);
}
.notice--success { background: var(--accent-soft); border-color: #b9e2d5; color: #0a5b43; }
.notice--error { background: #fdf3f3; border-color: #f0c9c9; color: #8c1d22; }
.notice[hidden] { display: none; }

.contact-panel {
  padding: var(--space-lg) var(--space-md);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

/* ------------------------------------------- 13. Long-form prose (legal pages) */
.prose { max-width: var(--container-narrow); }
.prose h2 { font-size: var(--fs-lg); margin-top: var(--space-lg); margin-bottom: 0.6rem; }
.prose h3 { font-size: 1.125rem; margin-top: var(--space-md); margin-bottom: 0.35rem; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p { margin-bottom: 0.95rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--accent-dark); }
.prose a { text-decoration: underline; }
.prose a:hover { color: var(--accent-darker); }
.prose strong { color: var(--ink); }

.updated { color: var(--muted); font-size: var(--fs-sm); }

.toc {
  margin-bottom: var(--space-lg);
  padding: 1.25rem 1.4rem;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.toc h2 { margin-bottom: 0.5rem; font-size: 1.0625rem; }
.toc ol { margin: 0; padding-left: 1.25rem; list-style: decimal; }
.toc li { margin-bottom: 0.35rem; font-size: var(--fs-sm); }
.toc li::marker { color: var(--accent-dark); }

/* ----------------------------------------------------------- 14. 404 page */
.error-page {
  display: grid;
  gap: var(--space-sm);
  place-items: center;
  min-height: 58vh;
  padding-block: 4rem;
  text-align: center;
}
.error-code {
  color: var(--accent-dark);
  font-size: clamp(3.25rem, 14vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.error-page p { margin-inline: auto; color: var(--muted); }
.error-page .btn-group { justify-content: center; margin-top: var(--space-sm); }

/* ------------------------------------ 15. Utilities and accessibility helpers */
.skip-link {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 100;
  padding: 0.75rem 1rem;
  color: var(--ink);
  background: var(--surface);
  border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.external-mark { display: inline-block; margin-left: 0.3rem; color: currentColor; opacity: 0.75; }

/* ------------------------------------------------------ 16. Larger screens */
@media (min-width: 760px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: var(--space-lg) var(--space-lg); }
  .product-panel { padding: var(--space-lg); }
  .contact-panel { padding: var(--space-lg); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    display: block;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .site-nav ul { flex-direction: row; align-items: center; gap: 1.9rem; }
  .site-nav li:last-child a { border-bottom: 0; }
  .site-nav a { padding: 0.35rem 0; border-bottom: 0; }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-xl); align-items: start; }
  .split-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-inner { max-width: 60rem; }
}

/* --------------------------------------------------- 17. Motion and print */
@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;
  }
}

/* Panel title and fact list used on the About page */
.panel-title { font-size: 1.0625rem; margin-bottom: 1rem; }

.facts { display: grid; gap: 0.9rem; margin: 0; }
.facts > div { display: grid; gap: 0.15rem; }
.facts dt {
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.facts dd { margin: 0; color: var(--ink); font-size: var(--fs-sm); font-weight: 500; }

@media (min-width: 620px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.75rem; }
}

/* Key-feature list heading used on the products page */
.checks-title { margin: 1.7rem 0 0.8rem; font-size: 1.0625rem; }
.checks { margin-bottom: 0.25rem; }

/* Small print under the contact form */
.form-note { margin-top: 1.1rem; color: var(--muted); font-size: var(--fs-xs); max-width: 54ch; }

/* Single-column variant of the fact list (product panels) */
.facts--single { grid-template-columns: 1fr; }

@media print {
  .site-header, .site-footer, .nav-toggle, .skip-link, .cta .btn-group { display: none; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
  .hero, .page-hero { color: #000; background: none; }
  .hero h1, .page-hero h1, .hero .lede, .page-hero .lede { color: #000; }
}
