/* ==========================================================================
   PRLinkUp — Base: reset, typography, accessibility
   ========================================================================== */

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

* {
    margin: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: var(--lh-body);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

body.is-locked {
    overflow: hidden;
}

/* Lenis smooth scroll */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: clip;
}

img,
svg,
picture,
video {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

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

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-soft);
}

a:hover {
    color: var(--color-primary-pressed);
}

ul[class],
ol[class] {
    list-style: none;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--fw-bold);
    line-height: var(--lh-snug);
    letter-spacing: var(--ls-tight);
    color: var(--color-text);
    text-wrap: balance;
}

h1 { font-size: var(--fs-hero); font-weight: var(--fw-black); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-3xl); line-height: 1.15; }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p {
    text-wrap: pretty;
}

strong {
    font-weight: var(--fw-semi);
}

::selection {
    background: var(--violet-200);
    color: var(--ink-950);
}

/* ---------- Focus ---------- */
:focus {
    outline: none;
}

:focus-visible {
    outline: 3px solid var(--violet-300);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------- Accessibility helpers ---------- */
.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    padding: 10px 16px;
    border-radius: var(--r-input);
    background: var(--ink-950);
    color: var(--white);
    font-weight: var(--fw-semi);
    transform: translateY(-200%);
    transition: transform var(--dur-base) var(--ease-out);
}

.skip-link:focus {
    transform: translateY(0);
    color: var(--white);
}

.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;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
