/* ==========================================================================
   BASE & MOBILE-NATIVE FOUNDATION
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg-dark);
  color: var(--text-light-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background-color: var(--bg-dark);
  color: var(--text-light-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a,
[role="button"],
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button,
a,
[role="button"],
.tappable {
  touch-action: manipulation;
}

button,
[role="button"],
.chip,
.tab-btn,
.drum-pad,
.circle-nav-btn {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

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

input,
textarea,
select {
  font-size: 16px;
}

:focus-visible {
  outline: 2px solid var(--red-500);
  outline-offset: 3px;
}

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

/* Architectural Background Grid Helpers */
.bg-grid-dark {
  background-color: var(--bg-dark);
  background-image:
    linear-gradient(to right, var(--grid-dark) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-dark) 1px, transparent 1px);
  background-size: 140px 140px;
}

.bg-grid-light {
  background-color: var(--bg-light);
  color: var(--text-dark-primary);
  background-image:
    linear-gradient(to right, var(--grid-light) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-light) 1px, transparent 1px);
  background-size: 140px 140px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
