/*
  CityBites base layer.
  Keep this low-specificity and global. Component and workflow styling belongs
  in citybites.components.css or citybites.patterns.css.
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

:where(html) {
    font-size: 16px;
    scroll-behavior: smooth;
}

:where(body) {
    margin: 0;
    color: var(--cb-text-primary);
    background: var(--cb-surface-page);
    font-family: var(--cb-font-sans);
    line-height: var(--cb-line-body);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

:where(button, input, select, textarea) {
    font: inherit;
}

:where(button) {
    cursor: pointer;
}

:where(button:disabled, [aria-disabled="true"]) {
    cursor: not-allowed;
}

:where(a) {
    color: inherit;
}

:where(img, svg, video, canvas) {
    max-width: 100%;
}

:where(img) {
    display: block;
}

:where(:focus-visible) {
    outline: 2px solid var(--cb-border-focus);
    outline-offset: 2px;
}

:where([hidden]) {
    display: none;
}

.cb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.cb-skip-link {
    position: absolute;
    top: var(--cb-space-3);
    left: var(--cb-space-4);
    z-index: var(--cb-z-toast);
    padding: var(--cb-space-2) var(--cb-space-4);
    border-radius: var(--cb-radius-pill);
    background: var(--cb-text-primary);
    color: var(--cb-text-inverse);
    font-weight: var(--cb-font-weight-bold);
    text-decoration: none;
    transform: translateY(-220%);
    transition: transform var(--cb-transition);
}

.cb-skip-link:focus-visible {
    transform: translateY(0);
    outline-color: var(--cb-border-focus);
}
