/* ************************* */
/*           Reset           */
/* ************************* */

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

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin: 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 root defaults */
html:focus-within {
    scroll-behavior: smooth;
}

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

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

/* 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;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
    html:focus-within {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ************************* */
/*         Variables         */
/* ************************* */

:root {
    --clr-neutral-000: hsl(0, 0%, 98%);
    --clr-neutral-400: hsl(0, 0%, 41%);
    --clr-neutral-900: hsl(0, 0%, 8%);

    --ff: 'Epilogue', sans-serif;

    --base-size: 18px;

    /* 3:4 <-> 1.125*/
    --scale-90: calc(var(--base-size)*0.624);
    --scale-100: calc(var(--base-size)*0.702);
    --scale-200: calc(var(--base-size)*0.79);
    --scale-300: calc(var(--base-size)*0.889);
    --scale-400: var(--base-size);
    --scale-500: calc(var(--base-size)*1.125);
    --scale-600: calc(var(--base-size)*1.266);
    --scale-700: calc(var(--base-size)*1.424);
    --scale-800: calc(var(--base-size)*1.602);
    --scale-900: calc(var(--base-size)*1.802);
    --scale-1000: calc(var(--base-size)*2.027);
    --scale-1100: calc(var(--base-size)*2.281);
    --scale-1200: calc(var(--base-size)*2.566);
    --scale-1300: calc(var(--base-size)*2.887);
    --scale-1400: calc(var(--base-size)*3.247);
    --scale-1500: calc(var(--base-size)*3.653);
    --scale-1600: calc(var(--base-size)*4.11);

    /* font size */
    --fs-90: var(--scale-90);
    --fs-100: var(--scale-100);
    --fs-100: var(--scale-100);
    --fs-200: var(--scale-200);
    --fs-300: var(--scale-300);
    --fs-400: var(--scale-400);
    --fs-500: var(--scale-500);
    --fs-600: var(--scale-600);
    --fs-700: var(--scale-700);
    --fs-800: var(--scale-800);
    --fs-900: var(--scale-900);
    --fs-1000: var(--scale-1000);
    --fs-1100: var(--scale-1100);
    --fs-1200: var(--scale-1200);
    --fs-1300: var(--scale-1300);
    --fs-1400: var(--scale-1400);
    --fs-1500: var(--scale-1500);
    --fs-1600: var(--scale-1600);

    /* font weight */
    /* --fw-400: 400; */
    --fw-500: 500;
    /* --fw-600: 600; */
    --fw-700: 700;
    /* --fw-800: 800; */

    /* --br-sm: 36em;
    --br-md: 48em;
    --br-lg: 62em; */
}

/* ************************* */
/*        Composition        */
/* ************************* */

body {
    background: var(--clr-neutral-000);
    color: var(--clr-neutral-400);
    font-family: var(--ff);
    font-size: var(--fs-400);
    font-weight: var(--fw-500);

    padding: 1em 0;
    margin-inline: auto;

    max-width: 75em;

    display: grid;
    gap: 1.5rem;
}

header {
    display: grid;
    grid-template-columns: max-content 1fr;
    grid-template-rows: 50px;
    gap: clamp(10px, 3vw, 5rem);
    align-items: center;

    padding-inline: 1em;

    max-height: 4rem;
}

main {
    display: grid;
    column-gap: 0;
    row-gap: 3rem;

    max-width: 60em;

    margin-inline: auto;
}

footer {
    text-align: center;
    font-size: var(--fs-200);

    padding-inline: 1em;
}

footer a {
    color: var(--clr-neutral-900);
    font-weight: var(--fw-700);
}

h1 {
    line-height: 1;
}

ul {
    list-style: none;

    padding: 0;
    margin: 0;
}

li {
    line-height: 1;
}

li>a {
    display: flex;
    gap: 1em;
}

button {
    border: 1px solid transparent;
    border-radius: 0.8rem;
    background: transparent;
    font-size: var(--fs-300);
    line-height: 1;

    padding: 0.9rem 1.5rem;

    transition: all 100ms ease-out;
}

a {
    color: var(--clr-neutral-400);
    text-decoration: none;
}

a:hover {
    color: var(--clr-neutral-900);
}

input {
    display: none;
}

details {
    max-height: 1em;
    overflow: hidden;

    transition: max-height 400ms ease-out;
}

details ul {
    background: var(--clr-neutral-000);

    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

input:checked+details {
    max-height: 800px;

    transition: max-height 1000ms ease-in;    
}

input:checked+details label::after {
    content: url('images/icon-arrow-up.svg');
}

summary {
    display: flex;
    width: min-content;
}

label {
    display: flex;
}

label::after {
    content: url('images/icon-arrow-down.svg');

    margin-left: 0.5em;

    transform: translateY(-3px);
}

/* ************************* */
/*         Utilities         */
/* ************************* */

.sr-only {
    height: 1px;
    left: -10000px;
    overflow: hidden;
    position: absolute;
    top: auto;
    width: 1px;
}

.clr-n-000 {
    color: var(--clr-neutral-000);
}

.clr-n-400 {
    color: var(--clr-neutral-400);
}

.clr-n-900 {
    color: var(--clr-neutral-900);
}

.bg-clr-n-000 {
    background: var(--clr-neutral-000);
}

.bg-clr-n-400 {
    background: var(--clr-neutral-400);
}

.bg-clr-n-900 {
    background: var(--clr-neutral-900);
}

.fs-x-sm {
    font-size: var(--fs-100);
}

.fs-sm {
    font-size: var(--fs-300);
}

.fs-m {
    font-size: var(--fs-400);
}

.fs-l {
    font-size: var(--fs-600);
}

.fs-x-l {
    font-size: var(--fs-900);
}

.fw-normal {
    font-weight: var(--fw-500);
}

.fw-bold {
    font-weight: var(--fw-700);
}

.border-solid {
    border: 2px solid var(--clr-neutral-400);
}

/* ************************* */
/*          Blocks           */
/* ************************* */

.navigation {
    background: var(--clr-neutral-000);
}

.filter {
    position: fixed;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    top: 0;
    right: 0;
    transition: opacity 300ms ease-out;
    width: 100%;
    height: 100vh;
    z-index: -1;
}

.navigation-toggle {
    background: url(images/icon-menu.svg) no-repeat center;

    position: absolute;
    top: 0;
    right: 0;
    z-index: 1000;

    margin: 1em;

    height: 3em;
    width: 3em;
}

.auth-buttons {
    display: grid;
}

.main-content {
    display: grid;
    gap: 1.5rem;

    justify-items: center;
    text-align: center;

    padding-inline: 1em;
}

.clients-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    padding-inline: 1em;
}

.auth-buttons-login {
    color: var(--clr-neutral-400);
}

.auth-buttons-reg {
    border: 2px solid var(--clr-neutral-400);
    color: var(--clr-neutral-400);
}

/* ************************* */
/*        Exceptions         */
/* ************************* */

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

.navigation-toggle[data-visible="true"] {
    background: url(images/icon-close-menu.svg) no-repeat center;
    position: fixed;
}

.filter[data-visible="true"] {
    opacity: 1;
    z-index: 0;
}

/* Primary Input is a fine pointer device such as a mouse or stylus */
@media (pointer:fine) {
    button {
        cursor: pointer;
    }

    summary label {
        cursor: pointer;

        /* Safari */
        -webkit-user-select: none;
        /* IE 10+ */
        -ms-user-select: none;
        user-select: none;
    }

    .main-button:focus,
    .main-button:hover {
        background: var(--clr-neutral-000);
        color: var(--clr-neutral-900);
        border: 1px solid var(--clr-neutral-900);
    }

    .auth-buttons-login:focus,
    .auth-buttons-login:hover {
        color: var(--clr-neutral-900);
    }

    .auth-buttons-reg:focus,
    .auth-buttons-reg:hover {
        border: 2px solid var(--clr-neutral-900);
        color: var(--clr-neutral-900);
    }
}

@media (max-width: 48em) {
    .navigation {
        display: grid;
        gap: 1.5rem;
        grid-template-rows: repeat(4, min-content);

        height: 100vh;
        padding: 5rem 1em;

        position: fixed;
        right: 0;
        top: 0;
        left: 35%;
        z-index: 100;

        transform: translateX(100%);
        transition: transform 300ms ease-out;
    }

    details li {
        padding-left: 1em;
    }
}

@media (min-width: 48em) {

    /* ************************* */
    /*        Composition        */
    /* ************************* */

    main {
        column-gap: 6.5rem;
        row-gap: 0;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr auto;

        max-height: 40em;
        padding-inline: 0;
    }

    details {
        overflow: visible;

        position: relative;
    }

    input:checked+details ul {
        transform: scaleY(1);
    }

    input:checked+details label::after {
        content: url('images/icon-arrow-up-black.svg');
    }

    details ul {
        position: absolute;

        overflow: hidden;

        transform: scaleY(0);
        transform-origin: top center;
        transition: transform 100ms ease-out;

        padding: 1.5em 1em;

        width: max-content;

        border-radius: 0.5rem;
        box-shadow: 0 0 15px var(--clr-neutral-400);
    }

    picture {
        grid-column: 2;
        grid-row: span 2;
    }

    picture img {
        height: 100%;
        margin-left: auto;
    }

    /* ************************* */
    /*         Utilities         */
    /* ************************* */

    .fs-x-l {
        font-size: var(--fs-1500);
        font-size: 67px;

    }

    .fs-sm {
        font-size: var(--fs-400);
    }

    /* ************************* */
    /*          Blocks           */
    /* ************************* */

    .navigation {
        display: flex;
        gap: 2rem;
        align-items: center;

        height: auto;
    }

    input:checked+details {
        color: var(--clr-neutral-900);
    }

    .navigation>li:nth-child(5) {
        margin-left: auto;
    }

    .navigation-toggle {
        display: none;
    }

    .filter {
        display: none;
    }

    .ul-features {
        right: 0;
    }

    .auth-buttons {
        display: flex;
        justify-self: right;
    }

    .main-content {
        gap: 3rem;

        justify-items: flex-start;
        align-self: center;
        text-align: left;
        grid-column: 1;
        grid-row: 1;
    }

    .clients-logos {
        grid-column: 1;
        grid-row: 2;
    }

    /* ************************* */
    /*        Exceptions         */
    /* ************************* */
}