/* ==========================================================================
   Base Reset & Layout
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd {
  margin: 0;
}

html {
  font-family: var(--font-family);
  font-size: 16px;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: var(--line-height-normal);
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-size: var(--font-size-body);
  line-height: var(--line-height-relaxed);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography Standards (Consistent Hierarchy Across All Pages)
   ========================================================================== */
h1, .heading-1 {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-tight);
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.025em;
}

h2, .heading-2 {
  font-size: var(--font-size-h2);
  line-height: var(--line-height-tight);
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.02em;
}

h3, .heading-3 {
  font-size: var(--font-size-h3);
  line-height: var(--line-height-snug);
  font-weight: 600;
  color: var(--text-white);
  letter-spacing: -0.015em;
}

h4, .heading-4 {
  font-size: var(--font-size-small);
  line-height: var(--line-height-normal);
  font-weight: 600;
  color: var(--text-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  font-size: var(--font-size-body);
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
}

.text-body {
  font-size: var(--font-size-body);
  line-height: var(--line-height-relaxed);
  color: var(--text-secondary);
}

.text-small, small {
  font-size: var(--font-size-small);
  line-height: var(--line-height-normal);
}

.text-xs {
  font-size: var(--font-size-xs);
  line-height: var(--line-height-normal);
}

/* ==========================================================================
   Form Controls (Input, Textarea, Select, Button)
   ========================================================================== */
input, textarea, select {
  font-family: inherit;
  font-size: var(--font-size-small);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--input-padding-y) var(--input-padding-x);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background-color: #131b2e;
}

button {
  font-family: inherit;
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: var(--line-height-tight);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* ==========================================================================
   Sleek Custom Scrollbar
   ========================================================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-blue-light);
}

/* ==========================================================================
   Semantic Containers
   ========================================================================== */
.container-custom {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding-desktop);
  padding-right: var(--container-padding-desktop);
}

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