/* --------------------------------------------------------
    RESET https://andy-bell.co.uk/a-more-modern-css-reset/
----------------------------------------------------------- */

/* Box sizing rules */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Prevent font size inflation */
html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
    margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
    list-style: none;
}

/* Set core body defaults */
body {
    min-height: 100vh;
    line-height: 1.5;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
    line-height: 1.1;
}

/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
    text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
    text-decoration-skip-ink: auto;
    color: currentColor;
}

/* Make images easier to work with */
img,
picture {
    max-width: 100%;
    display: block;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
    font: inherit;
}


/* custom */

li { list-style: none; }

a { text-decoration: none; }

button { 
    cursor: pointer; 
    background: none;
    border: none;
}

/* ============================================
    BASE
=============================================== */

@font-face {
    font-family: Alata;
    src: url(../fonts/Alata-Regular.ttf);
    font-weight: 400;
}

@font-face {
    font-family: JosefinSans;
    src: url(../fonts/JosefinSans-Light.ttf);
    font-weight: 300;
}

:root {
    --clr-white: hsl(0, 0%, 100%);
    --clr-black: hsl(0, 0%, 0%);
    --clr-paragraph: hsl(0, 0%, 41%);

    --font-title: JosefinSans;
    --font-paragraph: Alata;  
   
    --wrapper-width: 86%;
    --wrapper-max-width: 69.5rem;
}

body {
    font-family: var(--font-paragraph);
    font-size: 0.9375rem;
}

h1, h2, h3 { 
    font-family: var(--font-title);
    text-transform: uppercase;
    font-weight: 300;
}

h1 { font-size: 2.5rem; }

h2 { font-size: 2rem; }

h3 { font-size: 1.25rem; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

main, section {
    padding: 3rem 0;
}

.wrapper {
    display: flow-root;
    width: var(--wrapper-width);
    max-width: var(--wrapper-max-width);
    height: 100%;
    margin: 0 auto;
}

.flex-center {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
}

.grid {
    display: grid;
    align-content: start;
    gap: 1.5rem;
}

@media (min-width: 48em) {

    main, section {
        padding: 5rem 0;
    }

}


/* ============================================
    MENU TOGGLE BUTTON
=============================================== */

.nav-link {
    display: block;
    color: var(--clr-white);
    text-align: center;
}

.nav-link::after {
    content: '';
    display: block;
    width: 0;
    margin: .5rem auto 0;
    height: 2px;
    background: var(--clr-white);
    transition: width .3s;
}

.nav-link:hover::after,
.nav-link:active::after {
    width: 1.5rem;
}

/* ============================================
    MENU TOGGLE BUTTON
=============================================== */

.menu-button {
    z-index: 10;
    width: 2.5rem;
    aspect-ratio: 1;
    margin-left: auto;
}
  
.menu-icon { 
    gap: 20%;
    width: 1.5rem;
    aspect-ratio: 1;

    transform: rotate(0deg);
    transition: .5s ease-in-out;
}
  
.menu-icon > div {
    background-color: var(--clr-white);
    width: 100%;
    height: 10%;
  
    opacity: 1;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}
  
.menu-button[aria-expanded="true"] .menu-icon div:nth-child(1) {
    transform: translateY(300%) rotate(135deg);
}
  
.menu-button[aria-expanded="true"] .menu-icon div:nth-child(2) {
    opacity: 0;
    width: 0%;
}
  
.menu-button[aria-expanded="true"] .menu-icon div:nth-child(3) {
    transform: translateY(-300%) rotate(-135deg);
}


/* ============================================
    HEADER
=============================================== */

header {
    position: relative;
    height: 40.625rem;
    color: var(--clr-white);
    background-image: url(../images/mobile/image-hero.jpg);
    background-color: var(--very-dark-gray);
    background-size: cover;
}

.header-nav-container {
    position: absolute; /* position is absolute to avoid content jumping when switching to fixed */
    width: var(--wrapper-width);
    max-width: var(--wrapper-max-width);
    top: 2rem;
}

.freeze-nav { position: fixed; } /* don't scroll nav container on menu toggle */

.header-logo {
    z-index: 10;
    width: 9rem;
    object-fit: contain;
}

.header-nav {
    z-index: 9;
    position: fixed;
    inset: 0 0 0 0;
    background-color: var(--clr-black);
    transform: translateX(100%);
    transition: transform 350ms ease-out;
}

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

header .nav-link {
    width: 100%;
    padding: .75rem calc((100% - var(--wrapper-width)) / 2) .15rem;
    font-family: var(--font-title);
    font-size: 1.5rem;
    text-transform: uppercase;
}

header .nav-link:hover::after,
header .nav-link:active::after {
    width: 0;
}

header .nav-link:hover,
header .nav-link:active {
    background-color: hsla(0, 0%, 100%, 10%);
}

.header-title {
    align-self: center;
    justify-self: center;
    padding: 1.5rem 1.5rem 1rem;
    line-height: 1;
    border: 2px solid var(--clr-white);
}

@media (min-width: 48em) {

    header {
        background-image: url(../images/desktop/image-hero.jpg);
        background-color: hsla(0, 0%, 0%, 40%);
        background-size: cover;
        background-position: center;
        background-blend-mode: multiply;
    }

    header .wrapper {
        justify-content: start;
    }

    .header-nav-container {
        top: 3.75rem;
        justify-content: space-between;
    }

    .header-logo {
        width: 12.25rem;
    }

    .menu-button {
        display: none;
    }

    .header-nav {     
        gap: 1.75rem;
        margin-top: .25rem;
        position: static;
        background-color: #00000000;
        transform: none;
        transition: none;
    }

    header .nav-link {
        width: fit-content;
        padding: .5rem 0 0;
        font-family: var(--font-text);
        font-size: 1rem;
        color: var(--clr-white);
        text-transform: capitalize;
        text-decoration: none;
    }
    
    header .nav-link:hover::after,
    header .nav-link:active::after {
        width: 1.5rem;
    }
    
    header .nav-link:hover,
    header .nav-link:active {
        background-color: hsla(0, 0%, 100%, 0%);
    }

    .header-title {
        margin-top: 5.5rem;
        max-width: 41rem;
        padding: 2.5rem 2.5rem 1.5rem;
        font-size: 4.5rem;
    }

}


/* ============================================
    SECTIONS
=============================================== */

.section-title {
    text-align: center;
}

.section-title {
    font-size: 2rem;
}

@media (min-width: 48rem) {
    .section-title {
        font-size: 3rem;
    }
}


/* ============================================
    SECTION ABOUT
=============================================== */

.section-about .section-title {
    margin: 1rem 0;
}

.section-about-paragraph {
    padding: 0 1rem;
    line-height: 1.6;
    color: var(--clr-paragraph);
    text-align: center;
}

@media (min-width: 48em) {

    .section-title,
    .section-about-paragraph {
        text-align: start;
    }

    .section-about .section-title {
        margin: 0 0 1rem;
        font-size: 2.5rem;
    }

    .section-about-paragraph {
        padding: 0;
    }
    
    .section-about .grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .section-about-image {
        grid-column: 1 / 5;
        margin: 0 0 8rem 0;
    }

    .section-about-content {
        grid-column: 3 / -1;
        align-self: self-end;

        padding: 4rem 0 0 4rem;
        background-color: white;
    }

    .section-about-image,
    .section-about-content {
        grid-row: 1 / 2;
    }

}

@media (min-width: 64em) {

    .section-about .section-title {
        margin: 0 0 1rem;
        font-size: 3rem;
    }

    .section-about-paragraph {
        padding: 0;
    }
    
    .section-about .grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .section-about-image {
        grid-column: 1 / 5;
        margin: 0;
    }

    .section-about-content {
        grid-column: 4 / -1;
        align-self: self-end;

        padding: 6rem 0 0 6rem;
        background-color: white;
    }

    .section-about-image,
    .section-about-content {
        grid-row: 1 / 2;
    }

}


/* ============================================
    SECTION CREATIONS
=============================================== */

.section-creations .section-title {
    margin-bottom: 1.5rem;
}

.creation {
    min-height: 7.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.creation-title,
.creation-image {
    grid-column: 1 / -1;
    grid-row: 1 / 2;
}

.creation-image img {
    object-fit: cover;
    min-width: 100%;
    min-height: 100%;
}

.creation-title {
    z-index: 5;
    height: 100%;
    font-size: 1.5rem;
}

.creation-title-link {
    display: flex;
    flex-direction: row;
    height: 100%;
    color: hsla(0, 0%, 100%, 0.85);
    background: linear-gradient(to right, hsla(0, 0%, 0%, 60%), hsla(0, 0%, 0%, 0%));
}

.creation-title-link span {
    display: block;
    width: 40%;
    align-self: flex-end;
    margin: 1.25rem;
    text-wrap: balance;
}

.creation-title-link:hover,
.creation-title-link:active {
    color: var(--clr-black);
    background: linear-gradient(to right, hsla(0, 0%, 100%, 60%), hsla(0, 0%, 100%, 60%));
}

.creations-button-see-all {
    width: fit-content;
    justify-self: center;
    padding: .5rem 2.25rem;
    margin-top: .5rem;
    color: var(--clr-black);
    border: 1px solid var(--clr-black);
    text-transform: uppercase;
    letter-spacing: .25rem;
    transition: all .3s;
}

.creations-button-see-all:hover,
.creations-button-see-all:active {
    color: var(--clr-white);
    background-color: var(--clr-black);
}

@media (min-width: 48em) {
    
    .section-creations .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .section-creations .section-title {
        grid-column: 1 / 3;
        margin: 1.5rem 0 3rem;
        justify-self: start;
    }

    .creations-button-see-all {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
        align-self: start;
        justify-self: end;
    }

    .creation-title-link {
        background: linear-gradient(to top, hsla(0, 0%, 0%, 60%), hsla(0, 0%, 0%, 0%));
    }

    .creation-title-link span {
        width: 80%;
    }

    .creations-button-see-all {
        margin-top: 1.5rem;
    }

}

@media (min-width: 64em) {
    
    .section-creations .grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .section-creations .section-title {
        grid-column: 1 / 4;
    }

    .creations-button-see-all {
        grid-column: 4 / 5;
    }

    .creation-title {
        font-size: 2rem;
    }

    .creation-title-link span {
        margin: 2rem 2.5rem;
    }

}

/* ============================================
    FOOTER
=============================================== */

footer {
    padding: 3.5rem 0;
    background-color: var(--clr-black);
    color: var(--clr-white);
}

footer .wrapper {
    gap: 0;
}

.footer-logo {
    width: 9rem;
    margin: 0 auto;
}

.footer-nav {
    display: flex;
    flex-flow: column wrap;
    gap: .5rem;
    width: 100%;
    margin: 2rem 0;
    color: var(--clr-white);
}

.social-links {
    width: fit-content;
    margin: 0 auto;
}

.social-links .nav-link {
    padding: .5rem;
}

.social-links img {
    width: 1.5rem;
    aspect-ratio: 1;
    object-fit: contain;
    object-position: center;
}

.social-links {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.copyright,
.attribution {
    color: var(--clr-paragraph);
    text-align: center;
}

.attribution {
    margin-top: .5rem;
    font-size: .75rem;
}

.attribution a {
    text-decoration: underline;
    color: var(--clr-white);
}

@media (min-width: 60em) {

    footer {
        padding: 2.5rem 0;
    }
    
    footer .wrapper {
        grid-template-columns: 1fr 1fr;
    }

    .footer-logo {
        width: 9rem;
        margin: 0 auto 0 0;
    }

    .footer-nav {
        flex-flow: row wrap;
        gap: 2rem;
        margin: 2rem 0 0;
    }

    .social-links {
        margin: 0 0 0 auto;
    }

    .social-links .nav-link {
        padding: .25rem .5rem;
    }

    .copyright,
    .attribution {
        text-align: end;
    }

    .copyright {
        margin-top: 1rem;
    }
    
}
