/* Krachpedale site: one stylesheet, no web fonts, no external resources.
   The page is neutral on purpose: the colour comes from the pedal artwork. */

:root {
    --bg: #121316;
    --surface: #1b1c21;
    --text: #ebebef;
    --muted: #9a9ca6;
    --link: #b4c0e6;
    --line: #2c2e36;
    --code-bg: #0d0e10;
    --shadow: rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f3f3f5;
        --surface: #ffffff;
        --text: #1d1e23;
        --muted: #5e6069;
        --link: #34447a;
        --line: #d8d9de;
        --code-bg: #e9eaee;
        --shadow: rgba(20, 20, 40, 0.14);
    }
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
}

.wrap {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 16px;
}

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

a:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: var(--code-bg);
    border-radius: 4px;
    padding: 0.1em 0.35em;
    overflow-wrap: anywhere;
}

/* header */

header.top {
    padding: 56px 0 32px;
    border-bottom: 1px solid var(--line);
}

header.top h1 {
    margin: 0;
    font-size: clamp(2rem, 7vw, 3.4rem);
    letter-spacing: 0.04em;
    line-height: 1.1;
}

header.top .tag {
    margin: 0.4em 0 0;
    font-size: 1.15rem;
    color: var(--muted);
}

header.top .intro {
    margin: 1.2em 0 0;
    max-width: 40rem;
    color: var(--muted);
}

/* sections */

section {
    padding: 40px 0;
}

section + section {
    border-top: 1px solid var(--line);
}

h2 {
    margin: 0 0 1em;
    font-size: 1.5rem;
}

/* pedal cards */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.4rem), 1fr));
    gap: 24px;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 6px 18px var(--shadow);
}

.card img {
    display: block;
    max-width: 100%;
    height: auto;
}

.card h3 {
    margin: 14px 0 0;
    font-size: 1.15rem;
}

.card .desc {
    margin: 0.4em 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.card .version {
    margin: 0.8em 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

/* size and checksum: a disclosure, closed by default, open until the visitor closes it */

details.verify {
    width: 100%;
    margin: 10px 0 16px;
    font-size: 0.8rem;
}

details.verify summary {
    cursor: pointer;
    text-align: center;
    color: var(--muted);
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

details.verify summary:hover {
    color: var(--text);
}

details.verify dl {
    margin: 10px 0 0;
    padding: 8px 10px;
    background: var(--code-bg);
    border-radius: 6px;
}

details.verify dt {
    color: var(--muted);
    font-size: 0.72rem;
}

details.verify dd {
    margin: 0 0 6px;
}

details.verify dd:last-child {
    margin-bottom: 0;
}

details.verify code {
    padding: 0;
    background: none;
    font-size: 0.7rem;
    word-break: break-all;
    user-select: all;
    -webkit-user-select: all;
}

.button {
    display: inline-block;
    margin-top: auto;
    padding: 0.5em 1.3em;
    border-radius: 999px;
    background: var(--text);
    color: var(--bg);
    font-weight: 600;
    text-decoration: none;
}

.button:hover {
    opacity: 0.85;
}

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

.note {
    margin: 1.5em 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

/* install */

ol.steps {
    margin: 0;
    padding-left: 1.4em;
}

ol.steps li {
    margin: 0 0 1em;
}

pre {
    margin: 0.6em 0 0;
    padding: 12px 14px;
    background: var(--code-bg);
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.85rem;
}

pre code {
    padding: 0;
    background: none;
    overflow-wrap: normal;
}

/* legal */

.legal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: 24px 48px;
    font-size: 0.92rem;
}

.legal h3 {
    margin: 0 0 0.4em;
    font-size: 1.05rem;
}

.legal p {
    margin: 0 0 0.8em;
}

footer.bottom {
    padding: 32px 0 56px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.85rem;
}

footer.bottom p {
    margin: 0 0 0.6em;
}
