/*
 * Jan Portfolio Design 1.1
 * Design layer for GeneratePress + Jan Portfolio Core.
 */

:root {
    --jan-gold: #d9a619;
    --jan-dark: #303030;
    --jan-text: #3c3d3f;
    --jan-muted: #aaa;
    --jan-font-body: "Roboto", Arial, sans-serif;
    --jan-font-display: "Montserrat", Arial, sans-serif;
}

/* ---------- Global page / GeneratePress reset ---------- */

body {
    background: #fff;
    color: var(--jan-text);
    font-family: var(--jan-font-body);
}

.site-header,
.page-header,
.entry-header {
    display: none !important;
}

.site-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 !important;
}

.content-area {
    width: 100%;
}

.inside-article {
    padding: 0 !important;
}

.entry-content {
    margin-top: 0 !important;
}

.entry-content > :first-child {
    margin-top: 0;
}

/* ---------- Custom header ---------- */

.jan-site-header {
    width: 100%;
    background: var(--jan-dark);
    color: #fff;
}

.jan-site-header-inner {
    width: min(1240px, calc(100% - 48px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.jan-site-brand {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 20px;
    line-height: 1.2;
    font-family: var(--jan-font-body);
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.jan-site-brand span {
    opacity: .75;
    margin: 0 3px;
}

.jan-site-nav {
    display: flex;
    align-items: center;
    gap: 38px;
}

.jan-site-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 76px;
    color: #bdbdbd !important;
    text-decoration: none !important;
    font-family: var(--jan-font-body);
    font-size: 16px;
    font-weight: 400;
}

.jan-site-nav a:hover,
.jan-site-nav a.is-active {
    color: #fff !important;
}

.jan-site-nav a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 21px;
    height: 2px;
    background: var(--jan-gold);
}

/* ---------- Homepage intro: native Gutenberg content ---------- */

body.home,
body.front-page {
    background: #fff;
}

/*
 * The intro is ordinary Gutenberg content. The plugin only controls
 * presentation. Add:
 *   Columns block       -> jan-home-intro
 *   Left column         -> jan-home-intro-left
 *   Right column        -> jan-home-intro-right
 *
 * The heading may be H1, H2 or H3; all are intentionally styled alike.
 */

body.home .entry-content > .wp-block-columns.jan-home-intro,
body.front-page .entry-content > .wp-block-columns.jan-home-intro {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto !important;
    padding: 136px 0 104px;
    display: flex;
    column-gap: 90px;
    align-items: center;
}

body.home .jan-home-intro > .wp-block-column.jan-home-intro-left,
body.front-page .jan-home-intro > .wp-block-column.jan-home-intro-left {
    flex-basis: calc(29% - 45px) !important;
    flex-grow: 0;
    flex-shrink: 0;
}

body.home .jan-home-intro > .wp-block-column.jan-home-intro-right,
body.front-page .jan-home-intro > .wp-block-column.jan-home-intro-right {
    flex-basis: calc(71% - 45px) !important;
    flex-grow: 1;
    min-width: 0;
}

/*
 * Typography is intentionally NOT defined here.
 * Gutenberg controls font family, size, weight, line height, letter spacing,
 * color, etc. for the actual page content. This plugin only provides layout.
 */

/* ---------- Portfolio filters */

/* ---------- Portfolio filters ---------- */

.jan-portfolio-filters {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto 26px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 30px;
}

.jan-portfolio-filter {
    color: var(--jan-muted);
    background: transparent;
    border: 0;
    padding: 0;
    font: inherit;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.jan-portfolio-filter:hover,
.jan-portfolio-filter.is-active {
    color: var(--jan-text);
}

/* ---------- Regular pages ---------- */

body.page .site-content {
    padding-bottom: 80px !important;
}

body.page .entry-content {
    max-width: 1240px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ---------- Responsive ---------- */

@media (max-width: 1279px) {
    body.home .entry-content > .wp-block-columns.jan-home-intro,
    body.front-page .entry-content > .wp-block-columns.jan-home-intro {
        padding-top: 110px;
        padding-bottom: 85px;
        column-gap: 60px;
    }

    body.home .jan-home-intro > .wp-block-column.jan-home-intro-left,
    body.front-page .jan-home-intro > .wp-block-column.jan-home-intro-left {
        flex-basis: calc(29% - 30px) !important;
    }

    body.home .jan-home-intro > .wp-block-column.jan-home-intro-right,
    body.front-page .jan-home-intro > .wp-block-column.jan-home-intro-right {
        flex-basis: calc(71% - 30px) !important;
    }
}

@media (max-width: 800px) {
    .jan-site-header-inner {
        min-height: 68px;
        width: min(100% - 32px, 1240px);
        gap: 20px;
    }

    .jan-site-brand {
        font-size: 17px;
    }

    .jan-site-nav {
        gap: 20px;
    }

    .jan-site-nav a {
        min-height: 68px;
        font-size: 14px;
    }

    .jan-site-nav a.is-active::after {
        bottom: 18px;
    }

    body.home .entry-content > .wp-block-columns.jan-home-intro,
    body.front-page .entry-content > .wp-block-columns.jan-home-intro {
        width: min(100% - 32px, 1240px);
        padding: 82px 0 70px;
        row-gap: 42px;
    }

    body.home .jan-home-intro > .wp-block-column.jan-home-intro-left,
    body.front-page .jan-home-intro > .wp-block-column.jan-home-intro-left,
    body.home .jan-home-intro > .wp-block-column.jan-home-intro-right,
    body.front-page .jan-home-intro > .wp-block-column.jan-home-intro-right {
        flex-basis: auto !important;
    }

    .jan-home-intro-left h1 {
        font-size: clamp(42px, 10vw, 60px);
    }

    .jan-home-intro-right p {
        font-size: clamp(22px, 5vw, 30px);
    }

    .jan-portfolio-filters {
        width: min(100% - 32px, 1240px);
    }
}

@media (max-width: 560px) {
    .jan-site-header-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 0;
    }

    .jan-site-brand {
        white-space: normal;
    }

    .jan-site-nav {
        width: 100%;
        justify-content: space-between;
    }

    .jan-site-nav a {
        min-height: 32px;
    }

    .jan-site-nav a.is-active::after {
        bottom: 0;
    }

    body.home .entry-content > .wp-block-columns.jan-home-intro,
    body.front-page .entry-content > .wp-block-columns.jan-home-intro {
        padding-top: 58px;
        padding-bottom: 52px;
        row-gap: 34px;
    }

    .jan-portfolio-filters {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 18px 25px;
        margin-bottom: 22px;
    }
}

/* Keep the Gutenberg editor visually close to the front-end for the intro. */
.wp-block-columns.jan-home-intro .jan-home-intro-left h1 {
    font-family: var(--jan-font-display);
}
.wp-block-columns.jan-home-intro .jan-home-intro-right p {
    font-family: var(--jan-font-body);
}
