/**
 * Base reset + typography for CollegePro.
 *
 * @package Ateducollegepro
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.cp-body {
    font-family: var(--cp-font-sans);
    font-size: var(--cp-fs-base);
    line-height: var(--cp-lh-normal);
    color: var(--cp-text);
    background: var(--cp-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Skip link */
.cp-skip-link {
    position: absolute;
    top: -100px;
    left: var(--cp-space-4);
    padding: var(--cp-space-2) var(--cp-space-4);
    background: var(--cp-primary);
    color: var(--cp-text-inverse);
    border-radius: var(--cp-radius);
    z-index: 999;
    text-decoration: none;
    font-weight: var(--cp-fw-semibold);
    transition: top var(--cp-dur) var(--cp-ease);
}

.cp-skip-link:focus {
    top: var(--cp-space-4);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--cp-font-display);
    font-weight: var(--cp-fw-semibold);
    line-height: var(--cp-lh-tight);
    color: var(--cp-text);
    margin: 0 0 var(--cp-space-3);
    letter-spacing: var(--cp-tracking-tight);
}

h1 {
    font-size: var(--cp-fs-3xl);
    font-weight: var(--cp-fw-bold);
}

h2 {
    font-size: var(--cp-fs-2xl);
    font-weight: var(--cp-fw-bold);
}

h3 {
    font-size: var(--cp-fs-xl);
}

h4 {
    font-size: var(--cp-fs-lg);
}

h5 {
    font-size: var(--cp-fs-md);
}

h6 {
    font-size: var(--cp-fs-base);
}

p {
    margin: 0 0 var(--cp-space-4);
    color: var(--cp-text);
    line-height: var(--cp-lh-relaxed);
}

a {
    color: var(--cp-primary);
    text-decoration: none;
    transition: color var(--cp-dur) var(--cp-ease);
}

a:hover {
    color: var(--cp-primary-700);
    text-decoration: underline;
}

small {
    font-size: var(--cp-fs-sm);
    color: var(--cp-text-muted);
}

code,
pre,
kbd,
samp {
    font-family: var(--cp-font-mono);
    font-size: 0.92em;
    background: var(--cp-surface-muted);
    padding: 2px 6px;
    border-radius: var(--cp-radius-xs);
}

pre {
    padding: var(--cp-space-4);
    overflow-x: auto;
    border-radius: var(--cp-radius);
}

img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

button {
    font: inherit;
    cursor: pointer;
    background: none;
    border: 0;
    color: inherit;
    padding: 0;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

input,
textarea,
select {
    font: inherit;
    color: inherit;
}

/* Focus ring — consistent everywhere */
:focus-visible {
    outline: 2px solid var(--cp-primary);
    outline-offset: 2px;
    border-radius: var(--cp-radius-xs);
}

/* Selection */
::selection {
    background: var(--cp-primary-100);
    color: var(--cp-primary-700);
}

/* Scrollbars (WebKit) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--cp-border-strong);
    border-radius: var(--cp-radius-full);
    border: 2px solid var(--cp-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cp-text-subtle);
}

/* Utility classes */
.cp-text-muted {
    color: var(--cp-text-muted);
}

.cp-text-subtle {
    color: var(--cp-text-subtle);
}

.cp-text-center {
    text-align: center;
}

.cp-text-right {
    text-align: right;
}

.cp-fw-medium {
    font-weight: var(--cp-fw-medium);
}

.cp-fw-semibold {
    font-weight: var(--cp-fw-semibold);
}

.cp-fw-bold {
    font-weight: var(--cp-fw-bold);
}

.cp-mb-0 {
    margin-bottom: 0;
}

.cp-mt-0 {
    margin-top: 0;
}

.cp-mt-2 {
    margin-top: var(--cp-space-2);
}

.cp-mt-4 {
    margin-top: var(--cp-space-4);
}

.cp-mt-6 {
    margin-top: var(--cp-space-6);
}

.cp-mb-4 {
    margin-bottom: var(--cp-space-4);
}

.cp-mb-6 {
    margin-bottom: var(--cp-space-6);
}

.cp-hidden {
    display: none !important;
}

.cp-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;
}

/* Keyframes */
@keyframes cp-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes cp-rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cp-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes cp-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes cp-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }
}