/* ============================================================
   ArenaFoot Community — Base
   ============================================================ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--af-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-main);
  background:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    var(--bg-deep);
  background-size: 100% 32px;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  transition: background-color var(--duration-normal) ease, color var(--duration-normal) ease;
}

.light body,
[data-theme="light"] body {
  background:
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    var(--bg-deep);
  background-size: 100% 32px;
}

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

input, button, textarea, select {
  font-family: var(--af-body);
}

button, [role='button'] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
[role='button']:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 2px;
}

button:active:not(:disabled),
.btn:active:not(:disabled),
[role='button']:active {
  transform: scale(0.975);
}

a {
  color: var(--ui-accent);
  text-decoration: none;
  transition: color 140ms ease;
}

a:hover {
  color: var(--ui-accent-hover);
}

ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--af-display);
  font-weight: 800;
  letter-spacing: -0.015em;
}

h1, .page-title {
  text-transform: uppercase;
}

.mono, .stat-value, .badge {
  font-family: var(--af-data);
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-tooltip);
  padding: var(--space-2) var(--space-4);
  background: var(--ui-accent);
  color: var(--color-ink-inverse);
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: var(--text-sm);
}

.skip-link:focus {
  top: var(--space-4);
}

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

/* === Animation States === */
/* Elements with will-change for GPU acceleration during animation */
.will-animate {
  will-change: transform, opacity;
}

/* Initial states for GSAP scroll animations */
.gsap-fade-up {
  opacity: 0;
  transform: translateY(30px);
}

.gsap-fade-left {
  opacity: 0;
  transform: translateX(-20px);
}

.gsap-fade-right {
  opacity: 0;
  transform: translateX(20px);
}

.gsap-scale {
  opacity: 0;
  transform: scale(0.95);
}

/* Reduced motion: disable all animations */
@media (prefers-reduced-motion: reduce) {
  .will-animate,
  .gsap-fade-up,
  .gsap-fade-left,
  .gsap-fade-right,
  .gsap-scale,
  .btn,
  .card-hover,
  .vote-box,
  .like-button-box,
  .status-chip,
  .badge {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
