@import 'reset.css';
/* Import of the Google Fonts Lato and Poppins for use in the page. */
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;1,300&display=swap&family=Poppins:ital,wght@0,300;0,400;0,600;1,400;1,600&display=swap');

/* Contents */
/* 1 - Global CSS */
/* 2 - Page Specific CSS */
/* 3 - Responsive CSS */

/* Global CSS */

html {
    scroll-behavior: smooth;
}

body {
    font-size: 16px;
    background-color: #fafafa;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 100px;
    width: 80%;
    margin: 0 auto;
}

header :is(a, a:link, a:visited) {
    text-decoration: none;
    font-size: 1.3rem;
    margin-right: 20px;
    position: relative;
    color: inherit;
}

.logo > :is(a, a:link, a:visited) {
    font-size: 3rem;
}

nav {
    min-width: 20%;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 10px 0 0;
    justify-content: space-between;
}

/* Underline for nav underline from https://tobiasahlin.com/blog/css-trick-animating-link-underlines/ */
nav a::before{
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #000;
    visibility: hidden;
    transform: scaleX(0);
    transition: all 0.2s ease-in-out 0s;
}

nav a:hover::before {
    visibility: visible;
    transform: scaleX(1);
}

nav a:visited {
    color: inherit;
}

/* Hidden hamburger on large width */
.mobile-hamburger-wrapper {
    display: none;
}


main {
    width: 80%;
    margin: 0 auto;
}

article {
    /* possibly update this with a %% */
    max-width: 720px;
    margin: 0 auto;
}

h1 {
    font-size: 4rem;
    line-height: 2em;
}

h2 {
    font-size: 3.5rem;
    line-height: 2em;
}

h3 {
    font-size: 2.2rem;
}

:is(h1,h2,h3){
    font-family: 'Lato', sans-serif;
    margin-bottom: 1rem;
}

p {
    max-width: 70ch;
    font-size: 1.2rem;
    line-height: 1.9rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

ul {
    list-style: circle outside;
    font-size: 1.2rem;
    line-height: 1.7rem;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.8rem;
}

.image-container {
    width: 200px;
    margin: 0 auto;
    padding: 25px 0;
}

figure > figcaption {
    padding-top: 10px;
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    text-align: center;
    margin: 0 auto;
}

figure > figcaption > .copyright-information {
    font-style: italic;
}

img {
    width: 100%;
}

main .image-container {
    width: 100%;
}

.page-navigation-lower {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.page-navigation-lower > div:first-of-type {
    margin: 40px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-navigation-lower :is(a, a:link, a:visited) {
    font-size: 1.25rem;
}

/* Dev Note - This could have been flex, but just wanted to show I understand how to use grid as well. */
footer {
    min-height: 150px;
    display: grid;
    grid-template: 1fr 1fr / 100%;
    justify-items: center;
    align-items: center;
    background-image: radial-gradient( circle farthest-corner at -4% -12.9%,  rgba(74,98,110,1) 0.3%, rgba(30,33,48,1) 90.2% );
}

footer p {
    color: #FFF;
    max-width: unset;
    font-size: 1rem;
}

footer > .logo > :is(a, a:link, a:visited) {
    text-decoration: none;
    color: #FFF;
    font-size: 1.5rem;
}

.article-hero {
    height: 500px;
    min-width: 100%;
    background-repeat: no-repeat;
    background-color: black;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 2rem;
}

.article-hero h1 {
    font-size: 6vw;
    text-align: right;
    color: white;
    max-width: 15ch;
    padding-right: 5%;
}


/* 2 - Page Specific CSS  */

.home-hero {
    background-image: linear-gradient(to left, rgb(0,0,0,0.5), rgb(0,0,0,0.5)),url("../img/churchill-house-26.jpg");
    background-position: center;
    background-size: cover;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    display: grid;
    grid-template-rows: 1fr 9fr;
    grid-template-columns: 100%;
}

.home-hero > h1 {
    font-size: 10vw;
    color: #FFF;
    text-align: center;
}

.home-hero > header {
    color: #FFF;
    justify-content: flex-end;
}

.home-hero nav a::before {
    background-color: #FFF;
}

#architect-hero {
    background-color: rgb(221, 221, 221);
    background-image: linear-gradient(to left, #000000 40%, rgb(255,255,255,0)),url("../img/extra2-robin_boyd_portrait-copyright-Mark-Strizic.jpg");
}

#history-hero {
    background-image: linear-gradient(to left, #000000 40%, rgb(255,255,255,0)),url("../img/churchill-house-12.jpg");
    /* background-position: -100% 0px; */
}

#design-hero {
    background-color: rgb(230, 230, 230);
    background-image: linear-gradient(to left, #000000 20%, rgb(255,255,255,0)),url("../img/churchill-house-4.jpg");
    /* background-position: -100% 0px; */
}

/* Media Queries */

@media screen and (max-width: 1500px){
    main {
        width: 100%;
    }

    #architect-hero {
        background-color: rgb(221, 221, 221);
        background-image: linear-gradient(to top, #000000 10%, rgb(255,255,255,0)),url("../img/extra2-robin_boyd_portrait-copyright-Mark-Strizic.jpg");
        /* background-position: -80% 0px; */
    }
    #history-hero {
        background-image: linear-gradient(to top, #000000 5%, rgb(255,255,255,0)),url("../img/churchill-house-12.jpg");
        /* background-position: -100% 0px; */
    }
    
}


@media screen and (max-width:1000px){
    header {
        justify-content: space-between;
    }
    
    
    .logo > :is(a, a:link, a:visited) {
        font-size: 2rem;
        max-width: 100px;
    }

    /* Don't get the nav on the front page. Working in reverse of what I'm expecting for some reason */
    nav:is(.landing-nav) {
        display: none;
    }

    /* CSS Only Hamburger menu adapted from Brad at Traversey Media https://www.youtube.com/watch?v=DZg6UfS5zYg */

    .mobile-hamburger-wrapper {
        display: unset;
        padding-right: 3rem;
        padding-bottom: 4.5rem;
    }

    .mobile-hamburger-wrapper .toggler {
        position: absolute;
        z-index: 2;
        cursor: pointer;
        width: 50px;
        height: 50px;
        opacity: 0;
    }

    .mobile-hamburger-wrapper .hamburger {
        position: absolute;
        z-index: 1;
        width: 30px;
        height: 30px;
        padding: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Hamburger Line */
    .mobile-hamburger-wrapper .hamburger > div {
        position: relative;
        width: 100%;
        height: 2px;
        background-color: #000;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }

    .mobile-hamburger-wrapper .hamburger > div::before, .mobile-hamburger-wrapper .hamburger > div::after {
        content: '';
        position: absolute;
        z-index: 1;
        top: -10px;
        width: 100%;
        height: 2px;
        background: inherit;
    }

    .mobile-hamburger-wrapper .hamburger > div:after {
        top: 10px;
    }

    /* Animate the hamburger line */
    .mobile-hamburger-wrapper .toggler:checked + .hamburger > div {
        transform: rotate(135deg);
    }

    /* Turns the hamburger line into an X by moving the before/after lines */
    .mobile-hamburger-wrapper .toggler:checked + .hamburger > div:before, .mobile-hamburger-wrapper .toggler:checked + .hamburger > div:after {
        top: 0;
        transform: rotate(90deg)
    }

    /* All of the settings for when the button is pressed */
    .mobile-hamburger-wrapper .toggler:checked ~ .menu {
        visibility: visible;
    }

    .mobile-hamburger-wrapper .toggler:checked ~ .menu  > div > div {
        opacity: 1;
        transition: opacity 0.4s;
    }

    /* Move the X with the page */

    .mobile-hamburger-wrapper .toggler:checked {
        position: fixed;
    }

    .mobile-hamburger-wrapper .toggler:checked ~ .hamburger {
        position: fixed;
    }

    /* Display settings for the menu */
    .mobile-hamburger-wrapper .menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        visibility: hidden;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-hamburger-wrapper .menu > div {
        background-color: rgba(255, 255, 255, 0.97);
        width: 100vw;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: flex-end;
          /* This is the transition where it is to scale from 0 to 1 */
        transition: all 0.4s ease;
    }

    .mobile-hamburger-wrapper .menu > div > div {
        text-align: right;
        max-width: 90vh;
        max-height: 100vh;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .mobile-hamburger-wrapper .menu > div > div > ul > li {
        list-style: none;
        font-size: 1.5rem;
        padding: 3rem;
    }

    .mobile-hamburger-wrapper .menu > div > div > ul > li > a {
        font-size: 2.0rem;
        transition: all 0.4s ease;
    }

    /* Set the main to 100% on smaller screen sizes. */

    main {
        width: 100%;
    }

    .article-hero {
        height: 50vh;
        min-width: 100%;
        background-repeat: no-repeat;
        background-size: contain;
        background-color: black;
        display: flex;
        justify-content: flex-end;
        align-items: flex-end;
        margin-bottom: 2rem;
    }

    .article-hero > h1 {
        font-size: 3rem;
    }

    #architect-hero {
        background-image: linear-gradient(to top, #000000 10%, rgb(255,255,255,0)),url("../img/extra2-robin_boyd_portrait-copyright-Mark-Strizic.jpg");
        background-position: unset;
    }

    #history-hero {
        background-image: linear-gradient(to top, #000000 10%, rgb(255,255,255,0)),url("../img/churchill-house-12.jpg");
        /* background-position: -100% 0px; */
    }
    
    #design-hero {
        background-color: rgb(230, 230, 230);
        background-image: linear-gradient(to top, #000000 10%, rgb(255,255,255,0)),url("../img/churchill-house-4.jpg");
        /* background-position: 0px -100%; */
    }
}

@media screen and (max-width:750px){

    main p {
        margin: 0 1em;
    }

    main :is(h1, h2, h3, h4) {
        text-align: center;
        line-height: 1.25em;
        margin: 15px 0;
    }

    main .image-container {
        width: 90%;
    }

    .home-hero > header {
        justify-content: center;
    }

    .home-hero > h1 {
        font-size: 4rem;
    }

    #architect-hero {
        background-image: linear-gradient(to top, #000000 10%, rgb(255,255,255,0)),url("../img/extra2-robin_boyd_portrait-copyright-Mark-Strizic.jpg");
    }
}

@media screen and (max-width:500px) {
    .article-hero {
        height: 40vh;
    }
}