/* Backspace — marketing site.
 *
 * Values come from Backspace Docs/docs/brand-guidelines.md: one background
 * (#101010), two whites stepped through an alpha ramp, one blue that means
 * "act". Posters carry the colour; nothing else is allowed to.
 */

@font-face { font-family: "Satoshi"; src: url("../fonts/Satoshi-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("../fonts/Satoshi-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("../fonts/Satoshi-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("../fonts/Satoshi-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/DMSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/DMSans-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/DMSans-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;

  --deep-black: #101010;
  --slate: #24282c;
  --sheet: #0e1014;
  --blue: #0a64bc;
  --navy: #010d27;
  --red: #eb5757;

  --white: #fefefe;
  --white-80: rgb(254 254 254 / 0.8);
  --white-60: rgb(254 254 254 / 0.6);
  --white-40: rgb(254 254 254 / 0.4);
  --shell: #cfd8dc;
  --shell-60: rgb(207 216 220 / 0.6);
  --shell-40: rgb(207 216 220 / 0.4);
  --shell-20: rgb(207 216 220 / 0.2);
  --shell-10: rgb(207 216 220 / 0.1);
  --shell-06: rgb(207 216 220 / 0.06);

  --display: "Satoshi", ui-sans-serif, system-ui, sans-serif;
  --body: "DM Sans", ui-sans-serif, system-ui, sans-serif;

  --gutter: 16px;
  --max: 1160px;
  --r-poster: 4px;
  --r-chip: 8px;
  --r-button: 16px;
  --r-card: 24px;
  --r-sheet: 32px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--deep-black);
  color: var(--shell);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--blue); color: var(--white); }

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

.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 100;
  background: var(--white); color: var(--deep-black);
  padding: 10px 16px; border-radius: 12px; font-family: var(--display); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- Type ---------- */

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--white);
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-weight: 900; font-size: clamp(40px, 7vw, 76px); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-weight: 700; font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -0.02em; }
h3 { font-weight: 700; font-size: 18px; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 500; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--shell-60);
}
.lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--shell-60); max-width: 56ch; }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgb(16 16 16 / 0.8);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--shell-10);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.lockup { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--white); font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.lockup img { width: 27px; height: 18px; }
.lockup .tm { align-self: flex-start; margin: 4.5px 0 0 -7px; letter-spacing: 0; font-family: var(--body); font-size: 9px; font-weight: 500; line-height: 1; color: var(--white-60); }
.nav-links { display: none; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-family: var(--display); font-weight: 500; font-size: 14px; color: var(--white-60); transition: color 0.15s; }
.nav-links a:hover { color: var(--white); }
@media (min-width: 860px) { .nav-links { display: flex; } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--r-button);
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--white); color: var(--deep-black); border: 0; }
.btn-primary:hover { background: #e9edef; }
.btn-secondary { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-secondary:hover { background: rgb(254 254 254 / 0.06); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; }

/* Store badges: Apple's and Google's official artwork, unmodified, at the
   same height (the Google PNG is cropped to its artwork so the two align). */
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.badge-link { display: inline-block; border-radius: 9px; line-height: 0; transition: transform 0.15s ease, opacity 0.15s ease; }
.badge-link:hover { opacity: 0.88; }
.badge-link:active { transform: scale(0.97); }
.badge-link img { height: 52px; width: auto; }
.badge-link[hidden] { display: none; }
.coming-soon {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 16px;
  font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--white);
  background: rgb(254 254 254 / 0.08); box-shadow: inset 0 0 0 1px rgb(254 254 254 / 0.18);
}
.coming-soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5aa6ee; box-shadow: 0 0 0 4px rgb(90 166 238 / 0.2); }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--shell-10); padding-block: 56px 40px; font-size: 14px; }
.footer-top { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer p { color: var(--shell-60); max-width: 34ch; margin-top: 12px; }
.footer h4 { font-size: 14px; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { text-decoration: none; color: var(--shell-60); transition: color 0.15s; }
.footer ul a:hover { color: var(--white); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--shell-10); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--shell-40); font-size: 13px; }

/* ---------- Legal & utility pages ---------- */

.doc-hero { padding-block: clamp(56px, 8vw, 96px) 40px; border-bottom: 1px solid var(--shell-10); background: linear-gradient(180deg, rgb(1 13 39 / 0.8), transparent); }
.doc-hero h1 { font-size: clamp(36px, 5vw, 56px); margin-top: 12px; }
.doc-hero p { margin-top: 16px; color: var(--shell-60); }
.doc { display: grid; gap: 48px; grid-template-columns: 1fr; padding-block: 48px 120px; }
@media (min-width: 1000px) { .doc { grid-template-columns: 240px minmax(0, 1fr); } }
.toc { display: none; }
@media (min-width: 1000px) {
  .toc { display: block; position: sticky; top: 96px; align-self: start; font-size: 14px; }
  .toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: toc; }
  .toc a { text-decoration: none; color: var(--shell-60); }
  .toc a:hover { color: var(--white); }
}
.prose { max-width: 70ch; font-size: 16px; color: var(--shell); }
.prose h2 { font-size: 24px; margin: 56px 0 16px; scroll-margin-top: 88px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 17px; margin: 28px 0 10px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--shell-40); }
.prose strong { color: var(--white); font-weight: 600; }
.prose a { color: var(--white); text-decoration-color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--shell-10); }
.prose th { font-family: var(--display); font-weight: 700; color: var(--white); white-space: nowrap; }
.prose td { color: var(--shell-60); min-width: 180px; }
.callout { border-radius: var(--r-button); padding: 20px 22px; margin: 0 0 24px; background: var(--shell-06); box-shadow: inset 0 0 0 1px var(--shell-10); }
.callout p:last-child { margin-bottom: 0; }

/* Details still to confirm before launch. Deliberately loud so none ships
   by accident: search the HTML for class="tbc". */
.tbc { background: rgb(235 87 87 / 0.14); color: #ffb4b4; border-radius: 4px; padding: 0 4px; box-shadow: inset 0 -1px 0 rgb(235 87 87 / 0.6); }

.steps-list { counter-reset: s; list-style: none; padding: 0 !important; }
.steps-list li { counter-increment: s; position: relative; padding-left: 44px; margin-bottom: 18px; }
.steps-list li::before {
  content: counter(s); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); color: var(--white); font-family: var(--display); font-weight: 700; font-size: 13px;
}

.center-page { min-height: calc(100vh - 64px); display: grid; place-items: center; text-align: center; padding: 64px var(--gutter); position: relative; isolation: isolate; }
.center-page::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 50% at 50% 30%, rgb(10 100 188 / 0.3), transparent 70%); }
.center-page .inner { display: flex; flex-direction: column; align-items: center; gap: 20px; max-width: 520px; }
.center-page .mark { width: 72px; height: 48px; }
.center-page .stores { justify-content: center; }

/* Legal tables: keep the grid column from growing to fit a wide table, and
   stack each row on phones so nothing scrolls sideways. */
.doc > * { min-width: 0; }
@media (max-width: 719px) {
  .prose table, .prose tbody, .prose tr, .prose th, .prose td { display: block; width: 100%; }
  .prose thead { display: none; }
  .prose tr { padding: 14px 0; border-bottom: 1px solid var(--shell-10); }
  .prose th, .prose td { border: 0; padding: 0; min-width: 0; white-space: normal; }
  .prose th { margin-bottom: 6px; }
  .prose td + td { margin-top: 6px; }
}

/* Result pages the backend redirects to after email links. */
.state { width: 56px; height: 56px; padding: 14px; border-radius: 50%; color: var(--white); background: var(--shell-10); box-shadow: inset 0 0 0 1px var(--shell-20); }
.state.ok { background: var(--blue); box-shadow: 0 16px 40px -12px rgb(10 100 188 / 0.8); }
.center-page .lede a { color: var(--white); text-decoration-color: var(--blue); text-underline-offset: 3px; }
