/**
 * main.css - Base Styles and Typography
 * Variables are now in variables.css - import that first!
 */

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

html {
    scroll-behavior: smooth;
}

/* ============================================
   BASE BODY STYLES
   ============================================ */
body {
    font-family: var(--text-font-family);
    font-size: var(--body-font-size);
    line-height: var(--body-line-height);
    font-weight: 400;
    background: var(--light-text);
    color: var(--text-color);
    min-height: 100vh;
}

/* Prevent right-click (optional - set in body tag) */
body[oncontextmenu="return false"] {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ============================================
   PAGE WRAPPER (for sticky footer)
   ============================================ */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    /* NO margin-top here - each section handles its own nav clearance */
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--header-font-family);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

h1 {
    font-size: 3.5rem;
    color: var(--light-text);
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

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

.lead {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
}

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

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

/* ============================================
   CONTAINER
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ============================================
   UTILITY CLASSES - MARGIN
   ============================================ */
.mt-1 { margin-top: var(--spacing-md); }
.mt-2 { margin-top: var(--spacing-xl); }
.mt-3 { margin-top: var(--spacing-xxl); }
.mt-4 { margin-top: 4rem; }
.mt-5 { margin-top: 5rem; }

.mb-1 { margin-bottom: var(--spacing-md); }
.mb-2 { margin-bottom: var(--spacing-xl); }
.mb-3 { margin-bottom: var(--spacing-xxl); }
.mb-4 { margin-bottom: 4rem; }
.mb-5 { margin-bottom: 5rem; }

.my-1 { margin-top: var(--spacing-md); margin-bottom: var(--spacing-md); }
.my-2 { margin-top: var(--spacing-xl); margin-bottom: var(--spacing-xl); }
.my-3 { margin-top: var(--spacing-xxl); margin-bottom: var(--spacing-xxl); }

/* ============================================
   UTILITY CLASSES - PADDING
   ============================================ */
.py-3 { padding-top: var(--spacing-xxl); padding-bottom: var(--spacing-xxl); }
.py-4 { padding-top: 4rem; padding-bottom: 4rem; }
.py-5 { padding-top: 5rem; padding-bottom: 5rem; }

/* ============================================
   UTILITY CLASSES - TEXT
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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

.font-weight-bold { font-weight: bold; }
.font-weight-normal { font-weight: normal; }

/* ============================================
   UTILITY CLASSES - DISPLAY
   ============================================ */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-block { display: inline-block; }

.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }

/* ============================================
   UTILITY CLASSES - WIDTH
   ============================================ */
.w-100 { width: 100%; }
.h-100 { height: 100%; }

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

/* ============================================
   RESPONSIVE TYPOGRAPHY
   ============================================ */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.75rem;
    }
    
    body {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
}
