/* Blue Desk website: type, colours, header, buttons and footer.
   The page keeps its own layout in a <style> block. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* Colours from the design book: neutral greys, one blue. The logo blue is
   #3D7EFF; on white it is deepened to #1F5FE0 so words on it can be read. */
:root {
  color-scheme: light dark;
  --page: #ffffff;
  --band: #f4f4f6;
  --surface: #ffffff;
  --raised: #f0f0f3;
  --ink: #1a1a1e;
  --ink-soft: #5c5c63;
  --line: #e6e6ea;
  --line-strong: #d4d4da;
  --lit: #3d7eff;
  --accent: #1f5fe0;
  --accent-ink: #ffffff;
  --accent-text: #1f5fe0;
  --accent-soft: #e6eeff;
  --ok: #1a7f37;
  --wait: #a15c00;
  --shadow: 0 1px 2px rgb(16 16 19 / 6%), 0 12px 32px -8px rgb(16 16 19 / 14%);
  --radius: 14px;
  --wide: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0c0c0e;
    --band: #141417;
    --surface: #1c1c21;
    --raised: #26262c;
    --ink: #f4f2ef;
    --ink-soft: #a7a39e;
    --line: rgb(255 255 255 / 8%);
    --line-strong: rgb(255 255 255 / 16%);
    --accent: #3d7eff;
    --accent-ink: #0c0c0e;
    --accent-text: #8fb2ff;
    --accent-soft: #16233f;
    --ok: #57c27a;
    --wait: #e2a54a;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 16px 40px -12px rgb(0 0 0 / 60%);
  }
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
  overflow-x: clip;
}

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

h1, h2, h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; }

a { color: var(--accent-text); }

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

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 720px) {
  .wrap { padding: 0 32px; }
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header: the mark and name, the links to the parts of the page, Sign in.
   On a phone the links sit on a second row under the other two. */
.top {
  position: relative;
  z-index: 10;
  background: var(--page);
  border-bottom: 1px solid var(--line);
}
.top-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand sign"
    "nav nav";
  align-items: center;
  column-gap: 16px;
  padding-top: 12px;
  padding-bottom: 4px;
}
.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand picture { display: block; line-height: 0; }
.brand img { width: auto; height: 30px; }
.top .sign-in { grid-area: sign; }
.top-nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  margin: 6px -10px 0;
}
.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.top-nav a:hover,
.top-nav a[aria-current] { color: var(--ink); }

@media (min-width: 760px) {
  .top {
    position: sticky;
    top: 0;
    background: color-mix(in srgb, var(--page) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
  }
  .top-row {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav sign";
    min-height: 64px;
    padding-top: 0;
    padding-bottom: 0;
  }
  .top-nav {
    justify-content: center;
    margin: 0;
  }
  html { scroll-padding-top: 80px; }
}

/* Buttons. One filled blue button per screen: Sign in. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover { filter: brightness(1.1); }
.button.small {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 0.9375rem;
}
.button:focus-visible { outline-color: var(--ink); }

/* A screenshot from the help guide, in a plain frame. */
.shot {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #f4f4f6;
  box-shadow: var(--shadow);
}
.shot img { width: 100%; }

/* Small line drawings beside headings. */
.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* A word in a pill, with a dot. The word carries the meaning, not the colour. */
.state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
}
.state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}
.state.later::before { background: var(--wait); }

/* Footer. */
.foot {
  border-top: 1px solid var(--line);
  background: var(--page);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px 48px;
  padding-top: 40px;
  padding-bottom: 24px;
}
.foot .brand { font-size: 1rem; }
.foot-about { max-width: 26em; margin-top: 10px; }
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot-links a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.foot-links a:hover { text-decoration: underline; }
.foot-small {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 16px;
  padding-bottom: 32px;
  font-size: 0.8125rem;
}
/* The rule above the small print, as wide as the words (not the side margins). */
.foot-small::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: var(--line);
}
@media (min-width: 720px) {
  .foot-small::before { left: 32px; right: 32px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .button { transition: filter 120ms ease; }
}
