/* ============================================================
   RMMS — Base Styles & Reset
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--body-md-size);
  font-weight: var(--body-md-weight);
  line-height: var(--body-md-line);
  color: var(--on-surface);
  background-color: var(--background);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-fixed); }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; border: none; outline: none; background: none; }
button { cursor: pointer; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface-container-lowest); }
::-webkit-scrollbar-thumb { background: var(--outline-variant); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--outline); }
* { scrollbar-width: thin; scrollbar-color: var(--outline-variant) var(--surface-container-lowest); }

/* Focus */
:focus-visible { outline: 2px solid var(--primary-container); outline-offset: 2px; border-radius: var(--radius-sm); }
::selection { background: rgba(13, 148, 136, 0.3); color: var(--on-surface); }

/* Typography */
.headline-lg { font-family: var(--font-headline); font-size: var(--headline-lg-size); font-weight: var(--headline-lg-weight); line-height: var(--headline-lg-line); letter-spacing: var(--headline-lg-spacing); }
.headline-md { font-family: var(--font-headline); font-size: var(--headline-md-size); font-weight: var(--headline-md-weight); line-height: var(--headline-md-line); letter-spacing: var(--headline-md-spacing); }
.headline-sm { font-family: var(--font-headline); font-size: var(--headline-sm-size); font-weight: var(--headline-sm-weight); line-height: var(--headline-sm-line); }
.body-lg { font-family: var(--font-body); font-size: var(--body-lg-size); line-height: var(--body-lg-line); }
.body-md { font-family: var(--font-body); font-size: var(--body-md-size); line-height: var(--body-md-line); }
.body-sm { font-family: var(--font-body); font-size: var(--body-sm-size); line-height: var(--body-sm-line); }
.label-md { font-family: var(--font-label); font-size: var(--label-md-size); font-weight: var(--label-md-weight); line-height: var(--label-md-line); letter-spacing: var(--label-md-spacing); text-transform: uppercase; }
.label-sm { font-family: var(--font-label); font-size: var(--label-sm-size); font-weight: var(--label-sm-weight); line-height: var(--label-sm-line); }

/* Utility */
.text-primary { color: var(--primary); }
.text-muted { color: var(--on-surface-variant); }
.text-error { color: var(--error); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-tabular { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.animate-fade-in { animation: fadeIn var(--transition-base) ease forwards; }
.animate-fade-in-up { animation: fadeInUp var(--transition-base) ease forwards; }
.animate-scale-in { animation: scaleIn var(--transition-fast) ease forwards; }
.delay-1 { animation-delay: 50ms; }
.delay-2 { animation-delay: 100ms; }
.delay-3 { animation-delay: 150ms; }
.delay-4 { animation-delay: 200ms; }
.delay-5 { animation-delay: 250ms; }
