/* ===========================================================================
   AnyPaya marketing site.

   Two rules govern everything here:

   1. Colour comes from the vendored token file. Nothing on this page invents
      a hex value; local names below are aliases so the token file stays the
      only place a colour is decided.

   2. The wordmark follows the part-based rule (ux-guidelines §4.2): the part
      `paya` is always coral, wherever it sits in the name, and the rest takes
      the text colour — so any name in the family renders from the same markup
      with no per-product variant.

   Language: both languages ship in the markup, and CSS shows one. A visitor
   with JS disabled still gets English; the toggle only flips html[lang].
   =========================================================================== */

/* Aliases onto the token file's ROLE layer, not its raw palette. The page pins
   [data-theme="dark"] on <html>, so the roles resolve to the dark layer and the
   system setting is not consulted. Keep using the roles rather than reaching
   past them to raw palette values — the token file stays the single source. */
:root {
  --ground: var(--surface-ground);
  --panel: var(--surface-panel);
  --sunken: var(--surface-sunken);
  --line: var(--border-subtle);
  --line-strong: var(--border-strong);
  --fg: var(--text-primary);
  --fg-muted: var(--text-muted);
  --fg-faint: var(--text-faint);

  /* Two coral roles, deliberately distinct: --accent is a fill behind
     --on-accent text; --accent-text is the darkened coral that stays legible
     as text. A thin orange does not carry at body size. */
  --accent: var(--accent-fill);
  --accent-text: var(--accent-primary);
  --on-accent: var(--text-on-accent);

  --olive: var(--state-success);
  --gold: var(--state-warning);

  --display: var(--font-display, 'Bricolage Grotesque', 'Trebuchet MS', system-ui, sans-serif);
  --ui: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* One column for everything: heading, body and boxes share both edges.
     Sized so body text lands near 70 characters — long enough not to look
     cramped beside a 2.9rem heading, short enough to stay readable. At 17px
     the 760px first attempt measured 84 characters, which is past the point
     where the eye loses the next line. */
  --measure: 680px;
  --wide: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--fg);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(100%, var(--measure)); margin: 0 auto; padding: 0 24px; }

/* The header bar spans the viewport, not the reading column: a sticky bar that
   stopped at 760px would leave the toggles floating mid-screen. */
.topbar { width: min(100%, var(--wide)); margin: 0 auto; }

/* --- wordmark ------------------------------------------------------------ */
.mark {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1;
  color: var(--fg);
  white-space: nowrap;
  text-decoration: none;
}
/* --accent-text, not --accent: the wordmark is text, and §4.2 splits the two
   coral roles because a fill colour and a text colour are not interchangeable. */
.mark span { color: var(--accent-text); }
/* `*` means "any": *paya reads as the wildcard that covers every product in the
   family. The glyph sits high in the em box, so it is nudged down and given a
   touch of room; the mark stays text, per ux-guidelines §4.2. */
.mark .any {
  color: var(--fg);
  display: inline-block;
  transform: translateY(-0.04em);
  margin-right: 0.02em;
}

.mark--sm { font-size: 0.95rem; }
.mark--md { font-size: 1.35rem; }
/* --lg is the in-heading form: it must match the words beside it, so it takes
   the heading's own size rather than a fixed one. A fixed 2rem was smaller than
   h2's clamp() at every viewport above ~840px, which made the wordmark read as
   a different, lesser element in the middle of its own sentence. */
.mark--lg { font-size: 1em; }

/* --- header -------------------------------------------------------------- */
header.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar {
  display: flex; align-items: center; gap: 18px;
  height: 62px;
}
.topbar nav { display: flex; gap: 20px; margin-left: auto; }
.topbar nav a {
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--fg-muted); text-decoration: none;
  padding: 4px 0; border-bottom: 1px solid transparent;
}
.topbar nav a:hover { color: var(--fg); border-bottom-color: var(--accent); }

/* Sign in sits beside the nav, never inside it: `.topbar nav` is display:none
   below 720px, and the one person who needs this link most — a customer coming
   back — is often on a phone. Styled like a nav link rather than a filled
   button so it does not compete with the page's own asks, which are for
   someone who does not have an account yet. */
.topbar .signin {
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--fg-muted); text-decoration: none;
  padding: 4px 0; border-bottom: 1px solid transparent;
  white-space: nowrap;
}
.topbar .signin:hover { color: var(--fg); border-bottom-color: var(--accent); }
.topbar .signin:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

/* Below 720px the nav drops to its own scrolling row under the bar rather
   than disappearing: on a multi-page site it is the only way between pages. */
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 0 0; row-gap: 6px; }
  .topbar nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 8px; }
}

/* --- type ---------------------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--display);
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 6.5vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0 0 1.1rem; }
a { color: var(--accent-text); }
strong { color: var(--fg); font-weight: 650; }
em { font-style: normal; font-weight: 600; color: var(--accent-text); }

.eyebrow {
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-faint); margin: 0 0 1rem;
}

/* --- sections ------------------------------------------------------------ */
/* No rules between sections: space alone separates them (2026-11-02). */
section { padding: clamp(2.25rem, 4.5vw, 3.5rem) 0; }
.sec-head { margin-bottom: 2.6rem; }
.sec-head p { color: var(--fg-muted); font-size: 1.08rem; }

/* --- hero ---------------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate;
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(2rem, 4vw, 3rem);
  background:
    radial-gradient(900px 420px at 78% -8%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 62%),
    radial-gradient(620px 320px at 4% 108%, color-mix(in srgb, var(--olive) 7%, transparent), transparent 60%);
}
.hero h1 { margin-bottom: 1.6rem; }
.hero .lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--fg-muted); margin-bottom: 2.2rem;
}
.hero .lede strong { color: var(--fg); }

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-block; font-family: var(--mono); font-size: 0.82rem;
  letter-spacing: 0.04em; text-decoration: none; padding: 11px 20px;
  border-radius: 8px; border: 1px solid var(--line-strong);
  color: var(--fg);
}
.btn:hover { border-color: var(--accent); }
.btn--primary {
  background: var(--accent); border-color: var(--accent);
  color: var(--on-accent); font-weight: 600;
}
.btn--primary:hover { background: var(--accent-text); border-color: var(--accent-text); }

/* --- the split: what breaks ---------------------------------------------- */
.split { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
@media (min-width: 780px) { .split { grid-template-columns: 1fr 1fr; } }
.split > div { background: var(--panel); padding: 1.8rem 1.6rem; }
.split .k {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 0.8rem;
}
.split .bad .k { color: var(--accent-text); }
.split .good .k { color: var(--olive); }
.split p:last-child { margin-bottom: 0; }

/* --- source list --------------------------------------------------------- */
.sources { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.6rem; }
.sources span {
  font-family: var(--mono); font-size: 0.75rem; color: var(--fg-muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
}

/* --- cards --------------------------------------------------------------- */
.cards { display: grid; gap: 16px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 1.5rem 1.4rem;
}
.card h3 {
  margin-bottom: 0.55rem;
  /* balance splits a two-word overflow down the middle, which looks like a
     deliberate two-line title. Cards are small; let the line fill first. */
  text-wrap: pretty;
}
.card p { font-size: 0.96rem; color: var(--fg-muted); margin-bottom: 0; }
/* Situation cards carry several paragraphs — the moment, then what changes —
   so they need the spacing a single-paragraph card does not. The last one
   still closes flush against the card edge. */
.card p + p { margin-top: 0.85rem; }
/* The maturity line: quieter than the body, and set in mono so it reads as a
   status rather than as more argument. Only the first situation is in
   production, and the page says so on the card rather than in a footnote. */
.card p.status {
  margin-top: 1.1rem; padding-top: 0.8rem; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em;
}

/* --- the three steps ----------------------------------------------------- */
.steps { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--panel); padding: 1.8rem 1.6rem; position: relative; }
.step .n {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-faint); margin-bottom: 0.9rem;
}
.step .pm { margin-bottom: 0.7rem; }
.step .q { color: var(--fg-muted); font-size: 0.95rem; margin-bottom: 0.9rem; }
.step .state {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  border: 1px solid currentColor; display: inline-block;
}
.step .state.live { color: var(--olive); }
.step .state.next { color: var(--gold); }

/* --- numbers ------------------------------------------------------------- */
.figures { display: grid; gap: 16px; margin-bottom: 2rem; }
@media (min-width: 720px) { .figures { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
.fig { border: 1px solid var(--line); border-radius: 10px; padding: 1.4rem 1.3rem; background: var(--panel); }
.fig .v {
  font-family: var(--display); font-weight: 800; font-size: 2.1rem;
  letter-spacing: -0.02em; line-height: 1.05; color: var(--accent-text);
}
.fig .l {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-faint); margin-top: 0.5rem;
}

/* --- quote / claim ------------------------------------------------------- */
.claim {
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border-radius: 0 8px 8px 0;
  padding: 1.4rem 1.6rem; margin: 0 0 1.6rem;
}
.claim p { font-size: 1.12rem; margin-bottom: 0; }

/* --- name story ---------------------------------------------------------- */
.namerow { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 1.4rem 0 0; }
.namerow .n { display: flex; flex-direction: column; gap: 3px; }
.namerow .n small {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-faint);
}

/* --- footer -------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 4rem;
  color: var(--fg-faint);
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.03em;
}
footer .frow { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: baseline; }
footer a { color: var(--fg-muted); text-decoration: none; }
footer a:hover { color: var(--accent-text); }
footer .spacer { flex: 1; }

/* --- multi-page additions (#410) ---------------------------------------- */
.wrap--wide { width: min(100%, var(--wide)); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--panel); padding: 8px 12px; }

.topbar { padding: 0 24px; }
.topbar nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }
.topbar .actions { display: flex; align-items: center; gap: 14px; }
@media (min-width: 721px) { .topbar nav + .actions { margin-left: 8px; } }
@media (max-width: 720px) { .topbar .actions { margin-left: auto; } }
.topbar .lang {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--fg-muted); text-decoration: none;
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 4px 10px;
}
.topbar .lang:hover { color: var(--fg); border-color: var(--accent); }

.hero { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.hero .eyebrow .mark { font-size: 0.95rem; }

ol.steps { list-style: none; margin: 0; padding: 0; }
.step h3 { margin-bottom: 0.6rem; }

.cards--three { margin-bottom: 0.5rem; }
@media (min-width: 900px) { .cards--three { grid-template-columns: repeat(3, 1fr); } }
.card--link { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.card--link:hover { border-color: var(--accent); }
.card--link .mark--lg { font-size: 1.35rem; }
.card__price { margin-top: auto; padding-top: 1rem; }

.group + .group { margin-top: 2.6rem; }
.group__title {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-faint); margin-bottom: 0.4rem;
}
.group__lede { color: var(--fg-muted); max-width: var(--measure); }

.stack { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stack__row { background: var(--panel); padding: 1.3rem 1.5rem; }
.stack__row .k {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-text); margin-bottom: 0.4rem;
}
.stack__row p:last-child { margin-bottom: 0; color: var(--fg-muted); }

.block + .block { margin-top: 2rem; }
.block p { color: var(--fg-muted); }

.price { font-size: 0.95rem; color: var(--fg-muted); }
.price strong { font-family: var(--display); font-size: 1.5rem; color: var(--fg); }
.price small { font-size: 0.8rem; color: var(--fg-faint); }

.existing { margin-top: 2rem; }

.buy { border: 1px solid var(--line-strong); border-radius: 10px; padding: 1.8rem 1.6rem; background: var(--panel); }
.buy__name { margin-bottom: 0.6rem; }
.closing h2 { margin-bottom: 1.6rem; }


/* The single page wrapped every heading in .sec-head for its spacing; the
   generated pages put h2 straight in the section. */
section h2 { margin-bottom: 1.4rem; }
.eyebrow .mark { text-transform: none; letter-spacing: -0.022em; }

/* --- moving between tool pages ------------------------------------------ */
/* The row of all six tools is the header's second row on every tool page.
   It scrolls sideways on a phone rather than wrapping into a block. */
/* Inside the sticky header, so it stays in view as the page scrolls. */
.toolnav { border-top: 1px solid var(--line); }
.toolnav__row {
  display: flex; gap: 6px; overflow-x: auto; padding-block: 6px;
  scrollbar-width: none;
}
.toolnav__row::-webkit-scrollbar { display: none; }
.toolnav a {
  flex: none; text-decoration: none; padding: 6px 12px; border-radius: 8px;
  border: 1px solid transparent; font-size: 0.95rem;
}
.toolnav a .mark { color: var(--fg-muted); }
.toolnav a .mark span { color: color-mix(in srgb, var(--accent-text) 70%, var(--fg-muted)); }
.toolnav a:hover { border-color: var(--line-strong); }
.toolnav a[aria-current="page"] { border-color: var(--accent); }
.toolnav a[aria-current="page"] .mark { color: var(--fg); }
.toolnav a[aria-current="page"] .mark span { color: var(--accent-text); }
.toolnav a:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.pager { padding-block: 2rem; }
.pager__row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pager__link {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 10px;
  min-width: min(100%, 14rem);
}
.pager__link:hover { border-color: var(--accent); }
.pager__link--next { text-align: right; align-items: flex-end; margin-left: auto; }
.pager__label {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-faint);
}

/* --- one left edge ------------------------------------------------------- */
/* Every section starts at the same left edge as the logo: text sections used
   the narrow centred column and card sections the wide one, so the edge
   jumped between them. The column is now always wide; running text keeps a
   readable measure inside it, aligned left. */
.wrap { width: min(100%, var(--wide)); }
.wrap > h1, .wrap > h2, .wrap > p, .wrap > ul,
.wrap > .stack, .wrap > .block, .wrap > .buy { max-width: var(--measure); }
@media (min-width: 720px) { .cards--two { grid-template-columns: repeat(2, 1fr); } }

/* --- lighter type and denser rhythm (#443) ------------------------------ */
/* Next to in-parallel.com the site read as a toy (Mika, 2026-11-18): heavy
   rounded headlines wrapping to four lines, oversized body text and
   monospace labels. Headlines stay large but light and wide, everything
   else is smaller and tighter, and labels use the text face. These rules
   come last so they override the earlier values above. */
:root { --wide: 1240px; --measure: 640px; }
body { font-size: 16px; line-height: 1.6; }
h1, h2, h3 { font-weight: 600; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.6rem); letter-spacing: -0.04em; line-height: 1.02; }
.wrap > h1 { max-width: 15em; }
h2 { font-size: clamp(1.6rem, 2.7vw, 2.3rem); letter-spacing: -0.028em; line-height: 1.12; }
h3 { font-size: 1.05rem; letter-spacing: -0.012em; }
.hero { padding: clamp(3rem, 7vw, 5rem) 0 clamp(1rem, 2vw, 1.5rem); }
.hero h1 { margin-bottom: 1.4rem; }
.hero .lede { font-size: 1.125rem; line-height: 1.55; max-width: 36rem; margin-bottom: 2rem; }
.sec-head p, .block p { font-size: 1rem; }
section { padding: clamp(1.6rem, 3vw, 2.4rem) 0; }
section h2 { margin-bottom: 0.75rem; }
p { margin-bottom: 0.75rem; }
.sec-head { margin-bottom: 1.25rem; }
.group + .group { margin-top: 1.5rem; }
.block + .block { margin-top: 1.25rem; }
.closing h2 { margin-bottom: 1.1rem; }
.claim { margin-bottom: 1rem; }
.cards { gap: 12px; }

/* Labels and navigation in the text face, not monospace. */
.topbar nav a, .topbar .signin { font-family: var(--ui); font-size: 0.875rem; color: var(--fg-muted); }
.topbar .lang { font-family: var(--ui); font-size: 0.8rem; }
.eyebrow, .group__title, .split .k, .stack__row .k,
.step .n, .fig .l, .pager__label, .card p.status {
  font-family: var(--ui); text-transform: none; letter-spacing: 0; font-size: 0.82rem; font-weight: 500; }
.btn { font-family: var(--ui); font-size: 0.9rem; letter-spacing: 0; font-weight: 500; padding: 10px 18px; }
.btn--primary { font-weight: 600; }
footer { font-family: var(--ui); font-size: 0.85rem; letter-spacing: 0; }

/* Denser cards. */
.card { padding: 1.25rem 1.2rem; }
.card h3 { margin-bottom: 0.4rem; }
.card p { font-size: 0.9rem; line-height: 1.55; }
.split > div, .step { padding: 1.4rem 1.3rem; }
.mark--md { font-size: 1.2rem; }
.card--link .mark--lg { font-size: 1.15rem; }
.claim p { font-size: 1.02rem; }


/* Full-width two-column stack instead of a narrow column. */
.wrap > .stack { max-width: none; }
@media (min-width: 780px) { .stack { grid-template-columns: 1fr 1fr; } }
.stack__row .k { color: var(--fg); font-weight: 600; font-size: 0.95rem; }
