/* Fonts */
@font-face {
    font-family: 'Open Sauce One';
    font-weight: 400;
    src: url(../fonts/OpenSauceOne-Regular.ttf);
    font-display: swap;
}

@font-face {
    font-family: 'Open Sauce One';
    font-weight: 600;
    src: url(../fonts/OpenSauceOne-SemiBold.ttf);
    font-display: swap;
}

@font-face {
    font-family: 'Open Sauce One';
    font-weight: 700;
    src: url(../fonts/OpenSauceOne-Bold.ttf);
    font-display: swap;
}

@font-face {
    font-family: 'Open Sauce One';
    font-weight: 400;
    font-style: italic;
    font-display: swap;
    src: url(../fonts/OpenSauceOne-Italic.ttf);
}

/* Accessibility */
.sr-only:not(:focus):not(:active) { /* https://css-tricks.com/inclusively-hidden/ */
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* Typography */
* {
    box-sizing: border-box;
}

body {
    color: #1F2933;
    font-family: 'Open Sauce One', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

h1 {
    margin: 0;
}

.formatted-content {
    padding: 0 15px;
    margin: 0 auto;
}

.formatted-content h1 {
    font-size: 24px;
    line-height: 1.4;
}

.formatted-content p {
    font-size: 18px;
    margin: 1.5em 0;
    line-height: 1.8;
}

@media screen and (min-width: 576px) {
    .formatted-content {
        max-width: 580px;
    }

    .formatted-content h1 {
        font-size: 30px;
    }

    .formatted-content p {
        font-size: 20px;
    }
}

@media screen and (min-width: 768px) {
    .formatted-content {
        max-width: 600px;
    }

    .formatted-content h1 {
        font-size: 36px;
    }

    .formatted-content p {
        font-size: 22px;
    }
}

@media screen and (min-width: 992px) {
    .formatted-content {
        max-width: 800px;
    }

    .formatted-content h1 {
        font-size: 40px;
    }

    .formatted-content p {
        font-size: 24px;
    }
}

.icon-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    transition: .15s ease-in-out opacity;
}

.icon-link img {
    position: relative;
    top: .12em;
    display: inline-block;
    width: 1em;
    height: 1em;
    margin: 0 .1em;
    vertical-align: baseline;
}

.icon-link span {
    white-space: nowrap;
}

.icon-link:hover {
    opacity: .7;
}

/* Home page hero */
.section-hero-image {
    position: relative;
    background: #ebeef2;
    height: 400px;
    margin-bottom: -150px;
    z-index: -1;
}

.section-hero-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top right;
    max-width: 2600px;
    margin: 0 auto;
}

.section-hero-image::after {
    position: absolute;
    top: 0;
    left: 0;
    content: '';

    display: block;
    width: 100%;
    height: 100%;

    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .8) 60%,
        rgba(255, 255, 255, 1) 95%
    );
}

@media screen and (min-width: 576px) {
    .section-hero-image {
        height: 480px;
        margin-bottom: -200px;
    }
}

@media screen and (min-width: 768px) {
    .section-hero-image {
        height: 650px;
        margin-bottom: -300px;
    }
}

@media screen and (min-width: 992px) {
    .section-hero-image {
        height: 72vw;
        margin-bottom: -30%;
    }
}

@media screen and (min-width: 1400px) {
    .section-hero-image {
        margin-bottom: -35%;
    }
}

/* Main nav */
.main-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    padding: 8px;

    display: flex;
    justify-content: flex-end;
}

.main-nav::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;

    padding-bottom: 100px;
    background: rgba(255, 255, 255, .4);

    -webkit-mask-image: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 1) 30%,
        rgba(255, 255, 255, 0) 100%
    );
    mask-image: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 1) 30%,
        rgba(255, 255, 255, 0) 100%
    );

    -webkit-backdrop-filter: blur(32px);
    backdrop-filter: blur(32px);
}

.language-select {
    position: relative;
    z-index: 20;

    appearance: none;
    border: 0;
    padding: 8px;
    padding-right: 28px;
    border-radius: 8px;

    color: inherit;
    font-size: 18px;
    line-height: 1.6;
    text-align-last: right;

    background: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor' class='w-5 h-5'%3E%3Cpath fill-rule='evenodd' d='M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z' clip-rule='evenodd' /%3E%3C/svg%3E%0A");
    background-size: 20px;
    background-repeat: no-repeat;
    background-position: right 4px center;

    transition: .1s ease-in-out background-color, .1s ease-in-out box-shadow;
}

.language-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(71, 85, 105, .4);
}

@media screen and (min-width: 576px) {
    .main-nav {
        padding: 16px 20px;
        background-position: right 12px center;
    }

    .main-nav::before {
        padding-bottom: 160px;
        background: rgba(255, 255, 255, .4);

        -webkit-mask-image: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 1) 30%,
            rgba(255, 255, 255, 0) 100%
        );
        mask-image: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 1) 0%,
            rgba(255, 255, 255, 1) 30%,
            rgba(255, 255, 255, 0) 100%
        );
    }

    .language-select {
        padding: 10px 16px;
        padding-right: 36px;
    }
}

/* Projects list */
.section-projects {
    position: relative;
    padding: 15px;
    padding-top: 60px;
    padding-bottom: 256px;
    background: linear-gradient(to bottom, white, #ebeef2);
}

.projects-grid {
    display: grid;
    gap: 36px;
    max-width: 320px;
    margin: 0 auto;
}

.project-card {
    position: relative;

    display: block;

    box-shadow: 0px 12px 24px rgba(0, 0, 0, 0.1),
        0px 12px 100px rgba(0, 0, 0, 0.2);

    color: white;
    text-decoration: none;

    background-color: #1f2933;

    transform-style: preserve-3d;
}

.project-card,
.project-card > * {
    border-radius: 24px;
}

.project-card::after { /* square ratio */
    content: '';
    display: block;
    padding-bottom: 100%;
}

.project-card-layer {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.project-card-shadow-layer {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 20%,
        rgba(0, 0, 0, .5) 50%,
        rgba(0, 0, 0, .6) 100%
    );
}

@media screen and (min-width: 768px) {
    .project-card-shadow-layer {
        background: linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) 0%,
            #00000000 50%,
            rgba(0, 0, 0, .5) 70%,
            rgba(0, 0, 0, .6) 100%
        );
    }
}

.project-card-title {
    padding: 24px;
    display: flex;
    flex-direction: column-reverse;

    transform: translateZ(30px);
}

.project-card-title h3 {
    margin-top: .2em;
    margin-bottom: 0;
    line-height: 1.3;
}

.project-card-subtitle {
    color: #c0e5ff;
    line-height: 1.3;
}

.project-card-ges {
    background-color: #fff;
}

.project-card-ges .project-card-title {
    color: #1f2933;
}

.project-card-ges .project-card-subtitle {
    color: hsl(210, 25%, 45%);
}

.project-card-sc .project-card-subtitle {
    color: #ffc0c0;
}

.project-card-gsc .project-card-subtitle {
    color: #feffc0;
}

.project-card-tpgw .project-card-subtitle {
    color: rgba(255, 255, 255, .8);
}

.project-card-tpgw-phone-layer {
    height: auto;
    transform: translateY(-12%) translateZ(80px);
}

@media screen and (min-width: 576px) {
    .projects-grid {
        max-width: 650px;
        grid-template-columns: 1fr 1fr;
        grid-gap: 28px;
    }

    .section-projects {
        padding-top: 120px;
    }
}

@media screen and (min-width: 768px) {
    .projects-grid {
        grid-gap: 36px;
        max-width: 736px;
    }

    .project-card-title h3 {
        font-size: 24px;
    }

    .project-card-subtitle {
        font-size: 18px;
    }
}

@media screen and (min-width: 992px) {
    .projects-grid {
        grid-gap: 48px;
        max-width: 950px;
    }

    .project-card,
    .project-card > * {
        border-radius: 36px;
    }

    .project-card-title {
        padding: 36px;
        transform: translateZ(30px);
    }

    .project-card-title h3 {
        font-size: 28px;
    }

    .project-card-subtitle {
        font-size: 20px;
    }
}

@media screen and (min-width: 1200px) {
    .projects-grid {
        grid-gap: 68px;
        max-width: 1100px;
    }

    .project-card,
    .project-card > * {
        border-radius: 48px;
    }

    .project-card-title {
        transform: translateZ(50px);
        padding: 48px;
    }

    .project-card-title h3 {
        font-size: 32px;
    }

    .project-card-subtitle {
        font-size: 22px;
    }
}

@media screen and (min-width: 1400px) {
    .projects-grid {
        grid-gap: 80px;
        max-width: 1200px;
    }

    .project-card-title h3 {
        font-size: 36px;
    }

    .project-card-subtitle {
        font-size: 24px;
    }
}
