/* ---------------------------------------------------------------------------
   PayFlow — marketing site

   The same "ledger" language as the dashboard: warm bone paper, a dark spine, ruled
   hairlines instead of boxes and shadows, tabular figures wherever a number appears.
   A landing page can be bolder than a working tool, so the type scale is larger and
   the rules do more of the structural work.
   --------------------------------------------------------------------------- */

:root {
  --paper:        #faf8f3;
  --paper-raised: #fffdf8;
  --paper-sunk:   #f2eee3;
  --ink:          #16150f;
  --ink-soft:     #4a4638;
  --ink-muted:    #6b6657;
  --ink-faint:    #9a9484;
  --rule:         #e6e0d0;
  --rule-strong:  #d6cfba;
  --verdigris:    #14543a;
  --verdigris-br: #1a6d4a;
  --verdigris-wash:#e8f0ea;
  --brass:        #9a7526;
  --brass-wash:   #f7f0dd;
  --sienna:       #a03c25;

  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --body:    "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16.5px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--verdigris); color: var(--paper);
  padding: 12px 18px; border-radius: 0 0 8px 0; text-decoration: none; font-weight: 600;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

a { color: var(--verdigris); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 3px; }

/* --- masthead ------------------------------------------------------------ */

.site {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250,248,243,.88);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.bar { display: flex; align-items: center; gap: 28px; height: 68px; }

.brand {
  font: 400 27px/1 var(--display);
  letter-spacing: -.01em; color: var(--ink); text-decoration: none; flex: none;
}
.brand .dot { color: var(--brass); }

.site nav { display: flex; gap: 24px; margin-right: auto; }
.site nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 14.5px;
  padding: 4px 0; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s;
}
.site nav a:hover { color: var(--ink); border-bottom-color: var(--brass); }

.bar-actions { display: flex; gap: 10px; flex: none; }

.solid, .ghost {
  display: inline-flex; align-items: center; justify-content: center;
  font: 500 14.5px var(--body); text-decoration: none; white-space: nowrap;
  padding: 9px 17px; border-radius: 8px; border: 1px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s;
}
.solid { background: var(--verdigris); color: var(--paper); border-color: var(--verdigris); }
.solid:hover { background: var(--verdigris-br); border-color: var(--verdigris-br); }
.ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.ghost:hover { background: var(--paper-sunk); }
.lg { padding: 14px 26px; font-size: 16px; }

/* --- hero ---------------------------------------------------------------- */

.hero { padding: 104px 0 88px; border-bottom: 1px solid var(--rule); }

.eyebrow {
  font: 500 12px var(--body); letter-spacing: .13em; text-transform: uppercase;
  color: var(--brass); margin: 0 0 20px;
}

h1 {
  font: 400 clamp(42px, 7.2vw, 78px)/1.06 var(--display);
  letter-spacing: -.025em; margin: 0 0 26px; max-width: 16ch;
}

.lede {
  font-size: clamp(17px, 2.1vw, 20px); line-height: 1.55;
  color: var(--ink-soft); max-width: 60ch; margin: 0 0 34px;
}

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }

.fineprint { font-size: 13.5px; color: var(--ink-muted); margin: 0; max-width: 58ch; }

/* --- sections ------------------------------------------------------------ */

.band { padding: 88px 0; border-bottom: 1px solid var(--rule); }
.band.alt { background: var(--paper-sunk); }

h2 {
  font: 400 clamp(30px, 4.4vw, 44px)/1.15 var(--display);
  letter-spacing: -.02em; margin: 0 0 18px; max-width: 20ch;
}

.section-lede {
  font-size: 17px; color: var(--ink-soft); max-width: 62ch; margin: 0 0 44px;
}

h3 { font: 600 16.5px var(--body); margin: 0 0 7px; letter-spacing: -.005em; }

/* --- payment rails ------------------------------------------------------- */

.rails { list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  border-top: 1px solid var(--rule-strong);
}
.rails li {
  padding: 22px 26px 22px 0; border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 5px;
}
.rail-name {
  font: 400 21px var(--display); letter-spacing: -.01em; color: var(--ink);
}
.rail-note { font-size: 14px; color: var(--ink-muted); line-height: 1.5; }

/* --- split layouts ------------------------------------------------------- */

.split { display: grid; gap: 56px; grid-template-columns: 1fr; }
/* A grid track's implicit min-width is its content's min-content size, and a <pre>
   of unbreakable API keys has a very large one. Without this the track refuses to
   shrink and pushes the whole page sideways on a phone, however carefully the <pre>
   itself is told to scroll. */
.split > * { min-width: 0; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 380px; align-items: start; }
  .code-split { grid-template-columns: minmax(0,1.15fr) 1fr; }
}

.feature-list { display: grid; gap: 0; }
.feature-list article {
  padding: 22px 0; border-top: 1px solid var(--rule);
}
.feature-list article:first-child { border-top: 1px solid var(--rule-strong); }
.feature-list p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* --- the phone mock ------------------------------------------------------ */

.phone { margin: 0; }
.phone-frame {
  border: 1px solid var(--rule-strong); border-radius: 18px; overflow: hidden;
  background: var(--paper); box-shadow: 0 18px 44px -26px rgba(22,21,15,.4);
}
.phone-bar {
  display: flex; align-items: center; gap: 7px;
  background: var(--ink); color: #cfc9b8; padding: 9px 13px; font-size: 11.5px;
}
.lock { font-size: 10px; }
.phone-url { font-family: var(--mono); letter-spacing: -.01em; }
.phone-body { padding: 16px; background: var(--paper); }

.p-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 11px; border-bottom: 1px solid var(--rule); margin-bottom: 14px;
}
.p-merchant { font-weight: 600; font-size: 15px; }
.p-secure {
  font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted);
}
.p-card {
  background: var(--paper-raised); border: 1px solid var(--rule);
  border-radius: 10px; padding: 15px; margin-bottom: 11px;
}
.p-title { font-weight: 600; font-size: 16px; margin: 0 0 6px; }
.p-amount {
  margin: 0; font: 600 29px/1 var(--body); letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.p-amount span {
  font-size: 12px; color: var(--ink-muted); letter-spacing: .04em;
  margin-right: 5px; vertical-align: .38em;
}
.p-label { font-size: 12.5px; font-weight: 600; margin: 0 0 9px; }
.p-opt {
  display: flex; gap: 9px; align-items: flex-start;
  border: 1px solid var(--rule); border-radius: 7px;
  padding: 9px 11px; margin-bottom: 6px; background: #fff;
}
.p-opt i {
  width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--rule-strong);
  flex: none; margin-top: 2px;
}
.p-opt.sel i { border-color: var(--verdigris); border-width: 4px; }
.p-opt b { display: block; font-size: 13px; }
.p-opt em { font-style: normal; font-size: 11.5px; color: var(--ink-muted); }
.p-btn {
  background: var(--verdigris); color: var(--paper); text-align: center;
  padding: 11px; border-radius: 7px; font-weight: 600; font-size: 14px; margin-top: 11px;
}
.phone-caption {
  font-size: 13px; color: var(--ink-muted); margin: 15px 2px 0; line-height: 1.55;
}

/* --- code ---------------------------------------------------------------- */

.code {
  background: var(--ink); color: #ddd6c4; border-radius: 11px;
  padding: 20px 22px; margin: 0 0 14px; overflow-x: auto;
  font: 400 13px/1.65 var(--mono); tab-size: 2;
}
.code.out { background: #1f1d16; }
.code .c { color: #9fd3b6; }
.code .s { color: #e0c98f; }
.code .f { color: #8fb8d8; }
.code .k { color: #9fd3b6; font-weight: 500; }

code {
  font: 400 .9em var(--mono); background: var(--brass-wash);
  padding: 1px 5px; border-radius: 4px; color: var(--ink);
}

/* --- pricing ------------------------------------------------------------- */

.table-wrap { overflow-x: auto; margin-bottom: 44px; }

.pricing { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 540px; }
.pricing th, .pricing td { padding: 15px 18px 15px 0; text-align: left; }
.pricing thead th {
  font: 500 11.5px var(--body); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-muted); border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 11px;
}
.pricing tbody th { font-weight: 500; }
.pricing tbody tr { border-bottom: 1px solid var(--rule); }
.pricing tbody tr:last-child { border-bottom: 0; }
.pricing .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pricing tbody td:last-child { color: var(--verdigris); font-weight: 600; }

.note-grid {
  display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.note-grid.four { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.note { border-top: 2px solid var(--verdigris); padding-top: 15px; }
.note p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

/* --- closing ------------------------------------------------------------- */

.closing {
  background: var(--ink); color: var(--paper);
  padding: 96px 0; text-align: center;
}
.closing h2 { color: var(--paper); margin: 0 auto 18px; max-width: 22ch; }
.closing p {
  color: #b8b2a0; max-width: 54ch; margin: 0 auto 32px; font-size: 16.5px;
}
.closing .cta { justify-content: center; margin: 0; }
.closing .ghost { color: var(--paper); border-color: #3d392c; }
.closing .ghost:hover { background: #26241b; }

/* --- footer -------------------------------------------------------------- */

.site-foot { background: var(--ink); color: #b8b2a0; padding: 64px 0 30px; }
.foot-grid {
  display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding-bottom: 40px;
}
.foot-brand { color: var(--paper); margin: 0 0 12px; font-size: 24px; }
.foot-note { font-size: 13.5px; line-height: 1.7; margin: 0; }
.foot-note a { color: #cfc9b8; }
.site-foot h4 {
  font: 500 11.5px var(--body); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 13px;
}
.site-foot .foot-grid a {
  display: block; color: #cfc9b8; text-decoration: none; font-size: 14.5px;
  padding: 4px 0;
}
.site-foot .foot-grid a:hover { color: var(--paper); }

.foot-legal {
  border-top: 1px solid #2c2a21; padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between;
  font-size: 12.5px; color: var(--ink-faint);
}
.foot-legal p { margin: 0; }

/* --- narrow -------------------------------------------------------------- */

@media (max-width: 820px) {
  .site nav { display: none; }
  .bar { gap: 14px; justify-content: space-between; }
  .bar-actions { margin-left: auto; }
  .hero { padding: 68px 0 56px; }
  .band { padding: 62px 0; }
}
@media (max-width: 480px) {
  .bar-actions .ghost { display: none; }
  .cta .solid, .cta .ghost { width: 100%; }
}
