/* ============================================================
   Joolr — joolr.africa landing page
   Design tokens follow the Tailwind scale (spacing, neutral
   palette) so a future Next.js/Tailwind port is 1:1.
   ============================================================ */

:root {
  /* Palette: stark white, deep charcoal, one jewel accent */
  --white: #ffffff;
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-800: #262626;
  --neutral-900: #171717;
  --neutral-950: #0a0a0a;

  --jewel: #9f59a1;          /* amethyst — from the Joolr logo */
  --jewel-dark: #7e3f80;
  --cyan: #5fc9eb;           /* logo gradient partner — dark sections only */

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Tailwind-equivalent rhythm */
  --space-section: clamp(6rem, 10vw, 8rem);   /* py-24 → py-32 */
  --container: 72rem;                          /* max-w-6xl */
  --radius: 1rem;                              /* rounded-2xl */
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 4.5rem; }   /* clear the sticky header on anchor jumps */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

body {
  font-family: var(--font);
  color: var(--neutral-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;   /* px-6 */
}
.center { text-align: center; }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.035em;          /* tracking-tighter */
  line-height: 1.05;
  text-wrap: balance;                /* text-balance */
  color: var(--neutral-950);
}

h1 { font-size: clamp(2.75rem, 7vw, 5.25rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.3; }

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--jewel);
  margin-bottom: 1rem;
}
.eyebrow-accent { color: var(--cyan); }

.lede, .section-lede {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--neutral-600);
  max-width: 38rem;
  text-wrap: pretty;
  margin-top: 1.5rem;
}

.microcopy {
  font-size: 0.875rem;
  color: var(--neutral-500);
  margin-top: 1rem;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.875rem 1.625rem;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn .arrow { transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--neutral-950);
  color: var(--white);
}
.btn-primary:hover { background: var(--neutral-800); }

.btn-accent {
  background: var(--jewel);
  color: var(--white);
}
.btn-accent:hover { background: var(--jewel-dark); box-shadow: 0 4px 20px rgb(159 89 161 / 0.45); }

.btn-lg { padding: 1.0625rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.625rem 1.25rem; font-size: 0.875rem; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--neutral-900);
  text-decoration: none;
  padding: 1.0625rem 0.5rem;
}
.text-link .arrow { transition: transform 0.15s ease; }
.text-link:hover .arrow { transform: translateX(3px); }
.text-link:hover { color: var(--jewel-dark); }

/* ---------- Section 1: Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}
/* backdrop-blur-md translucency once the page scrolls */
.site-header.scrolled {
  background: rgb(255 255 255 / 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--neutral-100);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;   /* logo | centered links | CTA */
  align-items: center;
  height: 4.25rem;
}
.logo { height: 2.375rem; width: auto; }
.logo-link { display: inline-flex; justify-self: start; }
.header-cta { justify-self: end; }

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.25rem;
}
.main-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--neutral-600);
  text-decoration: none;
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--neutral-950); }

.nav-toggle { display: none; }

@media (max-width: 800px) {
  .header-inner { grid-template-columns: auto 1fr auto auto; gap: 1rem; }
  .header-cta .btn { padding: 0.5rem 1rem; font-size: 0.8125rem; }

  .nav-toggle {
    display: grid;
    gap: 6px;
    background: none;
    border: 0;
    padding: 0.5rem;
    cursor: pointer;
    justify-self: end;
    grid-column: 4;
  }
  .nav-toggle span {
    width: 22px; height: 2px;
    background: var(--neutral-950);
    border-radius: 2px;
    transition: transform 0.2s ease;
  }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-4px) rotate(-45deg); }

  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--neutral-100);
    padding: 0.5rem 1.5rem 1rem;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 0.875rem 0; border-bottom: 1px solid var(--neutral-100); }
  .main-nav a:last-child { border-bottom: 0; }
}

/* ---------- Section 2: Hero ---------- */
.hero {
  /* Massive negative space; solid white — no background imagery */
  padding-block: clamp(7rem, 14vw, 11rem);
  text-align: center;
}
.hero-inner { display: grid; justify-items: center; }
.hero .lede { margin-inline: auto; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.75rem;
  justify-content: center;
}

/* ---------- Sections ---------- */
.section { padding-block: var(--space-section); }

.section-dark {
  background: var(--neutral-900);
  color: var(--neutral-400);
}
.section-dark h2 { color: var(--white); }
.section-dark .section-lede { color: var(--neutral-400); }
.section-dark .microcopy { color: var(--neutral-500); }

/* ---------- Section 3: Core capabilities ---------- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;                       /* grid-cols-1 */
  gap: 1rem;
  margin-top: 3.5rem;
}
@media (min-width: 700px)  { .card-grid { grid-template-columns: repeat(2, 1fr); } } /* md:grid-cols-2 */
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(4, 1fr); } } /* lg:grid-cols-4 */

.card {
  /* Flat, clean: subtle border, p-8, no drop shadows */
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.2s ease;
}
.card:hover { border-color: var(--neutral-400); }
.card-icon {
  width: 2.5rem; height: 2.5rem;
  display: grid; place-items: center;
  color: var(--jewel);
  margin-bottom: 1.5rem;
}
.card-icon svg { width: 1.5rem; height: 1.5rem; }
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.9375rem; color: var(--neutral-600); }

/* ---------- Section 4: ROAS calculator ---------- */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .calc-grid { grid-template-columns: 1.05fr 0.95fr; gap: 5rem; }
}

.check-list {
  list-style: none;
  margin-top: 1.75rem;
  display: grid;
  gap: 0.875rem;
}
.check-list li {
  position: relative;
  padding-left: 1.875rem;
  color: var(--neutral-200);
  font-size: 1rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.3125rem;
  width: 1.125rem; height: 1.125rem;
  border-radius: 999px;
  background: var(--jewel) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>') center / 0.625rem no-repeat;
}
.calc-ctas { margin-top: 2.25rem; }
.calc-ctas .microcopy { margin-top: 0.875rem; }

/* Widget */
.calc-widget {
  background: var(--neutral-950);
  border: 1px solid var(--neutral-800);
  border-radius: var(--radius);
  padding: 2rem;
}
.widget-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neutral-500);
  margin-bottom: 1.75rem;
}
.slider-row { margin-bottom: 1.75rem; }
.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}
.slider-head label { font-size: 0.9375rem; font-weight: 500; color: var(--neutral-200); }
.slider-head output { font-size: 0.9375rem; font-weight: 700; color: var(--cyan); font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--neutral-800);
  outline-offset: 4px;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--white);
  border: 3px solid var(--jewel);
  transition: transform 0.1s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.12); }
input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--white);
  border: 3px solid var(--jewel);
}
input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 999px; background: var(--neutral-800);
}

.widget-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-top: 1px solid var(--neutral-800);
  padding-top: 1.5rem;
  margin-top: 0.25rem;
}
.result-item { display: grid; gap: 0.25rem; }
.result-label { font-size: 0.8125rem; color: var(--neutral-500); }
.result-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.widget-note {
  font-size: 0.8125rem;
  color: var(--neutral-500);
  margin-top: 1.25rem;
  text-wrap: pretty;
}
.widget-link {
  display: inline-block;
  margin-top: 0.875rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
}
.widget-link:hover { text-decoration: underline; }

/* ---------- Section 5: Methodology ---------- */
.timeline {
  list-style: none;
  margin-top: 4rem;
  display: grid;
  gap: clamp(3rem, 6vw, 5rem);
}
.timeline-step {
  position: relative;
  max-width: 30rem;
}
/* Staggered rhythm on wider screens */
@media (min-width: 800px) {
  .timeline-step-offset { margin-left: 40%; }
}
.ghost-num {
  /* text-8xl text-neutral-100 font-bold, absolutely positioned behind */
  position: absolute;
  top: 50%;
  left: -0.06em;
  transform: translateY(-58%);
  font-size: clamp(6rem, 14vw, 9rem);   /* ~text-8xl+ */
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--neutral-100);
  z-index: 0;
  user-select: none;
  pointer-events: none;
}
.timeline-body {
  position: relative;
  z-index: 1;
  padding-left: clamp(2.5rem, 6vw, 4rem);
  text-align: left;
}
.timeline-body h3 { margin-bottom: 0.625rem; font-size: 1.375rem; }
.timeline-body p { color: var(--neutral-600); max-width: 26rem; }

/* ---------- Section 6: Why us ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 800px) {
  .why-grid { grid-template-columns: 1fr 1fr; gap: 5rem; }
}
.why-body {
  font-size: clamp(1.0625rem, 1.8vw, 1.1875rem);
  color: var(--neutral-400);
  text-wrap: pretty;
  /* Align optically with the headline's first line */
  padding-top: 0.375rem;
}

/* ---------- Section 7: Final CTA ---------- */
.section-kicker {
  padding-block: clamp(7rem, 12vw, 10rem);  /* py-32 */
}
.section-kicker h2 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.section-kicker .hero-ctas { margin-top: 2.5rem; }

/* ---------- Section 8: Footer ---------- */
.site-footer {
  background: var(--neutral-950);
  color: var(--neutral-400);
  padding-block: 4rem 3rem;
  font-size: 0.875rem;                 /* text-sm */
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-brand p { margin-top: 1.25rem; max-width: 16rem; }
.footer-col { display: grid; gap: 0.75rem; align-content: start; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.375rem;
}
.footer-col a {
  text-decoration: none;
  color: var(--neutral-400);
  transition: color 0.15s ease;
  width: fit-content;
}
.footer-col a:hover { color: var(--white); }

.social-row { display: flex; gap: 0.875rem; }
.social-row a {
  display: grid;
  place-items: center;
  width: 2.25rem; height: 2.25rem;
  border: 1px solid var(--neutral-800);
  border-radius: 999px;
  color: var(--neutral-400);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.social-row a:hover { color: var(--white); border-color: var(--neutral-600); }
.social-row svg { width: 1rem; height: 1rem; }

.footer-legal { margin-top: 0.75rem; color: var(--neutral-500); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }
