/* Recoflo marketing site. The tokens are those of the application's design
   system (GitHub Primer primitives with Recoflo's green); the spacing is
   that of a marketing page. Mona Sans and Hubot Sans: SIL Open Font
   License 1.1, see fonts/OFL.txt. */

@font-face {
  font-family: "Mona Sans";
  src: url("/assets/fonts/MonaSans-VF.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hubot Sans";
  src: url("/assets/fonts/HubotSans-VF.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --fg: #1f2328;
  --fg-muted: #59636e;
  --fg-on-emphasis: #ffffff;
  --fg-link: #0969da;
  --bg: #ffffff;
  --bg-muted: #f6f8fa;
  --border: #d1d9e0;
  --border-muted: #d1d9e0b3;
  --brand: #2f5d50;
  --brand-hover: #264d42;
  --brand-active: #1f4037;
  --brand-muted: #e6efec;
  --success-fg: #1a7f37;
  --success-bg: #dafbe1;
  --focus: #0969da;

  --font-sans: "Mona Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans", Helvetica, Arial, sans-serif;
  --font-display: "Hubot Sans", var(--font-sans);

  --radius: 6px;
  --radius-large: 12px;
  --shadow: 0 1px 1px #1f23280a, 0 8px 24px #1f232814;
  --width: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section: clamp(3.5rem, 9vw, 7rem);
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--fg-link);
  text-underline-offset: 0.2em;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
}

h2 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
}

h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
}

.wrap {
  width: 100%;
  max-width: var(--width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.skip:focus {
  top: 0.5rem;
}

/* Header */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffffeb;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-muted);
}

.header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--brand);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 1.5rem;
  margin-right: auto;
  font-size: 0.9375rem;
}

.nav a,
.lang a {
  color: var(--fg);
  text-decoration: none;
}

.nav a:hover,
.lang a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.lang {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.nav + .lang {
  margin-left: 0;
}

.lang [aria-current] {
  font-weight: 600;
  color: var(--fg);
}

@media (max-width: 52rem) {
  .nav {
    display: none;
  }

  .nav + .lang {
    margin-left: auto;
  }
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.button-primary {
  background: var(--brand);
  color: var(--fg-on-emphasis);
}

.button-primary:hover {
  background: var(--brand-hover);
}

.button-primary:active {
  background: var(--brand-active);
}

.button-small {
  min-height: 2.25rem;
  padding: 0.25rem 0.875rem;
  font-size: 0.875rem;
}

.arrow {
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
}

.arrow::after {
  content: " \2192";
}

.arrow:hover {
  color: var(--brand);
  text-decoration: underline;
}

/* Text parts */

.eyebrow {
  margin-bottom: 0.875rem;
  color: var(--brand);
  font-size: 0.9375rem;
  font-weight: 600;
}

.lead {
  color: var(--fg-muted);
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.muted {
  color: var(--fg-muted);
}

section {
  padding-block: var(--section);
}

.band {
  background: var(--bg-muted);
  border-block: 1px solid var(--border-muted);
}

.head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.head h2 + .lead {
  margin-top: 1rem;
}

/* Hero */

.hero {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
  text-align: center;
}

.hero h1 {
  max-width: 15ch;
  margin-inline: auto;
}

.hero .lead {
  max-width: 36rem;
  margin: 1.5rem auto 2rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.75rem;
}

.flow {
  display: grid;
  grid-template-columns: minmax(0, 15rem) 3rem minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  margin-top: clamp(3rem, 7vw, 5rem);
  text-align: left;
}

.flow-arrow {
  color: var(--fg-muted);
  font-size: 2rem;
  line-height: 1;
  text-align: center;
}

@media (max-width: 52rem) {
  .flow {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }
}

/* The drawn stack with its cover sheet */

.stack {
  position: relative;
  width: 100%;
  max-width: 13rem;
  aspect-ratio: 210 / 297;
  margin: 0 1.25rem 1.25rem 0;
}

.sheet {
  position: absolute;
  inset: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
}

.sheet:nth-child(1) {
  transform: translate(1.25rem, 1.25rem);
}

.sheet:nth-child(2) {
  transform: translate(0.625rem, 0.625rem);
}

.sheet.cover {
  display: flex;
  flex-direction: column;
  padding: 11%;
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.cover img {
  width: 46%;
}

.cover .rule {
  height: 0.4375rem;
  margin-top: 0.625rem;
  border-radius: 1rem;
  background: var(--border);
}

.cover .rule:first-of-type {
  margin-top: auto;
}

.cover .rule:nth-of-type(2) {
  width: 72%;
}

.cover .rule:nth-of-type(3) {
  width: 48%;
}

.cover .tab {
  position: absolute;
  top: 11%;
  right: 11%;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
}

/* A screenshot in its frame */

.frame {
  margin: 0;
  overflow: hidden;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow);
}

.frame::before {
  content: "";
  display: block;
  height: 1.75rem;
  border-bottom: 1px solid var(--border-muted);
  background:
    radial-gradient(circle, var(--border) 0.25rem, transparent 0.28rem) 0.75rem 50% / 0.5rem 0.5rem no-repeat,
    radial-gradient(circle, var(--border) 0.25rem, transparent 0.28rem) 1.625rem 50% / 0.5rem 0.5rem no-repeat,
    radial-gradient(circle, var(--border) 0.25rem, transparent 0.28rem) 2.5rem 50% / 0.5rem 0.5rem no-repeat,
    var(--bg);
}

.frame img {
  width: 100%;
}

.frame.fade img {
  -webkit-mask-image: linear-gradient(#000 78%, transparent);
  mask-image: linear-gradient(#000 78%, transparent);
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-top: 1.25rem;
  border-top: 2px solid var(--brand);
}

.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 0.75rem;
  color: var(--brand);
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 650;
  line-height: 1;
}

.steps p,
.card p {
  margin-top: 0.5rem;
  color: var(--fg-muted);
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.25rem;
}

.cards-two {
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.card {
  padding: 1.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
}

.card svg {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 1rem;
  color: var(--brand);
}

.cards-two .card h3 {
  font-size: 1.375rem;
}

.note {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--brand-muted);
  border-radius: var(--radius-large);
  color: var(--fg);
}

.note strong {
  color: var(--brand);
}

/* A text beside a picture */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.split.flip > :first-child {
  order: 2;
}

.split h2 + p {
  margin-top: 1rem;
}

@media (max-width: 52rem) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .split.flip > :first-child {
    order: 0;
  }
}

/* Call to action */

.cta {
  text-align: center;
}

.cta .lead {
  max-width: 34rem;
  margin: 1rem auto 2rem;
}

/* Footer */

.footer {
  padding-block: 2rem;
  border-top: 1px solid var(--border-muted);
  color: var(--fg-muted);
  font-size: 0.875rem;
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer p {
  margin-right: auto;
}

.footer a {
  color: var(--fg-muted);
}

/* Text pages: privacy, not found */

.prose {
  max-width: 44rem;
  padding-block: clamp(3rem, 7vw, 5rem);
}

.prose h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.5rem;
}

.prose h2 {
  margin: 2.5rem 0 0.75rem;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.prose p + p {
  margin-top: 1rem;
}
