/*
Theme Name:   Passage
Theme URI:    https://passage.cat
Description:  Child theme for Twenty Twenty-Five - Consolidated Static Header
Author:       Genetic
Author URI:   https://amplestudio.com
Template:     twentytwentyfive
Version:      5.4.0
*/

/* --- 1. GLOBAL & BRAND ASSETS --- */

/* --- PREMIUM FADE IN (MASKS WP FOUT) --- */
body {
    animation: psg-premium-reveal 1.0s ease-out forwards;
    /* Starts invisible, hiding the ugly unstyled text */
    opacity: 0; 
}

@keyframes psg-premium-reveal {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* FOUT Fix: We only target body elements so WordPress Global Styles can control Headings! */
p, a, span, li, div {
    font-family: var(--wp--preset--font-family--bentonsans), var(--wp--preset--font-family--benton-sans), system-ui, -apple-system, sans-serif;
}

.psg-header-wrapper {
    background-color: #000000;
    width: 100%;
    z-index: 9999;
    position: relative;
}

/* Remove Selection Frame */
a:focus, a:active {
    outline: none !important;
    box-shadow: none !important;
}

a {
    text-decoration: none !important;
    transition: color 0.3s ease;
}

a:not(.wp-block-button__link):not(.wpcf7-submit):not(.psg-submit-btn):not(.passage-service-card *):hover {
    color: #00AAE9 !important;
}

.psg-logo-trigger-wrapper {
    width: 80px;
    height: 80px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483647 !important; 
}

#psgMenuTrigger {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2147483647 !important; 
    cursor: pointer;
    display: none; 
}

.psg-isotype-svg { 
    width: 78px; height: 78px; 
    display: block; position: relative;
    overflow: visible;
    pointer-events: none; 
}

.stop1 { stop-color: #00AAE9; } 
.stop2 { stop-color: #805AF5; } 
.stop3 { stop-color: #E61EAD; } 
.stop4 { stop-color: #FF0000; } 

.grecaptcha-badge {
    visibility: hidden !important;
}

/* --- FIX: FORCE LINKS TO RESPECT PARENT TYPOGRAPHY --- */
p a, blockquote a, em a, span a {
    font-family: inherit !important;
    font-style: inherit !important;
    font-weight: inherit !important;
}

/* --- THE PROVEN TARGETED GAP KILLER (FORCED TO TOP) --- */

/* 1. Home Page (Your original code) */
.page-template-home2 main.wp-block-group,
.page-template-home2 .entry-content,
.page-template-home2 .entry-content > .alignfull:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* 2. Single Service Pages (Your original code) */
body.page-template-page-services-single main#wp--skip-link--target {
    margin-top: 0 !important;
}
body.page-template-page-services-single main#wp--skip-link--target > .wp-block-group:first-child {
    padding-top: 0 !important;
}

/* 3. The exact same targeted logic applied to all other Pages (Solutions, Pricing, etc.) */
body.page main#wp--skip-link--target {
    margin-top: 0 !important;
}
body.page main#wp--skip-link--target > .wp-block-group:first-child {
    padding-top: 0 !important;
}

/* --- 2. DESKTOP NAVIGATION (> 720px) --- */
@media screen and (min-width: 721px) {
    #psgMenuTrigger { display: none !important; }
    .psg-logo-trigger-wrapper { pointer-events: none; }
    .psg-isotype-link { pointer-events: auto; } 

    .psg-simple-header {
        display: flex;
        justify-content: space-between; 
        align-items: center;
        max-width: 1340px; 
        margin: 0 auto;
        padding: 15px 40px;
        position: relative;
    }

    .psg-nav-container {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 12px;
    }

    /* Utility Row */
    .psg-utility-row .psg-utility-list {
        display: flex;
        gap: 1.5rem;
        list-style: none;
        margin: 0;
        padding: 0;
        align-items: center;
    }

    .psg-utility-row .psg-utility-list a {
        color: #ffffff;
        text-decoration: none;
        font-family: var(--wp--preset--font-family--bentonsans), sans-serif;
        font-size: 13px;
        font-weight: 400;
        opacity: 0.6;
        transition: all 0.2s ease;
    }

    .psg-utility-row .psg-utility-list a:hover {
        opacity: 1;
        color: #00AAE9 !important;
    }

    .lang-selector {
        color: #666 !important;
        font-size: 12px !important;
        cursor: default;
    }

    .lang-selector a {
        display: inline !important;
        padding: 0 2px;
    }

    /* Main Menu */
    .psg-static-nav {
        display: block;
    }

    .psg-menu-list {
        display: flex;
        flex-direction: row;
        gap: 2.5rem;
        align-items: center;
        list-style: none;
        margin: 0; padding: 0;
    }

    .psg-menu-list li a {
        color: #ffffff !important;
        text-decoration: none;
        transition: all 0.2s ease;
        font-family: var(--wp--preset--font-family--bentonsans), var(--wp--preset--font-family--benton-sans), sans-serif !important; 
        font-weight: 700 !important;
        letter-spacing: 0.05em;
        font-size: 17px;
        text-transform: none; 
    }

    .psg-menu-list li a:hover,
    .psg-menu-list .current-menu-item > a {
        color: #00AAE9 !important;
    }

    .psg-menu-list li { position: relative; }

    /* Sub-Menu Alignment */
    .psg-menu-list .sub-menu {
        position: absolute;
        top: 100%; 
        left: 0;
        background-color: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        display: none;
        flex-direction: column;
        padding: 25px;
        min-width: 280px;
        z-index: 1000;
        list-style: none;
        border-left: 1px solid #333;
        box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    }

    .psg-menu-list li:hover > .sub-menu { display: flex; }

    .psg-menu-list .sub-menu li { 
        margin-bottom: 12px; 
        margin-left: -25px; 
    }

    .psg-menu-list .sub-menu li a {
        font-size: 16px;
        line-height: 1.6;
        text-transform: none;
        opacity: 0.8;
        font-weight: 400 !important;
        padding-left: 25px;
    }
}

/* --- ADJUST HEADER UTILITY ROW VERTICAL POSITION (DESKTOP) --- */
@media screen and (min-width: 721px) {
    .psg-utility-row {
        margin-top: 0px !important; /* Pulls the block up. Increase the negative value (e.g., -18px) to go higher */
        margin-bottom: 12px !important; /* Pushes the main menu back down so it doesn't move */
    }
}

/* --- HEADER PRIMARY CTA BUTTON (PASSAGE BLUE) --- */
.psg-utility-list {
    align-items: center !important;
    gap: 24px !important; 
}

.psg-utility-list .psg-header-cta {
    display: inline-block !important;
    padding: 8px 20px !important; 
    background-color: #00AAE9 !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 0 1px #00AAE9 !important; 
    border-radius: 4px; 
    font-weight: 500 !important; 
    text-decoration: none !important;
    opacity: 1 !important; /* <--- THIS FIXES THE DIMMING AND THE FLASH */
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Hover State */
.psg-utility-list .psg-header-cta:hover,
.psg-utility-list .psg-header-cta:focus {
    background-color: rgba(0, 170, 233, 0.1) !important; 
    color: #00AAE9 !important; 
    box-shadow: inset 0 0 0 1px #00AAE9 !important; 
    opacity: 1 !important; /* Ensures it stays solid on hover */
}


/* --- 3. MOBILE NAVIGATION (<= 720px) --- */
@media screen and (max-width: 720px) {
    #psgMenuTrigger { display: block !important; }

    .psg-simple-header {
        justify-content: center; 
        padding: 10px 0;
    }

    .psg-nav-container { width: 100%; }
    .psg-utility-row { display: none; }
    .psg-static-nav { display: none; }

    .psg-menu-open .psg-static-nav {
        display: block;
        position: fixed;
        top: 0; left: 0;
        width: 100vw; height: 100vh;
        background: #000000;
        z-index: 2147483646; 
        padding: 100px 0 0 10%; /* ADJUSTED: Reduced from 140px to bring menu up */
    }

    .psg-menu-open ul, 
    .psg-menu-open li,
    .psg-menu-open .sub-menu {
        list-style: none !important;
        list-style-type: none !important;
        margin: 0;
        padding: 0;
    }

    .psg-menu-open .psg-menu-list {
        flex-direction: column;
        display: flex;
        gap: 8px; /* ADJUSTED: Reduced from 20px to save vertical space */
    }

    .psg-menu-open li a {
        color: #ffffff !important;
        text-decoration: none;
        font-family: var(--wp--preset--font-family--bentonsans), var(--wp--preset--font-family--benton-sans), sans-serif !important; 
        font-weight: 700 !important;
        font-size: 22px !important; 
        line-height: 1.6 !important;
        display: block;
    }

    .psg-menu-open .sub-menu {
        padding-left: 20px !important;
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .psg-menu-open .sub-menu li a {
        font-size: 17px !important; 
        font-weight: 400 !important;
        opacity: 0.7;
    }
}

/* --- 3.1 MOBILE MENU SECONDARY UTILITY --- */
@media screen and (max-width: 720px) {
    
    /* The Wrapper */
    .psg-menu-open .psg-mobile-menu-bottom {
        margin-top: 15px; /* ADJUSTED: Reduced from 50px */
        padding-top: 20px; /* ADJUSTED: Reduced from 30px */
        padding-bottom: 20px; /* ADJUSTED: Reduced from 40px */
        border-top: 1px solid rgba(255, 255, 255, 0.15); /* Sleek divider */
        width: 85%; /* Matches the 10% left padding of the main menu */
    }

    /* Secondary Links Layout */
    .psg-menu-open .psg-mobile-secondary-links {
        display: flex !important;
        flex-direction: row !important; /* Forces them inline, overriding the column flex */
        flex-wrap: wrap !important;
        gap: 15px 25px !important;
        margin-bottom: 25px !important;
    }

    /* Secondary Links Typography (Overriding the 22px bold rules) */
    .psg-menu-open .psg-mobile-secondary-links li a {
        font-size: 15px !important; 
        font-weight: 400 !important; 
        color: rgba(255, 255, 255, 0.7) !important;
        letter-spacing: 0.02em;
        text-transform: none !important;
        display: inline-block !important; /* Prevents them from stacking full width */
    }

    /* Hover effect for secondary links */
    .psg-menu-open .psg-mobile-secondary-links li a:hover {
        color: #ffffff !important;
    }

    /* Social Icons Layout */
    .psg-menu-open .psg-mobile-socials {
        display: flex;
        gap: 20px;
        align-items: center;
    }

    /* Social Icons SVGs */
    .psg-menu-open .psg-mobile-socials a {
        color: rgba(255, 255, 255, 0.7) !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .psg-menu-open .psg-mobile-socials a:hover {
        color: #ffffff !important;
    }
}

/* --- 3.2 HIDE MOBILE UTILITIES ON DESKTOP (>= 721px) --- */
@media screen and (min-width: 721px) {
    .psg-mobile-menu-bottom {
        display: none !important;
    }
}


/* --- 4. BRAND ARROW MASK --- */
.menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 12px; height: 12px;
    margin-left: 10px;
    background-color: currentColor;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 297 297"><path d="M202.5 190.3L179.8 190.3L148.6 130.1L117.1 190.3H94.1L148.3 85.5L202.5 190.3Z"/></svg>') no-repeat center;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 297 297"><path d="M202.5 190.3L179.8 190.3L148.6 130.1L117.1 190.3H94.1L148.3 85.5L202.5 190.3Z"/></svg>') no-repeat center;
    mask-size: contain;
    transform: rotate(180deg);
    vertical-align: middle;
}


/* --- 5. ANIMATIONS --- */
@keyframes recordSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.7; }
}

#psgRing { 
    transform-origin: center; 
    animation: recordSpin 4s linear infinite;
}

.psg-menu-open #psgRing {
    animation: ringPulse 2s ease-in-out infinite;
}


/* --- 6. SVG ICONS --- */
.passage-sub-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    display: block;
}


/* --- 7. PORTFOLIO VIDEO RESPONSIVE SWITCHER --- */

/* 1. Target Figure Wrapper */
figure:has(.psg-video-desktop) {
    display: none !important;
}

figure:has(.psg-video-mobile) {
    display: block !important;
}

/* 2. Desktop Swap */
@media screen and (min-width: 721px) {
    figure:has(.psg-video-mobile) {
        display: none !important;
    }
    
    figure:has(.psg-video-desktop) {
        display: block !important;
    }
}

/* 3. Safety Fallback */
@media screen and (max-width: 720px) {
    presto-player.psg-video-desktop { display: none !important; height: 0; }
}
@media screen and (min-width: 721px) {
    presto-player.psg-video-mobile { display: none !important; height: 0; }
}


/* --- 8. WORKS INDEX CLEANUP --- */

/* 1. Hide Single Project Featured Image */
.single-post .wp-block-post-featured-image {
    display: none !important;
}

/* 2. Hide Works Index Featured Image */
.page-id-74 main > .wp-block-group > .wp-block-post-featured-image,
.page-id-74 .wp-site-blocks > .wp-block-post-featured-image {
    display: none !important;
}

/* 3. Retain Mosaic Grid Images */
.wp-block-query .wp-block-post-featured-image {
    display: block !important;
}


/* --- 9. SINGLE PROJECT LAYOUT --- */

/* 1. Eliminate Top Spacing */
.single-post .wp-site-blocks {
    padding-top: 0 !important;
}

.psg-hero-video-group {
    margin-top: 0 !important;
    padding-top: 0 !important;
    line-height: 0; 
}

/* Kill rogue empty paragraph tags injected by WordPress that create white gaps */
.single-post .wp-site-blocks > p:empty,
.single-post main > p:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Fallback: In case WordPress injects a line break inside the paragraph */
.single-post .wp-site-blocks > p:has(br),
.single-post main > p:has(br) {
    display: none !important;
}

/* 2. Full-Width Video Breakout */
.psg-hero-video-group .wp-block-presto-player-reusable-edit,
.psg-hero-video-group .presto-player-wrapper {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

/* 3. Position-Based Hide */
.psg-hero-video-group br {
    display: none !important;
}

@media screen and (min-width: 721px) {
    .psg-hero-video-group .wp-block-presto-player-reusable-edit:nth-of-type(2) {
        display: none !important;
    }
}

@media screen and (max-width: 720px) {
    .psg-hero-video-group .wp-block-presto-player-reusable-edit:nth-of-type(1) {
        display: none !important;
    }
}

/* --- PRESTO PLAYER: ANTI-FLASH (DARK FADE) --- */

/* 1. Paint the container dark grey behind the video */
.wp-block-presto-player-reusable-edit,
.presto-player-wrapper {
    background-color: #202020 !important;
}

/* 2. Hide the player instantly */
presto-player {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out !important;
}

/* 3. The reveal class */
presto-player.psg-player-ready {
    opacity: 1 !important;
    visibility: visible !important;
}

/* --- 10. WORKS INDEX: CLICKABLE CARDS --- */

/* 1. Container Reference */
.wp-block-post {
    position: relative !important;
    transition: transform 0.3s ease-in-out !important;
}

/* 2. Hover Effect */
.wp-block-post:hover {
    transform: translateY(-5px) !important;
}

/* 3. Stretched Link */
.wp-block-post .wp-block-post-title a::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 999 !important;
    cursor: pointer !important;
}

/* 4. Excerpt Visual Feedback */
.wp-block-post:hover .wp-block-post-excerpt {
    opacity: 0.8;
}

/* --- OVERRIDE QUERY LOOP EXCERPT TYPOGRAPHY --- */
.wp-block-post .wp-block-post-excerpt,
.wp-block-post .wp-block-post-excerpt p {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    color: #555555 !important; 
    margin-top: 0 !important; /* Set to 0 so only the title's bottom margin creates space */
}

/* --- WORKS SPACING RESET POSTS SINGLE --- */

/* 1. Kill WP structural GAP on the Group Wrapper */
.single-post .wp-block-post-template .wp-block-post .wp-block-group {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
    padding-top: 0 !important;
    gap: 0 !important; 
}

/* 2. Force Title to have EXACTLY 0 top and 12px bottom */
.single-post .wp-block-post-template .wp-block-post-title {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
    margin-bottom: 12px !important;
    margin-block-end: 12px !important;
    padding-top: 0 !important;
}

/* 3. Force Excerpt to have 0 margin (Top AND Bottom) */
.single-post .wp-block-post-template .wp-block-post .wp-block-group > *:not(.wp-block-post-terms) + *:not(.wp-block-post-terms),
.single-post .wp-block-post-template .wp-block-post-excerpt,
.single-post .wp-block-post-template .wp-block-post-excerpt p {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
}

/* 4. Give the Category Tags their physical spacing back! */
.single-post .wp-block-post-template .wp-block-post-terms {
    margin-top: 25px !important;
    margin-block-start: 25px !important;
}

/* --- WORKS INDEX: EDITORIAL TYPOGRAPHY UPGRADES --- */

/* Adds breathing room between the thumbnail and the title */
.wp-block-post .wp-block-post-featured-image {
    margin-bottom: 25px !important; 
}

/* 1. Cinematic Titles (Forces Benton Sans Condensed & tighter spacing) */
.wp-block-post .wp-block-post-title,
.wp-block-post .wp-block-post-title a {
    font-family: var(--wp--preset--font-family--benton-sans-condensed), "Benton Sans Condensed", sans-serif !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    line-height: 1.15 !important;
    margin-bottom: 12px !important;
    color: #111111 !important;
}

/* 2. Excerpt Tweaks (Just to ensure it sits perfectly between title and tags) */
.wp-block-post .wp-block-post-excerpt {
    margin-bottom: 20px !important; 
}

/* 3. Editorial Category Metadata (The "Technical Spec" approach) */
.wp-block-post .wp-block-post-terms {
    display: block !important;
    margin-top: auto !important; 
    padding-top: 15px !important;
    border-top: 1px solid #eaeaec !important; 
    font-family: var(--wp--preset--font-family--bentonsans), sans-serif !important;
    font-size: 0.65rem !important; 
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important; 
    color: #999999 !important;
}

/* Force the link inside the tag to inherit the styles */
.wp-block-post .wp-block-post-terms a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
}

/* Make the category tag light up blue when hovering over the card */
.wp-block-post:hover .wp-block-post-terms a {
    color: #00AAE9 !important; 
}

/* --- 11. CALL TO ACTION --- */

.cta-grain-background {
    position: relative;
    overflow: hidden !important; 
    background-color: #0088cc; 
    border-radius: 10px; 
}

.cta-grain-background::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.22;
    pointer-events: none; z-index: 1;
    border-radius: inherit; 
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
    mask-image: radial-gradient(ellipse, rgba(0,0,0,1) 40%, rgba(0,0,0,0.6) 100%);
    -webkit-mask-image: radial-gradient(ellipse, rgba(0,0,0,1) 40%, rgba(0,0,0,0.6) 100%);
}

.cta-grain-background::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 1;
    border-radius: inherit; 
    background: radial-gradient(ellipse, rgba(0,0,0,0) 50%, rgba(0,0,0,0.15) 100%);
}

/* --- UNIVERSAL GRAIN (For large full-width blocks) --- */

.psg-grain-texture {
    position: relative;
    overflow: hidden !important;
}

.psg-grain-texture::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 1;
    opacity: 0.35; /* Tripled the opacity so it's definitively visible */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-repeat: repeat !important; 
    background-size: 200px 200px !important; 
    mix-blend-mode: overlay;
}

/* Keep text above the grain */
.cta-grain-background > *,
.psg-grain-texture > * {
    position: relative;
    z-index: 2;
}

/* --- SMART BUTTON HOVERS (Frosted Ghost Effect) --- */
.cta-grain-background .wp-block-button__link {
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* On hover: faint white wash, white stroke appears, text turns white. Works for ALL colors! */
.cta-grain-background .wp-block-button__link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important; 
    box-shadow: inset 0 0 0 1px #ffffff !important; 
    opacity: 1; 
}

/* --- PASSAGE BLUE CTA BUTTON --- */
.wp-block-button.cta-blue-solid .wp-block-button__link {
    background-color: #00AAE9 !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 0 1px #00AAE9 !important; 
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Hover State */
.wp-block-button.cta-blue-solid .wp-block-button__link:hover,
.wp-block-button.cta-blue-solid .wp-block-button__link:focus {
    background-color: rgba(0, 170, 233, 0.1) !important; /* A crisp 10% tint of your brand blue */
    color: #00AAE9 !important; 
    box-shadow: inset 0 0 0 1px #00AAE9 !important; 
    opacity: 1 !important; 
}

/* --- PERFECT HORIZONTAL ALIGNMENT (Desktop & Tablet) --- */
@media (min-width: 782px) {
    .cta-grain-background .wp-block-columns {
        display: flex !important;
        flex-wrap: nowrap !important; 
        align-items: center !important; 
        justify-content: space-between !important;
        gap: 30px !important; 
    }

    .cta-grain-background .wp-block-column:nth-child(1) {
        flex: 0 0 auto !important;
        width: auto !important;
    }

    .cta-grain-background .wp-block-column:nth-child(2) {
        flex: 1 1 auto !important;
        width: auto !important;
    }

    .cta-grain-background .wp-block-column:nth-child(3) {
        flex: 0 0 auto !important;
        width: auto !important;
    }

    /* Force the button inside Column 3 to never squish or wrap text */
    .cta-grain-background .wp-block-column:nth-child(3) .wp-block-button,
    .cta-grain-background .wp-block-column:nth-child(3) .wp-block-button__link {
        width: auto !important;
        min-width: max-content !important;
        white-space: nowrap !important;
    }

    /* Strip rogue bottom margins so the text mathematically centers */
    .cta-grain-background h1,
    .cta-grain-background h2,
    .cta-grain-background h3,
    .cta-grain-background p {
        margin-bottom: 0 !important;
        margin-top: 0 !important;
    }
}

/* Mobile Responsiveness */
@media (max-width: 781px) {
    .cta-grain-background {
        text-align: center !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .cta-grain-background .wp-block-group,
    .cta-grain-background .wp-block-columns,
    .cta-grain-background .wp-block-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    .cta-grain-background .wp-block-column {
        flex-basis: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    .cta-grain-background .wp-block-buttons {
        justify-content: center !important;
        width: 100% !important;
    }

    .cta-grain-background .passage-sub-icon,
    .cta-grain-background svg {
        margin-left: auto !important;
        margin-right: auto !important;
        display: block !important;
    }
}

/* --- CTA COLOR VARIATIONS (Brand Palette) --- */

/* 1. Brand Plum (Creative, Deep, Media & Entertainment) */
.cta-theme-plum {
    background-color: #6b3d8c !important; 
}

/* 2. Brand Crimson (Cinematic, Authoritative, Architecture) */
.cta-theme-crimson {
    background-color: #a01030 !important; 
}

/* 3. Brand Red (High-energy, Bold, Advertising) */
.cta-theme-red {
    background-color: #cc0000 !important; 
}

/* 4. Brand Gold */
.cta-theme-gold {
    background-color: #ECA828 !important; 
}

/* --- 12. PRICING --- */

/* Background Stage */
.pricing-wrapper-grey {
    background-color: #f7f7f7 !important; 
    padding: 80px 20px !important;
}

/* White Cards */
.pricing-card-white {
    background-color: #ffffff !important;
    border: 1px solid #eaeaec;
    border-radius: 10px; 
    padding: 40px !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card-white:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}


/* --- 13. HOME --- */

/* 1. Layout Snap */
.page-template-home2 main.wp-block-group,
.page-template-home2 .entry-content,
.page-template-home2 .entry-content > .alignfull:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.page-template-home2 .wp-block-template-part header {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 2. Hero Wrapper */
.hero-passage-wrapper {
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 80vh !important; 
    background-color: #0b0b0b !important;
    overflow: hidden;
    color: #ffffff;
    text-align: center;
}

/* Compiled Hero Title Styles */
.hero-title-pulse {
    position: relative;
    z-index: 10 !important; 
    color: #ffffff !important;
    /* Main Anchor: Bold and Condensed */
    font-family: "benton-sans-condensed", sans-serif !important;
    font-size: clamp(2.2rem, 7vw, 4.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1; 
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    text-transform: uppercase;
}

/* The Slogan: The "Italic Whisper" Hierarchy */
.hero-title-pulse .hero-slogan {
    display: block !important; /* Forces the line break */
    margin-top: 20px !important;
    font-family: "benton-sans-condensed", sans-serif !important; 
    font-weight: 300; /* Extra light weight for elegance */
    font-size: 0.55em; /* Half size of main title */
    text-transform: none; /* Keeps it lowercase */    
    letter-spacing: 0.25em !important;     
    opacity: 0.85; /* Subtle softening for depth */
}


/* --- 14. HOME: HERO STRUCTURE --- */

.hero-passage-wrapper {
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* Reduced from 85vh to 60vh for a tighter, more focused banner */
    min-height: 60vh !important; 
    overflow: hidden;
    color: #ffffff;
    text-align: center;
    background: #111111 !important; 
    /* Kill any default bottom margin */
    margin-bottom: 0 !important;
}

/* Canvas Background Position */
.cymatics-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Forces the canvas container to match the wrapper exactly */
    height: 100%;
    z-index: 1; 
    pointer-events: none;
}

#cymatics-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Hide Debug Text */
#cymatics-overlay {
    display: none; 
}

/* Headline Z-Index */
.hero-passage-wrapper .wp-block-heading, 
.hero-passage-wrapper .wp-block-paragraph,
.hero-passage-wrapper .wp-block-group__inner-container {
    position: relative;
    z-index: 10 !important;
}

/* --- KILL GAP: HERO TO SERVICES --- */

/* Targets the transition between the dark hero and the light services */
.hero-passage-wrapper + .psg-services-section-wrapper,
.wp-block-group.hero-passage-wrapper + .psg-services-section-wrapper {
    margin-top: 0 !important;
}

/* Ensure the services section starts exactly where the hero ends */
.psg-services-section-wrapper {
    margin-top: 0 !important;
    padding-top: 100px !important; /* Space inside the top of services */
}


/* --- 15. HOME: INFINITE LOGO MARQUEE --- */

.logo-passage-container {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    background: #202020 !important; /* UPDATED to #202020 */
    padding: 70px 0 60px 0; /* Slightly increased padding to frame the new title */
    overflow: hidden;
    box-sizing: border-box;
}

/* 1. The New Title Styling */
.logo-passage-container .marquee-title {
    color: #ffffff !important;
    text-align: center;
    font-family: var(--wp--preset--font-family--bentonmodernfour), Georgia, serif !important;
        font-size: clamp(0.984rem, 0.984rem + ((1vw - 0.32rem) * 0.889), 1.5rem) !important; 
    font-weight: 400 !important;
    letter-spacing: -0.1px !important; 
    line-height: 1.125 !important; 
    margin: 0 0 80px 0 !important; 
    position: relative;
    z-index: 5; 
}

/* 2. The Fade Gradients (Updated to #202020) */
.logo-passage-container::before,
.logo-passage-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 35%; /* Slightly narrowed so it doesn't overlap the centered title */
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.logo-passage-container::before {
    left: 0;
    background: linear-gradient(to right, #202020 15%, transparent 100%); /* UPDATED */
}

.logo-passage-container::after {
    right: 0;
    background: linear-gradient(to left, #202020 15%, transparent 100%); /* UPDATED */
}

/* 3. The Track */
.logo-marquee-wrapper {
    display: flex;
    width: 100%;
}

.marquee-track {
    display: flex;
    flex-shrink: 0;
    gap: 150px; 
    align-items: center;
}

.marquee-track img {
    height: 90px; 
    width: auto;
    display: block;
}

/* --- FIX: KILL GAP ABOVE BRAND CAROUSEL --- */
.wp-block-group:has(.logo-passage-container) {
    margin-top: 0 !important;
    padding-top: 0 !important;
}


/* --- 16. HOME: SONIC WINDOWS --- */

.sonic-windows-container {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    background: #fff; 
    padding: 30px 0 100px 0;
    display: block;
    /* Native swiping for mobile & tablets */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Hide scrollbar for a clean editorial look */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    cursor: grab; /* Shows desktop users they can pull it */
}

/* Grabbing state for desktop */
.sonic-windows-container.is-grabbing {
    cursor: grabbing;
}

/* Hide scrollbar for Chrome/Safari/Opera */
.sonic-windows-container::-webkit-scrollbar {
    display: none; 
}

.sonic-windows-track {
    display: flex;
    gap: 60px; 
    width: max-content;
    padding-left: 50px;
    padding-right: 50px; /* Ensures the last item has space on the right */
}

.sonic-window {
    width: 320px; 
    flex-shrink: 0;
    /* Prevents the text from highlighting blue while dragging */
    user-select: none; 
    -webkit-user-select: none;
}

/* Prevent native browser image/video dragging behavior */
.sonic-window video,
.sonic-window a {
    -webkit-user-drag: none;
}

.sonic-window video {
    border-radius: 10px; 
    overflow: hidden;
    width: 100%;
    aspect-ratio: 9 / 16; 
    object-fit: cover;
    background: #eee; 
    display: block;
    pointer-events: none; /* Stops video play buttons from blocking the drag */
}

.window-info {
    margin-top: 15px;
    font-family: var(--wp--preset--font-family--bentonsans), sans-serif; 
    font-size: 1rem;
    line-height: 1.2; /* Tightened from 1.4 to pull lines closer */
    color: #000;
}

/* This is the missing piece: Kills the <br> tag so it stops adding a double space */
.window-info br {
    display: none !important;
}

/* PORTFOLIO TITLE: Benton Sans Condensed */
.window-info strong {
    font-family: var(--wp--preset--font-family--benton-sans-condensed), "Benton Sans Condensed", sans-serif !important;
    font-size: 1.15rem; 
    font-weight: 700;
    letter-spacing: 0.02em;
    display: block;
    margin-bottom: 2px; 
}

/* PORTFOLIO SUBTITLE: Clean and Normal */
.window-info em {
    font-family: var(--wp--preset--font-family--bentonsans), sans-serif; 
    color: #666; 
    font-style: normal !important; 
}

/* Link Hover Effect (Passage Blue) */
.window-link:hover .window-info,
.window-link:hover .window-info em {
    color: #00AAE9 !important;
    transition: color 0.3s ease;
}


/* --- 17. HOME: SERVICES SECTION --- */

/* Services Section Background */
.psg-services-section-wrapper {
    background-color: #f7f7f7 !important;
    padding: 70px 20px !important;
    margin-bottom: 0 !important;
}
.psg-services-section-wrapper + * {
    margin-top: 0 !important;
}

/* Service Cards Master Structure */
.passage-service-card {
    background-color: #ffffff !important;
    border: 1px solid #eaeaec;
    border-radius: 10px;
    /* Adjusted bottom padding to 40px to align the title perfectly with the flex layout */
    padding: 45px 35px 40px 35px !important; 
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease, background-color 0.4s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    position: relative; 
}

/* Card Hover Elevation (The Zoom) */
.passage-service-card:hover {
    transform: scale(1.03); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.12); 
    z-index: 20; 
}

/* --- THE GLOBAL LINK FIX --- */
/* By breaking the absolute trap, this now covers the entire card */
.passage-service-card h2.wp-block-heading a::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 10;
}

/* --- FLEXBOX VISUAL REORDERING --- */
/* This aligns all elements vertically and pushes the title to the bottom without using absolute positioning */

/* 1. Illustration (Top) */
.passage-service-card > .passage-service-illustration {
    order: 1;
    width: 80px; 
    height: 80px;
    margin-bottom: 20px !important;
    transition: filter 0.4s ease;
}

/* 2. Catchphrase */
.passage-service-card > p.has-text-color {
    order: 2;
    margin-top: 5px !important;
    margin-bottom: 10px !important; 
    transition: color 0.3s ease;
}

/* 3. Main Paragraph */
.passage-service-card > p:not(.has-text-color) {
    order: 3;
    font-size: 0.95rem;
    line-height: 1.4 !important; 
    /* INCREASE THIS from 15px to 30px (or whatever spacing feels right) */
    margin-bottom: 30px; 
    transition: color 0.3s ease;
}

/* 4. Service Title (Pinned to bottom via auto-margin) */
.passage-service-card h2.wp-block-heading {
    order: 4;
    position: static !important; 
    /* KEEP THIS AS AUTO so they all perfectly align at the bottom of the card */
    margin-top: auto !important; 
    margin-bottom: 0 !important;
    height: 32px !important; 
    display: flex !important;
    align-items: center !important; 
    font-family: var(--wp--preset--font-family--benton-sans-condensed), "Benton Sans Condensed", sans-serif !important;
    font-size: 1rem !important;
    transition: color 0.3s ease;
}

.passage-service-card h2.wp-block-heading a {
    font-family: inherit !important;
}

/* --- THE PASSAGE ISOTYPE ICON --- */
.passage-card-icon-wrapper {
    position: absolute;
    bottom: 40px;
    right: 24px;
    width: 32px;
    height: 32px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
}

.psg-icon-ring { transition: stroke 0.3s ease; }
.psg-icon-arrow { transition: fill 0.3s ease; }


/* --- COLOR LOGIC: DEFAULT STATES --- */

/* 1. Audio Strategy (Blue) */
.card-blue h2, .card-blue h2 a { color: #0088cc !important; }
.card-blue .psg-icon-ring { stroke: #0088cc !important; }
.card-blue .psg-icon-arrow { fill: #0088cc !important; }

/* 2. Music & Scoring (Purple) */
.card-purple h2, .card-purple h2 a { color: #6b3d8c !important; }
.card-purple .psg-icon-ring { stroke: #6b3d8c !important; }
.card-purple .psg-icon-arrow { fill: #6b3d8c !important; }

/* 3. Sound for Brands (Red) */
.card-red h2, .card-red h2 a { color: #c71440 !important; }
.card-red .psg-icon-ring { stroke: #c71440 !important; }
.card-red .psg-icon-arrow { fill: #c71440 !important; }

/* 4. Licensing (Gold) */
.card-gold h2, .card-gold h2 a { color: #eca828 !important; }
.card-gold .psg-icon-ring { stroke: #eca828 !important; }
.card-gold .psg-icon-arrow { fill: #eca828 !important; }


/* --- HOVER STATES: INVERSE REVEAL (MUST BE AT THE VERY BOTTOM) --- */

/* 1. Background color triggers */
.card-blue:hover { background-color: #0088cc !important; }
.card-purple:hover { background-color: #6b3d8c !important; }
.card-red:hover { background-color: #c71440 !important; }
.card-gold:hover { background-color: #eca828 !important; }

/* 2. All text, links, and SVGs turn white on hover */
.passage-service-card:hover .passage-service-illustration { filter: brightness(0) invert(1) !important; }
.passage-service-card:hover > p,
.passage-service-card:hover h2,
.passage-service-card:hover h2 a { color: #ffffff !important; }

.passage-service-card:hover .psg-icon-ring { stroke: #ffffff !important; }
.passage-service-card:hover .psg-icon-arrow { fill: #ffffff !important; }
.passage-service-card:hover .passage-card-icon-wrapper { transform: scale(1.1) translateX(4px); }

/* --- FORCE FULLWIDTH FOR SERVICES PATTERN INSIDE PAGES --- */
.psg-services-section-wrapper {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

/* --- TABLET/LAPTOP OVERRIDE: 2x2 SERVICE CARDS (THE BULLETPROOF MATH METHOD) --- */
@media (min-width: 768px) and (max-width: 1199px) {
    /* 1. Force a Flex Row and push items to the opposite edges */
    body .psg-services-section-wrapper .wp-block-columns {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        
        /* We actively kill Gutenberg's buggy gap to take manual control */
        gap: 0 !important; 
    }
    
    /* 2. Force exact widths and manual bottom margins */
    body .psg-services-section-wrapper .wp-block-column {
        /* Exactly 50% width minus 20px (creates a perfect 40px center channel) */
        width: calc(50% - 20px) !important; 
        max-width: calc(50% - 20px) !important;
        flex: 0 0 calc(50% - 20px) !important; 
        
        /* Manual vertical spacing */
        margin-top: 0 !important;
        margin-bottom: 40px !important; 
        margin-left: 0 !important;
        margin-right: 0 !important;
        
        /* CRITICAL: Prevents your 40px inner padding from blowing out the card width */
        box-sizing: border-box !important; 
    }
}

/* --- MOBILE OVERRIDE: CATCHPHRASE TITLE SIZE --- */
@media (max-width: 767px) {
    /* Targets the Catchphrase ("Don't leave your sound to chance", etc.) */
    .passage-service-card > p.has-text-color {
        font-size: 1.38rem !important; /* Adjust this value up or down (e.g., 24px or 1.8rem) */
        line-height: 1.2 !important;  /* Keeps the two-line stack looking tight and professional */
    }
}

/* --- 19. CONTACT FORM UX --- */

.psg-minimal-form {
    width: 100%;
    display: block;
}

/* 1. Strip CF7 Paragraph Spacing */
.psg-minimal-form p {
    margin: 0 !important;
    padding: 0 !important;
}

.psg-minimal-form .form-row {
    display: flex;
    gap: 15px;
}

/* Vertical Rhythm */
.psg-minimal-form .form-group {
    margin-bottom: 20px;
    width: 100%;
}

.psg-minimal-form .form-group.half {
    width: 50%;
}

/* 2. Input Styling */
.psg-minimal-form input[type="text"],
.psg-minimal-form input[type="email"],
.psg-minimal-form select,
.psg-minimal-form textarea {
    width: 100%;
    background-color: #ffffff !important;
    border: 1px solid #cccccc !important; 
    border-radius: 10px !important; 
    padding: 16px 20px !important;
    font-size: 0.95rem;
    font-family: var(--wp--preset--font-family--bentonsans), sans-serif;
    color: #333333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important; 
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.psg-minimal-form input::placeholder,
.psg-minimal-form textarea::placeholder {
    color: #888888;
}

.psg-minimal-form textarea {
    resize: vertical;
    min-height: 120px;
}

.psg-minimal-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23888%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 12px !important;
    color: #888888; 
}

.psg-minimal-form input:focus,
.psg-minimal-form select:focus,
.psg-minimal-form textarea:focus {
    outline: none;
    border-color: #00AAE9 !important;
    box-shadow: 0 10px 30px rgba(0, 170, 233, 0.1) !important;
    transform: translateY(-2px);
}

/* 3. CF7 Error Messages */
.psg-minimal-form .wpcf7-not-valid-tip {
    font-size: 0.75rem !important;
    color: #e74c3c !important; 
    margin-top: 5px !important;
    font-weight: 500;
}

.psg-minimal-form .wpcf7-response-output {
    border-radius: 10px !important;
    font-size: 0.85rem !important;
    margin-top: 20px !important;
    padding: 15px !important;
}

/* 4. Checkbox Alignment */
.psg-consent-group {
    margin-top: 5px;
}

.psg-consent-group .wpcf7-list-item label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
}

.psg-consent-group input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    accent-color: #00AAE9;
    flex-shrink: 0;
}

.psg-consent-group span.wpcf7-list-item-label {
    font-size: 0.9rem !important;
    color: #555555;
    line-height: 1.2;
}

.psg-consent-group a {
    color: #00AAE9;
    text-decoration: underline;
}

/* 5. Legal Text Sizing */
.psg-legal-text,
.psg-legal-text p {
    font-size: 11px !important; 
    color: #a0a0a0 !important; 
    line-height: 1.4 !important;
    margin-top: 15px !important;
    margin-bottom: 25px !important;
    text-align: justify;
}

/* 6. Submit Button */
.psg-minimal-form .wpcf7-submit {
    width: 100%;
    background-color: #00AAE9 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 18px !important;
    font-family: var(--wp--preset--font-family--bentonsans), sans-serif;
    font-size: 1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 170, 233, 0.3) !important;
    transition: all 0.3s ease;
}

.psg-minimal-form .wpcf7-submit:hover {
    background-color: #0088cc !important;
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 170, 233, 0.4) !important;
}

/* Disabled State */
.psg-minimal-form .wpcf7-submit:disabled {
    background-color: #e0e0e0 !important;
    color: #a0a0a0 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Hide CF7 Loader */
.wpcf7-spinner {
    display: none !important;
}

@media screen and (max-width: 768px) {
    .psg-minimal-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    .psg-minimal-form .form-group.half {
        width: 100%;
    }
}


/* --- 20. CONTACT PAGE SPECIFICS --- */

/* 1. Contact Page Background */
body.page-id-83 {
    background-color: #f7f7f7 !important;
}

/* 2. Main Container Transparent Background */
body.page-id-83 .wp-site-blocks {
    background-color: transparent !important;
}

/* 3. Alignment */
.psg-minimal-form .psg-legal-text,
.psg-minimal-form .psg-legal-text p {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.psg-minimal-form .psg-consent-group {
    padding-left: 10px !important;
}

/* --- CYMATICS NOISE OVERLAY --- */
.cymatics-noise-overlay {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    pointer-events: none; 
    background-image: url('data:image/svg+xml,%3Csvg viewBox=%220 0 200 200%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cfilter id=%22noiseFilter%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%220.8%22 numOctaves=%223%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23noiseFilter)%22/%3E%3C/svg%3E'); 
    opacity: 0.33; 
    mix-blend-mode: soft-light; 
    z-index: 2;
}


/* --- 21. CF7 SYSTEM MESSAGES --- */

/* Remove Default CF7 Borders */
.wpcf7 form .wpcf7-response-output {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 25px 0 0 0 !important;
    font-family: var(--wp--preset--font-family--bentonsans), sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    text-align: left !important; 
}

/* Success Message */
.wpcf7 form.sent .wpcf7-response-output {
    color: #00AAE9 !important; 
}

/* Error Messages */
.wpcf7 form.invalid .wpcf


/* --- 22. SOLUTIONS EDITORIAL INDEX (GRID OVERRIDE) --- */

.psg-solutions-index {
    margin-top: 40px !important;
    margin-bottom: 40px !important;
}

/* 1. FORCE CSS GRID: Destroys Gutenberg flexbox and guarantees perfect alignment */
.psg-solution-row {
    display: grid !important;
    grid-template-columns: 20% 80% !important; /* 20% width for number, 80% for text */
    align-items: center !important; /* Absolute dead-center vertical alignment */
    border-top: 1px solid #eaeaec;
    padding: 30px 0 !important; /* Clean, symmetrical top & bottom padding */
    margin: 0 !important;
}

.psg-solution-row:last-child {
    border-bottom: 1px solid #eaeaec;
}

/* 2. STRIP COLUMN RULES: Turns Gutenberg columns into obedient grid cells */
.psg-solution-row .wp-block-column {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    display: block !important;
}

/* 3. ZERO OUT ALL SPACING: Kills all invisible margins on text */
.psg-solution-row .wp-block-column * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 4. RE-ADD CONTROLLED SPACING: Only a precise 10px gap between Title and Text */
.psg-solution-row .wp-block-column h1,
.psg-solution-row .wp-block-column h2,
.psg-solution-row .wp-block-column h3 {
    margin-bottom: 10px !important; 
}

/* 5. THE NUMBERS: Stripped of weird line-heights to center perfectly */
.psg-massive-number {
    font-family: var(--wp--preset--font-family--bentonmoddisp), "Benton Modern Display", sans-serif !important;
    font-size: 8rem !important; /* Perfect display size without breaking row height */
    line-height: 1 !important; 
    font-weight: 600;
    color: #f2f2f4 !important; 
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* --- HOVER INTERACTION: THE BLUE FADE --- */
.psg-solution-row .psg-massive-number,
.psg-solution-row h1,
.psg-solution-row h2,
.psg-solution-row h3,
.psg-solution-row h4,
.psg-solution-row p {
    transition: color 1s ease !important;
}

.psg-solution-row:hover {
    cursor: pointer;
}

.psg-solution-row:hover h1,
.psg-solution-row:hover h2,
.psg-solution-row:hover h3,
.psg-solution-row:hover h4,
.psg-solution-row:hover p {
    color: #00AAE9 !important; 
}

.psg-solution-row:hover .psg-massive-number {
    color: rgba(0, 170, 233, 0.4) !important; 
}

/* --- MOBILE RESPONSIVENESS (Triggers at 900px) --- */
@media (max-width: 899px) {
    .psg-solution-row {
        grid-template-columns: 100% !important; /* Stacks text under number */
        padding: 20px 0 !important;
        align-items: flex-start !important; 
    }
    
    .psg-massive-number {
        font-size: 5rem !important; 
        margin-bottom: 15px !important; /* Spacing between stacked number and title */
    }
}

/* --- MAKE THE ENTIRE ROW CLICKABLE --- */
.psg-solution-row {
    position: relative !important; 
}

.psg-solution-row a::after {
    content: "";
    position: absolute;
    inset: 0; /* Modern shorthand for top, bottom, left, right: 0 */
    z-index: 10; /* Pulls the invisible link to the very front */
}

.psg-solution-row h1 a,
.psg-solution-row h2 a,
.psg-solution-row h3 a,
.psg-solution-row p a,
.psg-solution-row a {
    text-decoration: none !important;
    color: inherit !important;
    font-family: inherit !important; /* Forces it to use your heading font */
    font-weight: inherit !important; /* Forces it to keep the bold/medium weight */
    font-size: inherit !important;
}

/* --- 23. AUDIENCES SECTION --- */

/* 1. Force Full-Width Bleed (Breaks the block out of restricted containers) */
.psg-force-bleed {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    margin-bottom: 0 !important; 
    margin-block-end: 0 !important; /* Overrides Gutenberg logical spacing */
    padding-left: 5vw !important; 
    padding-right: 5vw !important;
    padding-top: 80px !important; 
    padding-bottom: 80px !important;
    box-sizing: border-box !important;
}

/* Strip the block-gap margin from whatever block sits immediately below the bleed section */
.psg-force-bleed + * {
    margin-top: 0 !important;
    margin-block-start: 0 !important; /* Overrides Gutenberg logical spacing */
}

/* 2. Turn the bulleted list into an elegant 2-column grid */
.psg-audience-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* 2 equal columns */
    gap: 40px 60px !important; /* 40px vertical gap, 60px horizontal gap */
    list-style: none !important; /* Kills the bullet points */
    padding-left: 0 !important;
    margin-top: 60px !important; /* Separates it from the title */
}

/* 3. Style individual list items with an editorial top-border */
.psg-audience-list li {
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding-top: 20px !important;
    margin-bottom: 0 !important;
}

/* 4. Make the Target Audience punchy and readable */
.psg-audience-list strong {
    display: block !important;
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
    margin-bottom: 8px !important;
    color: #ffffff !important;
}

/* 5. Make the Service description subtle and clean */
.psg-audience-list em {
    display: block !important;
    font-size: 1rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-style: normal !important; /* Removes the slant for a more modern look */
    line-height: 1.4 !important;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 781px) {
    .psg-audience-list {
        grid-template-columns: 1fr !important; /* Stacks to a single column on mobile */
        gap: 30px !important;
    }
}

/* --- 24. TEMPLATE BOUNDARY GAP FIX --- */

/* 1. Nuke the spacing from the main content wrapper so the blue block sits flush at the bottom */
main > .wp-block-group {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* 2. Keep the Pattern flush to the block above it, but RESTORE its inner padding */
.psg-services-section-wrapper {
    margin-top: 0 !important;
    /* padding-top: 0 !important; <-- REMOVED so your text can breathe again! */
}

/* --- 25. EDITORIAL TEXT BLOCK (Services Index) --- */

/* 1. Lock the columns to the top and force the exact custom width */
.psg-editorial-columns {
    align-items: flex-start !important; 
    width: 100% !important;
    max-width: 1280px !important; /* Adjust this number until it perfectly matches your cards! */
    margin-left: auto !important; /* Centers the block horizontally */
    margin-right: auto !important; 
}

/* 2. Style the Left Column (The Preamble) */
.psg-editorial-columns > .wp-block-column:first-child h2 {
    margin-top: 0 !important;
    margin-bottom: 40px !important;
    line-height: 1.1 !important;
}

.psg-editorial-columns > .wp-block-column:first-child p {
    font-size: 1.15rem !important; 
    line-height: 1.5 !important;
    color: #000000 !important;
    font-weight: 600 !important;
}

/* 3. Style the Right Column (The Body) */
.psg-editorial-columns > .wp-block-column:last-child > p:first-of-type {
    margin-top: 0 !important; 
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #000000 !important;
    margin-bottom: 30px !important;
}

.psg-editorial-columns > .wp-block-column:last-child p {
    color: #444444; 
    line-height: 1.65 !important; 
    margin-bottom: 24px !important;
}

/* --- 26. PASSAGE FOOTER (Cinematic Bookend) --- */

/* --- KILL WORDPRESS DEFAULT FOOTER MARGIN --- */
footer.wp-block-template-part,
.wp-site-blocks > footer {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
}

/* 1. MASTER WRAPPER & GUTENBERG OVERRIDES */
.psg-footer-wrapper {
    background-color: #111111 !important; 
    color: #ffffff !important;
    margin-top: 0 !important; /* Gap killed */
    padding: 60px 5% 40px 5% !important; /* Keeps the internal breathing room */
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    box-sizing: border-box !important;
}

.psg-footer-wrapper .wp-block-group {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Kills the hidden margins and width limits Gutenberg forces on inner blocks */
.psg-footer-wrapper .is-layout-constrained > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
}

/* 2. THE 6-COLUMN GRID */
.psg-footer-grid {
    display: grid !important;
    width: 100% !important; 
    gap: 30px !important; 
    max-width: 1200px !important; 
    margin: 0 auto !important;
    padding: 0 0 60px 0 !important; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important; 
}

/* Desktop: 6 Columns (Logo + 5 Lists) */
@media (min-width: 1024px) { 
    .psg-footer-grid { 
grid-template-columns: 2.0fr 0.8fr 1.4fr 1.5fr 0.8fr 1.1fr !important;
    } 
    /* Force the final column (CONNECT) to dock to the far right edge */
    .psg-footer-grid > .wp-block-group:last-child {
        justify-self: end !important;
    }
}

/* Tablet: 3x2 Wrap (Perfectly balanced for 6 columns) */
@media (min-width: 768px) and (max-width: 1023px) { 
    .psg-footer-grid { 
        grid-template-columns: 1fr 1fr 1fr !important; 
        gap: 40px !important; 
    } 
    .psg-footer-grid > .wp-block-group:last-child { 
        justify-self: start !important; 
    } 
}

/* 3. TYPOGRAPHY & LINKS */
/* Section Headers */
.psg-footer-grid h2, .psg-footer-grid h3, .psg-footer-grid h4 {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.15em !important;
    color: rgba(255, 255, 255, 0.5) !important; 
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}

/* Force linked headers to perfectly match plain headers */
.psg-footer-grid h2 a, 
.psg-footer-grid h3 a, 
.psg-footer-grid h4 a {
    font-size: inherit !important;
    font-weight: inherit !important;
    text-transform: inherit !important;
    letter-spacing: inherit !important;
    color: inherit !important;
    display: inline !important; 
    margin-bottom: 0 !important;
    line-height: inherit !important; /* Forces perfect vertical alignment with plain headers */
    padding: 0 !important; /* Strips any residual anchor padding */
}

/* Standard Links & Text */
.psg-footer-grid p, .psg-footer-grid a, .psg-footer-grid strong {
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    margin: 0 !important; 
}

.psg-footer-grid a {
    display: inline-block !important; 
    margin-bottom: 6px !important; 
    transition: color 0.2s ease-in-out, opacity 0.2s ease-in-out !important; 
}

/* Hover States: Protects the theme's blue hover without muddy opacity */
.psg-footer-grid a:hover,
.psg-footer-grid a:focus {
    opacity: 1 !important; 
    background: transparent !important;
}

/* Ensure the header links light up pure white instead of blue */
.psg-footer-grid h2 a:hover, 
.psg-footer-grid h3 a:hover, 
.psg-footer-grid h4 a:hover {
    color: #ffffff !important;
}

/* 5. UTILITY BAR (Bottom Line) & SOCIALS */
.psg-footer-utility {
    width: 100% !important; 
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 30px 0 0 0 !important; 
}

.psg-utility-left a:hover { color: #ffffff !important; }

.psg-social-icons {
    display: flex;
    gap: 24px;
}

.psg-social-icons a {
    color: rgba(255, 255, 255, 0.7) !important;
    display: flex !important;
    transition: color 0.3s ease, transform 0.3s ease !important;
    margin: 0 !important;
}

.psg-social-icons a:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* 6. MOBILE RESPONSIVENESS */
@media (max-width: 767px) {
    .psg-footer-grid { 
        grid-template-columns: 1fr !important; 
        gap: 50px !important; 
        text-align: center !important; 
    }
    
    /* Hyper-specific logo alignment for mobile to override inline styles */
    div.psg-footer-wrapper div.psg-footer-logo-wrapper { 
        margin: 0 auto 10px auto !important; 
        transform: translateX(-5px) !important; 
        display: block !important; 
    }
    
    .psg-footer-utility-inner { 
        flex-direction: column !important; 
        text-align: center !important; 
        gap: 25px !important; 
    }
    
    /* Forces a wide gap to unstick the social icons for touch screens */
    .psg-social-icons { 
        justify-content: center !important; 
        width: 100% !important; 
        gap: 35px !important; 
    }
}

/* --- 27. ABOUT PAGE: PARTNER GRID --- */

/* 1. Desktop Spacing & Alignment */
.psg-partner-grid {
    align-items: flex-start !important;
    justify-content: center !important;
    margin-top: 40px !important;
    margin-bottom: 60px !important; 
    gap: 60px !important; /* Wide breathing room between columns */
}

/* 2. Force Vertical Stacking in Columns */
.psg-partner-grid .wp-block-column {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important; 
    text-align: center !important;
}

/* 3. The Bounding Box (Universal Wrapper for alignment) */
.psg-partner-grid .wp-block-image {
    /* Hard-force the wrapper to the center of the column */
    margin: 0 auto 25px auto !important; 
    align-self: center !important; 
    
    height: 75px !important; 
    width: 100% !important;
    display: flex !important;
    align-items: center !important; 
    justify-content: center !important; 
    text-align: center !important; 
}

/* 4. Global Logo Treatment (Universal Centering & Styling) */
.psg-partner-grid img {
    width: auto !important;
    height: auto !important;
    opacity: 0.75 !important; 
    filter: grayscale(100%); 
    transition: all 0.4s ease !important;
    display: block !important;
    
    /* Double-lock centering inside the figure */
    margin-left: auto !important; 
    margin-right: auto !important; 
    object-position: center !important; /* Forces SVGs to paint in the middle */
}

/* The Hover Reveal */
.psg-partner-grid img:hover {
    opacity: 1 !important;
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* 5. Editorial Text */
.psg-partner-grid p {
    font-size: 0.85rem !important; 
    line-height: 1.5 !important;
    color: #666666 !important; 
    margin: 0 !important;
}

/* 6. OPTICAL BALANCING (Strictly for visual weight sizing) */
.psg-partner-grid .wp-block-column:nth-child(1) img { max-height: 40px !important; max-width: 110px !important; } /* Music Tech */
.psg-partner-grid .wp-block-column:nth-child(2) img { max-height: 42px !important; max-width: 100% !important; } /* Modelo */
.psg-partner-grid .wp-block-column:nth-child(3) img { max-height: 55px !important; max-width: 100% !important; } /* French Tech */
.psg-partner-grid .wp-block-column:nth-child(4) img { max-height: 28px !important; max-width: 115px !important; } /* Curtis */  


/* 7. Mobile Overrides (MUST be at the absolute bottom to override desktop rules) */
@media (max-width: 767px) {
    .psg-partner-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; /* 2x2 grid */
        gap: 40px 20px !important; 
    }
    
    .psg-partner-grid .wp-block-image {
        height: 55px !important; 
        margin-bottom: 15px !important;
    }

    /* Shrink all logos proportionally for mobile */
    .psg-partner-grid img {
        max-width: 120px !important;
    }
    
    /* Slightly reduce the tall French Tech logo so it fits the mobile bounding box */
    .psg-partner-grid .wp-block-column:nth-child(3) img { max-height: 45px !important; }
    
    .psg-partner-grid p {
        font-size: 0.8rem !important; 
    }
}

/* ==========================================================================
   PASSAGE: 404 MINIMALIST LAYOUT (V2 - Safely Scoped)
   ========================================================================== */

/* --- 1. Base Container & Typography (Scoped to MAIN to protect Footer) --- */
.error404 main#wp--skip-link--target {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 10vh 5vw;
}

.error404 main h1 {
    font-size: clamp(60px, 12vw, 120px) !important;
    line-height: 0.85 !important;
    letter-spacing: -0.04em !important;
    text-align: center;
    margin-bottom: 40px !important;
    text-transform: uppercase;
}

.error404 main p {
    max-width: 450px !important;
    margin: 0 auto 30px auto !important;
    text-align: center !important;
}

/* --- 2. Fused Search Form (Universal Component) --- */
.wp-block-search {
    width: 100%;
    max-width: 450px !important;
    margin: 0 auto !important;
}

.wp-block-search__inside-wrapper {
    border: 1px solid #ccc !important;
    border-radius: 10px !important;
    overflow: hidden !important; 
    padding: 0 !important;
}

.wp-block-search__input {
    background: transparent !important;
    color: #000 !important; 
    border: none !important;
    border-radius: 0 !important;
    padding: 15px 20px !important;
    text-align: left !important;
    font-size: 16px !important;
}

.wp-block-search__input::placeholder {
    color: #888 !important;
}

.wp-block-search__input:focus {
    background: #fafafa !important;
    outline: none !important;
}

/* Nuke the native browser "X" clear button */
.wp-block-search__input::-webkit-search-decoration,
.wp-block-search__input::-webkit-search-cancel-button,
.wp-block-search__input::-webkit-search-results-button,
.wp-block-search__input::-webkit-search-results-decoration {
    -webkit-appearance: none !important;
    display: none !important;
}

.wp-block-search__button {
    background-color: #0088cc !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 25px !important;
    margin: 0 !important;
    transition: background-color 0.3s ease !important;
}

.wp-block-search__button:hover {
    background-color: #00AAE9 !important;
}

/* --- 3. Escape Routes / Stacked Links (Universal Component) --- */
.psg-404-nav-links {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    text-align: center;
}

.psg-404-nav-links a {
    display: block !important; 
    width: fit-content;
    margin: 0 auto 15px auto !important;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.psg-404-nav-links a::before {
    content: '→';
    margin-right: 10px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.psg-404-nav-links a:hover {
    color: #00AAE9;
}

.psg-404-nav-links a:hover::before {
    transform: translateX(4px);
}