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

html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  margin: 0;
  background: var(--mesh-bg);
  background-attachment: fixed;
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
  position: relative;
}

/* ---- Subtle grain/noise texture over the glass, VisionOS-style ---- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  opacity: var(--noise-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--parchment);
}

p { margin: 0 0 var(--sp-3); color: var(--parchment-dim); }

a { color: inherit; }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

button, input {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  transition: transform var(--dur-fast) var(--ease-out);
}

/* Light tactile "squish" feedback on press for every button in the app. */
button:active {
  transform: scale(0.96);
}
@media (prefers-reduced-motion: reduce) {
  button:active { transform: none; }
}

button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--brass-soft-strong);
  color: var(--parchment);
}

/* Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--ink-600) transparent;
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--ink-600);
  border-radius: 8px;
}
*::-webkit-scrollbar-thumb:hover { background: var(--slate-600); }

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

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
