/**
 * CSS Reset & Base Styles
 *
 * Moderní CSS reset + základní styly
 */

/* ============================================
 * BOX SIZING
 * ============================================ */

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

/* ============================================
 * MARGIN & PADDING RESET
 * ============================================ */

* {
    margin: 0;
    padding: 0;
}

/* ============================================
 * HTML & BODY
 * ============================================ */

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-gray-900);
    background-color: var(--color-white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
 * TYPOGRAPHY
 * ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-4);
    color: var(--color-gray-900);
}

h1 {
    font-size: var(--font-size-5xl);
}

h2 {
    font-size: var(--font-size-4xl);
}

h3 {
    font-size: var(--font-size-3xl);
}

h4 {
    font-size: var(--font-size-2xl);
}

h5 {
    font-size: var(--font-size-xl);
}

h6 {
    font-size: var(--font-size-lg);
}

p {
    margin-bottom: var(--spacing-4);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-colors);
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

strong, b {
    font-weight: var(--font-weight-bold);
}

em, i {
    font-style: italic;
}

small {
    font-size: var(--font-size-sm);
}

/* ============================================
 * LISTS
 * ============================================ */

ul, ol {
    list-style-position: inside;
    margin-bottom: var(--spacing-4);
    padding-left: var(--spacing-4);
}

li {
    margin-bottom: var(--spacing-2);
}

/* ============================================
 * IMAGES & MEDIA
 * ============================================ */

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

img {
    border: 0;
}

svg {
    fill: currentColor;
}

/* ============================================
 * FORM ELEMENTS
 * ============================================ */

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: var(--line-height-normal);
    margin: 0;
}

button,
input {
    overflow: visible;
}

button,
select {
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
    cursor: pointer;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
    outline: 1px dotted ButtonText;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: var(--spacing-3);
    border: var(--border-width) solid var(--color-gray-300);
    border-radius: var(--border-radius-md);
    background-color: var(--color-white);
    transition: var(--transition-all);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(115, 163, 222, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
 * TABLES
 * ============================================ */

table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

th, td {
    text-align: left;
    padding: var(--spacing-3);
}

/* ============================================
 * UTILITY CLASSES
 * ============================================ */

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

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ============================================
 * ACCESSIBILITY
 * ============================================ */

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

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

/* ============================================
 * SELECTION
 * ============================================ */

::selection {
    background-color: var(--color-primary);
    color: var(--color-white);
}

::-moz-selection {
    background-color: var(--color-primary);
    color: var(--color-white);
}
