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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--top-offset);
}

body {
  font-family: var(--ff-body);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  opacity: 0;
  animation: pageIn 0.4s ease-out 0.05s forwards;
}

@keyframes pageIn {
  to { opacity: 1; }
}

@media (max-width: 768px) {
  body { padding-bottom: calc(var(--bottom-nav-h) + var(--safe-b)); }
}

body.no-scroll { overflow: hidden; }

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

a {
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

ul, ol { list-style: none; }

input, textarea, select {
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }

::selection { background: rgba(var(--brand-rgb, 27,73,99), 0.15); }

:focus-visible {
  outline: 2px solid var(--brand-pop);
  outline-offset: 2px;
  border-radius: 4px;
}
