/*
 * Statisfy website.
 *
 * Tokens follow the app (src/theme/themes.ts, dark palette): Manrope, a
 * graphite near-black, and one green that means "the primary thing". The green
 * is the app's #1DDB6E, and text on it is #062814, because white on that green
 * reaches only 2.6:1.
 *
 * The one loud element is the hero's diagonal bars, lifted from the app icon.
 * Everything else stays quiet: hairlines instead of cards, left-aligned text,
 * one typeface. If you add a section, resist giving it a background of its own.
 */

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0a0d0b;
  --panel: #141816;
  --raised: #1b201d;
  --line: rgba(242, 244, 241, 0.09);
  --line-strong: rgba(242, 244, 241, 0.16);
  --paper: #f2f4f1;
  --mute: #9aa39d;
  --green: #1ddb6e;
  --green-ink: #99efbe;
  --on-green: #062814;
  --green-wash: rgba(29, 219, 110, 0.1);

  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: 24px;
  --section: clamp(72px, 11vw, 136px);
  --radius: 18px;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--green-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  background: var(--raised);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

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

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 10;
  background: var(--green);
  color: var(--on-green);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus {
  top: 8px;
}

/* ---------------------------------------------------------------- buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, transform 0.08s ease;
}
.button:active {
  transform: translateY(1px);
}
.button--primary {
  background: var(--green);
  color: var(--on-green);
}
.button--primary:hover {
  background: #3be584;
}
.button--secondary {
  color: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}
.button--secondary:hover {
  box-shadow: inset 0 0 0 1.5px var(--paper);
}
.button--small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.9375rem;
  background: var(--green);
  color: var(--on-green);
}
.button--small:hover {
  background: #3be584;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: relative;
  z-index: 3;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1875rem;
  letter-spacing: -0.02em;
}
.brand img {
  width: 32px;
  height: 32px;
}

.site-header nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-header nav a:not(.button) {
  display: inline-block;
  padding: 8px 12px;
  color: var(--mute);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: 999px;
}
.site-header nav a:not(.button):hover,
.site-header nav a[aria-current="page"] {
  color: var(--paper);
}
.site-header__cta {
  margin-left: 8px;
}

/* ---------------------------------------------------------------- phone frame */

.phone {
  margin: 0;
  position: relative;
  border-radius: 46px;
  padding: 7px;
  background: linear-gradient(160deg, #2e3531, #1a1f1c 40%, #242a26);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 40px 80px -30px rgba(0, 0, 0, 0.8),
    0 18px 40px -20px rgba(0, 0, 0, 0.6);
  width: 100%;
  max-width: 320px;
}
.phone img {
  border-radius: 39px;
  width: 100%;
  background: var(--ink);
}

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

.hero {
  position: relative;
  /* The bars are wider than a phone screen on purpose; clip them to the page. */
  overflow: hidden;
  overflow: clip;
  padding-top: clamp(24px, 5vw, 56px);
  padding-bottom: var(--section);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}
.hero h1 {
  font-size: clamp(2.75rem, 6.6vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.hero h1 span {
  display: block;
}
.hero h1 span + span {
  color: var(--green);
}
.hero__lede {
  margin-top: 28px;
  max-width: 34em;
  color: var(--mute);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 36px;
}
.hero__note {
  color: var(--mute);
  font-size: 0.9375rem;
  margin: 0;
}

.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
}
.hero__visual .phone {
  position: relative;
  z-index: 1;
  max-width: 300px;
}

/* The five bars of the app icon, scaled up behind the phone. They draw in once
   on load, left to right, like a level meter coming up — the only motion on the
   site that nobody asked for. */
.bars {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(760px, 150%);
  translate: -50% -50%;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
.bars line {
  stroke: var(--green);
  stroke-width: 58;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.bars line:nth-child(1),
.bars line:nth-child(5) {
  opacity: 0.35;
}
.bars line:nth-child(2),
.bars line:nth-child(4) {
  opacity: 0.6;
}
@media (prefers-reduced-motion: no-preference) {
  .bars line {
    animation: bar-in 900ms cubic-bezier(0.2, 0.7, 0.1, 1) both;
  }
  .bars line:nth-child(1) { animation-delay: 120ms; }
  .bars line:nth-child(2) { animation-delay: 200ms; }
  .bars line:nth-child(3) { animation-delay: 280ms; }
  .bars line:nth-child(4) { animation-delay: 360ms; }
  .bars line:nth-child(5) { animation-delay: 440ms; }
}
@keyframes bar-in {
  from {
    stroke-dashoffset: 1;
  }
}

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

.section {
  padding-block: var(--section);
  border-top: 1px solid var(--line);
}

.section__head {
  max-width: 40rem;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section__head h2,
.split h2 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
}
.section__head p,
.split__text > p {
  margin-top: 20px;
  color: var(--mute);
  font-size: 1.125rem;
  max-width: 36em;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
}
.split--flip .split__media {
  order: -1;
}
.split__media {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}
.split__media--pair .phone {
  max-width: 260px;
}
.split__media--pair .phone + .phone {
  margin-top: 64px;
}

/* A list of facts, set as rows with hairlines between. Used instead of cards. */
.facts {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.facts li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--mute);
}
.facts strong {
  display: block;
  color: var(--paper);
  font-weight: 600;
  margin-bottom: 2px;
}

/* Import sources: four ways in, side by side. Not a sequence, so not numbered. */
.sources {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}
.sources li {
  padding: 28px 28px 8px 0;
}
.sources li + li {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}
.sources svg {
  width: 30px;
  height: 30px;
  color: var(--green);
  margin-bottom: 18px;
}
.sources h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.sources p {
  color: var(--mute);
  font-size: 0.98rem;
  margin: 0;
}

/* Free vs Premium */
.plans {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
}
.plan {
  padding-top: 24px;
  border-top: 2px solid var(--line-strong);
}
.plan--premium {
  border-top-color: var(--green);
}
.plan h3 {
  font-size: 1.5rem;
}
.plan > p {
  color: var(--mute);
  margin-top: 8px;
}
.plan ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.plan li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--line);
}
.plan li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.15em;
  width: 12px;
  height: 6px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  rotate: -45deg;
}
.plans__note {
  margin-top: 28px;
  color: var(--mute);
  font-size: 0.9375rem;
  max-width: 44em;
}

/* Screenshot rail */
.rail {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding: 8px var(--gutter) 32px;
  margin-inline: calc(var(--gutter) * -1);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.rail figure {
  flex: 0 0 auto;
  margin: 0;
  scroll-snap-align: start;
  width: 240px;
}
.rail .phone {
  border-radius: 38px;
  padding: 6px;
}
.rail .phone img {
  border-radius: 32px;
}
.rail figcaption {
  margin-top: 14px;
  color: var(--mute);
  font-size: 0.9375rem;
}
.rail figcaption strong {
  color: var(--paper);
  font-weight: 600;
  display: block;
}

/* Closing call to action */
.closer {
  padding-block: var(--section);
  border-top: 1px solid var(--line);
}
.closer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.closer h2 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  letter-spacing: -0.04em;
  max-width: 12em;
}
.closer p {
  color: var(--mute);
  margin: 16px 0 0;
}

/* ---------------------------------------------------------------- inner pages */

.page-head {
  padding-top: clamp(32px, 6vw, 72px);
  padding-bottom: clamp(32px, 5vw, 56px);
}
.page-head h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  letter-spacing: -0.04em;
  line-height: 1;
}
.page-head p {
  margin-top: 20px;
  color: var(--mute);
  font-size: 1.1875rem;
  max-width: 38em;
}
.page-head .meta {
  font-size: 0.9375rem;
  margin-top: 12px;
}

.with-toc {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
  padding-bottom: var(--section);
}
.toc {
  position: sticky;
  top: 24px;
  font-size: 0.9375rem;
}
.toc h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--mute);
  margin-bottom: 10px;
}
.toc ol,
.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}
.toc a {
  display: block;
  padding: 6px 0 6px 16px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--mute);
  text-decoration: none;
  line-height: 1.35;
}
.toc a:hover {
  color: var(--paper);
  border-left-color: var(--green);
}

/* Long-form reading: support answers, the policy, the terms, feature detail. */
.prose {
  max-width: 44rem;
}
.prose > section {
  scroll-margin-top: 24px;
}
.prose > section + section {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}
.prose h2 {
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  margin-bottom: 18px;
}
.prose h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.015em;
  margin: 32px 0 10px;
}
.prose p,
.prose li {
  color: #c9cfca;
}
.prose strong {
  color: var(--paper);
  font-weight: 600;
}
.prose ul,
.prose ol {
  padding-left: 1.25em;
  margin: 0 0 1em;
}
.prose li {
  margin-bottom: 0.5em;
}
.prose li::marker {
  color: var(--mute);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 24px;
  font-size: 0.9375rem;
}
.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  color: #c9cfca;
}
.prose th {
  color: var(--paper);
  font-weight: 600;
  border-bottom-color: var(--line-strong);
}
.table-scroll {
  overflow-x: auto;
}

.summary-box {
  background: var(--green-wash);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.summary-box h2 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}
.summary-box ul {
  margin: 0;
}
.summary-box li {
  color: var(--paper);
}

.callout {
  border-left: 3px solid var(--green);
  padding: 4px 0 4px 20px;
  margin: 24px 0;
}
.callout p:last-child {
  margin-bottom: 0;
}

/* FAQ */
.faq {
  border-top: 1px solid var(--line-strong);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 20px 44px 20px 0;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--paper);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 14px;
  height: 14px;
  translate: 0 -50%;
  background:
    linear-gradient(var(--mute), var(--mute)) center / 14px 2px no-repeat,
    linear-gradient(var(--mute), var(--mute)) center / 2px 14px no-repeat;
  transition: rotate 0.2s ease;
}
.faq details[open] summary::after {
  rotate: 45deg;
}
.faq summary:hover {
  color: var(--green-ink);
}
.faq .answer {
  padding: 0 0 20px;
}
.faq .answer > :last-child {
  margin-bottom: 0;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--panel);
  margin-bottom: clamp(48px, 7vw, 80px);
}
.contact h2 {
  font-size: 1.5rem;
}
.contact p {
  color: var(--mute);
  margin: 8px 0 0;
  max-width: 34em;
}

.feature-figure {
  float: right;
  width: 220px;
  margin: 4px 0 24px 40px;
}
.feature-figure .phone {
  border-radius: 36px;
  padding: 6px;
}
.feature-figure .phone img {
  border-radius: 30px;
}

/* 404 */
.lost {
  padding-block: clamp(64px, 12vw, 160px);
}
.lost h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  letter-spacing: -0.045em;
}
.lost p {
  color: var(--mute);
  font-size: 1.1875rem;
  margin-top: 20px;
  max-width: 30em;
}
.lost .hero__actions {
  margin-top: 32px;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 56px 40px;
  font-size: 0.9375rem;
  color: var(--mute);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.site-footer__about p {
  margin-top: 14px;
  max-width: 26em;
}
.site-footer h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--paper);
  margin-bottom: 12px;
}
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer li {
  margin-bottom: 8px;
}
.site-footer a:not(.brand) {
  color: var(--mute);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.site-footer a:not(.brand):hover {
  color: var(--paper);
  text-decoration: underline;
}
.site-footer__fine {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  line-height: 1.55;
}
.site-footer__fine p {
  margin: 0 0 6px;
  max-width: 70em;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 960px) {
  .sources {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sources li:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .sources li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .site-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .site-footer__about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .hero__grid,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .split--flip .split__media {
    order: 0;
  }
  .hero__visual {
    min-height: 0;
    padding-block: 24px 8px;
  }
  .hero__visual .phone {
    max-width: 250px;
  }
  .bars {
    width: min(560px, 135%);
  }
  .with-toc {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc {
    position: static;
    padding-bottom: 8px;
  }
  .toc ol,
  .toc ul {
    columns: 2;
    column-gap: 24px;
  }
  .toc li {
    break-inside: avoid;
  }
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-figure {
    float: none;
    width: 200px;
    margin: 8px 0 28px;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 16px;
  }
  body {
    font-size: 1rem;
  }
  .site-header nav a:not(.button) {
    padding: 8px 8px;
  }
  .site-header__cta {
    display: none;
  }
  .sources {
    grid-template-columns: minmax(0, 1fr);
  }
  .sources li,
  .sources li + li {
    padding: 24px 0 20px;
    border-left: 0;
  }
  .sources li + li {
    border-top: 1px solid var(--line);
  }
  .split__media--pair .phone {
    max-width: 46%;
  }
  .split__media--pair .phone + .phone {
    margin-top: 40px;
  }
  .rail figure {
    width: 200px;
  }
  .contact {
    padding: 24px 20px;
  }
  .toc ol,
  .toc ul {
    columns: 1;
  }
  .site-footer__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .hero__actions .button {
    width: 100%;
  }
}

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

/* Three-up variant of the sources row, used for the privacy statements. */
.sources--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 960px) {
  .sources--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sources--three li:nth-child(3) {
    padding-left: 28px;
    border-left: 1px solid var(--line);
  }
  .sources--three li:nth-child(n + 3) {
    border-top: 0;
  }
}
@media (max-width: 720px) {
  .sources--three {
    grid-template-columns: minmax(0, 1fr);
  }
  .sources--three li,
  .sources--three li + li,
  .sources--three li:nth-child(3) {
    padding: 24px 0 20px;
    border-left: 0;
  }
  .sources--three li + li {
    border-top: 1px solid var(--line);
  }
}
