﻿/* ═══════════════════════════════════════════════════════════
   SCHOOLPROOFING BASE STYLES
   Reset, Typography, Base Elements
   ═══════════════════════════════════════════════════════════ */

/* ─────────────── Reset ─────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--sp-font-sans);
    font-size: var(--sp-text-base);
    font-weight: var(--sp-font-normal);
    line-height: var(--sp-leading-normal);
    color: var(--sp-text-primary);
    background-color: var(--sp-bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─────────────── Typography ─────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--sp-font-display);
    font-weight: var(--sp-font-bold);
    line-height: var(--sp-leading-tight);
    color: var(--sp-navy);
    margin-bottom: var(--sp-space-4);
}

h1 {
    font-size: var(--sp-text-4xl);
}

h2 {
    font-size: var(--sp-text-3xl);
}

h3 {
    font-size: var(--sp-text-2xl);
}

h4 {
    font-size: var(--sp-text-xl);
}

h5 {
    font-size: var(--sp-text-lg);
}

h6 {
    font-size: var(--sp-text-base);
}

p {
    margin-bottom: var(--sp-space-4);
    color: var(--sp-text-secondary);
}

    p:last-child {
        margin-bottom: 0;
    }

/* ─────────────── Links ─────────────── */
a {
    color: var(--sp-navy);
    text-decoration: none;
    transition: color var(--sp-transition);
}

    a:hover,
    a:focus {
        color: var(--sp-forest);
        text-decoration: underline;
    }

/* ─────────────── Lists ─────────────── */
ul, ol {
    padding-left: var(--sp-space-6);
    margin-bottom: var(--sp-space-4);
}

li {
    margin-bottom: var(--sp-space-2);
}

/* ─────────────── Images ─────────────── */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ─────────────── Forms ─────────────── */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}

    input:focus,
    textarea:focus,
    select:focus {
        outline: 2px solid var(--sp-navy);
        outline-offset: 2px;
    }

button {
    cursor: pointer;
    background: none;
    border: none;
}

/* ─────────────── Tables ─────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

th, td {
    text-align: left;
    padding: var(--sp-space-3) var(--sp-space-4);
}

/* ─────────────── Horizontal Rule ─────────────── */
hr {
    border: none;
    border-top: 1px solid var(--sp-border);
    margin: var(--sp-space-8) 0;
}

/* ─────────────── Code ─────────────── */
code, kbd, samp, pre {
    font-family: var(--sp-font-mono);
    font-size: 0.875em;
}

code {
    background-color: var(--sp-gray-100);
    padding: 0.125rem 0.375rem;
    border-radius: var(--sp-radius-sm);
    color: var(--sp-danger);
}

pre {
    background-color: var(--sp-gray-800);
    color: var(--sp-gray-100);
    padding: var(--sp-space-4);
    border-radius: var(--sp-radius-md);
    overflow-x: auto;
}

    pre code {
        background: none;
        padding: 0;
        color: inherit;
    }

/* ─────────────── Blockquote ─────────────── */
blockquote {
    border-left: 4px solid var(--sp-forest);
    padding-left: var(--sp-space-4);
    margin: var(--sp-space-6) 0;
    color: var(--sp-text-secondary);
    font-style: italic;
}

/* ─────────────── Selection ─────────────── */
::selection {
    background-color: var(--sp-navy-lighter);
    color: var(--sp-navy-dark);
}

/* ─────────────── Focus Visible ─────────────── */
:focus-visible {
    outline: 2px solid var(--sp-navy);
    outline-offset: 2px;
}

/* ─────────────── Scrollbar (WebKit) ─────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--sp-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--sp-gray-400);
    border-radius: var(--sp-radius-full);
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--sp-gray-500);
    }

/* ─────────────── 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;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 9999;
    padding: var(--sp-space-3) var(--sp-space-4);
    background: var(--sp-navy);
    color: var(--sp-white);
    font-weight: var(--sp-font-semibold);
}

    .skip-link:focus {
        top: 0;
    }
