/* --------------------------------------------------
   BASE.CSS — Global foundation for the entire system
   -------------------------------------------------- */

/* Modern CSS Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables — unified Tailwind‑aligned theme */
:root {
    /* Backgrounds */
    --color-bg: #f3f4f6;
    --color-bg-darker: #9ca3af;
    --color-surface: #ffffff;
    --color-surface-2: #f9fafb;

    /* Primary */
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;

    /* Text */
    --color-text: #1f2937;
    --color-text-secondary: #6b7280;
    --color-text-muted: #9ca3af;

    /* Border */
    --color-border: #e5e7eb;

    /* Semantic colors */
    --color-danger: #dc2626;
    --color-success: #16a34a;
    --color-warning: #f59e0b;

    /* Spacing scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-14: 56px;
    --space-16: 64px;
    --space-20: 80px;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 2px 6px rgba(0,0,0,0.08);

    /* Transitions */
    --transition: 0.2s ease;

    /* Typography scale */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-md: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
}

/* Typography */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    font-family: "Inter", "Segoe UI", Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.55;
}

/* NEW — Paragraph spacing */
p {
    margin: var(--space-2) 0 var(--space-3);
}

/* Titles */
h1, .text-title-xl {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

h2, .text-title-lg {
    font-size: var(--font-size-xl);
    font-weight: 600;
    /* margin-bottom: var(--space-3); */
}

h3, .text-title-md {
    font-size: var(--font-size-lg);
    font-weight: 600;
    /* margin-bottom: var(--space-2); */
}

h4, .text-title-sm {
    font-size: var(--font-size-sm);
    font-weight: 600;
    /* margin-bottom: var(--space-2); */
}

/* Body text */
.text-body {
    font-size: var(--font-size-md);
}

.text-body-sm {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.text-small {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

/* Links */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

/* Lists */
ul,
ol {
    margin: var(--space-3) 0;
    padding-left: var(--space-5);
}

li {
    margin-bottom: var(--space-1); /* smaller gap */
    line-height: 1.4;              /* tighter line height */
}

.card ul,
.card ol {
    margin-top: var(--space-2);
    margin-bottom: var(--space-2);
}

.card li:last-child {
    margin-bottom: 0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-md);
}

/* Utility classes */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }

/* Responsive helpers */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
    .hide-desktop { display: none !important; }
}
