/*
    Html
    Resets
    Input, Select, Label 
*/

/* ================================================== */
/*                       Html                         */
/* ================================================== */

@charset "UTF-8";
@viewport {width: device-width;}

html {
    height: 100%;
    min-width: 380px;
    user-select: none;
    -webkit-tap-highlight-color: transparent; 
}
html.fixed {
    overflow: hidden;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: var(--color-text);
    background-color: var(--bg-main);
    font-family: 'Montserrat', sans-serif;
    font-size: var(--font-size);
    font-weight: var(--font-weight);
}
main > *:not(.section):last-child {
    margin-bottom: var(--indent-block);
}
h1, 
h2, .h2 {
    font-family: 'Exo 2', sans-serif;
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-semi);
    margin-bottom: calc(var(--indent) * 2);
}
h3, .h3 {
    font-size: var(--font-size-medium);
    font-weight: var(--font-weight-semi);
    margin-bottom: var(--indent);
}
picture + h3, 
picture + .h3 {
    margin-bottom: unset;
}
/* ================================================== */
/*                       Resets                       */
/* ================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
*:focus {
    outline: none;
}
a {
    color: var(--color-text);
    text-decoration: none;
}
p:not(:last-child) {
    margin-bottom: 1rem;
}
p,
span {
    line-height: 1.6;
}
picture {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
img {
    max-width: 100%;
    max-height: 100%;
    border-style: none;
    object-fit: contain;
}
header ul,
footer ul {
    margin: 0; 
    list-style: none;
}
header ul li,
footer ul li {
    margin: 0; 
}
button {
    font-family: inherit;
    text-align: inherit;
    font-weight: inherit;
    font-size: 100%;
    background-color: transparent;
    color: inherit;
    border: none;
    cursor: pointer;
}
address {
    font-style: unset;
}

/* ================================================== */
/*                 Input, Select, Label               */
/* ================================================== */
input:not([type="checkbox"]),
textarea,
select {
    position: relative;
    display: inline-block;
    width: 100%;
    min-height: 50px;
    padding: 10px 15px;
    border: unset;
    border-radius: var(--border-radius);
    text-transform: none;
    font-size: inherit;
    font-family: inherit;
    line-height: 1;
    background-color: #00000070;
    color: var(--color-text);
}
input::placeholder,
textarea::placeholder {
    color: var(--color-text);
}
/* Хак для автозаполнения */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: var(--color-text);
    transition: background-color 5000s ease-in-out 0s;
}
input[type="checkbox"],
input[type="submit"],
select {
    cursor: pointer;
}
textarea {
    resize: vertical;
}
input[type="checkbox"] {
    position: relative;
    height: 30px;
    width: 30px;
    flex: 0 0 30px;
}
input[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110%;
    height: 110%;
    transform: translate(-50%, -50%);
    border: 1px solid;
    border-color: var(--border-color);
    border-radius: 3px;
    background-color: var(--bg-boxed);
}
input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    bottom: 7px;
    left: 7px;
    height: 25px;
    width: 15px;
    border-bottom: 4px solid;
    border-right: 4px solid;
    border-color: var(--color-text);
    transform: rotate(45deg);
}
label {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

/* ================================================== */
/*                     Scrollbar                      */
/* ================================================== */
html {
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: var(--bg-second) transparent;
}
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: transparent;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: var(--bg-second);
    border-radius: var(--border-radius);
}