/* Reset + global typography */

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

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-variation-settings: var(--wonk-heading);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
}

::selection {
  background: var(--green-200);
  color: var(--ink-900);
}

/* Scrollbars — thin, warm, never default grey */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--paper-400) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--paper-400);
  border-radius: var(--r-full);
  border: 3px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--paper-500);
  background-clip: content-box;
}

.on-chrome ::-webkit-scrollbar-thumb,
.scroll-dark::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  background-clip: content-box;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ---- Utilities ---- */

.hidden {
  display: none !important;
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: 'zero' 1;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.display {
  font-family: var(--font-display);
  font-variation-settings: var(--wonk-display);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Shared keyframes ---- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(31, 191, 107, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(31, 191, 107, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(31, 191, 107, 0);
  }
}

@keyframes sheen {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(220%);
  }
}

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