/* ============================================================
   Modern CSS Reset — 777CX Game
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  min-height: 100vh;
  line-height: var(--lh-normal);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

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

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

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

:focus-visible {
  outline: 3px solid var(--color-accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Remove default focus ring only where we provide a custom one */
:focus:not(:focus-visible) {
  outline: none;
}

/* Selection */
::selection {
  background: var(--color-accent);
  color: #04140D;
}

/* Custom scrollbar (WebKit) */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--color-accent-deep), var(--color-surface-elevated));
  border-radius: var(--radius-pill);
  border: 3px solid var(--color-bg-alt);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

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

/* Skip link */
.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: #04140D;
  font-weight: var(--fw-bold);
  border-radius: var(--radius-pill);
  transition: top var(--dur-mid) var(--ease-out);
}
.skip-link:focus {
  top: 12px;
}

[hidden] {
  display: none !important;
}
