/**
 * Global base styles. Token file (tokens-dev.css / tokens-bio.css) is loaded
 * by layout per variant; it defines --color-* and --font-*.
 */

@import url('$lib/fonts.css');

:root {
    --font-sans: system-ui, -apple-system, blinkmacsystemfont, sans-serif;
    --font-serif: serif;
}

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

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading, var(--font-sans));
    font-variation-settings: 'opsz' var(--font-heading-opsz, 36);
    font-weight: 600;
    letter-spacing: 0.045em;
}

html {
    font-family: var(--font-body, var(--font-sans));
    font-size: 100%;
    line-height: 1.6;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--color-bg);
    color: var(--color-fg);
    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 0.5rem 1rem;
    background: var(--color-accent);
    color: var(--color-bg);
    z-index: 100;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    padding: 1rem;
    z-index: 10;
}

.heading {
    text-align: center;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
}

.action {
    align-items: center;
    background: var(--color-surface-elevated);
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgb(0 0 0 / 15%);
    color: var(--color-fg);
    cursor: pointer;
    display: flex;
    height: 3rem;
    justify-content: center;
    min-height: 48px;
    min-width: 48px;
    padding: 0;
    width: 3rem;

    &:hover,
    &:focus-visible {
        background: var(--color-border-subtle);
    }

    &:focus-visible {
        outline: 2px solid var(--color-focus-ring);
        outline-offset: 2px;
    }
}

.panel-btn {
    align-items: center;
    background: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    color: var(--color-fg);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 1rem;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.75rem 1rem;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s ease-in-out;

    &:hover,
    &:focus-visible {
        background: var(--color-border);
    }

    &:focus-visible {
        outline: 2px solid var(--color-focus-ring);
        outline-offset: 2px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
