/* Tokens, fonts and element defaults for the player. */

@font-face { font-family: "Metaphor"; src: url("../../fonts/Metaphor-Medium-Regular.ttf"); font-display: swap; }
@font-face { font-family: "Metaphor"; font-style: italic; font-weight: 700; src: url("../../fonts/Metaphor-BoldItalic.ttf"); font-display: swap; }
@font-face { font-family: "Dumbledor"; src: url("../../fonts/Dumbledor1Thin.ttf"); font-display: swap; }
@font-face { font-family: "Otsutome"; size-adjust: 75%; src: url("../../fonts/OtsutomeFont_Ver3.ttf"); font-display: swap; }

:root {
    color-scheme: dark;

    --kp-green-950: #022f01;
    --kp-green-900: #0b350b;
    --kp-green-700: #0f5310;
    --kp-green-500: #139100;
    --kp-green-300: #70ad63;
    --kp-mint: #c5ffc9;
    --kp-orange: #ffa500;
    --kp-burlywood: #deb887;
    --kp-blue-500: #5972a7;
    --kp-blue-300: #748fc9;
    --kp-grey-300: #c5c5c5;
    --kp-text: #fff;
    --kp-text-muted: #b8b8b8;
    --kp-focus: #ffd24d;
    --kp-panel-bg: url("../../images/player/what-the-hex-dark.png");
    --kp-shadow: 0 0 6px 4px rgb(0 0 0 / 0.55);

    --kp-font-display: "Metaphor", "Dumbledor", serif;
    --kp-font-body: "Dumbledor", "Otsutome", serif;
    --kp-font-ui: "Metaphor", system-ui, sans-serif;

    --kp-gap: clamp(0.5rem, 1vw, 1rem);
    --kp-radius: 4px;
}

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

html,
body {
    height: 100%;
    margin: 0;
}

body {
    background: #000;
    color: var(--kp-text);
    font-family: var(--kp-font-body);
    font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
    line-height: 1.35;
    scrollbar-color: var(--kp-green-900) #000;
}

h1,
h2,
h3 {
    margin: 0 0 0.4em;
    font-family: var(--kp-font-display);
    font-style: italic;
    font-weight: 700;
    color: var(--kp-orange);
}

p {
    margin: 0.2em 0;
}

a {
    color: var(--kp-orange);
}

button,
input,
textarea,
select {
    font: inherit;
    font-family: var(--kp-font-ui);
}

button {
    cursor: pointer;
}

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

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

[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Missing-feature notice (js/browser-check.js) */
.browser-check {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    padding: 0.75rem 1rem;
    background: #5a0000;
    color: #fff;
    font-family: var(--kp-font-ui);
    text-align: center;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    z-index: 90;
    max-width: min(90vw, 36rem);
    padding: 0.6rem 1rem;
    border: 2px ridge #000;
    background: rgb(0 0 0 / 0.85);
    color: var(--kp-mint);
    font-family: var(--kp-font-ui);
    opacity: 0;
    pointer-events: none;
    translate: -50% 0.5rem;
    transition: opacity 300ms ease, translate 300ms ease;

    &.is-visible {
        opacity: 1;
        translate: -50% 0;
    }
}

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

/* Spam trap fields (spatie/laravel-honeypot): hidden from people, not from bots. */
.honeypot {
    position: absolute;
    left: -100vw;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
