/**
 * COPRO ACADEMY - CSS Reset
 * Modern reset with improved defaults
 */

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

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

/* Improve media defaults */
img,
picture,
video,
canvas,
svg {
    border-radius: 0;
    display: block;
    max-width: 100%;
}

/* Remove built-in form typography styles */
input,
button,
textarea,
select {
    font: inherit;
}

/* Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* Improve line heights */
body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Remove list styles on ul, ol elements with a list role */
ul[role="list"],
ol[role="list"] {
    list-style: none;
}

/* Set core body defaults */
html {
    scroll-behavior: smooth;
}

/* Remove button defaults */
button {
    border: none;
    background: none;
    cursor: pointer;
}

/* Remove link defaults */
a {
    text-decoration: none;
    color: var(--color-primary);
}

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

/**
 * COPRO ACADEMY - Design Tokens
 * Single source of truth for all design values
 */

:root {
    /* Colors */
    --color-primary: #3a5db0;
    --color-primary-light: #6f9afe;
    --color-primary-dark: #1e3a8a;
    --color-white: #ffffff;
    --color-gray-50: #f8f9fa;
    --color-gray-100: #f4f6fa;
    --color-gray-400: #e4e4e4;
    --color-gray-500: #666666;
    --color-gray-900: #1f1f1f;
    --color-success: #2ecc71;
    --color-warning: #f39c12;
    --color-error: #e74c3c;
    --color-purple: #9b59b6;

    /* Spacing scale */
    --space-xs: 0.25rem;
    /* 4px */
    --space-sm: 0.5rem;
    /* 8px */
    --space-md: 1rem;
    /* 16px */
    --space-lg: 1.5rem;
    /* 24px */
    --space-xl: 2rem;
    /* 32px */
    --space-2xl: 3rem;
    /* 48px */
    --space-3xl: 4rem;
    /* 64px */

    /* Typography scale */
    --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.8rem);
    --text-sm: clamp(0.85rem, 0.8rem + 0.25vw, 0.9rem);
    --text-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
    --text-lg: clamp(1.1rem, 1rem + 0.5vw, 1.2rem);
    --text-xl: clamp(1.3rem, 1.2rem + 0.5vw, 1.5rem);
    --text-2xl: clamp(1.6rem, 1.4rem + 1vw, 2rem);
    --text-3xl: clamp(2rem, 1.8rem + 1vw, 2.5rem);
    --text-4xl: clamp(2.5rem, 2rem + 2vw, 3.5rem);

    /* Font weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Border radius */
    --radius-sm: 4px;
    --radius-base: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-base: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Component tokens */
    --button-height: 2.75rem;
    --button-height-sm: 2.25rem;
    --button-height-lg: 3.25rem;
    --input-height: 2.75rem;
    --card-padding: var(--space-lg);
    --container-width: 1200px;

    /* Z-index scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
}

/* Font family */
html {
    font-family: "Lato", system-ui, -apple-system, sans-serif;
}


/**
 * COPRO ACADEMY - Base Styles
 * Default element styling
 */

body {
    background: var(--color-gray-100);
    color: var(--color-gray-900);
    font-size: var(--text-base);
}

/* Typography */
h1 {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    line-height: 1.2;
}

h2 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    line-height: 1.3;
}

h3 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    line-height: 1.3;
}

h4 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    line-height: 1.4;
}

h5 {
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    line-height: 1.4;
}

h6 {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
}

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

/* Links */
a {
    transition: color var(--transition-fast);
}

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

/* Lists */
ul,
ol {
    padding-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

li {
    margin-bottom: var(--space-xs);
}

/* Form elements */
input,
textarea,
select {
    background: var(--color-white);
    border: 2px solid var(--color-gray-100);
    border-radius: var(--radius-base);
    padding: var(--space-sm) var(--space-md);
    min-height: var(--input-height);
    transition: border-color var(--transition-fast);
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgb(58 93 176 / 0.1);
}

/* Tables */
table {
    width: 100%;
    background: var(--color-white);
    border-radius: var(--radius-base);
    overflow: hidden;
    box-shadow: var(--shadow-base);
}

th,
td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--color-gray-100);
}

th {
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: var(--font-semibold);
}

/* Images */
img {
    border-radius: var(--radius-base);
    width: 100%;
    height: auto;
}

/* Code */
code {
    background: var(--color-gray-100);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-family: "Monaco", "Courier New", monospace;
    font-size: var(--text-sm);
}

pre {
    background: var(--color-gray-100);
    padding: var(--space-md);
    border-radius: var(--radius-base);
    overflow-x: auto;
    margin-bottom: var(--space-md);
}

/* Accessibility */
.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;
}

/* Focus management */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}