/*
Theme Name: Contact Front
Theme URI: https://36.agency
Author: 36creative     
Author URI: https://36.agency
Description: Block theme designed to provide a flexible and easy to use editing experience.
Version: 3.0
Requires at least: 6.5.5
Tested up to: 6.5.5
Requires PHP: 8.1.23
Text Domain: blueprint
*/

* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    min-height: 10dvh;
}

body:not(.wp-admin) .site-header,
body:not(.wp-admin) .section-hero .wp-block-blueprint-heading,
body:not(.wp-admin) .section-hero .wp-block-blueprint-scroll-prompt,
body:not(.wp-admin) .section-hero .wp-block-blueprint-row {
    opacity: 0;
}

img {
    max-width: 100%;
    height: auto;    
}

@media screen and (max-width: 767px) {
    :root {
        --wp--custom--spacing--40: 1.25rem;
    }
}

:root :where(.is-layout-constrained) > * {
    margin-block-start: 0;
}

#wp--skip-link--target {
    margin: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}



/*
* Core button overrides
* ************************************************************************/
.wp-block-blueprint-button{
    font-family: var(--wp--preset--font-family--ibm-plex-mono);
    font-size: var(--wp--preset--font-size--small);
    line-height: 1.3;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
}
.wp-element-button {
    --button-color: var(--wp--preset--color--black);
    --button-background-color: var(--wp--preset--color--brand-primary);
    --button-border-color: var(--wp--preset--color--brand-primary);

    --button-hover-color: var(--wp--preset--color--white);
    --button-hover-background-color: var(--wp--preset--color--black);
    --button-hover-border-color: var(--wp--preset--color--brand-primary);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    height: 40px;
    min-width: 110px;
    margin: 0;
    border-radius: var(--wp--custom--border-radius--sm);
    transition: all 0.2s ease-in-out 0s;
    background: var(--button-background-color);
    border: 1px solid var(--button-border-color);
    color: var(--button-color);
    @media screen and (min-width: 768px) {
        min-width: 140px;
    }
}

.wp-element-button__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.wp-element-button .text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    line-height: 1;
}

.wp-element-button svg path {
    transition: all 0.3s ease-in-out 0s;
    fill: currentColor;
    stroke: currentColor;
}

.wp-element-button svg line {
    transition: all 0.3s ease-in-out 0s;
    stroke: currentColor;
    fill: currentColor;
}

.wp-element-button:hover{
    color: var(--button-hover-color);
    background-color: var(--button-hover-background-color);
    border-color: var(--button-hover-border-color);
}

/*
* Block button variations
* ************************************************************************/
.is-style-alt-color-fill .wp-element-button{
    --button-color: var(--wp--preset--color--white);
    --button-background-color: var(--wp--preset--color--black);
    --button-border-color: var(--wp--preset--color--brand-primary);

    --button-hover-color: var(--wp--preset--color--black);
    --button-hover-background-color: var(--wp--preset--color--brand-primary);
    --button-hover-border-color: var(--wp--preset--color--brand-primary);
}

.is-style-outline .wp-element-button{    
    --button-color: var(--wp--preset--color--brand-primary);
    --button-background-color: transparent;
    --button-border-color: var(--wp--preset--color--brand-primary);     
}

.is-style-alt-outline .wp-element-button{    
    --button-color: var(--wp--preset--color--white);
    --button-background-color: transparent;
    --button-border-color: var(--wp--preset--color--white);

    --button-hover-color: var(--wp--preset--color--white);
    --button-hover-background-color: var(--wp--preset--color--black);
    --button-hover-border-color: var(--wp--preset--color--white);
}

.is-style-text-link .wp-element-button{
    --button-color: var(--wp--preset--color--black);
    --button-background-color: transparent;
    --button-border-color: transparent;

    --button-hover-color: var(--wp--preset--color--brand-primary);
    --button-hover-background-color: transparent;
    --button-hover-border-color: transparent;
}

.is-style-alt-text-link .wp-element-button{
    --button-color: var(--wp--preset--color--brand-primary);
    --button-background-color: transparent;
    --button-border-color: transparent;

    --button-hover-color: var(--wp--preset--color--white);
    --button-hover-background-color: transparent;
    --button-hover-border-color: transparent;
}

/*
* Gravity Forms block overrides
* ************************************************************************/
.gform_wrapper.gform-theme--framework {
    max-width: 646px !important;
    --gf-color-danger: #ff4545;
    --gf-form-validation-bg-color: rgb(48 9 1 / 87%);
    --gf-font-family-base: var(--wp--preset--font-family--neue-haas-grotesk-text);

    @media screen and (max-width: 768px) {
        --gf-form-gap-y: 52px;
        --gf-ctrl-textarea-height: 120px;
    }
    @media screen and (min-width: 768px) {
        width: calc(100% - var(--wp--custom--spacing--40) * 2) !important;
        margin-left: var(--wp--custom--spacing--40);
        margin-right: var(--wp--custom--spacing--40);
    }

    .gfield{
        position: relative;

        textarea, 
        input[type]:where(:not(.gform-text-input-reset):not([type=hidden])):where(:not(.gform-theme__disable):not(.gform-theme__disable *):not(.gform-theme__disable-framework):not(.gform-theme__disable-framework *)){
        --gf-ctrl-radius: 0;
        --gf-ctrl-padding-x: 16px;
        --gf-ctrl-size: 41px;

        --gf-ctrl-outline-color-focus: transparent;
        --gf-ctrl-outline-width-focus: 0;

        --gf-ctrl-color: var(--wp--preset--color--white);
        --gf-ctrl-color-focus: var(--wp--preset--color--white);
        --gf-ctrl-color-hover: var(--wp--preset--color--white);
        --gf-ctrl-color-error: var(--wp--preset--color--white);

        --gf-ctrl-bg-color: transparent;
        --gf-ctrl-bg-color-hover: transparent;
        --gf-ctrl-bg-color-focus: transparent;
        --gf-ctrl-bg-color-error: transparent;
        
        --gf-ctrl-border-color: var(--wp--preset--color--gray-600);
        --gf-ctrl-border-color-hover: var(--wp--preset--color--white);
        --gf-ctrl-border-color-focus: var(--wp--preset--color--white);
        --_border-color: var(--gf-ctrl-border-color);
        border-bottom: 1px solid var(--_border-color) !important;
        border-image: linear-gradient(to top, var(--_border-color) 28%, transparent 28%) 1 !important;
        transition: all 0.3s ease-in-out;

        &:hover { --_border-color: var(--gf-ctrl-border-color-hover); }
        &:focus { --_border-color: var(--gf-ctrl-border-color-focus); }

    }

    textarea, .textarea.large{
        min-block-size: 150px;
        @media screen and (max-width: 768px) {
            min-block-size: 120px;
        }
    }

    .gform-field-label:where(:not(.gform-theme__disable):not(.gform-theme__disable *):not(.gform-theme__disable-framework):not(.gform-theme__disable-framework *)){
        --gf-ctrl-label-color-primary: var(--wp--preset--color--white);
    }

    .gfield_description{
        margin-inline-start: 16px;
    }

    .gfield_validation_message{
        margin-inline-start: 16px;
    }
        
    .gfield_label,
    .gform-field-label{
            --gf-label-space-primary: 0;
            position: absolute;
            top: 0;
            left: 16px;
            pointer-events: none;
            transform: translateY(9px);
            transition: transform 0.3s ease-in-out, font-size 0.3s ease-in-out;
            text-transform: uppercase;
            
            &.active{
                transform: translateY(-100%);
                font-size: 10px;
                --gf-ctrl-label-color-primary: var(--wp--preset--color--gray-600);
            }
        }

    }
    .gform_footer{
        --gf-form-footer-margin-y-start: 40px;
        @media screen and (max-width: 768px) {
            --gf-form-footer-margin-y-start: 52px;
        }
        .wp-block-blueprint-button{
            width: 100% !important;
            position: relative;
            .wp-element-button{
                width: 100% !important;
                --gf-ctrl-btn-bg-color-primary: var(--button-background-color);
                --gf-ctrl-btn-color-primary: var(--button-color);

                --gf-ctrl-btn-font-size: var(--wp--preset--font-size--small);
                --gf-ctrl-btn-size: 40px;   
                --gf-ctrl-btn-text-transform: uppercase;
                --gf-ctrl-btn-font-weight: 500;
                --gf-ctrl-btn-radius: 4px;

                &:hover, &:focus{
                    --gf-ctrl-btn-bg-color-hover-primary: var(--wp--preset--color--black);
                    --gf-ctrl-btn-border-color-hover-primary: var(--wp--preset--color--brand-primary);
                    --gf-ctrl-btn-shadow-hover: var(--wp--preset--color--brand-primary);
                    --gf-ctrl-btn-color-hover-primary: var(--wp--preset--color--white);

                    --gf-ctrl-btn-bg-color-focus-primary: var(--wp--preset--color--black);
                    --gf-ctrl-btn-border-color-focus-primary: var(--wp--preset--color--brand-primary);
                    --gf-ctrl-btn-shadow-focus: var(--wp--preset--color--brand-primary);
                    --gf-ctrl-btn-color-focus-primary: var(--wp--preset--color--white);

                    --gf-ctrl-outline-color-focus: transparent;
                    --gf-ctrl-outline-width-focus: 0;   
                }

            }
            .gform-loader{
                position: absolute;
                top: calc(50% - 12px);
                left: calc(50% - 12px);
                --gf-form-spinner-fg-color: var(--wp--preset--color--black);
            }

            .wp-element-button:hover ~ .gform-loader,
            .wp-element-button:focus ~ .gform-loader{
                --gf-form-spinner-fg-color: var(--wp--preset--color--white);
            }

            &:has(.gform-loader) .wp-element-button__inner{
                visibility: hidden;
            }
        }
    }
    .gform_heading{
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        font-family: var(--wp--preset--font-family--neue-haas-grotesk-text);
        margin-bottom: 40px;
        
    }
}

.gform_confirmation_wrapper{
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    font-family: var(--wp--preset--font-family--neue-haas-grotesk-text);
    padding: 30px;
    font-size: 15px;
}


/*
* Section Spesific Styles
* ************************************************************************/
.section-hero{
    .BackgroundImage{
        transform: scale(1.15);
        opacity: 0;
        animation: bgImgFadeIn 0.3s ease 0.3s forwards;
    }
    .wp-block-blueprint-heading{
        margin-inline-start: 0;
        margin-inline-end: 0;
    }
}

.section-stats{
    .wp-block-blueprint-grid{
        .wp-block-blueprint-grid-item{
            .inner-blocks-container{
                padding-top: 12px;
                padding-bottom: 15px;
                height: 308px;
                @media screen and (min-width: 768px) {
                    padding-top: 28px;
                    padding-bottom: 28px;
                    height: 360px;
                }
                > *:not(.BackgroundColor) {
                    margin-left: 20px;
                    margin-right: 20px;
                }
            }
            .BackgroundColor {
                overflow: hidden;
                transition: box-shadow 0.5s ease;
            }
            &:hover .BackgroundColor {
                box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 8px 24px rgba(0,0,0,0.5);
            }
            .BackgroundColor .cursor-glow {
                position: absolute;
                width: 500px;
                height: 500px;
                border-radius: 50%;
                background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 35%, transparent 70%);
                pointer-events: none;
                opacity: 0;
                filter: blur(20px);
                will-change: transform, opacity;
            }
        }
    }
    .wp-block-blueprint-counter{
        margin-top: auto;
    }
}

.section-recent-media{
    overflow: visible;
    .section-recent-media__title{
     .wp-block-blueprint-heading{
        margin-inline-start: 0;
        margin-inline-end: 0;
     }   
    }

    .decorative-images{
        margin: 0 auto;
        max-width: var(--wp--style--global--content-size);
        width: 100%;
        position: absolute;
        top: 18%;
        left: 50%;
        transform: translateX(-50%);
        pointer-events: none;

        @media screen and (max-width: 768px) {
            display: none;
        }

        .drone{
            transform: translateX(-45%);
        }

        .drone-blade-1,
        .drone-blade-2{
            position: absolute;
            transform-origin: center;
            svg{
                display: block;
            }
        }
        .drone-blade-1{
            top: 2.3%;
            right: 25.3%;
            transform: rotate(1170deg);
        }
        .drone-blade-2{
            bottom: 4%;
            right: 25.3%;
        }
    }
}

.section-contact {
    .wp-block-blueprint-paragraph{
        margin-inline-start: 0;
        margin-inline-end: 0;   
    }
    .form-row {
        opacity: 0;
        justify-content: center;
        width: 100%;
    }
    .gf-styles-loaded & .form-row {
        animation: bgImgFadeIn 0.3s ease 0.3s forwards;
    }
}

.site-footer{
    margin-block-start: 20px;
    @media screen and (min-width: 768px) {
        margin-block-start: 72px;
    }
    a{
        text-decoration: none;
        &:hover{
            color: var(--wp--preset--color--brand-primary);
        }
    }
    .footer-bottom-mobile{
        &.wp-block-blueprint-grid.number-of-columns-2{
        .container{
            grid-template-columns: 1fr 1fr !important;
            .wp-block-blueprint-grid-item{
             grid-column: unset !important;   
            }
        }
    }
        .wp-block-blueprint-heading{
            margin-inline-start: 0;
            margin-inline-end: 0;
        }
    }
}

.error404{
    .wp-site-blocks{
        display: flex;
        flex-direction: column;
        min-height: 100dvh;
        .wp-block-blueprint-section{
            flex-grow: 1;
        }
        .site-footer{
            margin-top: auto;
        }
    }
}

@keyframes bgImgFadeIn {
    to { opacity: 1; }
}