/*
warning: to use the variabilized classes taking into account the dark and light modes (example: color: var(--md-default-fg-color)).
You need to add a data-md-color-scheme="slate" | "default" metadata to the enclosing elements
*/
/* ----- ----- ----- ----- ----- */
/* additional fonts */
/* ----- ----- ----- ----- ----- */
@font-face {
    font-family: "Fredoka";
    src: url("../assets/fonts/Fredoka-VariableFont_wdth,wght.ttf") format("truetype");
    font-display: swap;
}

:root > * {
    --md-primary-fg-color: rgb(219, 221, 251);
}

/* ----- ----- ----- ----- ----- */
/* variables */
/* ----- ----- ----- ----- ----- */
/* breakpoints */
/* xs, extra-small: 0px*/
/* sm, small: 600px */
/* md, medium: 900px */
/* lg, large: 1200px */
/* xl, extra-large: 1536px */
:root {
    /* colors */
    --color-primary: #4351e8;
    --color-secondary: #F92672;

    --color-text-gray: #4D4D4D;

    --color-background-what: #232A55;
    --color-background-oss: #E9EBF6;
    --color-background-what-key: #2A336C;
    --color-background-contribute: #2A336C;

    --color-snippet-primary: #A6E22E;
    --color-snippet-secondary: #F92672;
    --color-snippet-ternary: #66D9EF;
    --color-snippet-background: #232A55;

    /* spaces */
    --section-padding-y: 56px;
    --highlight-content-flex: 1 0 48%;

    /* fonts */
    --font-fredoka-semibold: 600;
    --font-fredoka-regular-400: 400;

    /* text */
    --accessible-line-height: 150%;

    /* border */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;

    /* shadows */
    --shadow-primary: 0 0 8px 0 rgba(0, 0, 0, 0.25);
    --shadow-secondary: 0 0 4px 0 rgba(0, 0, 0, 0.15);

    /*animations*/
    --hover-transform: transform .5s cubic-bezier(.075, .85, .175, 1);
    --hover-scale: scale(1.050);
}

/* ----- ----- ----- ----- ----- */
/* initialization */
/* ----- ----- ----- ----- ----- */
em {
    font-style: normal;
}

/* ----- ----- ----- ----- ----- */
/* hacks */
/* ----- ----- ----- ----- ----- */
/* hides the title of the site to have only the logo */
.md-header__title > .md-header__ellipsis > .md-header__topic {
    display: none;
}

/* hides the title of the site of the mobile drawer */
.md-nav--primary > .md-nav__title {
    color: transparent !important;
}

.md-nav--primary > .md-nav__title > .md-logo > img {
    width: 80% !important;
}

/* rounds up the search field and the suggestion panel */
form[name="search"] {
    border-radius: var(--border-radius-md) !important;
}

div[class="md-search__scrollwrap"] {
    margin-top: 4px;
    border-radius: var(--border-radius-md) !important;
}

/* ----- ----- ----- ----- ----- */
/* hero */
.knl-hero {
    padding: var(--section-padding-y) 0;
    background: linear-gradient(180deg, rgba(67, 81, 232, 0.3) -23.35%, rgba(255, 255, 255, 0) 100%);
}

.knl-hero__content {
    padding: 0 8px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.knl-hero__text {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.knl-hero__title {
    margin: 0;
    font-family: "Fredoka", sans-serif;
    font-size: clamp(24px, 7vw, 64px);
    font-weight: var(--font-fredoka-semibold);
    text-align: center;
}

.knl-hero__title em {
    color: var(--color-primary);
}

.knl-hero__description {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: clamp(16px, 3vw, 24px);
    font-weight: normal;
    text-align: center;
    line-height: var(--accessible-line-height);
}

.knl-hero__description em {
    font-weight: bold;
    color: var(--color-primary);
}

.knl-hero__cta {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* ----- ----- ----- ----- ----- */
/* buttons */
/* ----- ----- ----- ----- ----- */
.button {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 32px;
    font-family: "Poppins", sans-serif;
    font-size: clamp(14px, 3vw, 16px);
    font-weight: bold;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-primary);
    transition: var(--hover-transform);
}

.button:hover {
    filter: brightness(110%);
    cursor: pointer;
    transform: var(--hover-scale);
}

.button__primary--contained {
    color: white;
    background-color: var(--color-primary);
}

.button__primary--contained svg {
    fill: white;
}

.button__primary--outlined {
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.button__primary--outlined svg {
    fill: var(--color-primary);
}

.button__secondary--outlined {
    color: var(--color-secondary);
    border: 1px solid var(--color-secondary);
}

.button__secondary--outlined svg {
    fill: var(--color-secondary);
}

/* ----- ----- ----- ----- ----- */
/* snippet */
/* ----- ----- ----- ----- ----- */
.knl-snippet {
    display: flex;
    padding-bottom: var(--section-padding-y);
    justify-content: center;
}

.knl-snippet pre {
    margin: 0;
}

.knl-snippet__code {
    display: block;
    position: relative;
    padding: clamp(8px, 5vw, 48px) clamp(8px, 5vw, 64px);

    font-family: 'Roboto Mono', monospace;
    font-size: clamp(10px, 2vw, 16px);
    color: white;
    line-height: var(--accessible-line-height);

    border-radius: var(--border-radius-md);
    background-color: var(--color-snippet-background);
    box-shadow: var(--shadow-primary);
}

.knl-snippet__code .function {
    color: var(--color-snippet-primary);
}

.knl-snippet__code .instruction {
    color: var(--color-snippet-secondary);
}

.knl-snippet__code .class,
.knl-snippet__code .comment {
    color: var(--color-snippet-ternary);
}

.knl-snippet__code .comment {
    font-style: italic;
}

/* ----- ----- ----- ----- ----- */
/* what | why | oss */
/* ----- ----- ----- ----- ----- */
/* curves */
.knl-what,
.knl-oss,
.knl-contribute {
    position: relative;
    display: block;
    padding: 88px 0; /* 32px + 56px */
}

.knl-what:before,
.knl-oss:before,
.knl-contribute:before,
.knl-what:after,
.knl-oss:after {
    position: absolute;
    content: " ";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;

    -webkit-mask-size: 100% 100%;
    -webkit-mask-clip: border-box;
    mask-size: 100% 100%;
    mask-clip: border-box;

    background-color: white;
}

.knl-what:before,
.knl-oss:before {
    -webkit-mask-image: url(../assets/images/curve-mask-top.svg);
    mask-image: url(../assets/images/curve-mask-top.svg);
}

.knl-contribute:before {
    -webkit-mask-image: url(../assets/images/curve-mask-top-contribute.svg);
    mask-image: url(../assets/images/curve-mask-top-contribute.svg);
}

.knl-what:after,
.knl-oss:after {
    -webkit-mask-image: url(../assets/images/curve-mask-bottom.svg);
    mask-image: url(../assets/images/curve-mask-bottom.svg);
}

/* ----- ----- ----- ----- ----- */
/* flex content disposition */
.knl-what__content,
.knl-why__content,
.knl-oss__content,
.knl-contribute__content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 48px;
    z-index: 1;
}

/* ----- ----- ----- ----- ----- */
/* titles */
.knl-what__content h3,
.knl-why__content h3,
.knl-oss__content h3,
.knl-contribute__content h3 {
    margin: 0;
    font-family: "Fredoka", sans-serif;
    font-size: clamp(20px, 7vw, 40px);
    font-weight: normal;
    line-height: var(--accessible-line-height);
    text-align: center;
}

.knl-what__content h3 em,
.knl-why__content h3 em,
.knl-oss__content h3 em,
.knl-contribute__content h3 em {
    font-weight: var(--font-fredoka-semibold);
}

.knl-what__content h3 em,
.knl-why__content h3 em,
.knl-contribute__content h3 em {
    color: var(--color-secondary);
}

.knl-what__content h3,
.knl-contribute__content h3 {
    color: white;
}

/* ----- ----- ----- ----- ----- */
.knl-what {
    background-color: var(--color-background-what);
}

.knl-what__content {
    color: white;
}

.knl-what__content .knl-argument {
    background-color: var(--color-background-what-key);
}

/* ----- ----- ----- ----- ----- */
.knl-why {
    padding: var(--section-padding-y) 0;
}

.knl-why__content {
    align-items: center;
    padding: 0 clamp(8px, 5vw, 104px);
}

.knl-why__content > p {
    width: 100%;
    margin: 0;
    padding: 0 24px;
    font-family: "Poppins", sans-serif;
    font-size: clamp(16px, 3vw, 18px);
    line-height: var(--accessible-line-height);
    text-align: center;
    color: var(--color-text-gray);
}

.knl-why__content > p em {
    font-weight: bold;
}

.knl-why__content > a img {
    border: 1px solid hsla(237, 93%, 72%, 0.5);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-primary);
}

.knl-why__content > a {
    transition: var(--hover-transform);
}

.knl-why__content > a:hover {
    transform: var(--hover-scale);
}

/* ----- ----- ----- ----- ----- */
.knl-oss {
    background-color: var(--color-background-oss);
}

.knl-oss__content {
}

.knl-oss__content .knl-argument {
    background-color: white;
}

.knl-oss__content .knl-argument p {
    color: var(--color-text-gray);
}

/* ----- ----- ----- ----- ----- */
.knl-highlights {
    display: flex;
    flex-direction: column;
    gap: 64px;
    padding: 96px 0;
}

.knl-highlight {
    display: flex;
    gap: 32px;
    padding: 0 8px;
}

.knl-highlight__figure {
    flex: var(--highlight-content-flex);
    position: relative;
}

.knl-highlight__figure > figure {
    position: relative;
    margin: 0;
    padding: var(--border-radius-md);
    text-align: center;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-secondary);
}

.knl-highlight__figure > figure .button__close {
    position: absolute;
    margin: 0;
    padding: 0;
    width: 24px;
    height: 24px;
    top: 8px;
    left: 8px;
    border: 1px solid var(--color-primary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    z-index: 2;
    transition: var(--hover-transform);
}

.knl-highlight__figure > figure .button__close:hover {
    transform: var(--hover-scale);
}

.knl-highlight__figure > figure .button__close svg {
    fill: var(--color-primary);
}

.knl-highlight__figure > figure img.efficiency {
    width: 400px;
    max-width: 100%;
    height: auto;
}

.knl-highlight__figure > figure .chart-container {
    position: relative;
    margin: auto;
    height: 400px;
    z-index: 0;
}

.knl-highlight__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: var(--highlight-content-flex);
}

.knl-highlight__content > header {
    display: flex;
    gap: 16px;
    align-items: center;
}

.knl-highlight__content > header > svg {
    flex-shrink: 0;
}

.knl-highlight__content > header > h3 {
    margin: 0;
    font-family: "Fredoka", sans-serif;
    font-size: clamp(20px, 3vw, 32px);
    font-weight: normal;
    line-height: var(--accessible-line-height);
}

.knl-highlight__content > header > h3 em {
    color: var(--color-primary);
    font-weight: var(--font-fredoka-semibold);
}

.knl-highlight__description {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: "Poppins", sans-serif;
    font-size: clamp(14px, 2vw, 16px);
    line-height: var(--accessible-line-height);
    color: var(--color-text-gray);
}

.knl-highlight__description em {
    font-weight: bold;
}

.knl-highlight__description p,
.knl-highlight__description ul {
    margin: 0;
}

.knl-highlight__content footer {
    display: flex;
}

/* ----- ----- ----- ----- ----- */
.knl-contribute {
    padding: 88px 0 32px; /* 32px + 56px */
    background-color: var(--color-background-contribute);
}

.knl-contribute__content {
    gap: 24px;
    align-items: center;
}

.knl-contribute__content svg {
    width: 96px;
    fill: white;
}

.knl-contribute__content > a {
    transition: var(--hover-transform);
}

.knl-contribute__content > a:hover {
    transform: var(--hover-scale);
}

/* ----- ----- ----- ----- ----- */
/* generic arguments */
.knl-arguments {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0;
    padding: 0 8px;
    list-style: none;
}

.knl-argument {
    display: flex;
    flex: 1 0 32%;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
}

.knl-argument img {
    width: 48px;
    height: 48px;
}

.knl-argument h4,
.knl-argument p {
    margin: 0;
    line-height: var(--accessible-line-height);
}

.knl-argument h4 {
    font-family: "Fredoka", sans-serif;
    font-size: clamp(18px, 5vw, 24px);
    text-align: center;
}

.knl-argument p {
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    text-align: center;
}

.knl-argument p em {
    font-weight: bold;
}

.knl-argument a {
    text-decoration: underline;
}

.knl-argument a:hover {
    text-decoration: none;
}

/* ----- ----- ----- ----- ----- */
/* modal */
/* ----- ----- ----- ----- ----- */
.modal {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: scale(1.1);
    transition: visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;
    z-index: 10000;
}

.show-modal {
    opacity: 1;
    visibility: visible;
    transform: scale(1.0);
    transition: visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 97%;
    max-width: 1024px;
    height: auto;
    max-height: 97%;
    padding: 8px;
    text-align: center;
    border-radius: var(--border-radius-md);
    background-color: white;
    z-index: 10001;
}

.modal-content .chart-container {
    position: relative;
    margin: auto;
    height: 400px;
    z-index: 0;
}

.modal-content .close-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    border-radius: 4px;
    stroke: var(--color-primary);
    transition: var(--hover-transform);
    z-index: 2;
}

.modal-content .close-button:hover {
    transform: var(--hover-scale);
}

/* ----- ----- ----- ----- ----- */
/* slider */
/* ----- ----- ----- ----- ----- */
.slider > .slide {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    z-index: 0;

    -webkit-transition: opacity 1s;
    -moz-transition: opacity 1s;
    -o-transition: opacity 1s;

    transition: opacity 1s;
}

.slider > .showing {
    opacity: 1;
    z-index: 1;
}

.slider__actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid lightgray;
}

.slider__actions .slider__button {
    padding: 4px 8px;
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: var(--border-radius-sm);
    transition: var(--hover-transform);
}

.slider__actions .slider__button:hover {
    cursor: pointer;
    transform: var(--hover-scale);
}

/* ----- ----- ----- ----- ----- */
/* media queries */
/* ----- ----- ----- ----- ----- */
@media screen and (max-width: 1600px) {
    .knl-highlight__figure .chart-container {
        width: 550px;
    }
}

@media screen and (max-width: 1200px) {
    .knl-highlight__figure .chart-container {
        width: 44vw;
    }
}

@media screen and (max-width: 992px) {
    .knl-highlights {
        padding: 64px 0;
    }

    .knl-highlight {
        flex-direction: column;
        padding: 0 32px;
    }

    .knl-highlight__figure .chart-container {
        width: 88vw;
    }
}

@media screen and (max-width: 768px) {
    .knl-what,
    .knl-why,
    .knl-oss,
    .knl-contribute {
        padding: 56px 0;
    }

    .knl-highlight {
        padding: 0 16px;
    }
}

@media screen and (max-width: 576px) {
    .knl-what,
    .knl-why,
    .knl-oss,
    .knl-contribute {
        padding: 48px 0;
    }

    .knl-arguments {
        flex-direction: column;
    }

    .knl-highlight__figure .chart-container {
        width: 80vw;
    }
}

@media screen and (max-width: 416px) {
    .knl-hero__cta {
        flex-direction: column;
        align-items: center;
    }

    .knl-snippet {
        display: none;
    }

    .knl-what,
    .knl-why,
    .knl-oss,
    .knl-contribute {
        padding: 40px 0;
    }
}

/* fix the charts display in the modal for small screens in landscape mode */
@media (orientation: landscape) and (max-height: 474px) {
    .modal-content .chart-container {
        height: 250px;
    }
}

/* ----- ----- ----- ----- ----- */
/* blog link customization   */
/* ----- ----- ----- ----- ----- */
/* main navigation: nav ul > li allows to distinguish the link in the footer */
nav ul > li [href="https://ai.lefebvre-sarrut.eu/"]::after {
    content: " ";
    display: inline-block;
    width: 20px;
    background: url(../assets/images/icon-open-in-new.svg) no-repeat center right;
    background-size: 16px 16px;
}

/* ----- ----- ----- ----- ----- */
/* 404 page */
/* ----- ----- ----- ----- ----- */
.not-found {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;

    padding: 24px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--md-shadow-z1); /* uses the parent design system */
}

.not-found > h1 {
    margin: 0;
    padding: 0;
    font-family: "Fredoka", sans-serif;
    font-size: 32px;
    font-weight: var(--font-fredoka-regular-400);
    color: var(--md-typeset-color);
    text-align: center;
}

.not-found > h1 > em {
    color: var(--color-primary);
    font-weight: var(--font-fredoka-semibold);
}

.not-found > img {
    max-height: 400px;
}

.not-found > .go-back {
    display: flex;
    gap: 8px;
}

.not-found > .go-back > svg {
    width: 18px;
    fill: var(--md-typeset-color);
}