/*
Theme Name: Claire Kaufman
Author: Matchbox Creative
Author URI: https://matchboxcreative.com/
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: ignition-benson
Text Domain: ignition-benson-child
*/

:root {
    --theme-display-font: Manrope, sans-serif;
}

a {
    color: var(--ignition-primary-color);
    font-weight: 600;
}

a:focus {
    outline: revert;
}

.nav a {
    font-weight: normal;
}

/* Remove bullets from specific lists */
.nobullets {
    list-style: none;
    padding: 0;
    line-height: 2;
}
.nobullets li {
}

.site-branding {
    max-width: none;
}

.site-logo a {
    font-family: var(--theme-display-font);
    font-weight: 800;
    line-height: 1;
}

.site-tagline {
    margin-top: 0.25em;
    font-family: var(--ignition-secondary-font-family);
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
}

@media (max-width: 500px) {
    .site-logo {
        font-size: 22px;
    }
}

body.home #site-content {
    padding-left: 0;
    padding-right: 0;
}

body.home #site-content > article {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    background-color: black;
}

body.home .entry-thumb {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    background-color: black;
}

body.home .entry-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

body.home footer {
    position: relative;
}

/* Work template */
.work_grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.work_item {
    position: relative;
    flex: 1 0 40%;
    color: white;

    opacity: 0;
    overflow: hidden;
}

.work_item:not(:empty) {
    background-color: black;
}

.work_item .work_item_title,
.work_item img {
    transition: opacity 0.35s;
}

.work_item a {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}

.work_item img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/2;
    object-fit: cover;
    opacity: 0.9;
}

.work_item_title {
    position: absolute;
    left: 20px;
    bottom: 20px;
    z-index: 1;
    max-width: 90%;

    font-family: var(--ignition-secondary-font-family);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;

    text-shadow: 1px 1px 2px rgb(0 0 0 / 24%), 0 0 5px rgb(0 0 0 / 24%);
}

.work_item:hover img {
    opacity: 1;
}

.work_item_bg {
    transition: transform 0.5s;
    transform: scale(1.025);
}
.work_item:hover .work_item_bg {
    transform: scale(1);
}

@media (max-width: 991px) {
    .work_item {
        flex-basis: 100%;
    }
}

/* Hide portfolio navigation */

.entry-section-entry-navigation {
    display: none;
}

/* Home slideshow */

.home .wp-block-gallery.has-nested-images figure.wp-block-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

.home .wp-block-gallery.has-nested-images figure.wp-block-image img {
    opacity: 0;
}

/* Tweak centering of images for phone */
@media (max-width: 575px) {
    .home .wp-block-gallery.has-nested-images figure.wp-block-image img {
        object-position: 75%;
    }
}

.home .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    left: 50%;
    transform: translateX(-50%);
    width: auto;

    opacity: 0;
    background: none;
    bottom: 18vh;

    /* font-family: var(--ignition-secondary-font-family); */
    font-weight: bold;
    line-height: 1.1;
    /* letter-spacing: 0.15ch; */
    text-shadow: 1px 1px 2px rgb(0 0 0 / 24%), 0 0 5px rgb(0 0 0 / 24%);
}

.home .caption_title {
    display: block;
    margin-bottom: 0.2em;
    font-size: 40px;
}

.home .caption_subtitle {
    display: block;
    font-size: 20px;
    font-weight: normal;
}

@media (max-width: 575px) {
    .home .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
        width: 90%;
    }

    .home .caption_title {
        font-size: 26px;
    }

    .home .caption_subtitle {
        font-size: 18px;
    }
}

.home .wp-block-gallery.has-nested-images figure.wp-block-image figcaption a {
    display: inline-block;
    position: relative;
    padding-left: 30px;
    padding-right: 30px;
    padding-bottom: 10px;
}

.home
    .wp-block-gallery.has-nested-images
    figure.wp-block-image
    figcaption
    a::after {
    content: "";
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: white;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.home
    .wp-block-gallery.has-nested-images
    figure.wp-block-image
    figcaption
    a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Case studies */

/* hero page header */
.page-hero::before {
    /* background: none; */
    background-color: rgba(0, 0, 0, 0.1);
}
.page-hero::after {
    background: none;
}
.page-hero-title {
    font-weight: 400;
    text-shadow: 1px 1px 2px rgb(0 0 0 / 24%), 0 0 5px rgb(0 0 0 / 24%);
}
.page-hero-content .page-hero-title::before {
    content: unset;
}

/* meta info - mobile spacing - HACKY */
@media (max-width: 781px) {
    .project_meta p {
        margin-bottom: 0;
    }

    .wp-block-columns:not(.is-not-stacked-on-mobile)
        > .wp-block-column:last-child {
        margin-bottom: 30px;
    }
}

/* large page title header */
h1.page-title {
    font-size: 30px;
    font-family: var(--ignition-primary-font-family);
    font-weight: 500;
}

.ignition-portfolio-template h1.page-title {
    font-size: 60px;
    font-size: clamp(2.5rem, 1.1111rem + 4.4444vw, 5rem);
    font-family: var(--theme-display-font);
    font-weight: 200;
}

.entry-content h2 {
    font-weight: 200;
}

.entry-content h2:not(:first-child) {
    margin-top: 2em;
    margin-bottom: 1em;
}

.ignition-portfolio-template .entry-content {
    display: flex;
    flex-direction: column;
    /* gap: 3rem; */
}

.ignition-portfolio-template .entry-content p {
    max-width: 70ch;
    /* margin-left: auto; */
    margin-right: auto;
}

/* Table layout */
.wp-block-table.is-style-ignition-benson-table tbody tr {
    background-color: transparent !important;
    border-top: 1px solid var(--ignition-border-color);
}
.wp-block-table.is-style-ignition-benson-table td {
    vertical-align: top;
    line-height: 1.35;
}
.wp-block-table.is-style-ignition-benson-table
    .has-fixed-layout
    td:first-child {
    width: 35%;
}
@media (max-width: 767px) {
    .wp-block-table tbody tr {
        padding: 1.5em 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0.25em;
    }
    .wp-block-table.is-style-ignition-benson-table tbody td {
        /* flex-basis: 40%; */
    }
    .wp-block-table.is-style-ignition-benson-table tbody td:first-child {
        /* flex-basis: 100%; */
    }

    /* Awards table */
    .awards-table td {
        flex-basis: 100%;
    }

    /* Film list table */
    .film-table tr {
        gap: 0.75em;
    }
    .film-table td:first-child {
        flex-basis: 100%;
    }
    .film-table td {
        flex-basis: 40%;
    }

    /* Commercials list table */
    .commercials-table td {
        flex-basis: 40%;
    }
}

/* Tables have too much margin */
.wp-block-table table {
    margin-bottom: 0;
}

/* Mobile styles for gutenbee columns */
.wp-block-gutenbee-container-row {
    gap: 30px;
}

/* lightbox */
.parvus-zoom__indicator {
    display: none;
}

:root {
    /* Gap for gallery block */
    --wp--style--gallery-gap-default: 1.25rem;
}

/* Prevent full-bleed for full-width galleries */
figure.wp-block-gallery.has-nested-images.alignfull {
    padding-left: calc(var(--wp--style--gallery-gap-default) * 1.5);
    padding-right: var(--wp--style--gallery-gap-default);
}
/* Full bleed on narrow screens */
@media (max-width: 575px) {
    :root {
        --wp--style--gallery-gap-default: 0.5rem;
    }

    figure.wp-block-gallery.has-nested-images.alignfull,
    .entry-content > figure.wp-block-image {
        padding-left: 0;
        padding-right: 0;
    }

    .entry-content > .wp-block-gallery {
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        width: 100vw;
        max-width: 100vw;
    }

    /* Force single column on narrow screens */
    .wp-block-gallery.has-nested-images figure.wp-block-image {
        flex-basis: content;
    }

    /* Hide spacers between galleries */
    .wp-block-gallery + .wp-block-spacer {
        height: var(--wp--style--gallery-gap-default) !important;
    }
}

/* Prevent tall images from stretching beyond top and bottom of window */
.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image img {
    max-height: calc(100vh - (var(--wp--style--gallery-gap-default) * 2));
}

/* Remove gap between galleries */
.wp-block-gallery {
    margin-bottom: 0;
}
.wp-block-gallery + .wp-block-gallery {
    /* must equal .entry-content gap property */
    margin-top: var(--wp--style--gallery-gap-default);
    /* margin-top: calc(-3rem + var(--wp--style--gallery-gap-default)); */
}

/* Fix file download block from floating elements underneath */
.wp-block-file.alignleft {
    display: inline;
    float: none;
}

/* See all link below portfolio items */
.see_all {
    /* outline: 1px solid; */
    height: 40vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.see_all a {
    position: relative;
    padding: 2rem 4rem;

    font-family: var(--ignition-secondary-font-family);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.see_all a::after {
    content: "";
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: currentColor;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.see_all a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Prevent header from bouncing when loading page */
.head-mast-inner {
    transition: none;
}

/* Download Button */
.wp-element-button {
    font-family: var(--ignition-secondary-font-family);
}

.wp-block-heading {
    font-family: var(--ignition-primary-font-family);
    font-weight: 500;
    font-size: 30px;
}

/* Footer spacing */
.footer-content-slot-item {
    display: inline;
    margin: 0 0.5em 0 0;
}

/* Override caption */
body:not(.home)
    .wp-block-gallery.has-nested-images
    figure.wp-block-image
    figcaption {
    position: static;
    text-align: left;
    background: none;
    color: currentColor;
    flex: none;
}

/* 404 page */
body.error404 .site-content-wrap {
    background-image: url(/wp-content/themes/clairekaufman/images/404.jpg);
    background-size: cover;
    background-position: center bottom;
}
body.error404 main {
    display: flex;
    align-items: flex-end;
    height: 100%;
}
body.error404 h1.page-title {
    font-family: var(--ignition-secondary-font-family);
    font-size: 50px;
    font-weight: 800;
    line-height: 1.1;

    text-shadow: 1px 1px 2px rgb(0 0 0 / 24%), 0 0 5px rgb(0 0 0 / 24%);
    color: white;

    text-align: center;
}
