:root {
    /* colors */
    --bg-base: #242529;
    --bg-base-deeper: #00000020;
    --contrast: #E1E2E5;
    --text-lighter: #E8EAEB;
    --neutral: #E1E2E508;
    --primary-dark: #063230;
    --primary: #6EB0AD;
    --accent: #FFB566;
    
    /* font family */
    --font-heading: "Space Mono", monospace;
    --font-body: "Poppins", sans-serif;

    /* typescale */
    --step--2: clamp(0.5rem, 0.5863rem + -0.0959vw, 0.5628rem);
    --step--1: clamp(0.75rem, 0.7503rem + -0.0003vw, 0.7502rem);
    --step-0: clamp(1rem, 0.9531rem + 0.191vw, 1.125rem);
    --step-1: clamp(1.333rem, 1.1999rem + 0.5417vw, 1.6875rem);
    --step-2: clamp(1.7769rem, 1.4937rem + 1.1528vw, 2.5313rem);
    --step-3: clamp(2.3686rem, 1.8325rem + 2.1827vw, 3.7969rem);
    --step-4: clamp(3.1573rem, 2.2047rem + 3.8785vw, 5.6953rem);

    /* spacing */
    --space-3xs: clamp(0.25rem, 0.2265rem + 0.0955vw, 0.3125rem);
    --space-2xs: clamp(0.5rem, 0.4765rem + 0.0955vw, 0.5625rem);
    --space-xs: clamp(0.75rem, 0.7031rem + 0.191vw, 0.875rem);
    --space-s: clamp(1rem, 0.9531rem + 0.191vw, 1.125rem);
    --space-m: clamp(1.5rem, 1.4296rem + 0.2865vw, 1.6875rem);
    --space-l: clamp(2rem, 1.9062rem + 0.382vw, 2.25rem);
    --space-xl: clamp(3rem, 2.8592rem + 0.5731vw, 3.375rem);
    --space-2xl: clamp(4rem, 3.8123rem + 0.7641vw, 4.5rem);
    --space-3xl: clamp(6rem, 5.7185rem + 1.1461vw, 6.75rem);

    --max-width: 120rem;
    --max-width-wide: 125rem;
    --content-height: 67.5rem;
    --padding-inline-wide: 3vw;
    --padding-inline-section: 5vw;
}

* {
    margin: 0;
}

body {
    box-sizing: border-box;
    background-color: var(--bg-base);
    color: var(--contrast);
}
section {
    padding-block: var(--space-xl);
}

.container {
    max-width: min(var(--max-width), 100%);
    margin-inline: auto;
    padding-inline: var(--padding-inline-section);
    box-sizing: content-box;

    .darker-box {
        width: fit-content;
        background-color: var(--bg-base-deeper);
        border: 2px solid var(--primary);
        border-radius: var(--space-2xs);
        padding: var(--space-2xl) var(--space-3xl);
        margin-inline: auto;
    }
}
.container:has(.darker-box) {
    @media (width < 1080px) {
        padding-inline: var(--padding-inline-wide);
        .darker-box {
            padding: var(--space-xl);
        }
    }
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 300;
    font-style: normal;
}

h1, h2 {
    color: var(--primary);
    text-transform: uppercase;
}

section:not(#hero,#cta) h2{
    font-size: var(--step-0);
    span.dotted-arrow::after { 
        content: url('./assets/icons/dotted-arrow.svg');
    }
}

h3 {
    font-size: var(--step-1);
    margin-bottom: var(--space-s);
}

p, li {
    font-family: var(--font-body);
    font-weight: 300;
    font-style: normal;
    line-height: 180%;
    letter-spacing: 0.045em;
    font-size: var(--step-0);
    max-width: 80ch;
}

p {
    margin-bottom: 01em;
}

li {
    list-style-position: outside;
    margin-block: 1.5em;
}
li::marker {
    color: var(--primary);
    font-size: 1.2em;
}

img {
    max-width: 100%;
}

a {
    transition: all 0.3s ease;
    &:hover {
        transform: scale(1.03);
    }
}
a.btn {
    font-family: var(--font-heading);
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.4em 1.2em;
    border-radius: 10em;

    &.outlined {
        color: var(--accent);
        border: 1px solid var(--accent);
        &:hover {
            background-color: var(--accent);
            color: var(--bg-base);
            font-weight: 600;
        }
    }
    &.filled {
        background-color: var(--accent);
        color: var(--bg-base);
        font-weight: 700;
        font-size: var(--step-1);
        &:hover {
            background-color: var(--primary);
        }
    }  
}
/* class to hide elements to non screen readers */
.visually-hidden {
    border: 0 !important;
	clip-path: inset(50%) !important;
	height: 1px !important;
	margin: -1px !important;
	overflow: hidden !important;
	padding: 0 !important;
	width: 1px !important;
	white-space: nowrap !important;
}



/* header */
header {
    
    .container{
        display: flex;
        justify-content: space-between;
        align-items: center;
        max-width: min(var(--max-width-wide), 100%);
        padding-inline: var(--padding-inline-wide);
        padding-block: var(--space-xs);
    }
    .logo {
        max-width: min(12rem, 50%);
        z-index: 2;
    }
    .menu-toggler{
        z-index: 2;
        left: 10px;
        top: 10px;
        opacity: 0;
        position: absolute;
        &:checked + .show-menu{
            span{
                background-color: transparent;
                
            }
            &:after {
                top: 9px;
                transform: rotate(45deg);
            }

            &:before {
                top: 9px;
                transform: rotate(-45deg);
            }
        }
        &:checked ~ .nav{
            display: block;
            transform: translateX(0);
        }
    }

    .show-menu{
        z-index: 2;
        width: 32px;
        height: 22px;
        display: flex;
        left: auto;
        cursor: pointer;
        align-items: center;
        position: relative;
        justify-content: center;
        span, &:before, &:after{
            width: 100%;
            height: 4px;
            background-color: var(--contrast);
            border-radius: 3px;
        }
        &:before ,  &:after{
            content: "";
            left: 0;
            position: absolute;
            transition: all 0.3s ease;
        }
        &:before{
            top: 0;
        }
        &:after{
            top: 18px;
        }
    }
    
    .nav{
        right: 0;
        top: 0;
        z-index: 1;
        bottom: 0;
        width: 100%;
        position: fixed;
        background: var(--primary-dark);
        transition: all 0.3s ease;
        transform: translateX(100%);
        .nav-menu{
            list-style-type: none;
            display: flex;
            flex-direction: column;
            gap: var(--space-m);
            align-items: center;
            justify-items: center;
            padding-top: 9em;
            & .menu-item {
                display: block;
                flex-direction: row;
                transition: all 0.3s ease;
                & a {
                    font-family: var(--font-heading);
                    font-size: var(--step-2);
                    text-decoration: none;
                    text-transform: uppercase;
                    transition: all 0.3s ease;
                    &:hover {
                        transform: scale(1.03);
                    }
                }
                & a:not(.btn) {
                    color: var(--contrast);
                    &:hover, &:active {
                        color: var(--primary);
                        text-decoration: underline;
                        text-underline-offset: 0.3em;
                        text-decoration-thickness: 2px;
                    }
                }
                
            }
        }
    }


    @media (width > 800px) {
        .menu-toggler, .show-menu {
            display: none;
        }
        .nav {
            z-index: 2;
            position: static;
            transform: translateX(0);
            background-color: transparent;
            .nav-menu {
                display: flex;
                flex-direction: row;
                padding: 0;
                justify-content: flex-end;
                .menu-item {
                    display:inline-block;
                    a {
                        font-size: var(--step-0);
                        transition: all 0.3s ease;
                        &:hover {
                            transform: scale(1.03);
                        }
                    }
                } 
                
            }
        }
        
    }
}


/* hero */
section#hero {
    padding-bottom: 0;
    padding-top: 1em;
    .hero-grid {
        & h1 {
            font-size: var(--step-1);
        }
        
        & h2 {
            font-family: var(--font-body);
            letter-spacing: -0.03em;
            line-height: 1.1em;
            margin-block: 0;
            font-size: var(--step-4);
            font-weight: 600;
            color: var(--contrast);
            text-transform: none;
            & span.primary {
                color: var(--primary);
            }
        }
    }
}

.hero-grid {
    display: grid;
    grid-template-areas:
    "part-1"
    "part-2"
    "img"
    "img";

    & .part-1 {
        grid-area: part-1;
        min-width: max-content;
    }
    & .description {
        grid-area: img;
        align-content: end;
        justify-self: end;
        max-width: 60ch;
        margin-bottom: 2em;
        h1 {
            text-align: center;
        }
    }
    & .part-2 {
        grid-area: part-2;
        justify-items: end;
        align-content: end;
        h2 {
            text-align: right;
        }
    }
    
    & .hero-img {
        grid-area: img;
        align-content: end;
        img {            
            display: inline-block;
            opacity: 20%;
            max-height: 60vh;
        }
    }
}
@media (width>955px) {
    .hero-grid{
        grid-template-areas:
        "part-1 description"
        "img description"
        "img part-2"
        "img part-2";

    
    .description { 
        grid-area: description;
        align-content: center;
        margin-bottom: 0;
    }
    .part-2 {
        grid-area: part-2;
        align-content: center;
        justify-self: start;
        & h2 {
            text-align: left;
            width: max-content;
        }
    }
    .hero-img {
        grid-area: img;
        justify-self: center;
    }
}
}


/* audience */
section#audience {
    padding-top: 0;
    .darker-box {
        min-width: 80%;
    }
}


/* services */
section#services {
    background-color: var(--bg-base-deeper);

    ul.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(600px, 100%),1fr));
    gap: var(--space-xl);
    align-items: center;
    justify-items: stretch;
    list-style: none;
    padding: 0;
    margin: 0 auto;

    & li {
        display: grid;
        grid-template-columns: 1fr 2.5fr;
        align-items: center;
        justify-items: center;
        marker: none;
        gap: var(--space-s);

        & svg {
            max-inline-size: 10em;
            fill: none;
            stroke: var(--primary);
            stroke-miterlimit: 10;
            stroke-width: 2px;
        }
        .service-description {
            h4 {
                font-size: var(--step-1);
                min-width: max-content;
            }
            p {
                font-size: var(--step--0);
                font-weight: 200;
                max-width: 100%;
            }
        }
        
    }
}
}

/* about */
section#about {
    svg#confusing-icon {
        max-width:  20rem;
        & .cls-1 {
            opacity: .98;
        }
        & .cls-2 {
            fill: none;
            stroke: var(--primary);
            stroke-miterlimit: 10;
            stroke-width: 2px;
        }
    }

    @media (width> 800px) {
        .about-grid {
            display: grid;
            grid-template-columns: 1.3fr 1fr 1fr;
            grid-template-rows: 0.5fr 1fr 1fr;
            gap: 2em;

            :nth-child(1) {
                grid-column: 1/3;
                grid-row: 1/2;
            }

            :nth-child(2) {
                grid-column: 2/4;
                grid-row: 2 /3;
                align-self: center;
            }

            :nth-child(3) {
                grid-column: 2 /4;
                grid-row: 3 /4;
                align-self: center;
                justify-self: end;
            }
            
            :nth-child(4) {
                grid-column: 1 /2;
                grid-row: 2 /4;
                align-self: end;
                justify-self: center;
                padding-inline: 2em;
            }
            
        }
    }
}


ol li{
    list-style-position: outside;
    &::marker {
        color: var(--primary);
        font-size: 1.1em;
        font-weight: 700;
    }
}


/* cta */
.cta-content {
    margin: 0 auto;
    max-width: 40rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    & h2 {
        font-size: var(--step-2);
    }
}

a.top.btn {
    background-color: var(--text-lighter);
    opacity: 40%;
    color: var(--contrast);
    position: fixed;
    bottom: 1em;
    right: 1em;
    color: var(--bg-base);
    font-size: var(--step-2);
    line-height: 1em;
    padding-inline: 0.28em;
    padding-top: 0.2em;
    padding-bottom: 0;
}

/* footer */
footer {
    background-color: var(--primary-dark);
    padding-top: var(--space-xl);
    padding-bottom: var(--space-m);

    a {
        color:  var(--primary);
        font-size: var(--step-0);
        font-family: var(--font-body);
        &:hover {
            color: var(--contrast);
        }
    }
    .footer-content {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: 2;
    }
    .container {
        max-width: var(--max-width-wide);
        padding-inline: var(--padding-inline-wide);
    }
    .logo-tag {
        .logo {
            margin-bottom: 1em;
            max-height: 4em;
        }
        .tagline {
            font-size: var(--step-0);
        }
    }
    .email-link {
        text-align: center;
        align-self: center;
        font-size: var(--step-1);
        & .email-icon {
            content: '';
        }
    }
    .socials {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
    }
    .copyright, .copyright > * {
        grid-column: 2/3;
        text-align: center;
        font-size: var(--step--1);
    }
}
