/*
|--------------------------------------------------------------------------
| OpenPage Base Styles
|--------------------------------------------------------------------------
|
| Shared, brand-neutral website foundations.
|
*/

:root {
    --page-background: #f6f5f8;
    --page-surface: #ffffff;
    --page-text: #201d25;
    --page-muted: #68636e;
    --page-border: #ddd9e2;

    --page-accent: #5d526c;
    --page-accent-dark: #403749;
    --page-accent-soft: #eeeaf2;

    --page-focus: #765f8c;
    --page-white: #ffffff;

    --page-radius-small: 0.5rem;
    --page-radius-medium: 1rem;
    --page-radius-large: 1.5rem;

    --page-shadow:
        0 24px 60px rgba(32, 29, 37, 0.12);

    --page-content-width: 72rem;

    color-scheme: light;
}


/*
|--------------------------------------------------------------------------
| Reset
|--------------------------------------------------------------------------
*/

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

html {
    min-height: 100%;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 18rem;
    min-height: 100vh;
    margin: 0;
    color: var(--page-text);
    background: var(--page-background);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

main,
header,
footer,
section,
article,
nav {
    display: block;
}

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

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--page-accent-dark);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--page-accent);
}

p,
h1,
h2,
h3 {
    overflow-wrap: break-word;
}

h1,
h2,
h3 {
    line-height: 1.15;
}

::selection {
    color: var(--page-white);
    background: var(--page-accent);
}


/*
|--------------------------------------------------------------------------
| Accessibility
|--------------------------------------------------------------------------
*/

:focus-visible {
    outline: 3px solid var(--page-focus);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    padding: 0.75rem 1rem;
    color: var(--page-white);
    background: var(--page-accent-dark);
    border-radius: var(--page-radius-small);
    box-shadow: var(--page-shadow);
    font-weight: 700;
    text-decoration: none;
    transform: translateY(calc(-100% - 2rem));
    transition: transform 160ms ease;
}

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


/*
|--------------------------------------------------------------------------
| Shared layout
|--------------------------------------------------------------------------
*/

.container {
    width: min(
        var(--page-content-width),
        calc(100% - 2rem)
    );
    margin-inline: auto;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/*
|--------------------------------------------------------------------------
| Shared buttons
|--------------------------------------------------------------------------
*/

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.7rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 999px;
    appearance: none;
    cursor: pointer;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    color: var(--page-white);
    background: var(--page-accent-dark);
    box-shadow:
        0 10px 24px rgba(64, 55, 73, 0.2);
}

.button-primary:hover {
    color: var(--page-white);
    background: var(--page-accent);
}

.button-secondary {
    color: var(--page-text);
    background: transparent;
    border-color: var(--page-border);
}

.button-secondary:hover {
    color: var(--page-text);
    background: var(--page-accent-soft);
    border-color: var(--page-accent);
}


/*
|--------------------------------------------------------------------------
| Reduced motion
|--------------------------------------------------------------------------
*/

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

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