/* ==========================================================================
   Base – reset, typografia, spoločné layoutové primitíva
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--color-bg-light);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1,
h2,
h3,
p,
dl,
dd,
ul,
ol,
figure,
pre {
    margin: 0;
}

h1,
h2,
h3 {
    font-weight: 600;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

:where(ul, ol)[role='list'] {
    padding: 0;
    list-style: none;
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color var(--duration-fast);
}

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

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

button {
    cursor: pointer;
}

code,
pre,
kbd {
    font-family: var(--font-mono);
}

input::placeholder {
    color: var(--color-placeholder);
    opacity: 1;
}

:focus-visible {
    outline: 2px solid #9b86ff;
    outline-offset: 3px;
}

::selection {
    background: var(--color-violet-strong);
    color: #fff;
}

[hidden] {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 200;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--color-ink);
    font-weight: 600;
    transform: translateY(-160%);
    transition: transform var(--duration-fast);
}

.skip-link:focus {
    transform: none;
}

/* Prepínanie obsahu tlačidla podľa aria-expanded */
[aria-expanded='true'] .when-collapsed,
[aria-expanded='false'] .when-expanded {
    display: none;
}

.mono {
    font-family: var(--font-mono);
}

.tabular {
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
}

.container--wide {
    max-width: var(--container-wide);
}

.section {
    padding: var(--section-y) var(--gutter);
}

.section--light-4 {
    background: var(--color-bg-light-4);
}

.section--light-3 {
    background: var(--color-bg-light-3);
}

.section--light-2 {
    background: var(--color-bg-light-2);
}

.heading-2 {
    font-size: var(--fs-h2);
    line-height: 1.02;
    letter-spacing: var(--tracking-h2);
}

.lead {
    max-width: 520px;
    margin-top: 18px;
    color: var(--color-text-muted);
    font-size: var(--fs-lead);
    line-height: 1.55;
}

.inline-code {
    color: var(--color-link);
    font-family: var(--font-mono);
    font-size: 0.9em;
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Tmavé plochy s particle cloud pozadím
   -------------------------------------------------------------------------- */

.backdrop {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: var(--color-text-on-dark);
}

.backdrop__canvas,
.backdrop__veil {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.backdrop__canvas {
    z-index: -2;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.backdrop__canvas.is-ready {
    opacity: 1;
}

.backdrop__veil {
    z-index: -1;
}

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