/**
 * IMT Tracker Design System - Base Styles
 * Reset, typography, and body styles
 */

/* =============================================
   CSS RESET
   ============================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Touch optimization for mobile */
* {
    -webkit-tap-highlight-color: transparent;
}

/* =============================================
   BASE ELEMENTS
   ============================================= */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
    min-height: 100vh;
    line-height: 1.5;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: var(--font-normal);
    line-height: 1.2;
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

p {
    margin-bottom: var(--space-md);
}

p:last-child {
    margin-bottom: 0;
}

/* =============================================
   LINKS
   ============================================= */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--accent);
}

/* =============================================
   FOCUS STATES
   ============================================= */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

/* =============================================
   TABLES
   ============================================= */
table {
    width: 100%;
    border-collapse: collapse;
}

/* =============================================
   FORM ELEMENTS BASE
   ============================================= */
input,
select,
textarea,
button {
    font-family: inherit;
    font-size: inherit;
}

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

/* =============================================
   IMAGES
   ============================================= */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =============================================
   LISTS
   ============================================= */
ul, ol {
    list-style: none;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--muted);
}

.text-accent {
    color: var(--accent);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-error {
    color: var(--error);
}

.font-mono {
    font-family: var(--mono);
}

.font-serif {
    font-family: var(--serif);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   SELECTION
   ============================================= */
::selection {
    background: var(--accent);
    color: white;
}

/* =============================================
   SCROLLBAR (Optional styling)
   ============================================= */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}
