/**
 * MotoForma Reset
 * Modern normalisation + accessible defaults
 * ============================================
 */

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

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 1.5rem);
    /* Prvky najíždějící zboku (data-reveal="right") nesmí na mobilu
       přidat vodorovný posuv. clip na rozdíl od hidden nerozbije sticky. */
    overflow-x: clip;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote,
dl, dd, ul, ol {
    margin: 0;
}

body {
    min-height: 100svh;
    overflow-x: hidden;
    background: var(--paper);
    font-family: var(--font-body);
    font-size: var(--step-0);
    font-weight: var(--font-normal);
    line-height: var(--leading-relaxed);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
    text-rendering: optimizeLegibility;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--t-fast);
}

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

/* Links inside body copy stay underlined for scannability */
.terms-content a,
.section__text a {
    color: var(--brand);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

/* Lists — only reset where opted in */
ul[role='list'],
ol[role='list'] {
    list-style: none;
    padding: 0;
}

/* Media */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

img {
    -webkit-user-drag: none;
    user-drag: none;
}

/* Forms inherit typography */
input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: var(--space-l) 0;
}

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

/* ============================================
   Focus — visible, keyboard-only, never red
   ============================================ */

:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
    border-radius: var(--r-xs);
}

/* On ink surfaces the ring flips to light */
.site-header :focus-visible,
.hero :focus-visible,
.site-footer :focus-visible,
.cta-section :focus-visible,
.dark-features :focus-visible {
    outline-color: #fff;
}

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}

[hidden] {
    display: none !important;
}

/* ============================================
   Reduced motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
