/* ------------------------------------ */
/* 0.0 - Reset */
/* ------------------------------------ */

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

/* ------------------------------------ */
/* 0.1 - Variables */
/* ------------------------------------ */

:root {
    --blue: hsla(212, 72%, 42%, 1);
    --blue2: hsla(205, 79%, 48%, 1);
    --indigo: hsla(205, 62%, 28%, 1);
    --darkblue: hsl(220, 90%, 4%);
    --oxford-blue: hsla(226, 46%, 12%, 1);
    --lilac: hsla(303, 28%, 68%, 1);
    --white: hsla(0, 0%, 100%, 1);
    --black: hsla(0, 0%, 0%, 1);
}

/* ------------------------------------ */
/* 0.2 - Fonts */
/* ------------------------------------ */

@font-face {
    font-family: 'Poppins';
    src: url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
}

/* ------------------------------------ */
/* 0.3 - Utilities */
/* ------------------------------------ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ------------------------------------ */
/* 1.0 - Global */
/* ------------------------------------ */

body {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.2;

    color: var(--white);
    background-color: var(--darkblue);

    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

header {
    position: fixed;
    width: 100%;
    padding: 1.5rem 0;
    background-color: var(--oxford-blue);
    z-index: 5;
}

header .container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
}


.brand {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: baseline;
}

.brand h1 {
    margin-right: 1ch;
}

.social {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: baseline;
    flex-wrap: nowrap;
}

.social img {
    width: 1.2rem;
    margin-right: 10px;
}

button {
    padding: 5px 10px;
    background-color: var(--darkblue);
    border: none;
    border-radius: 5px;
    color: var(--white);
    cursor: pointer;
    transition: background-color .2s;
}

button:hover {
    background-color: var(--oxford-blue);
}

header button {
    display: none;
    height: 2rem;
    z-index: 10;
}

nav {
    display: flex;
    position: inherit;
    justify-content: center;
    align-items: baseline;
    flex-wrap: nowrap;
}

nav a {
    padding: 5px 10px;
    margin-left: 5px;
    background-color: var(--darkblue);
    border-radius: 5px;
    transition: background-color .2s;
}

nav a.active {
    background-color: var(--blue2);
}

nav a:hover {
    background-color: var(--oxford-blue);
}

a {
    color: var(--white);
    text-decoration: none;
    transition: color .3s;
}

a:hover {
    color: var(--lilac);
}

main {
    padding-top: 7rem;
    padding-bottom: 2rem;
}

.quote {
    padding: 1rem 0;
    text-align: center;
    font-size: 2.5rem;
}

.title {
    padding: 1rem 0;
    text-align: start;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 1rem;
    grid-auto-flow: dense;
}

.grid .wide-2 {
    grid-column: span 2;
}

.item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--oxford-blue);
    border-radius: 15px;
    box-shadow: rgba(54, 54, 56, 0.2) 0px 7px 29px 0px;
    overflow: hidden;
}

.item * {
    margin-bottom: 1rem;
}

.item img {
    height: 13rem;
    object-fit: cover;
    border-radius: 5px;
    max-width: 75vw;
}

.item .social a {
    margin: 0 5px;
    border-radius: 15px;
}

.item .social img {
    height: 1.5rem;
    width: unset;
    margin: .5rem;
}

.item a {
    padding: 5px 10px;
    background-color: var(--blue);
    border-radius: 5px;
}

.item a:hover {
    background-color: var(--indigo);
}

footer {
    padding: 1rem 0;
    background-color: var(--oxford-blue);
    text-align: center;
    width: 100%;
}

/* ------------------------------------ */
/* 2.0 - Media Queries */
/* ------------------------------------ */

@media (max-width: 768px) {
    header button {
        display: block;
    }

    nav {
        z-index: 5;
        position: fixed;
        top: 0;
        right: -4rem;
        height: 100vh;
        min-width: calc(25ch + 4rem);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 5rem 5rem 1rem 1rem;
        background-color: var(--darkblue);
        transform: translateX(100%);
        transition: transform .3s;
        transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    header nav[data-visible="true"] {
        transform: translateX(0);
    }

    header nav a {
        margin: 5px 0;
    }
    
}

@media (max-width: 650px) {
    .grid .wide-2 {
        grid-column: span 1;
    }
}

@media (max-width: 425px) {
    .brand {
        flex-direction: column;
    }

    main {
        padding-top: 8rem;
    }
}

@media (max-width: 375px) {
    .item img {
        height: 5rem;
    }
}