/* Sweep — marketing & legal site.
   Palette and type scale mirror src/theme/tokens.ts so the site and the app
   read as one product. Single dark theme, like the app itself. */

:root {
  --ink: #26262a;
  --tray: #313137;
  --tray-raised: #3c3c43;
  --hairline: #45454d;
  --paper: #f4f2ec;
  --muted: #a2a1a7;
  --dim: #6f6e76;
  --pencil: #f2c14e;
  --pencil-ink: #2a2208;
  --red: #e4574a;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 64ch;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--pencil);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--pencil);
  outline-offset: 3px;
  border-radius: 4px;
}

.shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

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

header.site {
  border-bottom: 1px solid var(--hairline);
}

header.site .shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 25px;
  letter-spacing: -0.04em;
  color: var(--paper);
}

.wordmark:hover {
  text-decoration: none;
}

.wordmark .mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--pencil);
  display: grid;
  place-items: center;
}

.wordmark .mark span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 2.5px solid var(--pencil-ink);
}

nav.site {
  display: flex;
  gap: 22px;
  font-size: 15px;
}

nav.site a {
  color: var(--muted);
}

nav.site a:hover,
nav.site a[aria-current="page"] {
  color: var(--paper);
  text-decoration: none;
}

nav.site a[aria-current="page"] {
  border-bottom: 2px solid var(--pencil);
}

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

.hero {
  padding: 84px 0 64px;
  text-align: center;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(38px, 8vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 auto 20px;
  max-width: 22ch;
  text-wrap: balance;
}

.hero p {
  margin: 0 auto 36px;
  max-width: 44ch;
  font-size: 19px;
  color: var(--muted);
  text-wrap: balance;
}

.hero .keep {
  color: var(--pencil);
}

.hero .toss {
  color: var(--red);
}

/* ---------- app store badge (inactive until release) ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px 13px 20px;
  border: 1.5px solid var(--hairline);
  border-radius: 12px;
  background: var(--tray);
  color: var(--paper);
  font: inherit;
  text-align: left;
  cursor: default;
}

.badge svg {
  flex: 0 0 auto;
  fill: var(--paper);
}

.badge .lines {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.badge .small {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge .big {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.hero .after-badge {
  margin: 18px auto 0;
  font-size: 14px;
  color: var(--dim);
}

/* ---------- promise strip ---------- */

.promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--hairline);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.promises div {
  background: var(--ink);
  padding: 26px 20px;
  text-align: center;
}

.promises dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.promises dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

/* ---------- page links ---------- */

.pages {
  padding: 56px 0 32px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pages h2 {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 14px;
}

.pages a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--hairline);
  color: var(--paper);
}

.pages a:last-of-type {
  border-bottom: 1px solid var(--hairline);
}

.pages a:hover {
  text-decoration: none;
}

.pages a:hover .name {
  color: var(--pencil);
}

.pages .name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.pages .what {
  flex: 1 1 auto;
  font-size: 14.5px;
  color: var(--muted);
  text-align: right;
}

/* ---------- document pages ---------- */

article.doc {
  padding: 60px 0 40px;
  max-width: var(--measure);
}

article.doc h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 8px;
  text-wrap: balance;
}

article.doc .updated {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
  margin: 0 0 34px;
}

article.doc h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 42px 0 10px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}

article.doc p {
  margin: 0 0 15px;
}

article.doc ul {
  margin: 0 0 15px;
  padding-left: 22px;
}

article.doc li {
  margin-bottom: 7px;
}

article.doc li::marker {
  color: var(--pencil);
}

article.doc strong {
  font-weight: 600;
}

article.doc .keyline {
  margin: 0 0 26px;
  padding: 18px 20px;
  background: var(--tray);
  border-left: 3px solid var(--pencil);
  border-radius: 0 12px 12px 0;
  font-weight: 500;
}

article.doc code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--tray-raised);
  padding: 2px 6px;
  border-radius: 5px;
}

article.doc hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 34px 0 22px;
}

article.doc .eula {
  font-size: 14.5px;
  color: var(--muted);
}

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

footer.site {
  border-top: 1px solid var(--hairline);
  margin-top: 40px;
}

footer.site .shell {
  padding-top: 32px;
  padding-bottom: 56px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
  color: var(--dim);
}

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

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

@media (max-width: 620px) {
  .hero {
    padding: 56px 0 64px;
  }

  .promises {
    grid-template-columns: minmax(0, 1fr);
  }

  .pages a {
    flex-direction: column;
    gap: 4px;
  }

  .pages .what {
    text-align: left;
  }

  article.doc {
    padding-top: 44px;
  }
}

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