/* runbuy.ai landing page. Colours and type follow docs/brandkit (Billet palette).
   Billet yellow appears in one place only: the hot end of a bar. */

@font-face { font-family: "Archivo"; src: url("assets/fonts/archivo-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #15191E;
  --ink-2: #1F252C;
  --paper: #F2F4F5;
  --white: #FFFFFF;
  --billet: #FFB21A;
  --steel: #6B7785;
  --steel-dark: #55606C;
  --steel-light: #A9B2BC;
  --line: #D9DEE3;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;
  --data: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(20px, 5vw, 72px);
  --measure: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ol { margin: 0; padding: 0; }
ol { list-style: none; }
a { color: inherit; }
img { display: block; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; text-wrap: balance; }
h3 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.25; }

/* ---------- buttons ---------- */
.btn { display: inline-block; padding: 10px 16px; background: var(--ink); color: var(--paper); border: 2px solid var(--ink); border-radius: 4px; font: 600 0.94rem/1.2 var(--body); text-decoration: none; }
.btn:hover { background: var(--ink-2); }
.btn-lg { padding: 15px 24px; font-size: 1.05rem; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 22px var(--gutter); }
.top nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); }
.top nav a:not(.btn) { font-size: 0.94rem; font-weight: 500; text-decoration: none; color: var(--steel-dark); }
.top nav a:not(.btn):hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(40px, 8vw, 104px) var(--gutter) clamp(40px, 6vw, 72px); }
.who { font-weight: 500; color: var(--steel-dark); margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.9rem, 9vw, 7.4rem); line-height: 0.96; }
.hero h1 span { display: block; }
.lede { font-size: clamp(1.1rem, 1.7vw, 1.32rem); line-height: 1.5; max-width: 56ch; margin-top: 28px; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 34px; }
.quiet { font-weight: 500; text-underline-offset: 4px; }

/* ---------- the board ---------- */
.board-wrap { padding: 0 var(--gutter); }
.board { max-width: var(--measure); margin: 0 auto; background: var(--ink); color: var(--paper); padding: clamp(20px, 3.4vw, 40px); border-radius: 6px; }
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: clamp(18px, 2.6vw, 30px); }
.board-head h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); letter-spacing: -0.02em; }
.board-head p { font-size: 0.84rem; color: var(--steel-light); }

.row { display: grid; grid-template-columns: 11ch minmax(0, 1fr) 29ch 19ch; align-items: center; column-gap: clamp(12px, 2vw, 28px); padding: 13px 0; border-top: 1px solid var(--ink-2); font: 400 0.9rem/1.3 var(--data); }
.sec { font-weight: 500; font-size: 1rem; }
.by { color: var(--steel-light); white-space: nowrap; }
.by b { display: inline-block; min-width: 9ch; font-weight: 500; color: var(--paper); }
.roll { color: var(--steel-light); text-align: right; white-space: nowrap; }

/* a bar seen from the side: light top face, tinted side face, hot end */
.track { display: block; height: 16px; }
.bar { position: relative; display: block; height: 16px; width: var(--left); min-width: 16px;
  background: linear-gradient(to bottom, var(--paper) 0 50%, rgba(242, 244, 245, 0.55) 50% 100%);
  transform-origin: left center; animation: roll-out 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.bar::after { content: ""; position: absolute; right: 0; top: 0; width: 16px; height: 16px; background: var(--billet); }
.row:nth-child(2) .bar { animation-delay: 0.08s; }
.row:nth-child(3) .bar { animation-delay: 0.16s; }
.row:nth-child(4) .bar { animation-delay: 0.24s; }
@keyframes roll-out { from { width: 16px; } }

.is-ask .bar { width: 100%; background: none; border: 1px dashed var(--steel); animation: none; }
.is-ask .bar::after { display: none; }
/* service center stock: nothing to wait for, so the whole bar is there */
.is-stock .bar { width: 100%; animation: none; }
.is-stock .bar::after { display: none; }

.row.axis { padding: 0; border-top: 0; }
.ticks { grid-column: 2; display: flex; justify-content: space-between; padding-top: 9px; border-top: 1px solid var(--steel-dark); font-size: 0.76rem; color: var(--steel-light); }

.log { margin-top: clamp(24px, 3.4vw, 40px); padding-top: clamp(18px, 2.6vw, 28px); border-top: 1px solid var(--steel-dark); }
.log h3 { font-size: 1rem; margin-bottom: 10px; }
.log li { display: grid; grid-template-columns: 6ch minmax(0, 1fr); column-gap: 14px; padding: 5px 0; font: 400 0.88rem/1.45 var(--data); color: var(--steel-light); }
.log li:last-child span { color: var(--paper); }
.log li:last-child time { color: var(--billet); }

/* ---------- how it works ---------- */
.how { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(72px, 11vw, 144px) var(--gutter) clamp(56px, 8vw, 104px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 88px); align-items: start; }
.how h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); position: sticky; top: 32px; }
.steps { counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); padding: 26px 0; border-top: 2px solid var(--ink); }
.steps li:last-child { border-bottom: 2px solid var(--ink); }
.steps li::before { content: counter(step); font: 800 1.2rem/1.25 var(--display); }
.steps h3, .steps p { grid-column: 2; }
.steps p { margin-top: 8px; color: var(--ink-2); max-width: 54ch; }

/* ---------- integrations ---------- */
.fits { background: var(--white); border-top: 1px solid var(--line); }
.fits-in { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(16px, 6vw, 88px); align-items: start; }
.fits h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.fits p { color: var(--ink-2); max-width: 54ch; }

/* ---------- where this goes ---------- */
.next { background: var(--ink); color: var(--paper); }
.next-in { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(64px, 11vw, 144px) var(--gutter); }
.next h2 { font-size: clamp(2.3rem, 6.4vw, 5.2rem); max-width: 16ch; }
.next-lede { font-size: clamp(1.1rem, 1.7vw, 1.32rem); line-height: 1.5; max-width: 58ch; margin-top: 28px; color: var(--steel-light); }
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: clamp(40px, 6vw, 80px); }
.stages li { padding-top: 18px; border-top: 16px solid var(--ink-2); }
.stages li:first-child { border-top-color: var(--billet); }
.when { font: 800 1.5rem/1 var(--display); letter-spacing: -0.02em; margin-bottom: 14px; }
.stages li p:last-child { margin-top: 8px; color: var(--steel-light); }

/* ---------- sellers ---------- */
.sellers { max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(56px, 9vw, 112px) var(--gutter); }
.sellers-text { max-width: 60ch; margin-left: auto; padding-left: clamp(18px, 3vw, 32px); border-left: 16px solid var(--ink); }
.sellers h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-bottom: 16px; max-width: 20ch; }
.sellers p + p { margin-top: 14px; }
.sellers p:last-child { margin-top: 26px; }

/* ---------- closing call ---------- */
.close { background: var(--billet); padding: clamp(56px, 9vw, 112px) var(--gutter); text-align: left; }
.close > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.close h2 { font-size: clamp(2.2rem, 6vw, 4.6rem); }
.close p { margin-top: 18px; font-size: 1.15rem; }
.close p:last-child { margin-top: 30px; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: var(--steel-light); padding: 40px var(--gutter) 48px; font-size: 0.9rem; }
.foot-in { max-width: var(--measure); margin: 0 auto; display: grid; gap: 12px; justify-items: start; }
.legal { font-size: 0.78rem; max-width: 70ch; }
.fine { display: flex; flex-wrap: wrap; gap: 6px 24px; }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .how { grid-template-columns: minmax(0, 1fr); }
  .how h2 { position: static; }
  .stages { grid-template-columns: minmax(0, 1fr); }
  .fits-in { grid-template-columns: minmax(0, 1fr); }
  .sellers-text { margin-left: 0; }
  .row { grid-template-columns: 11ch minmax(0, 1fr); row-gap: 8px; }
  .by { grid-column: 1 / -1; }
  .roll { grid-column: 1 / -1; text-align: left; margin-top: -4px; }
  .row.axis { display: none; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .top nav a:not(.btn) { display: none; }
}

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