/* ==========================================================================
   Ousmane Diallo — Affiliate Lead Generation
   Dark, typographic, minimal. Inspired by osmo.supply.
   ========================================================================== */

/* ---- Fonts (self-hosted, SIL Open Font License) ---- */
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/inter-tight-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/inter-tight-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fragment Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/fragment-mono-latin.woff2") format("woff2");
}

/* ---- Tokens ---- */
:root {
  color-scheme: dark;
  --bg: #151313;            /* page */
  --band: #201d1d;          /* nav bar, pricing band */
  --surface: #2a2727;       /* tags, chips, pill buttons, cards */
  --surface-hover: #393636;
  --line: #363232;          /* hairlines */
  --muted: #8f8c8c;         /* labels, secondary text */
  --soft: #b8b8b8;          /* body copy on the band */
  --ink: #f4f4f4;           /* primary text */
  --white: #ffffff;
  --black: #151313;
  --purple: #6840ff;

  --sans: "Inter Tight", Arial, Helvetica, sans-serif;
  --mono: "Fragment Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: 1.25rem;
  --section: 5rem;
  --radius: 0.5rem;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --appear-y: 1.25rem;      /* travel of the appear animations */
}

@media (min-width: 768px) {
  :root {
    --gutter: 1.875rem;
    --section: 7.5rem;
  }
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 450;
  line-height: 1.4;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 500; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }
::selection { background: var(--purple); color: var(--white); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

main { flex: 1; }

.container {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 62rem; }

/* Mono tag, e.g. [ ENGAGEMENT ] */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.4rem;
  border-radius: 0.1875rem;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}
.tag--dark { background: var(--surface-hover); color: var(--ink); }
.tag--glass { background: rgb(255 255 255 / 0.16); color: var(--white); }
.tag__dot { width: 0.4375rem; height: 0.4375rem; border-radius: 50%; background: #3ccf4e; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.125rem;
  border-radius: 0.125rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.btn--primary { background: var(--white); color: var(--black); }
.btn--primary:hover { background: #dcdcdc; }
.btn--pill { border-radius: 3rem; background: var(--surface); color: var(--ink); }
.btn--pill:hover { background: var(--surface-hover); }
.btn svg { width: 1rem; height: 1rem; }

/* ---- Nav ---- */
.nav {
  position: fixed;
  inset-inline: 0;
  top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
  z-index: 50;
  padding-inline: 0.75rem;
}
.nav__bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;              /* the bar hugs its content: links, logo, contact */
  width: fit-content;
  max-width: 100%;
  height: 3.375rem;
  margin-inline: auto;
  padding: 0.375rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.3125rem;
  background: var(--band);
  color: var(--ink);
}
.nav__links { display: flex; gap: 0.875rem; font-size: 0.875rem; white-space: nowrap; }
.nav__links a { color: var(--soft); transition: color 0.2s; }
.nav__links a:hover { color: var(--white); }
.nav__brand { order: -1; display: flex; color: var(--white); }
.nav__brand .logo { width: auto; height: 0.6875rem; }   /* = cap height of the nav links */
.nav__cta { display: none; height: 2.625rem; }

/* The link of the view on screen. */
body:has(#services:target) .nav__links a[href$="#services"],
body:has(#how-it-works:target) .nav__links a[href$="#how-it-works"],
body:has(#pricing:target) .nav__links a[href$="#pricing"],
body:has(#contact:target) .nav__links a[href$="#contact"] { color: var(--white); }

@media (max-width: 380px) {
  .nav__bar { gap: 1rem; }
  .nav__links { gap: 0.625rem; font-size: 0.8125rem; }
}
@media (min-width: 640px) {
  .nav { top: calc(env(safe-area-inset-top, 0px) + 1.25rem); }
  .nav__bar { gap: 2rem; padding-right: 0.375rem; }
  .nav__links { gap: 1.25rem; font-size: 0.9375rem; }
  .nav__contact { display: none; }
  .nav__brand { order: 0; }
  .nav__cta { display: inline-flex; }
}

/* ---- One screen: the home page never scrolls; views swap in place (CSS :target) ---- */
.screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.stage { display: flex; flex-direction: column; min-height: 0; }
.view {
  position: relative;
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;       /* only kicks in on very small screens */
  padding: 5rem var(--gutter) 0.75rem;
}
.view:target,
.stage:not(:has(.view:target)) .view--home { display: flex; }
.view__inner { width: 100%; max-width: 56rem; margin: auto; }
@media (min-width: 640px) { .view { padding-top: 6rem; } }

/* ---- Home view ---- */
.hero { position: relative; text-align: center; }
.hero__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 0.18em;
  margin-top: clamp(1.25rem, 4dvh, 2.5rem);
  font-size: clamp(2.75rem, min(10vw, 15dvh), 8.75rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 500;
}
.hero__title span { white-space: nowrap; }
.asterisk {
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  color: var(--purple);
}
.asterisk svg { width: 100%; height: 100%; }
.hero__lede {
  max-width: 36rem;
  margin: clamp(1.25rem, 4dvh, 2.5rem) auto 0;
  font-size: clamp(1.0625rem, 2.6dvh, 1.25rem);
  line-height: 1.75;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.chip {
  padding: 0.1em 0.35em 0.15em;
  border-radius: 0.3125rem;
  background: var(--surface);
  white-space: nowrap;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: clamp(1.25rem, 4dvh, 2.5rem);
}

@media (min-width: 900px) {
  .hero__title { column-gap: 0.22em; }
}

/* ---- Section heads ---- */
.section__head { text-align: center; }
.section__head h2 {
  margin-top: 1rem;
  font-size: clamp(1.75rem, min(5.4vw, 6.5dvh), 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.section__head p {
  max-width: 38rem;
  margin: 0.875rem auto 0;
  color: var(--soft);
  font-size: clamp(0.9375rem, 2.2dvh, 1.0625rem);
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---- Cards (services, pricing) ---- */
.cards {
  display: grid;
  gap: 0.75rem;
  max-width: 50rem;
  margin: clamp(1.25rem, 4dvh, 2.5rem) auto 0;
}
@media (min-width: 600px) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.125rem, 3dvh, 2rem);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
.card--outline { border: 1px solid var(--line); background: var(--band); }
.card--purple { background: var(--purple); color: var(--white); }
.card h3 {
  margin-top: clamp(0.75rem, 3dvh, 2rem);
  font-size: clamp(1.5rem, min(5vw, 4.5dvh), 2.25rem);
  line-height: 1;
  letter-spacing: -0.05em;
}
.card__price { margin-top: clamp(0.5rem, 1.8dvh, 1.25rem); font-size: clamp(1.25rem, 3.4dvh, 1.75rem); letter-spacing: -0.04em; }
.card__price small { font-size: inherit; opacity: 0.55; }
.card__text {
  flex: 1;
  margin-top: 0.5rem;
  color: var(--soft);
  font-size: clamp(0.875rem, 2dvh, 1rem);
  line-height: 1.45;
  text-wrap: pretty;
}
.card--purple .card__text { color: rgb(255 255 255 / 0.8); }
.card__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1rem;
  margin-top: clamp(0.75rem, 2.4dvh, 1.5rem);
  padding-top: clamp(0.75rem, 2.4dvh, 1.5rem);
  border-top: 1px solid rgb(255 255 255 / 0.1);
  font-size: clamp(0.8125rem, 1.9dvh, 0.9375rem);
}
.card--purple .card__list { border-color: rgb(255 255 255 / 0.25); }
.card__list li { display: flex; gap: 0.5rem; align-items: baseline; }
.card__list li::before {
  content: "";
  flex-shrink: 0;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 0.125rem;
  background: var(--purple);
  transform: translateY(-0.05rem);
}
.card--purple .card__list li::before { background: var(--white); }

/* Phones: drop what the screen already says (the active nav link names the view, card titles name the plan). */
@media (max-width: 599px) {
  .nav__bar { height: 2.875rem; }
  .view { padding-top: 4.375rem; }
  .section__head .tag,
  .card > div:first-child { display: none; }
  .section__head h2,
  .card h3 { margin-top: 0; }
  .section__head p { margin-top: 0.625rem; }
  .cards { gap: 0.5rem; margin-top: 1rem; }
  .card { padding: 1rem; }
  .card h3 { font-size: 1.375rem; }
  .card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 0.75rem; }
  .card__head .card__price { margin-top: 0; font-size: 1rem; }
  .card__text { margin-top: 0.375rem; }
  .card__list { gap: 0.25rem 1rem; margin-top: 0.625rem; padding-top: 0; border-top: 0; }
}

/* ---- Steps (how it works) ---- */
.steps {
  max-width: 50rem;
  margin: clamp(1.25rem, 4dvh, 2.5rem) auto 0;
  border-bottom: 1px solid var(--line);
}
.step {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: 0.2rem 0.75rem;
  padding-block: clamp(0.625rem, 1.8dvh, 1.125rem);
  border-top: 1px solid var(--line);
}
.step__num { grid-row: span 2; padding-top: 0.25em; color: var(--muted); font-family: var(--mono); font-size: 0.6875rem; }
.step h3 { font-size: clamp(0.9375rem, 2.2dvh, 1.125rem); font-weight: 500; letter-spacing: -0.02em; }
.step p { color: var(--soft); font-size: clamp(0.8125rem, 2dvh, 1rem); line-height: 1.45; text-wrap: pretty; }
@media (min-width: 768px) {
  .step { grid-template-columns: 2.5rem minmax(0, 0.75fr) minmax(0, 1.5fr); gap: 1.5rem; align-items: baseline; }
  .step__num { grid-row: auto; }
}

/* Short phones (small Androids, iPhone SE with Safari's bars): tighter type so every view still fits. */
@media (max-width: 599px) and (max-height: 660px) {
  .view { padding-top: 4.125rem; }
  .section__head h2 { font-size: 1.5rem; }
  .section__head p { font-size: 0.875rem; }
  .cards,
  .steps { margin-top: 0.75rem; }
  .card { padding: 0.875rem; }
  .card h3 { font-size: 1.25rem; }
  .card__text { font-size: 0.8125rem; line-height: 1.4; }
  .card__list { margin-top: 0.5rem; font-size: 0.75rem; }
  .step { padding-block: 0.5rem; }
  .step h3 { font-size: 0.875rem; }
  .step p { font-size: 0.78125rem; line-height: 1.4; }
}
@media (max-width: 599px) and (max-height: 580px) {
  .section__head h2 { font-size: 1.375rem; }
  .section__head p { margin-top: 0.375rem; font-size: 0.8125rem; line-height: 1.45; }
  .card { padding: 0.75rem 0.875rem; }
  .card__text { margin-top: 0.25rem; }
  .card__list { gap: 0.125rem 0.875rem; margin-top: 0.375rem; }
  .step { padding-block: 0.375rem; }
  .step p { line-height: 1.35; }
}

/* ---- Contact view ---- */
.contact { text-align: center; }
.contact h2 {
  margin-top: 1rem;
  font-size: clamp(2.5rem, min(8vw, 10dvh), 6rem);
  line-height: 1;
  letter-spacing: -0.06em;
}
.contact p {
  max-width: 34rem;
  margin: clamp(1rem, 3dvh, 1.5rem) auto 0;
  font-size: clamp(1rem, 2.4dvh, 1.125rem);
  line-height: 1.6;
  text-wrap: balance;
}
.contact__email {
  display: inline-block;
  margin-top: clamp(1.25rem, 4dvh, 2.5rem);
  font-size: clamp(1.25rem, 3.4vw, 2.25rem);
  letter-spacing: -0.04em;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s;
  overflow-wrap: anywhere;
}
.contact__email:hover { border-color: var(--ink); }
.contact__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: clamp(1rem, 3dvh, 2rem); }
.copy-btn .icon-check { display: none; }
.copy-btn.is-copied .icon-copy { display: none; }
.copy-btn.is-copied .icon-check { display: block; }

/* ---- Footer: business identity, always on screen ---- */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  padding: 0.75rem var(--gutter) calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}
.footer__id,
.footer__legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.125rem 0.875rem; }
.footer__id > *,
.footer__legal a { white-space: nowrap; }
.footer a { transition: color 0.2s; }
.footer a:hover { color: var(--ink); }
@media (min-width: 1024px) { .footer { justify-content: space-between; } }
@media (max-width: 599px) {
  .footer { padding-block: 0.625rem calc(env(safe-area-inset-bottom, 0px) + 0.625rem); font-size: 0.6875rem; }
  .footer { gap: 0 0.625rem; }
  .footer__id,
  .footer__legal { display: contents; }
}

/* ---- Rows (legal sections) ---- */
.rows { margin-top: 4rem; border-bottom: 1px solid var(--line); }
.row {
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
}
.row .h3 { font-size: 1.125rem; font-weight: 500; letter-spacing: -0.02em; }
@media (min-width: 768px) {
  .row { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 2rem; padding-bottom: 3.5rem; }
}

/* ---- Legal pages ---- */
.legal { padding-top: 9.5rem; padding-bottom: var(--section); }
.legal__back { display: inline-flex; align-items: center; gap: 0.375rem; color: var(--muted); font-size: 0.9375rem; transition: color 0.2s; }
.legal__back:hover { color: var(--ink); }
.legal__back svg { width: 1rem; height: 1rem; }
.legal h1 {
  margin-top: 1.5rem;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.06em;
}
.legal__meta { margin-top: 1.25rem; }
.legal__nav { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 2rem; }
.legal__nav a { transition: background-color 0.2s; }
.legal__nav a:hover { background: var(--surface-hover); }
.legal__nav a[aria-current="page"] { background: var(--ink); color: var(--black); }
.legal__intro { max-width: 40rem; margin-top: 3rem; font-size: 1.25rem; line-height: 1.5; letter-spacing: -0.02em; }

.prose > * + * { margin-top: 0.75rem; }
.prose strong { font-weight: 600; }
.prose a { text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 0.2em; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose ul { padding-left: 1.1rem; list-style: "–  "; }
.prose li + li { margin-top: 0.25rem; }

/* ---- Appear animations ---- */
@keyframes appear {
  from { opacity: 0; transform: translateY(var(--appear-y)); }
}

/* Views replay these each time they come on screen; legal pages on load. */
.hero > :not(.hero__title),
.hero__title > *,
.section__head > *,
.cards > *,
.steps > *,
.contact > *,
.legal > * { animation: appear 0.6s var(--ease-out) both; }

.hero__title > :nth-child(1) { animation-delay: 60ms; }
.hero__title > :nth-child(2) { animation-delay: 110ms; }
.hero__title > :nth-child(3) { animation-delay: 160ms; }
.hero__lede { animation-delay: 220ms; }
.hero__ctas { animation-delay: 280ms; }

.section__head > :nth-child(2),
.contact > :nth-child(2),
.legal > :nth-child(2) { animation-delay: 50ms; }
.section__head > :nth-child(3),
.contact > :nth-child(3),
.legal > :nth-child(3) { animation-delay: 100ms; }
.contact > :nth-child(4),
.legal > :nth-child(4) { animation-delay: 150ms; }
.contact > :nth-child(5),
.legal > :nth-child(5) { animation-delay: 200ms; }
.legal > :nth-child(n + 6) { animation-delay: 250ms; }
.cards > :nth-child(1) { animation-delay: 120ms; }
.cards > :nth-child(2) { animation-delay: 180ms; }
.steps > :nth-child(1) { animation-delay: 100ms; }
.steps > :nth-child(2) { animation-delay: 150ms; }
.steps > :nth-child(3) { animation-delay: 200ms; }
.steps > :nth-child(4) { animation-delay: 250ms; }
.steps > :nth-child(5) { animation-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :root { --appear-y: 0; }              /* fades only, no movement */
}
