/* Reset, základní typografie, focus, pomocné třídy. */
*, *::before, *::after { box-sizing: border-box; }

html {
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Stránka se nesmí posouvat do stran (ani o kousek, když něco přečuhuje). clip, ne hidden: nevytváří scroll kontejner,
       takže sticky akce dál drží u dolního okraje. */
    overflow-x: clip;
    overscroll-behavior-x: none;
}

html, body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
}

body {
    background: radial-gradient(120% 80% at 50% 0, var(--c-bg-2), var(--c-bg)) fixed;
    background-color: var(--c-bg);
    color: var(--c-on-bg);
    font-family: var(--font-body);
    font-size: var(--fs-md);
    line-height: var(--lh-body);
    overflow-x: hidden;
    overflow-x: clip;
    overscroll-behavior-x: none;
    overscroll-behavior-y: contain;
    -webkit-tap-highlight-color: transparent;
    /* Svislé posouvání a štípnutí (zoom) zůstává, vodorovné gesto stránku nepohne. Dvojité klepnutí na zoom se nepoužívá. */
    touch-action: pan-y pinch-zoom;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p { margin: 0; }

h1, h2, h3, h4, .tt-display {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: var(--lh-tight);
    letter-spacing: -.01em;
}

h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }

img, svg { display: block; max-width: 100%; }

a { color: var(--c-yellow); }

ul, ol { margin: 0; padding: 0; list-style: none; }

/* Focus viditelný na tmavém i krémovém podkladu (UX §1.4). */
:focus-visible {
    outline: 3px solid var(--c-focus);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px var(--c-ink);
}

:focus:not(:focus-visible) { outline: none; }

h1:focus { outline: none; box-shadow: none; }

/* Pomocné třídy */
.tt-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.tt-muted { color: var(--c-on-bg-soft); }
.tt-soft { color: var(--c-ink-soft); }
.tt-center { text-align: center; }
.tt-nowrap { white-space: nowrap; }
.tt-nbsp { white-space: nowrap; }
.tt-hidden { display: none !important; }

.tt-text-sm { font-size: var(--fs-sm); }
.tt-text-xs { font-size: var(--fs-xs); }
.tt-text-lg { font-size: var(--fs-lg); }

.tt-eyebrow {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-xs);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--c-on-bg-soft);
}

/* Reduced motion: blokové vypnutí animací kromě tříd, které jsou funkční (časovač) nebo dekorativně důležité (spinner). */
@media (prefers-reduced-motion: reduce) {
    :root:not([data-motion="full"]) *:not(.tt-keep-motion),
    :root:not([data-motion="full"]) *:not(.tt-keep-motion)::before,
    :root:not([data-motion="full"]) *:not(.tt-keep-motion)::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

:root[data-motion="reduced"] *:not(.tt-keep-motion),
:root[data-motion="reduced"] *:not(.tt-keep-motion)::before,
:root[data-motion="reduced"] *:not(.tt-keep-motion)::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
}
