/* ==== COMMON ==== */
* {
    box-sizing: border-box; /* width = (content + padding + border) */
    flex-wrap: wrap; /* Можно переносить */
}

html {
    scroll-behavior: smooth; /* Медленная прокрутка при переходе по ссылкам */
}

body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;

    width: 100%;
    min-height: 100vh; /* Занять 100% экрана */

    font-family: 'EB Garamond', Arial, Helvetica, sans-serif;
}

/* ~~~~ Headers ~~~~ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    text-align: center;
    max-width: 100%;
}

h1 {
    font-size: 50px;
    font-weight: 800;
    margin-bottom: 24px;
}

h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 20px;
}

h3 {
    font-size: 32px;
    margin-bottom: 16px;
}

h4 {
    font-size: 28px;
    margin-bottom: 14px;
}

h5 {
    font-size: 26px;
    margin-bottom: 12px;
}

h6 {
    font-size: 22px;
    margin-bottom: 10px;
}

/* ~~~~ Text & Links ~~~~ */
a, p {
    font-size: 22px;
    line-height: 1.4;
    margin-bottom: 10px;
    color: #333;
}

/* ~~~~ Save text ~~~~ */
h1, h2, h3, h4, h5, h6, p, a {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* ~~~~ Img ~~~~ */
img {
    display: block;
}

/* ==== HEADER & MAIN & FOOTER ==== */
header a, main a, footer a {
    transition: color 0.6s ease;
}

/* ==== HEADER & FOOTER ==== */
header,
footer {
    display: flex;
    justify-content: center;

    width: 100%;
    min-height: 50px;
    gap: 50px;
    padding: 10px;

    background-color: #343434;
    color: #c0c1c2;
}

/* ~~~~ Text & Links ~~~~ */
header a,
footer a {
    color: #c0c1c2;
}

header a:hover,
footer a:hover {
    color: white;
}

footer h3 {
    color: #ffffff;
    font-size: 18px;
}

header a,
header p {
    display: inline-block;

    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;

    font-size: 24px;
}

footer a,
footer p {
    font-size: 16px;
}

/* ==== MAIN ==== */
main {
    background: #dedede;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1; /* Растёт, занимая доступное пространство */
    flex-shrink: 1; /* Сжимается, если места мало */
    flex-basis: 0; /* Начальная ширина */

    width: 100%;

    border-top: solid 1px silver;
    border-bottom: solid 1px silver;
}

main a {
    color: darkblue;
    text-decoration: underline;
}

main a:hover {
    color: #971313;
}

/* ==== SIZES ==== */
.block {
    width: 100%;
    margin-bottom: 60px;
}

.img--400x500 { width: 400px; height: 500px; }
.img--300x250 { width: 300px; height: 250px; }
.img--250x250 { width: 250px; height: 250px; }
.img--full    { width: 100%;  height: 300px; }

/* ==== MARGIN ==== */
.margin--80x0x0x0 {
    margin: 80px 0 0 0;
}