/*
 * PikaPixel design tokens — the "Warm & Indie" direction from the Browse design
 * (editorial / ochre, Claude Design artifact, 2026-09-22).
 *
 * Colour is OKLCH throughout, as the design authored it. Everything else in the site refers to
 * these variables: a component never hardcodes a colour, a font stack or a rule width.
 */

:root {
    /* Palette */
    --bg: oklch(0.965 0.012 78);
    --surface: oklch(0.985 0.008 82);
    --surface-2: oklch(0.945 0.014 75);
    --ink: oklch(0.22 0.018 55);
    --ink-soft: oklch(0.38 0.018 60);
    --muted: oklch(0.55 0.015 65);
    --rule: oklch(0.87 0.014 72);
    --rule-strong: oklch(0.72 0.018 68);

    /* Ochre is the chosen accent; the design's rust/moss/plum are not shipped. */
    --accent: oklch(0.68 0.14 65);
    --accent-strong: oklch(0.55 0.15 50);

    /* A pixel that somebody else already owns, and one this visitor has selected. */
    --pixel-sold: oklch(0.55 0.015 65);
    --pixel-selected: oklch(0.55 0.15 50);

    /* Type */
    --serif-display: 'Instrument Serif', 'Newsreader', Georgia, serif;
    --serif: 'Newsreader', Georgia, serif;
    --sans: 'IBM Plex Sans', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;

    /* Spacing and measure */
    --container-max: 1280px;
    --container-gutter: 32px;
    --sidebar-width: 260px;

    /* The eyebrow/label treatment the design uses everywhere: small, mono, tracked, uppercase.
       `text-transform` is deliberately NOT part of it — see .pp-eyebrow. */
    --eyebrow-size: 10px;
    --eyebrow-tracking: 0.12em;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    /* A faint warm wash, standing in for paper. */
    background-image:
        radial-gradient(ellipse at 20% 0%, oklch(0.97 0.02 80 / 0.5), transparent 50%),
        radial-gradient(ellipse at 80% 100%, oklch(0.95 0.025 50 / 0.35), transparent 50%);
    background-attachment: fixed;
}

/*
 * Layout container. Padding is logical so the gutter follows the writing direction; an RTL
 * project's content sits in an LTR shell without either fighting the other.
 */
.pp-container {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-gutter);
}

@media (max-width: 700px) {
    :root {
        --container-gutter: 20px;
    }
}

/*
 * The mono eyebrow. `text-transform: uppercase` is applied only for Latin scripts: uppercasing
 * is meaningless in Arabic and Hebrew, changes length unpredictably in German, and in Turkish
 * the dotless i makes it wrong. Scripts without case simply render as authored.
 */
.pp-eyebrow {
    font-family: var(--mono);
    font-size: var(--eyebrow-size);
    letter-spacing: var(--eyebrow-tracking);
    color: var(--muted);
    font-weight: 500;
}

:root:lang(en) .pp-eyebrow,
:root:lang(cy) .pp-eyebrow {
    text-transform: uppercase;
}

/* Numbers that should line up in a column: prices, percentages, counts. */
.pp-figure {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}

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

svg {
    shape-rendering: geometricPrecision;
}

/* Visible only to assistive technology. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/*
 * Focus is never removed, only restyled: the design's inputs use the accent, and every other
 * focusable thing gets a visible ring that survives on both the ivory surfaces and the ink ones.
 */
:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    border-color: var(--accent-strong);
    outline-offset: -1px;
}

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