/* ─── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--jj-charcoal);
    background-color: var(--jj-ivory);
    overflow-x: hidden;
    min-height: 100vh;
}

body.menu-open {
    overflow: hidden;
}

/* Selection */
::selection {
    background: var(--jj-rose);
    color: var(--jj-charcoal);
}

/* Focus */
:focus-visible {
    outline: 2px solid var(--jj-mauve);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

/* Links */
a {
    color: var(--jj-mauve-dark);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--jj-charcoal);
}

/* Images */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Lists */
ul, ol {
    list-style: none;
}

/* Forms */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}

/* Prevent iOS zoom on input focus - inputs must be at least 16px */
@supports (-webkit-touch-callout: none) {
    input[type="text"],
    input[type="email"],
    input[type="search"],
    input[type="password"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px;
    }
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

textarea {
    resize: vertical;
}

/* Tables */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--jj-ivory-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--jj-rose-dark);
    border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--jj-mauve);
}

/* Smooth page transitions */
main {
    animation: jj-page-in var(--duration-slow) var(--ease-out);
}

@keyframes jj-page-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Screen reader only */
.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;
}
