/* Naɓanam landing. Ink on paper; the route orange only marks what travels. */

:root {
  --paper: #ffffff;
  --surface: #f3f3ef;
  --ink: #1e2126;
  --muted: #5c626a;
  --line: #dcdcd5;
  --route: #cc5600;
  --route-ink: #a94700;
  --done: #1d7349;
  --btn-bg: #a94700;
  --btn-fg: #ffffff;
  --btn-bg-hover: #8a3a00;
  --header-bg: rgba(255, 255, 255, 0.94);
  --code-str: #2f5f8a;
  --dot-off: #b9bab3;
  --lv-1: #e2e2dc;
  --lv-2: #c7c8c1;

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 32px);
  --sec-pad: clamp(72px, 10vw, 128px);
  --radius: 12px;

  color-scheme: light;
}

/* Dark theme: follows the system until the visitor picks one in the header. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17191c;
    --surface: #202327;
    --ink: #ecede8;
    --muted: #a3a8ae;
    --line: #34383d;
    --route: #e8701a;
    --route-ink: #f2914a;
    --done: #4cc38a;
    --btn-bg: #f2914a;
    --btn-fg: #17191c;
    --btn-bg-hover: #f6a96f;
    --header-bg: rgba(23, 25, 28, 0.92);
    --code-str: #8ab4e0;
    --dot-off: #4f545a;
    --lv-1: #34383d;
    --lv-2: #5a5f66;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #17191c;
  --surface: #202327;
  --ink: #ecede8;
  --muted: #a3a8ae;
  --line: #34383d;
  --route: #e8701a;
  --route-ink: #f2914a;
  --done: #4cc38a;
  --btn-bg: #f2914a;
  --btn-fg: #17191c;
  --btn-bg-hover: #f6a96f;
  --header-bg: rgba(23, 25, 28, 0.92);
  --code-str: #8ab4e0;
  --dot-off: #4f545a;
  --lv-1: #34383d;
  --lv-2: #5a5f66;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul,
figure {
  margin: 0;
}

h1,
h2,
h3,
dt {
  font-weight: 500;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
}

code,
pre {
  font-family: var(--mono);
  font-size: 0.82em;
}

:focus-visible {
  outline: 2px solid var(--route);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  z-index: 100;
}

.skip:focus {
  top: 12px;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* Buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  font: 500 16px/1 var(--font);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
}

.btn-primary:hover {
  background: var(--btn-bg-hover);
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
}

.link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: text-decoration-color 0.15s ease;
}

.link:hover {
  text-decoration-color: var(--route);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}

/* Header */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.top.is-scrolled {
  border-bottom-color: var(--line);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.top-nav {
  display: none;
  gap: 28px;
  font-size: 15px;
}

.top-nav a,
.top-link {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.top-nav a:hover,
.top-link:hover {
  color: var(--ink);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-link {
  margin-right: 8px;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--muted);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The icon shows the theme the button switches to. */
.theme-toggle .i-sun,
[data-theme="dark"] .theme-toggle .i-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .i-sun {
  display: block;
}

.top-link {
  display: none;
  font-size: 15px;
}

@media (min-width: 640px) {
  .top-link {
    display: inline;
  }
}

@media (min-width: 1000px) {
  .top-nav {
    display: flex;
  }
}

/* Hero */

.hero {
  padding-block: clamp(40px, 8vw, 104px) clamp(64px, 9vw, 120px);
}

.hero-grid {
  display: grid;
  gap: 56px;
}

.hero h1 {
  font-size: clamp(38px, 5.6vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.032em;
  max-width: 16ch;
}

.lede {
  margin-top: 24px;
  max-width: 44ch;
  font-size: clamp(18px, 1.9vw, 20px);
  line-height: 1.5;
  color: var(--muted);
}

.hero .actions {
  margin-top: 36px;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 72px;
  }
}

/* Sequence diagram: three lanes, messages travel between their centres. */

.seq {
  --lane-1: calc(100% / 6);
  --lane-2: 50%;
  --lane-3: calc(500% / 6);
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
}

.seq-heads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  font-size: 14px;
  line-height: 1.25;
  color: var(--muted);
}

.seq-heads span {
  padding-inline: 4px;
}

.seq-head-nb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink);
}

.seq-body {
  position: relative;
  margin-top: 14px;
  padding-block: 8px 12px;
  background:
    linear-gradient(var(--line), var(--line)) var(--lane-1) 0 / 1px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) var(--lane-2) 0 / 1px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) var(--lane-3) 0 / 1px 100% no-repeat;
  background-position: calc(100% / 6) 0, 50% 0, calc(500% / 6) 0;
}

.msg {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  row-gap: 8px;
  padding-block: 14px;
  animation: msg-in 0.45s ease both;
  animation-delay: calc(0.35s + var(--i) * 0.55s);
}

.msg-label {
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
  padding-inline: 4px;
}

.msg-label code {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.msg-line {
  position: relative;
  height: 2px;
  background: var(--ink);
  animation: line-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(0.45s + var(--i) * 0.55s);
}

.msg-line::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 0;
  height: 0;
  border-block: 5px solid transparent;
}

/* Lane 1 → 2, 2 → 3 point right; 3 → 2, 2 → 1 point left. */
.m-12 .msg-label { grid-column: 1 / 5; }
.m-12 .msg-line { grid-column: 2 / 4; transform-origin: left; }
.m-23 .msg-label { grid-column: 3 / 7; }
.m-23 .msg-line { grid-column: 4 / 6; transform-origin: left; }
.m-32 .msg-label { grid-column: 3 / 7; }
.m-32 .msg-line { grid-column: 4 / 6; transform-origin: right; }
.m-21 .msg-label { grid-column: 1 / 5; }
.m-21 .msg-line { grid-column: 2 / 4; transform-origin: right; }

.m-12 .msg-line::after,
.m-23 .msg-line::after {
  right: -1px;
  border-left: 8px solid var(--ink);
}

.m-32 .msg-line::after,
.m-21 .msg-line::after {
  left: -1px;
  border-right: 8px solid var(--ink);
}

.msg.is-back .msg-line {
  background: var(--route);
}

.msg.is-back .msg-line::after {
  border-right-color: var(--route);
}

.msg.is-back .msg-label code {
  color: var(--route-ink);
}

.seq figcaption {
  margin-top: 12px;
}

@keyframes msg-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes line-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Sections */

.sec {
  padding-block: var(--sec-pad);
  border-top: 1px solid var(--line);
}

.sec-tight {
  padding-block: clamp(56px, 7vw, 88px);
}

.sec-head {
  display: grid;
  gap: 16px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.sec h2,
.end h2 {
  font-size: clamp(29px, 4.1vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.026em;
  max-width: 19ch;
}

.sec-head p {
  max-width: 48ch;
  color: var(--muted);
}

.sec h3 {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.split {
  display: grid;
  gap: 40px;
}

@media (min-width: 960px) {
  .split {
    grid-template-columns: 5fr 7fr;
    gap: 72px;
    align-items: start;
  }

  .split-sticky > .sec-head {
    position: sticky;
    top: 104px;
  }
}

.stack {
  display: grid;
  gap: 16px;
  align-content: start;
}

.figure figcaption,
.seq figcaption {
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 52ch;
}

.figure > figcaption {
  margin-top: 14px;
}

.stack > figcaption {
  margin-top: 0;
}

/* Integration steps: a real sequence, joined by the route line. */

.steps {
  counter-reset: step;
  display: grid;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 40px 60px;
}

.steps > li:last-child {
  padding-bottom: 0;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -3px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--route);
  border-radius: 50%;
  background: var(--paper);
  font-size: 15px;
  color: var(--route-ink);
  z-index: 1;
}

.steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16.25px;
  top: 31px;
  bottom: 0;
  width: 1.5px;
  background: var(--route);
  opacity: 0.45;
}

.steps p {
  margin-top: 6px;
  color: var(--muted);
  max-width: 50ch;
}

.chip {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--surface);
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

@media (max-width: 420px) {
  .steps > li {
    padding-left: 50px;
  }

  .chip {
    padding-inline: 8px;
    font-size: 12px;
  }
}

.fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.fields code {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

/* Facts list (infrastructure) */

.facts {
  display: grid;
}

.facts > div {
  padding-block: 18px;
  border-top: 1px solid var(--line);
}

.facts > div:last-child {
  border-bottom: 1px solid var(--line);
}

.facts dd {
  margin-top: 4px;
  color: var(--muted);
  max-width: 52ch;
}

@media (min-width: 640px) {
  .facts > div {
    display: grid;
    grid-template-columns: 13em 1fr;
    gap: 24px;
  }

  .facts dd {
    margin-top: 0;
  }
}

@media (min-width: 960px) {
  #infrastructure .split {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  #infrastructure .facts > div {
    display: block;
  }

  #infrastructure .facts dd {
    margin-top: 4px;
  }
}

/* Dispatch rings */

.rings {
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
}

.ring {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
}

.ring-far {
  stroke-dasharray: 2 8;
}

.ring-link {
  stroke: var(--route);
  stroke-width: 2;
}

.dot {
  fill: var(--ink);
}

.dot-on {
  fill: var(--route);
}

.dot-off {
  fill: var(--dot-off);
}

.dot-done {
  fill: var(--done);
}

.pin {
  fill: var(--route);
}

/* Short notes beside a figure */

.notes {
  display: grid;
  gap: 14px;
}

.notes li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  max-width: 52ch;
}

.notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 10px;
  height: 2px;
  background: var(--ink);
}

.notes code {
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* Code panels */

.code {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.code-title {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

.code pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
  tab-size: 2;
}

.code code {
  font-size: inherit;
}

.code .k {
  color: var(--route-ink);
}

.code .p {
  color: var(--ink);
}

.code .s {
  color: var(--code-str);
}

.code .s.hl {
  color: var(--done);
}

.code .c {
  color: var(--muted);
  font-style: italic;
}

/* Checkout line: where the price lands in the partner's app */

.checkout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}

.checkout-val code {
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(204, 86, 0, 0.1);
  color: var(--route-ink);
  font-size: 14px;
}

/* Payment modes: a real two-way choice, side by side */

.modes {
  display: grid;
  border-top: 1px solid var(--line);
}

.mode {
  padding-block: 24px;
}

.mode + .mode {
  border-top: 1px solid var(--line);
}

.mode p {
  margin-top: 8px;
  color: var(--muted);
  max-width: 50ch;
}

.mode-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mode-flow code {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
}

.aside {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  max-width: 62ch;
}

@media (min-width: 760px) {
  .modes {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }

  .mode + .mode {
    border-top: 0;
  }

  .mode {
    padding-block: 28px;
  }
}

/* Proximity zone */

.zone {
  width: 100%;
  max-width: 420px;
}

.zone-area {
  fill: rgba(204, 86, 0, 0.07);
  stroke: var(--route);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}

.zone-radius {
  stroke: var(--route);
  stroke-width: 1;
}

.zone-label {
  font: 400 13px var(--font);
  fill: var(--route-ink);
}

.tick {
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Reliability scale */

.scale {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 12px;
}

.lv {
  display: grid;
  gap: 6px;
  align-content: start;
}

.lv-bar {
  height: 8px;
  border-radius: 4px;
}

.lv-1 .lv-bar { background: var(--lv-1); }
.lv-2 .lv-bar { background: var(--lv-2); }
.lv-3 .lv-bar { background: var(--ink); }
.lv-4 .lv-bar { background: var(--route); }

.lv-name {
  margin-top: 4px;
  font-size: 16px;
}

.lv-desc {
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
}

@media (min-width: 560px) {
  .scale {
    grid-template-columns: 0.8fr 1fr 1.6fr 1fr;
    gap: 6px;
  }

  .lv-desc {
    padding-right: 8px;
  }
}

/* Security and partner space */

.cols {
  display: grid;
  gap: 48px;
}

.list {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.list li {
  padding-block: 13px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.cols .link {
  margin-top: 12px;
}

@media (min-width: 860px) {
  .cols {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
  }
}

/* Partners */

.partners {
  display: grid;
  gap: 32px;
}

.partners h2 {
  font-size: clamp(24px, 3vw, 30px);
}

.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.logos li {
  display: grid;
  place-items: center;
  min-width: 160px;
  height: 80px;
  padding: 0 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.logos img {
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.logo-name {
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--muted);
}

@media (min-width: 760px) {
  .partners {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

/* Closing call to action */

.end {
  padding-block: var(--sec-pad);
  background: var(--surface);
}

.end h2 {
  max-width: 20ch;
}

.end p {
  margin-top: 16px;
  color: var(--muted);
  max-width: 46ch;
}

.end .actions {
  margin-top: 32px;
}

/* Footer */

.foot {
  padding-block: 40px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.foot-row {
  display: grid;
  gap: 24px;
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.foot-nav a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
}

.foot-nav a:hover {
  color: var(--ink);
}

.foot-legal {
  color: var(--muted);
}

@media (min-width: 960px) {
  .foot-row {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 48px;
  }

  .foot-nav {
    justify-content: center;
  }
}

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

  .msg,
  .msg-line {
    animation: none;
  }
}
