:root {
    --wrapper-width: 1440px;
    --wrapper-padding: 40px;
}
@media (max-width: 460px) {
    :root {
        --wrapper-padding: 20px;
    }
}

body {
    font-family: Inter, sans-serif;
    line-height: 1.5;
    font-weight: 300;
    font-size: 18px;
    letter-spacing: 0.02em;
    color: #101828;
    -webkit-font-smoothing: antialiased;
}
img,
svg,
video {
    display: block;
}
img[height] {
    height: auto;
    max-width: 100%;
}

.wrapper {
    max-width: var(--wrapper-width);
    margin: 0 auto;

    padding: 72px var(--wrapper-padding);
}

::selection {
    background: #101828;
    color: #fff;
}

.main-header {
    text-align: center;
    font-size: 16px;
    line-height: 1;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transition: box-shadow 0.4s ease;
}
.main-header.is-scrolled {
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.06),
        0 8px 24px -16px rgba(16, 24, 40, 0.25);
}
.main-header__wrapper {
    max-width: var(--wrapper-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 24px var(--wrapper-padding);
}
.main-header .home-link {
    display: block;
    margin: 0;
}
.main-header .site-title {
    font-weight: 400;
    font-size: 20px;
    line-height: 24px;

    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.main-nav {
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.main-nav ul {
    display: flex;
    justify-content: center;
    flex-flow: row;
    gap: 30px;
}
.main-nav li {
}
.main-nav a {
    display: block;
    height: 24px;
    line-height: 24px;
    white-space: nowrap;
    position: relative;
    font-size: 14px;
}
.main-nav a::after {
    content: "";
    position: absolute;
    display: block;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #101828;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.main-nav li.--active a::after,
.main-nav li a:hover::after,
.main-nav li a:focus::after {
    transform: scaleX(1);
    transform-origin: left;
}
.main-nav li.--active a::after {
    background: #e3e7eb;
}

.picture-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 2px;
    grid-auto-flow: dense;
}
.picture-grid-item {
    background: #eee;
    position: relative;
}
.picture-grid-item.--double,
.picture-grid-item.--triple,
.picture-grid-item.--quad {
    grid-column-end: span 2;
}
.picture-grid-item a {
    display: block;
    position: relative;
}
.picture-grid-item img {
    width: 100%;
    object-fit: cover;
    height: 100%;
    object-position: 50% 50%;
}
@media (min-width: 768px) {
    .picture-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .picture-grid-item.--triple {
        grid-column-end: span 3;
    }
    .picture-grid-item.--quad {
        grid-column-end: span 4;
    }
}
@media (min-width: 1280px) {
    .picture-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.single-photo {
    padding: 20px;
}
.single-photo img {
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.about-section {
    display: grid;
    grid-gap: 40px;
    align-items: end;
}
.about-section p {
    padding-bottom: 1em;
}
.about-section .__content {
}
.about-section .__image {
    align-self: start;
}
@media (min-width: 768px) {
    .about-section {
        grid-template-columns: 1fr 2fr;
    }
}

.main-footer {
    padding: 48px 0;
    font-weight: 300;
    text-align: center;
    font-size: 16px;
    line-height: 1;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-bottom: 24px;
}
.footer-links a:hover,
.footer-links a:focus {
    text-decoration: underline;
}

.posts-list {
    text-align: center;
    padding: 0 20px;
}
.posts-list a:hover,
.posts-list a:focus {
    text-decoration: underline;
}

.collection-teaser + .collection-teaser {
    margin-top: 120px;
}
.collection-teaser header {
}
.article-single header h1,
.collection-teaser header h3 {
    position: relative;
    font-size: clamp(
        32px,
        calc(32px + (48 - 32) * ((100vw - 400px) / (960 - 400))),
        48px
    );
    line-height: 1.1;
    font-weight: 400;
    max-width: 400px;
    padding-bottom: 40px;
}
.article-single header h1::after,
.collection-teaser header h3::after {
    content: "";
    position: absolute;
    display: block;
    bottom: 20px;
    height: 2px;
    width: 80px;
    background: #e3e7eb;
}
.collection-teaser__images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 32px;
}
.collection-teaser__image {
    background: #333;
    overflow: hidden;
}
.collection-teaser__image img {
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.collection-teaser__image a:hover img,
.collection-teaser__image a:focus img {
    transform: scale(1.05);
}
.collection-teaser__image a {
    display: block;
    position: relative;
    height: 100%;
}
.collection-teaser__image a::after {
    position: absolute;
    content: "";
    width: 12px;
    height: 12px;
    display: block;
    background: url("/icons/arrow-top-right.svg") no-repeat 50% 50%;
    z-index: 2;
    top: 20px;
    right: 20px;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.collection-teaser__image a:hover::after,
.collection-teaser__image a:focus::after {
    transform: translate(3px, -3px);
}
.collection-teaser__image-overlay {
    position: absolute;
    bottom: 0;
    padding: 20px 24px;
    color: #fff;
    background: transparent
        linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.8));
    width: 100%;
    height: 100%;
    display: flex;
    flex-flow: column;
    justify-content: flex-end;
    transition: background-color 0.3s;
}
.collection-teaser__image-overlay h4 {
    font-size: clamp(18px, 3vw, 28px);
    font-weight: 500;
    line-height: 1.2;
    max-width: 260px;
    padding-bottom: 28px;
    position: relative;
}
.collection-teaser__image-overlay h4::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 14px;
    left: 0;
    width: 80px;
    height: 2px;
    background: #fff;
    opacity: 0.5;
}
.collection-teaser__image-overlay p {
    color: #fff;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
}
.collection-teaser__image a:hover .collection-teaser__image-overlay {
    background-color: rgba(0, 0, 0, 0.2);
}
.collection-teaser__image a:hover {
}
@media (max-width: 959px) {
    .collection-teaser__images {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 460px) {
    .collection-teaser__images {
        grid-template-columns: 1fr;
    }
    .collection-teaser__image-overlay h4 {
        font-size: clamp(18px, 7vw, 28px);
    }
}

.article-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-flow: dense;
    margin-top: 72px;
    grid-gap: 20px;
}
.article-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.article-gallery-item {
    background: #eee;
    overflow: hidden;
}
.article-gallery-item img {
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.article-gallery-item a:hover img,
.article-gallery-item a:focus img,
a.article-gallery-item:hover img,
a.article-gallery-item:focus img {
    transform: scale(1.04);
}
.article-gallery-item.--cols-2 {
    grid-column-end: span 2;
}
.article-gallery-item.--cols-3 {
    grid-column-end: span 3;
}
.article-gallery-item.--cols-4 {
    grid-column-end: span 4;
}
.article-gallery-item.--cols-5 {
    grid-column-end: span 4;
}
.article-content {
    max-width: 680px;
}
@media (min-width: 768px) {
    .article-gallery {
        grid-gap: 40px;
    }
}

.article {
    max-width: 640px;
    margin: 0 auto;
}
.article.--centered {
    text-align: center;
}
.article h1 {
    font-size: max(24px, min(48px, 6vw));
    margin: 0 0 0.5em 0;
}

.buttons {
    display: flex;
    margin: 24px 0;
}
.buttons.--centered {
    justify-content: center;
}
.button {
    display: block;
    background: #333;
    color: #fff;
    padding: 8px 20px;
    font-weight: 500;
    transition: background-color 0.25s ease, transform 0.25s ease;
}
.button:hover,
.button:focus {
    background: #000;
    transform: translateY(-1px);
}

.download-box {
    max-width: 600px;
    margin: 10vh auto;
    display: grid;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.download-box h1 {
    margin: 0 auto 24px;
    font-weight: 600;
    font-size: 22px;
}
.download-box .buttons {
    justify-content: center;
    margin-bottom: 0;
    text-align: center;
    gap: 6px;
    flex-flow: column;
}
.download-box p {
    margin-bottom: 12px;
}
.download-box ul {
    padding-left: 1.2em;
    list-style: disc;
}
.download-box li {
    margin-bottom: 12px;
}

.download-pages-grid .download-box {
    margin: 0;
}
.download-pages-grid a.download-box:hover,
.download-pages-grid a.download-box:focus {
    outline: 4px solid #ff4f00;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
@media (min-width: 1024px) {
    .download-pages-grid {
        grid-template-columns: 1fr 1fr;
        grid-gap: 40px;
    }
}
