/* Bulpost tools: Geist-inspired, with no rounded corners. The hub, QR Code Gen, Background Removal and Image Edit
   share the fonts, colours and base styles below, word for word, and write buttons and inputs the same way.
   Change them in all four. */

@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background-100: #ffffff;
  --background-200: #fafafa;
  --gray-100: #f2f2f2;
  --gray-200: #ebebeb;
  --gray-400: #d6d6d6;
  --gray-700: #8f8f8f;
  --gray-900: #666666;
  --gray-1000: #171717;
  --gray-alpha-100: rgba(0, 0, 0, 0.04);
  --gray-alpha-200: rgba(0, 0, 0, 0.06);
  --gray-alpha-400: rgba(0, 0, 0, 0.08);
  --gray-alpha-500: rgba(0, 0, 0, 0.21);
  --gray-alpha-700: rgba(0, 0, 0, 0.44);
  --primary-hover: #383838;
  --blue-100: #f0f7ff;
  --blue-200: #e5f1ff;
  --blue-700: #006bff;
  --red-100: #ffebeb;
  --red-400: #ffc9cb;
  --red-800: #da2f35;
  --red-900: #cb2a2f;
  --red-1000: #8e1a1f;
  --amber-700: #ffb224;
  --green-700: #45a557;
  --green-900: #297a3a;
  --overlay: rgba(0, 0, 0, 0.78);
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.02), 0 4px 8px -4px rgba(0, 0, 0, 0.04), 0 16px 24px -8px rgba(0, 0, 0, 0.06);
  --shadow-menu: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 4px 8px -4px rgba(0, 0, 0, 0.04), 0 16px 24px -8px rgba(0, 0, 0, 0.12);
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background-100: #0a0a0a;
    --background-200: #000000;
    --gray-100: #1a1a1a;
    --gray-200: #1f1f1f;
    --gray-400: #2e2e2e;
    --gray-700: #8f8f8f;
    --gray-900: #a1a1a1;
    --gray-1000: #ededed;
    --gray-alpha-100: rgba(255, 255, 255, 0.05);
    --gray-alpha-200: rgba(255, 255, 255, 0.08);
    --gray-alpha-400: rgba(255, 255, 255, 0.14);
    --gray-alpha-500: rgba(255, 255, 255, 0.24);
    --gray-alpha-700: rgba(255, 255, 255, 0.44);
    --primary-hover: #cccccc;
    --blue-100: #0f1b2d;
    --blue-200: #10233d;
    --blue-700: #0a72ef;
    --red-100: #2a1314;
    --red-400: #671e21;
    --red-800: #e5484d;
    --red-900: #ff6166;
    --red-1000: #fdd8d8;
    --amber-700: #ffb224;
    --green-700: #46a758;
    --green-900: #62c073;
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 4px 8px -4px rgba(0, 0, 0, 0.6);
    --shadow-menu: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 4px 8px -4px rgba(0, 0, 0, 0.6), 0 16px 24px -8px rgba(0, 0, 0, 0.7);
  }
}

* {
  box-sizing: border-box;
  border-radius: 0;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--background-200);
  color: var(--gray-1000);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

h1, h2, p, ul, ol, dl, dd {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -0.96px;
}

h2 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.32px;
}

:focus-visible {
  outline: 2px solid var(--blue-700);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.panel {
  background: var(--background-100);
  border: 1px solid var(--gray-alpha-400);
  box-shadow: var(--shadow);
}

.hint {
  color: var(--gray-900);
  font-size: 13px;
  line-height: 18px;
  text-wrap: pretty;
}

/* Page */

.container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px max(24px, env(safe-area-inset-right)) 24px max(24px, env(safe-area-inset-left));
}

/* Tools: three cards side by side, stacked on phones */

.tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0;
  list-style: none;
}

/* The whole card is the link. */
.tool {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 24px;
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 150ms ease;
}

.tool:hover {
  border-color: var(--gray-alpha-500);
}

/* The name, with its badge beside it or wrapped below. */
.tool h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  background: var(--gray-100);
  color: var(--gray-1000);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: normal;
  white-space: nowrap;
}

.description {
  color: var(--gray-900);
  text-wrap: pretty;
}

/* Sits at the bottom, so the links line up across cards. */
.url {
  margin-top: auto;
  padding-top: 16px;
  color: var(--gray-900);
  font-family: var(--font-mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.tool:hover .url {
  color: var(--gray-1000);
}

@media (max-width: 800px) {
  .tools {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .container {
    gap: 16px;
    padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
  }

  .tool {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool {
    transition: none;
  }
}
