/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap');

/* Globals */
* {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
    border: none;
    color: black;
    font-family: 'Roboto', 'Arial Narrow', Arial, sans-serif;
}

h1 {
    font-size: 6rem;
}

h2 {
    font-size: 3rem;
}

h3 {
    font-size: 2rem;
}

a:hover {
    opacity: 0.8;
    transition: ease-in-out;
    transition-duration: 0.8s;
}

/* Navigation */
nav {
    height: 90px;
    width: 100%;
    display: flex;
    position: fixed;
    align-items: center;
    justify-content: space-between;
    background-color: #3c3e42;
    z-index: 10;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    background-color: #3c3e42;
    border-radius: 50%;
    border: 5px solid #3c3e42;
    z-index: 10;
}

.logo-text {
    font-size: 3rem;
    color: #dbeeff;
    line-height: 0.9;
}

.desktop-links {
    color: #dbeeff;
    font-size: 1.25rem;
    margin-right: 2rem;
}

.join-cta {
    border: 1px solid #c5d0dd;
    background-color: #204b57;
    color: #c5d0dd;
    border-radius: 10px;
    padding: 0.5em 0.5em;
    margin-right: 2rem;
}

nav > ul {
    display: flex;
}

.mobile-nav {
    color: #dbeeff;
    font-size: 2rem;
    line-height: 2.5;
    padding-right: 1rem;
}

.mobile-active {
    text-decoration: underline;
}

.active {
    border-bottom: 1px solid #dbeeff;
}

.nav-bar-spacer {
    height: 80px;
    visibility: hidden;
}

/* Hero */

.hero {
    display: grid;
    grid-template: repeat(3, 1fr) / 12rem 1fr;
    height: 100svh;
    background-position: left;
    background-size: cover;
    align-items: end;
}

.index-lg-image {
    /* Photo by Marita Kavelashvili on unsplash.com */
    background-image: url(../images/forest.webp);
}

.location-lg-image {
    /* Photo by Tim Foster on unsplash.com */
    background-image: url(../images/locations-lg-img.webp);
    background-position: center;
}

.join-us-lg-image {
    /* Photo by Axel Brunst on unsplash.com */
    background-image: url(../images/signup.webp);
    background-position: right;
}

.hero > h2 {
    grid-area: 3/1/4/2;
    font-size: 12rem;
    text-align: right;
    writing-mode:vertical-rl;
    text-orientation:sideways;
    color: #dbeeff;
    justify-self: self-end;
    line-height: 0.9;
    font-family: 'Arial';
    letter-spacing: -8px;
}

.hero > p {
    grid-area: 3/2/4/3;
    color: rgb(219, 238, 255);
    font-size: 1.25rem;
    font-weight: bolder;
}

.hero > h2,
.hero > p {
    padding-bottom: 1.5rem;
}

/* Intro */
.intro {
    display: grid;
    grid-template: auto / 1fr minmax(320px, 2fr) 1fr;
    padding: 2rem 0;
    background-color: #c5d0dd;
}

.intro > h2 > span {
    font-size: 4rem;
    text-decoration: underline;
    color: #204B57;
}

.intro > h2, .intro > p {
    padding: 0.5rem 1rem;
    line-height: 1.3;
}

.intro > h2 {
    color: #3c3e42;
    grid-area: 1/2/2/3;
}

.intro > p {
    grid-area: 2/2/3/3;
}

/* Reasons */
.reason-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 4rem;
    padding: 2rem 0;
    background-color: #3c3e42;
}

.reason-card {
    width: fit-content;
    display: flex;
    flex-flow: column nowrap;
    margin: 0 1rem;
}

.reason-card > h3 {
    color: rgb(219, 238, 255);
    padding: 1rem 1rem;
}

.reason-icon {
    color:  rgb(219, 238, 255);
    position: relative;
    top: 2px;
    left: -5px;
}

.reason-card-body {
    display: flex;
    flex-flow: row nowrap;
}

.reason-card-body > p {
    color: whitesmoke;
    max-width: 268px;
    padding: 0 16px 16px;
    line-height: 1.2;
}

.rsn-txt-bg {
    grid-area: text;
    background-color: #cbdbe4;
    z-index: -1;
    transform: skew(355deg, 355deg);
}

.reason-card-body > figure {
    max-height: 268px;
    margin: 0 16px 16px;
}

.reason-card-body > figure > img {
    max-width: 268px;
    max-height: 268px;
    border-bottom-right-radius: 16px;
    border: 1px solid #dbeeff;
    box-shadow: 0.5px 0.5px 2px 0 #dbeeff;
}

.ready {
    display: grid;
    grid-template: auto / repeat(2, 1fr);
    padding: 4rem 0;
    align-items: baseline;
    background-color: #c5d0dd;
}

.ready > h2 {
    grid-area: 1/1/2/2;
    justify-self: right;
    color: #204B57;
}

.ready > p {
    grid-area: 1/2/2/3;
    font-size: 0.75rem;
    text-align: left;
    color: #3c3e42;
}

.join-us-btn {
    grid-area: 2/2/3/3;
    font-size: 2rem;
    font-weight: 500;
    background-color: #204b57;
    color: #dbeeff;
    border: 1px solid #3c3e42;
    border-radius: 10px;
    padding: 0.5rem;
    max-width: fit-content;
    margin: 2rem 0 0;
}

/* Locations */
.location-card-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-gap: 2rem;
    justify-items: center;
    margin: 2rem 2rem;
}

.location-card {
    display: flex;
    flex-flow: column nowrap;
}

.location-card > h2 {
    color: #dbeeff;
    background-color: #3c3e42;
    padding: 1rem 0.5rem;
}

.location-card > p {
    height: 100%;
    background-color: #c5d0dd;
    padding: 1rem 0.5rem 1rem;
}

.location-card > img {
    height: 300px;
    width: auto;
    object-fit: cover;
    object-position: top;
    border-radius: 20px 20px 0 0;
}

.location-card > figure > img {
    width: 100%;
    border-radius: 20px 20px 0 0;
}

/* Join Us */
.form-container {
    height: 100svh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background-image: url(../images/signup.webp);
    background-position: right;
    background-size: cover;
}

.join-us-form {
    flex-basis: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #3c3e4250;
    backdrop-filter: blur(2px);
    border: 1px solid #3c3e42;
    border-radius: 2rem;
    margin: 100px 0 10px;
}

.form-logo { 
    margin: 1.5rem 0 0.5rem; 
    padding: 0.5rem;   
    background-color: #204b57; 
    border: 1px solid #dbeeff; 
    border-radius: 50%;
    }

.form-label,
.form-input,
.form-submit {
    width: 95%;
    box-sizing: border-box;
    margin: 0.25rem;
    color: #dbeeff;
}

.form-label {
    padding: 0.5rem 0.5rem 0rem;
}

.form-input {
    padding: 0.75rem;
    background: #3c3e42;
    color: #dbeeff;
    outline: none;
    border: 1px solid #204b57;
    border-radius: 2rem;
}

.form-input:focus,
.form-input:focus-visible {
    border: 1px solid #dbeeff;
}

.form-input::placeholder {
    color:#dbeeff;
}

/* Modified Code from CSS Tricks to stop autofill changing form input background colour */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  border: 1px solid #204b57;
  -webkit-text-fill-color: #dbeeff;
  -webkit-box-shadow: 0 0 0px 1000px #3c3e42 inset;
  transition: background-color 5000s ease-in-out 0s;
}

.form-submit {
    padding: 0.5rem;
    border: 1px solid #dbeeff;
    border-radius: 2rem;
    margin-bottom: 0.5rem;
    background-color: #3c3e42;
    font-size: 1.5rem;
}

.form-submit:hover {
    background-color: #204b57;
    transition: ease-in-out;
    transition-duration: 0.4s;
}

/* Footer */
footer {
    width: 100%;
    display: grid;
    grid-template: auto / repeat(3, 1fr);
    justify-items: center;
    border-top: 1px solid grey;
    background-color: #3c3e42;
    align-items: center;
}

.footer-link {
    display: flex;
    align-items: flex-end;
} 

.mobile-footer,
.desktop-footer {
    color: #cbdbe4;
}

footer > a {
    padding: 1rem 0;
}

/* Media Queries */
@media screen and (max-width:425px) {
    .location-card-wrapper {
        margin: 2rem 0;
    }
}

@media screen and (max-height:425px) {
    .hero {
        grid-template: repeat(3, 1fr) / 8rem 1fr;
    }
    .hero > h2 {
        font-size: 8rem;
    }
    .hero > h2,
    .hero > p {
        padding: 0.15rem;
    }
}

@media screen and (max-height:661px) {
    .form-container {
        height: 661px;
    }
}

@media screen and (max-width: 600px) {
    .reason-card {
        margin: 0;
    }
    .reason-card-body > figure {
        display: none;
    }
}

@media screen and (min-width:769px) {
    .mobile-nav {
        display: none;
    }
    .nav-logo {
        position: static;
        float: left;
        width: 80px;
        height: auto;
    }
}

@media screen and (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    .mobile-nav {
        padding-right: 2rem;
    }
    .desktop-footer {
        display: none;
    }
}

@media screen and (min-width: 1024px) {
    .hero {
        height: 100vh;
    }
}