/* Sweep — marketing & legal site.
   Palette mirrors src/theme/tokens.ts so site and app read as one product. */

:root {
  color-scheme: dark;
  --ink: #26262a;
  --tray: #313137;
  --tray-raised: #3c3c43;
  --hairline: #5a5a63;      /* 2.21:1 on ink, 2.62:1 on sheet — the page's
                               primary structural device, because the tonal
                               step to --sheet tops out at 1.19:1 at any value */
  --rule: #63636d;          /* 2.54:1 on ink — where a rule is the ONLY separator */
  --sheet: #171719;         /* the print: deliberately DARKER than the bench */
  --rebate: #c9a24e;        /* film-edge print. 6.29:1 on ink, 7.47:1 on sheet */
  --wax-keep: rgba(242, 193, 78, 0.18);
  --wax-toss: rgba(228, 87, 74, 0.16);
  --paper: #f4f2ec;
  --muted: #a2a1a7;
  --dim: #949399;           /* 4.95:1 on --ink; the old value was 2.99:1 */
  --pencil: #f2c14e;
  --pencil-ink: #2a2208;
  --red: #e4574a;           /* graphic marks only */
  --red-text: #f58074;      /* red as text: 5.9:1 on --ink */

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

  --measure: 64ch;
  --shell: 1180px;
}

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage.woff2") format("woff2-variations"), url("/fonts/bricolage.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fixel";
  src: url("/fonts/fixel.woff2") format("woff2-variations"), url("/fonts/fixel.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 87.5% 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-latin-ext.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans-cyrillic.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

html[lang="uk"] {
  --display: "Fixel", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(242, 193, 78, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(228, 87, 74, 0.06), transparent 50%),
    var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -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: var(--shell);
  margin: 0 auto;
  padding: 0 22px;
}

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

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(38, 38, 42, 0.86);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(69, 69, 77, 0.7);
}

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

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

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

.wordmark .mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: url("/favicon.svg") center / cover no-repeat;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 22px;
  top: 12px;
  z-index: 30;
  padding: 10px 14px;
  background: var(--pencil);
  color: var(--pencil-ink);
  border-radius: 10px;
  font-weight: 600;
}

/* Marks a value that must be filled in before this page is published. */
mark.fill {
  background: var(--red-fill, #c7392c);
  color: #fff;
  padding: 1px 7px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.92em;
}

nav.site {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
  font-size: 14px;
  font-weight: 500;
}

nav.site a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  margin: 0 -4px;
}
nav.site a:hover,
nav.site a[aria-current="page"] {
  color: var(--paper);
  text-decoration: none;
}

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

article.doc {
  margin-inline: auto;
  padding: 48px 0 40px;
  max-width: var(--measure);
}

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

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

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

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

article.doc p a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

article.doc li { margin-bottom: 6px; }
article.doc li::marker { color: var(--pencil); }
article.doc strong { font-weight: 600; }

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

article.doc code {
  font-family: ui-monospace, Menlo, monospace;
  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: 28px 0 20px;
}

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

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

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

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

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

.site-langs {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-basis: 100%;
}

.site-langs > svg {
  flex: none;
  margin-top: 13px;
}

.site-langs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-langs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-langs a[aria-current="page"] {
  color: var(--paper);
  font-weight: 600;
}

.site-legal {
  flex-basis: 100%;
  margin: 0;
}

/* One darkroom safelight, off-axis and behind everything. */
body {
  background-image: radial-gradient(560px 380px at 6% -8%, rgba(228, 87, 74, 0.05), transparent 70%);
  background-repeat: no-repeat;
}

/* ---------- shared tail ---------- */

main { flex: 1 0 auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* The wordmark plus three nav links overflow a 320px header at full size. */
@media (max-width: 380px) {
  nav.site { gap: 14px; font-size: 13px; }
}
