/*
 * Clarity Air base styles.
 * Reset + @font-face + element defaults. References tokens.css only.
 */

@font-face {
    font-family: "Sentient";
    src: url("../../fonts/Sentient-Variable.woff2") format("woff2-variations");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Sentient";
    src: url("../../fonts/Sentient-VariableItalic.woff2") format("woff2-variations");
    font-weight: 200 800;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Geist";
    src: url("../../fonts/Geist-Variable.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("../../fonts/JetBrainsMono-Variable.woff2") format("woff2-variations");
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* ----- Modern reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: transparent; border: 0; padding: 0; cursor: pointer; }
a { color: var(--link); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration-thickness: 0.12em; }

/* ----- Body ----- */
html { font-size: 100%; }
body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--clarity-font-sans);
    font-size: var(--clarity-text-base);
    line-height: var(--clarity-leading-normal);
    letter-spacing: var(--clarity-tracking-base);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ----- Display + headings ----- */
h1, h2, h3, h4 {
    font-family: var(--lane-display-font, var(--clarity-font-display));
    line-height: var(--clarity-leading-tight);
    letter-spacing: var(--lane-tracking, var(--clarity-tracking-tight));
    color: var(--fg);
    font-weight: 600;
}
h1 { font-size: var(--clarity-text-5xl); }
h2 { font-size: var(--clarity-text-3xl); }
h3 { font-size: var(--clarity-text-xl); }
h4 { font-size: var(--clarity-text-lg); }

@media (min-width: 64rem) {
    h1 { font-size: var(--clarity-text-6xl); }
    h2 { font-size: var(--clarity-text-4xl); }
}

/* ----- Body copy ----- */
p { max-width: var(--clarity-readable-max); }
code, kbd, pre, samp { font-family: var(--clarity-font-mono); font-size: 0.95em; }

/* ----- Container ----- */
.container {
    max-width: var(--clarity-content-max);
    margin-inline: auto;
    padding-inline: var(--clarity-gutter-mobile);
}
@media (min-width: 64rem) {
    .container { padding-inline: var(--clarity-gutter-desktop); }
}

/* ----- Focus ring ----- */
:focus-visible {
    outline: 2px solid var(--lane-accent, var(--accent));
    outline-offset: 3px;
    border-radius: var(--clarity-radius-sm);
}

/* ----- Skip link ----- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    padding: var(--clarity-space-2) var(--clarity-space-4);
    background: var(--accent);
    color: var(--accent-fg);
    z-index: 100;
}
.skip-link:focus { top: 0; }
