/* Pocket ID branding: Geist for text, Gloock for headings and the app's neutral black-and-white palette */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/demo-kuma/fonts/geist.woff2") format("woff2");
}

@font-face {
  font-family: "Gloock";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/demo-kuma/fonts/gloock.woff") format("woff");
}

:root {
  color-scheme: light dark;
  --page: #ffffff;
  --fg: #0a0a0a;
  --muted: #737373;
  --surface-muted: #f5f5f5;
  --surface-muted-hover: #e5e5e5;
  --hairline: rgba(0, 0, 0, 0.09);
  --danger: #dc2626;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0a0a0a;
    --fg: #fafafa;
    --muted: #a1a1a1;
    --surface-muted: #262626;
    --surface-muted-hover: #333333;
    --hairline: rgba(255, 255, 255, 0.1);
    --danger: #f87171;
  }
}

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

[v-cloak] {
  display: none !important;
}

html,
body {
  margin: 0;
}

body {
  font-family:
    "Geist",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--fg);
  background-color: var(--page);
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
  text-align: center;
  overflow: hidden;
}

/* The logo on an inverted tile, like the passkey tile on pocket-id.org */
.mark {
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 2.5rem;
}

.mark-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 1.625rem;
  background-color: var(--fg);
  color: var(--page);
}

.mark-tile svg {
  height: 2.6rem;
  width: auto;
}

.content {
  position: relative;
  max-width: 34rem;
}

h1 {
  margin: 0;
  font-family: "Gloock", Georgia, serif;
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  margin: 1.5rem 0 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

/* Pill buttons like the app's: a filled primary in the text color and a muted secondary */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    opacity 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.btn-primary {
  background-color: var(--fg);
  color: var(--page);
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-secondary {
  background-color: var(--surface-muted);
  color: var(--fg);
}

.btn-secondary:hover {
  background-color: var(--surface-muted-hover);
}

.note {
  margin: 2rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.error {
  margin: 1.5rem 0 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: 0.75rem;
  background-color: var(--surface-muted);
  font-size: 0.9375rem;
  color: var(--danger);
}

.spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 2.25rem;
  border: 2px solid var(--hairline);
  border-top-color: var(--fg);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
