/* ================================================
   LAYER 2: BASE - Reset & Typography (ITCSS)
   Modern Theme - Vitrino Real Estate System
   ================================================ */

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

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--surface-page);
  min-height: 100vh;
  transition: background-color var(--transition-base), color var(--transition-base);
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--space-4);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
  margin-top: 0;
  margin-bottom: var(--space-4);
}

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

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

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

hr {
  margin: var(--space-6) 0;
  border: 0;
  border-top: 1px solid var(--border-default);
}

::selection {
  background: var(--interactive-primary);
  color: var(--text-on-brand);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--surface-muted);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--color-slate-400);
  border-radius: var(--radius-full);
  border: 2px solid var(--surface-muted);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-slate-500);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
