/* ============================================================
   COOPNIX — Base Reset & Defaults V.3
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    line-height: var(--lh-tight);
    font-weight: var(--fw-bold);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin-bottom: 1em; color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: var(--color-primary-dark); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

/* --- Selection --- */
::selection {
    background: var(--color-primary);
    color: #fff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

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

/* --- Utility text --- */
.text-primary { color: var(--color-primary) !important; }
.text-white { color: #fff !important; }
.text-muted { color: var(--text-muted) !important; }
.text-center { text-align: center !important; }
.text-gradient {
    background: var(--gradient-cta);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Image utilities --- */
.img-rounded { border-radius: var(--radius-card); }
.img-bordered {
    border: 3px solid var(--bg-surface);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-card);
}
.img-logo {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    object-fit: contain;
    background: var(--bg-surface);
    padding: 8px;
}
.img-hero {
    border-radius: var(--radius-card-alt);
    box-shadow: var(--shadow-lg);
}

/* --- Scroll animation --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
