/*
 * Shared base for Kokua helpers. Brand values come from brand/tokens/kokua.css; this file only
 * adds the system light/dark switch, a small reset, and the quiet "home" mark.
 */
:root {
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --kokua-canvas: var(--kokua-night);
        --kokua-surface: var(--kokua-dark-surface);
        --kokua-text: #fff;
        --kokua-muted: #C1CCD2;
        --kokua-link: var(--kokua-brand-blue);
        --kokua-shadow: 0 10px 32px rgb(0 0 0 / 35%);
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--kokua-canvas);
    color: var(--kokua-text);
    font: 400 1rem/1.5 var(--kokua-body);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

h1,
h2 {
    font-family: var(--kokua-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: var(--kokua-link);
}

button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--kokua-text);
    outline-offset: 4px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* The only chrome a helper carries: a small K that leads back to the collection. */
.helper-home {
    position: fixed;
    z-index: 10;
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--kokua-control-radius);
    opacity: 0.5;
    transition: opacity 200ms ease-out;
}

.helper-home:hover,
.helper-home:focus-visible {
    opacity: 1;
}

.helper-home img {
    display: block;
    width: auto;
    height: 22px;
}

@media (prefers-reduced-motion: reduce) {
    .helper-home {
        transition: none;
    }
}
