/* Essential Base Styles - Custom Preflight Replacement
 *
 * Minimal reset CSS to replace Tailwind's preflight while maintaining performance.
 * Includes only critical styles needed for proper rendering and font loading.
 *
 * Total size: ~1KB (vs ~3KB full Tailwind preflight)
 * Performance: Critical for LCP and CLS metrics
 */

/* Box sizing border-box reset */
*,
::before,
::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: currentColor;
}

/* HTML base */
html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-feature-settings: normal;
  font-variation-settings: normal;
}

/* Body with Manrope font stack - CRITICAL for font loading */
body {
  margin: 0;
  font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  font-weight: 500; /* Medium weight for better readability - brand guideline */
  line-height: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Heading elements inherit font family */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  font-size: inherit;
  font-weight: inherit;
}

/* Reset margins for common elements */
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
ul,
ol,
dl,
figure,
hr {
  margin: 0;
}

/* List reset */
ol,
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Link reset */
a {
  color: inherit;
  text-decoration: inherit;
}

/* Button reset */
button,
[type='button'],
[type='reset'],
[type='submit'] {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

/* Remove focus outline but maintain accessibility */
button:focus-visible,
[type='button']:focus-visible,
[type='reset']:focus-visible,
[type='submit']:focus-visible {
  outline: 2px solid;
  outline-offset: 2px;
}

/* Input reset */
input,
textarea,
select {
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

/* Image reset */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}

/* Table reset */
table {
  text-indent: 0;
  border-color: inherit;
  border-collapse: collapse;
}

/* Remove default fieldset styles */
fieldset {
  margin: 0;
  padding: 0;
}

/* Hidden attribute */
[hidden] {
  display: none !important;
}
