/* ============================================
   2026 FIFA World Cup — Base Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Background Ambient Glow ── */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(ellipse, rgba(79, 70, 229, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  right: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(197, 168, 128, 0.02) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--text-5xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-4xl); letter-spacing: -0.01em; }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

a:hover {
  color: var(--color-primary-light);
}

strong, b {
  font-weight: var(--font-semibold);
}

small {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* ── Lists ── */
ul, ol {
  list-style: none;
}

/* ── Media ── */
img, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Form Elements ── */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  transition: border-color var(--duration-fast) var(--ease-default),
              box-shadow var(--duration-fast) var(--ease-default);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* ── Table ── */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  font-weight: var(--font-semibold);
  text-align: left;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  color: var(--text-primary);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* ── Selection ── */
::selection {
  background: rgba(79, 70, 229, 0.3);
  color: var(--text-primary);
}

/* ── Utility Classes ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-16) 0;
}

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

.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gold {
  color: var(--text-gold);
}

.text-center {
  text-align: center;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-responsive {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* ── Page Wrapper ── */
.page-wrapper {
  min-height: 100vh;
  padding-top: var(--nav-height);
}

.page-header {
  text-align: center;
  padding: var(--space-12) 0 var(--space-8);
}

.page-header h1 {
  margin-bottom: var(--space-4);
}

.page-header p {
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0 auto;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  .container { padding: 0 var(--space-4); }
}

@media (max-width: 768px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  .section { padding: var(--space-10) 0; }
  .grid-responsive {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 { font-size: var(--text-2xl); }
  .container { padding: 0 var(--space-3); }
}
