* {
    box-sizing: border-box;
}

:root {
    --phlox: #c0219c;
    --gris: #6f6f6f;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    font-family: 'Jost', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #000;
    background: #fff;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

h1,
h2 {
    margin: 0;
    font-weight: 300;
    line-height: 1.05;
}

h2 {
    font-size: 56px;
}

::selection {
    background: var(--phlox);
    color: #fff;
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 40px;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
    color: #fff;
    transition: background-color .3s, color .3s, box-shadow .3s;
}

.header.scrolled {
    background: #fff;
    color: #000;
    box-shadow: 0 1px 0 #e6e6e6;
}

.logo img {
    width: 86px;
    filter: invert(1);
    transition: filter .3s;
}

.header.scrolled .logo img {
    filter: none;
}

.header nav {
    display: flex;
    gap: 36px;
}

.header nav a {
    font-size: 16px;
    text-decoration: none;
}

.header nav a:hover {
    text-decoration: underline;
    text-decoration-color: var(--phlox);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 40px 70px;
    background: #2a1426 url(img/phlox-flou.jpg) center / cover;
    color: #fff;
    overflow: hidden;
}

.hero-content {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 64px;
}

.hero h1 {
    font-size: 88px;
    letter-spacing: -0.015em;
}

.hero p {
    max-width: 420px;
    margin: 28px 0 40px;
    font-size: 20px;
    line-height: 1.55;
}

.hero-photo {
    width: auto;
    height: min(76vh, 740px);
    aspect-ratio: 3 / 4;
    object-fit: cover;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .6);
    animation: focus 1.6s ease-out .3s both;
}

@keyframes focus {
    from {
        filter: blur(18px);
        opacity: 0;
    }
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    border: 1px solid transparent;
    border-radius: 50px;
    background: #fff;
    color: #000;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}

.btn:hover {
    background: var(--phlox);
    border-color: var(--phlox);
    color: #fff;
}

.btn-dark {
    background: #000;
    color: #fff;
}

.btn-outline {
    background: none;
    border-color: #000;
}

.gallery {
    padding: 130px 0 110px;
}

.gallery-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 48px;
}

.filters {
    display: flex;
    gap: 28px;
}

.filters button {
    padding: 4px 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 17px;
    color: var(--gris);
    cursor: pointer;
}

.filters button:hover {
    color: #000;
}

.filters button.active {
    color: #000;
    text-decoration: underline;
    text-decoration-color: var(--phlox);
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
}

.grid {
    columns: 3;
    column-gap: 24px;
}

.photo {
    display: block;
    margin-bottom: 24px;
    break-inside: avoid;
    cursor: zoom-in;
    animation: fade .5s ease;
}

.photo img {
    width: 100%;
}

.photo.hide {
    display: none;
}

@keyframes fade {
    from {
        opacity: 0;
    }
}

.about {
    padding: 110px 0;
}

.about .container {
    display: grid;
    grid-template-columns: 360px 1fr;
    align-items: center;
    gap: 100px;
}

.about-text {
    max-width: 640px;
}

.lead {
    margin: 28px 0 20px;
    font-size: 32px;
    font-weight: 300;
    line-height: 1.3;
}

.about dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 12px 40px;
    margin: 40px 0 0;
}

.about dt {
    color: var(--gris);
}

.about dd {
    margin: 0;
}

.contact {
    padding: 110px 0 140px;
}

.contact p {
    max-width: 620px;
    margin: 24px 0 0;
}

.email {
    display: inline-block;
    margin: 28px 0 40px;
    font-size: 48px;
    font-weight: 300;
    line-height: 1.2;
    text-decoration-color: var(--phlox);
    text-decoration-thickness: 2px;
    text-underline-offset: 12px;
    overflow-wrap: anywhere;
}

.email:hover {
    color: var(--phlox);
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 40px;
    border-top: 1px solid #e6e6e6;
    font-size: 15px;
    color: var(--gris);
}

.footer p {
    margin: 0;
}

.footer a {
    text-decoration: none;
}

.footer a:hover {
    color: #000;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 90px;
    background: rgba(0, 0, 0, .94);
}

.lightbox.open {
    display: flex;
    animation: fade .25s ease;
}

.lightbox figure {
    margin: 0;
    text-align: center;
}

.lightbox img {
    width: auto;
    max-height: 80vh;
    margin: 0 auto;
}

.lightbox figcaption {
    margin-top: 16px;
    font-size: 16px;
    color: #bbb;
}

.lightbox button {
    position: absolute;
    padding: 8px 18px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 54px;
    font-weight: 300;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    opacity: .75;
}

.lightbox button:hover {
    opacity: 1;
}

.close {
    top: 14px;
    right: 18px;
}

.prev,
.next {
    top: 50%;
    transform: translateY(-50%);
}

.prev {
    left: 14px;
}

.next {
    right: 14px;
}

@media (max-width: 1100px) {
    .hero h1 {
        font-size: 64px;
    }

    .hero-photo {
        height: min(70vh, 620px);
    }
}

@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-photo {
        order: -1;
        width: 100%;
        max-width: 480px;
        height: auto;
    }

    .grid {
        columns: 2;
    }

    .about .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-logo {
        width: 240px;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 17px;
    }

    h2 {
        font-size: 40px;
    }

    .container {
        padding: 0 20px;
    }

    .header {
        padding: 10px 20px;
    }

    .logo img {
        width: 62px;
    }

    .header nav {
        gap: 20px;
    }

    .header nav a {
        font-size: 15px;
    }

    .hero {
        padding: 96px 20px 56px;
    }

    .hero-content {
        gap: 32px;
    }

    .hero h1 {
        font-size: 46px;
    }

    .hero p {
        margin: 18px 0 30px;
        font-size: 18px;
    }

    .gallery {
        padding: 80px 0;
    }

    .gallery-top {
        margin-bottom: 28px;
    }

    .filters {
        gap: 20px;
    }

    .grid {
        column-gap: 12px;
    }

    .photo {
        margin-bottom: 12px;
    }

    .about {
        padding: 70px 0;
    }

    .about-logo {
        width: 200px;
    }

    .lead {
        font-size: 26px;
    }

    .contact {
        padding: 70px 0 90px;
    }

    .email {
        margin: 22px 0 30px;
        font-size: 26px;
    }

    .footer {
        padding: 22px 20px;
    }

    .lightbox {
        padding: 60px 10px 80px;
    }

    .lightbox img {
        max-height: 62vh;
    }

    .prev,
    .next {
        top: auto;
        bottom: 12px;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-photo,
    .photo,
    .lightbox.open {
        animation: none;
    }
}
