/* mobile first */

@font-face {
    font-family: 'MyFont';
        src: url('../fonts/AbrilFatface-Regular.woff') format('woff');
        src: url('../fonts/AbrilFatface-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'MyFont2';
        src: url('../fonts/HelveticaNeueCyr-Roman.woff') format('woff');
        src: url('../fonts/HelveticaNeueCyr-Roman.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'MyFont3';
        src: url('../fonts/DMSerifDisplay-Regular.woff') format('woff');
        src: url('../fonts/DMSerifDisplay-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

:root{
    --titles: #B94141;
    --subtitles: #2F2F2F;
    --texts: #2F2F2F;
    --inputs: #787878;
    --links: #DBDFE2;
    --grey: #EEEEEE;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
    touch-action: manipulation;
}

html {
    scroll-behavior: smooth;
    font-size: clamp(12px, 100vw / 24.375, 16px);
}

body {
    font-family: 'MyFont', 'MyFont2', sans-serif;
    background-color: #FFFFFF;
    font-size: 1rem;
}

body.no-scroll {
  overflow: hidden;
  touch-action: none; /* отключает тач-скролл */
}

main {
    overflow-x: hidden;
}

.container {
    max-width: 480px;
    margin: auto;
    padding: 0 1rem;
}

button, input, textarea {
  -webkit-appearance: none;
  appearance: none;
}

ul {
    list-style: none;
}

button, a {
    cursor: pointer;
}

a {
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: inherit;
    line-height: inherit;
}

/* ------------------------- */

/* sec2 */

.sec1 {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section2__title {
    width: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 1.5rem 0;
}

.upload__block {
    max-width: 480px;
    width: 100%;
    top: 110px;
    left: 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    background: url('../images/sec1/sec1-textures.jpg');
    padding: 22.5px 16px;
    font-family: 'MyFont3', sans-serif;
}

.upload__button {
    font-family: 'MyFont2', sans-serif;
    padding: 10px 20px;
    background-color: #FFFFFF;
    color: var(--texts);
    border: 1px solid var(--texts);
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload__description {
    line-height: 1.25rem;
    letter-spacing: 0.04em;
    font-size: 18px;
}

.upload__button span{
    line-height: 16px;
    font-size: 1rem;
    align-self: end;
}

.section2__title h2 {
    font-size: 2.75rem;
    color: var(--titles);
}

/* sec4 */

.community {
    margin: 2rem 0 1.5rem 0;
}

.community__block {
    width: 100%;
    display: flex;
    gap: 0.25rem;
}

.community__small {
    width: 33%;
}

.community__big {
    width: 67%;
}

.community__small img {
    width: 100%;
    height: calc(50% - 6px);
}

.community__big img {
    width: 100%;
}

/* modal */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
}

.modal__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    width: 100%;
    height: 100vh;
    max-width: 100%;
}

.modal__header {
    color: var(--texts);
    height: 88px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #FFFFFF;
    width: 100%;
    max-width: 480px;
    padding: 0 16px;
}

.modal__header h3 {
    font-size: 1.5rem;
}

.modal__image-block {
    max-width: 480px;
    height: 100%;
}
.modal__image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal__footer {
    height: 108px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--texts);
    background-color: #FFFFFF;
}

.modal__footer p {
    font-size: 1.25rem;
}


/* ---------------------- */

form {
    display: flex;
    flex-direction: column;
    max-width: 480px;
    width: 100%;
    height: 100%;
    padding: 0 16px 28px 16px;
}

.upload__modal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    gap: 16px;
    max-width: 480px;
}

.upload__modal-area {
    position: relative;
    background-color: var(--grey);
    width: 100%;
    aspect-ratio: 179 / 227;
    border-radius: 16px;
    padding: 16px;
}

.modal__preview {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    background-color: var(--grey);
    border-radius: 16px;
}

.custom-file-label {
  cursor: pointer;
}

.custom__file-label input[type="file"] {
  display: none;
}

.custom__file-label div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    height: 100%;
    font-family: 'MyFont2', sans-serif;
}

.custom__upload-title {
    text-decoration: underline;
    text-underline-offset: 4px;
    line-height: 22px;
    letter-spacing: 0.04em;
    color: var(--texts);
    position: relative;
    z-index: 2;
}

.custom__upload-title.active {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: #FFFFFF;
    padding: 5px 12px;
    border-radius: 5px;
}

.upload__textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    padding: 16px 20px;
    font-size: 1rem;
    border-radius: 16px;
    margin-top: 12px;
    background-color: var(--grey);
    color: var(--texts);
    border: none;
    margin-bottom: 5px;
}

form button {
    width: 100%;
    padding: 16px;
    background-color: var(--texts);
    color: #FFFFFF;
    letter-spacing: 0.04em;
    font-family: 'MyFont2', sans-serif;
    font-size: 1rem;
    justify-content: flex-end;
    border-radius: 1rem;
    border: none;
}

form button:disabled {
    background-color: #8E8E8E;
    cursor: not-allowed;
}

@media (min-width: 481px) {
    .container, .modal__header, form {
        padding: 0;
    }
    form {
        padding-bottom: 28px;
    }
}



