/* ============================================
   BROWSER RESET & NORMALIZATION
   Modern CSS Reset for Consistent Rendering
   ============================================ */

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

/* HTML & Body Defaults */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-gray-dark);
  background-color: var(--color-white);
  overflow-x: hidden;
}

/* Remove default margins */
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, figcaption, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

/* Heading Defaults */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-gray-dark);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }
h5 { font-size: var(--font-size-h5); }
h6 { font-size: var(--font-size-h6); }

/* List Styles */
ul, ol {
  list-style: none;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a:hover {
  text-decoration: none;
}

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

img {
  border-style: none;
}

/* Buttons & Inputs */
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

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

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

input,
textarea,
select {
  width: 100%;
}

textarea {
  resize: vertical;
}

/* Remove default input styles */
input:focus,
textarea:focus,
select:focus {
  outline: none;
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Strong & Bold */
b,
strong {
  font-weight: var(--font-weight-bold);
}

/* Emphasis */
em,
i {
  font-style: italic;
}

/* Small */
small {
  font-size: var(--font-size-small);
}

/* Code & Pre */
code,
pre,
kbd,
samp {
  font-family: monospace;
  font-size: 1em;
}

/* Horizontal Rule */
hr {
  border: 0;
  border-top: var(--border-width-thin) solid var(--color-gray-light);
  margin: var(--space-xl) 0;
}

/* Selection */
::selection {
  background-color: var(--color-accent-cyan);
  color: var(--color-white);
}

::-moz-selection {
  background-color: var(--color-accent-cyan);
  color: var(--color-white);
}

/* Scrollbar Styles (Webkit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-lighter);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gray-medium);
  border-radius: var(--border-radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-blue);
}

/* Remove Chrome autofill background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--color-white) inset !important;
  -webkit-text-fill-color: var(--color-gray-dark) !important;
}

/* Accessibility - Focus Visible */
:focus-visible {
  outline: 2px solid var(--color-accent-orange);
  outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Screen Reader Only */
.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;
}
