@font-face {
  font-family: "FK Grotesk Neue";
  src: url("/fonts/FKGroteskNeue-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "FK Grotesk Neue";
  src: url("/fonts/FKGroteskNeue-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* 402pay's colors, as the main site sets them: ink on white, the green
   accent, and a soft tint of it, then the same in dark. */
:root {
  --background: #ffffff;
  --foreground: #111111;
  --muted: #5c5c5c;
  --rule: rgba(17, 17, 17, 0.22);
  --accent: #119e47;
  --accent-soft: rgba(17, 158, 71, 0.14);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #141414;
    --foreground: #fafafa;
    --muted: #a3a3a3;
    --rule: rgba(250, 250, 250, 0.26);
    --accent: #6ef78c;
    --accent-soft: rgba(110, 247, 140, 0.16);
    color-scheme: dark;
  }
}

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

/* Hidden means hidden, whatever display a class gives the element. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "FK Grotesk Neue", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-wrap: pretty;
}

/* The dot field, faint down the right side behind everything, fading
   toward the text. field.js draws it; phones and narrow windows don't show
   it, so it never sits under the words. */
.dots {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 0;
  display: none;
  width: min(44vw, 720px);
  height: 100vh;
  color: var(--accent);
  opacity: 0.34;
  pointer-events: none;
  /* A long, eased fade toward the text rather than an edge. */
  -webkit-mask-image: linear-gradient(to left, #000, rgba(0, 0, 0, 0.7) 25%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.08) 72%, transparent 90%);
  mask-image: linear-gradient(to left, #000, rgba(0, 0, 0, 0.7) 25%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.08) 72%, transparent 90%);
}

/* The bright green reads much stronger on the dark ground, so it sits lower. */
@media (prefers-color-scheme: dark) {
  .dots {
    opacity: 0.24;
  }
}

@media (min-width: 1100px) {
  .dots {
    display: block;
  }
}

/* One narrow column, the footer pinned to the bottom of the screen. */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: max(28px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

@media (min-width: 640px) {
  .page {
    padding: 32px 26px 24px;
  }
}

.home {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--foreground);
  border-radius: 4px;
}

/* The 402pay mark, the favicon's, in the accent. */
.mark {
  display: block;
  width: 40px;
  height: auto;
  color: var(--accent);
}

main {
  max-width: 50rem;
  margin-top: 56px;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

@media (min-width: 640px) {
  main {
    margin-top: 72px;
    font-size: 24px;
  }
}

h1,
p {
  margin: 0 0 1.05em;
  font-size: inherit;
  line-height: inherit;
}

h1 {
  font-weight: 500;
  text-wrap: pretty;
}

p {
  font-weight: 400;
}

/* Links in the text: a soft underline that takes the accent on hover. */
.text-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  border-radius: 2px;
  transition: text-decoration-color 150ms ease;
}

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

/* The one way in: its label over a thick accent underline. */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 0.3em;
  color: var(--foreground);
  text-decoration: none;
  border-radius: 4px;
}

.cta-label {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}

/* An industry's points, each beside its icon. */
ul.points {
  display: grid;
  gap: 0.6em;
  margin: 0 0 1.3em;
  padding: 0;
  list-style: none;
}

ul.points li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

ul.points svg {
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  margin-top: 0.15em;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Talk to our team: one column of plain fields. */
main.narrow {
  max-width: 30rem;
}

main.narrow h1 {
  margin-bottom: 1.2em;
}

.form {
  display: grid;
  gap: 22px;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field label,
.field legend {
  padding: 0;
  font-weight: 500;
}

.field legend {
  margin-bottom: 8px;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.field input[type="url"],
.field input[type="text"],
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
}

.field select {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 15px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.field select option {
  background: var(--background);
  color: var(--foreground);
}

.field textarea {
  resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.field input[aria-invalid="true"] {
  border-color: #d93025;
}

.error {
  margin: 0;
  font-size: 14px;
  color: #d93025;
}

@media (prefers-color-scheme: dark) {
  .field input[aria-invalid="true"] {
    border-color: #ff8a80;
  }

  .error {
    color: #ff8a80;
  }
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-weight: 400 !important;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.cf-turnstile {
  min-height: 65px;
}

.done {
  font-size: 18px;
  line-height: 1.45;
  outline: none;
}

/* The same outlined icon as the industry pages' points, larger. */
.done > svg {
  display: block;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.done p {
  margin: 0;
}

.button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.button {
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #0b2414;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: filter 150ms ease;
}

.button:hover {
  filter: brightness(1.08);
}

.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* The legal index: one document a line. */
.doc-list {
  display: grid;
  gap: 0.4em;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The legal documents: reading size, a wider column and plain structure. */
main.legal {
  max-width: 44rem;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

main.legal h1 {
  margin-bottom: 0.6em;
  font-size: 32px;
  line-height: 1.15;
}

.doc h2 {
  margin: 2.2em 0 0.6em;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
}

.doc h3 {
  margin: 1.6em 0 0.4em;
  font-size: 17px;
  font-weight: 500;
}

.doc p,
.doc ul,
.doc ol,
.doc dl {
  margin: 0 0 1em;
}

.doc ul,
.doc ol {
  padding-left: 1.3em;
}

.doc li {
  margin-bottom: 0.4em;
}

.doc dt {
  font-weight: 500;
}

.doc dd {
  margin: 0 0 0.8em;
}

.doc a {
  color: inherit;
  text-decoration-color: var(--rule);
  text-underline-offset: 0.2em;
}

.doc a:hover {
  text-decoration-color: var(--accent);
}

.doc table {
  display: block;
  width: 100%;
  overflow-x: auto;
  margin: 0 0 1.2em;
  border-collapse: collapse;
  font-size: 15px;
}

.doc th,
.doc td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.doc th {
  font-weight: 500;
}


footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  margin-top: auto;
  padding-top: 48px;
  font-size: 13px;
  color: var(--foreground);
}

footer a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
}

footer a:hover {
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
