/*
Theme Name: Cristo Rey
Theme URI: https://parroquiacristorey.com
Author: Jan Dev
Author URI: https://parroquiacristorey.com
Description: Tema personalizado para la Parroquia Cristo Rey del Universo.
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 7.2
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: assembler
Tags: blog, one-column, three-columns, wide-blocks, block-patterns, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, rtl-language-support, style-variations, template-editing, theme-options, threaded-comments, translation-ready
*/

/* =========================================
   DESIGN SYSTEM ENGINE — "The Editorial Layer"
   Apple Bezier: cubic-bezier(0.23, 1, 0.32, 1)
   ========================================= */

:root {
    --cr-ease: cubic-bezier(0.23, 1, 0.32, 1);
    --cr-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --cr-ambient-bg: var(--wp--preset--color--theme-1);
    --cr-depth-perspective: 1200px;
}

body {
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.8s var(--cr-ease);
    perspective: var(--cr-depth-perspective);
}

/* Set default line height for font size presets. */

.has-xx-large-font-size,
.has-xxx-large-font-size {
    line-height: 1;
}

/* ====== Neumorphic Button System ====== */

.wp-element-button,
.wp-block-button__link {
    transition: transform 0.4s var(--cr-ease),
        box-shadow 0.4s var(--cr-ease),
        background-color 0.4s var(--cr-ease);
    position: relative;
    box-shadow:
        3px 3px 8px rgba(11, 29, 55, 0.08),
        -2px -2px 6px rgba(255, 255, 255, 0.6);
}

.wp-element-button:hover,
.wp-block-button__link:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow:
        5px 5px 16px rgba(11, 29, 55, 0.12),
        -3px -3px 10px rgba(255, 255, 255, 0.7);
}

.wp-element-button:active,
.wp-block-button__link:active {
    transform: translateY(0) scale(0.98);
    box-shadow:
        inset 2px 2px 5px rgba(11, 29, 55, 0.1),
        inset -1px -1px 3px rgba(255, 255, 255, 0.4);
    transition-duration: 0.1s;
}

/* Ensure button groups and their parent containers don't clip hover effects */
.wp-block-buttons,
.wp-block-buttons .wp-block-button {
    overflow: visible !important;
}

/* Hero and section containers — allow button hover to breathe */
.hero-video-container,
.hero-content,
.bento-item,
.bento-item>*,
.service-card,
.service-card>* {
    overflow: visible !important;
}

/* Sticky Header */
.is-sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--wp--preset--color--theme-1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.5s var(--cr-ease);
}

/* ====== Scroll Reveal (Opacity + Translate) ====== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--cr-ease),
        transform 0.9s var(--cr-ease);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ====== Mask Reveal (Clip-Path Choreography) ====== */
.reveal-mask {
    /* Negative inset allows child shadows and hover effects to overflow the clip boundary */
    clip-path: inset(100% -20px -20px -20px);
    opacity: 0;
    transition: clip-path 1s var(--cr-ease),
        opacity 0.6s var(--cr-ease);
    will-change: clip-path, opacity;
}

.reveal-mask.active {
    /* -20px padding on all sides lets hover box-shadows and translateY show unclipped */
    clip-path: inset(-20px -20px -20px -20px);
    opacity: 1;
}

/* Mask from left */
.reveal-mask--left {
    clip-path: inset(0 100% 0 0);
}

.reveal-mask--left.active {
    clip-path: inset(-20px -20px -20px -20px);
}

/* Mask from right */
.reveal-mask--right {
    clip-path: inset(0 0 0 100%);
}

.reveal-mask--right.active {
    clip-path: inset(-20px -20px -20px -20px);
}

/* ====== PREMIUM HEADER SYSTEM ====== */

.cr-premium-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    background-color: transparent;
    transition: all 0.5s var(--cr-ease);
}

.cr-premium-header.scrolled {
    background-color: rgba(240, 238, 233, 0.9);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.cr-header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.5s var(--cr-ease);
}

.cr-premium-header.scrolled .cr-header-container {
    padding: 0.5rem 2rem;
}

/* Brand */
.cr-brand-link {
    text-decoration: none !important;
}

.cr-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cr-brand-title {
    display: block;
    font-family: var(--wp--preset--font-family--poppins);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--wp--preset--color--theme-2);
}

.cr-brand-subtitle {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--wp--preset--color--theme-6);
    transition: opacity 0.4s ease;
}

.cr-premium-header.scrolled .cr-brand-subtitle {
    opacity: 0;
}

/* Desktop Nav */
.cr-desktop-nav {
    display: none;
}

@media (min-width: 900px) {
    .cr-desktop-nav {
        display: block;
    }
}

.cr-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.cr-nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--wp--preset--color--theme-2) !important;
    text-decoration: none !important;
    position: relative;
    padding: 0.25rem 0;
}

.cr-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--wp--preset--color--theme-3);
    transition: width 0.4s var(--cr-ease), left 0.4s var(--cr-ease);
}

.cr-nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* Desktop CTAs */
.cr-header-ctas {
    display: none;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 900px) {
    .cr-header-ctas {
        display: flex;
    }
}

/* Premium Button Styles */
.cr-btn {
    text-decoration: none !important;
    font-family: var(--wp--preset--font-family--poppins);
    font-weight: 500;
    transition: all 0.4s var(--cr-ease);
}

.cr-btn-text {
    font-size: 0.85rem;
    color: var(--wp--preset--color--theme-5) !important;
}

.cr-btn-text:hover {
    color: var(--wp--preset--color--theme-3) !important;
}

.cr-btn-pill {
    font-size: 0.85rem;
    padding: 0.6rem 1.75rem;
    border-radius: 100px;
    background: var(--wp--preset--color--theme-2);
    color: var(--wp--preset--color--theme-1) !important;
}

.cr-btn-pill:hover {
    background: var(--wp--preset--color--theme-5);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(11, 29, 55, 0.15);
}

/* Hamburger Toggle */
.cr-mobile-toggle {
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10000;
    padding: 10px;
}

@media (min-width: 900px) {
    .cr-mobile-toggle {
        display: none;
    }
}

.cr-hamburger {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cr-hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--wp--preset--color--theme-2);
    transition: transform 0.4s var(--cr-ease), opacity 0.4s ease;
}

.cr-mobile-toggle[aria-expanded="true"] .cr-hamburger span:first-child {
    transform: translateY(8px) rotate(45deg);
}

.cr-mobile-toggle[aria-expanded="true"] .cr-hamburger span:last-child {
    transform: translateY(-8.5px) rotate(-45deg);
}

/* Mobile Overlay Menu */
.cr-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(240, 238, 233, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s var(--cr-ease), visibility 0.5s;
}

.cr-mobile-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.cr-mobile-overlay-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
}

.cr-mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cr-mobile-nav-link {
    font-size: 2rem;
    font-weight: 300;
    color: var(--wp--preset--color--theme-2) !important;
    text-decoration: none !important;
}

.cr-mobile-ctas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.cr-btn-text-large {
    font-size: 1.1rem;
    color: var(--wp--preset--color--theme-5) !important;
}

.cr-btn-pill-large {
    font-size: 1.1rem;
    padding: 1rem 3rem;
    border-radius: 100px;
    background: var(--wp--preset--color--theme-2);
    color: var(--wp--preset--color--theme-1) !important;
}

/* Stagger Animation for Mobile Menu */
.cr-mobile-nav-item,
.cr-mobile-ctas {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--cr-ease), transform 0.6s var(--cr-ease);
    transition-delay: calc(var(--stagger) * 0.1s);
}

.cr-mobile-overlay.is-active .cr-mobile-nav-item,
.cr-mobile-overlay.is-active .cr-mobile-ctas {
    opacity: 1;
    transform: translateY(0);
}

/* Forms: Thumb-friendly */
input:not([type=submit]):not([type=checkbox]):not([type=radio]):not([type=range]),
textarea {
    min-height: 50px;
    padding: 12px 16px;
    font-size: 16px;
}

/* Hero Video */
.hero-video-section {
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

.hero-video-container {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(11, 29, 55, 0.7), rgba(11, 29, 55, 0.5));
    /* Deep Blue gradient */
    z-index: 0;
}

.hero-video-container>.wp-block-group {
    position: relative;
    z-index: 1;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
    font-family: var(--wp--preset--font-family--cinzel-decorative) !important;
    letter-spacing: 0.1em;
}

.header-cta-buttons {
    margin-left: 20px;
}

@media (max-width: 782px) {
    .header-cta-buttons {
        display: none;
    }
}

/* Fields */

label,
.jetpack-field-label .rich-text.jetpack-field-label__input,
.contact-form .grunion-checkbox-multiple-options legend,
.contact-form .grunion-radio-options legend,
.wp-block-jetpack-contact-form-container .wp-block-jetpack-contact-form label {
    display: inline-block;
    font-size: var(--wp--preset--font-size--small);
    margin-bottom: 0.25em;
    font-weight: inherit;
}

textarea,
input:not([type=submit]):not([type=checkbox]):not([type=radio]):not([type=range]),
.wp-block-post-comments-form textarea,
.wp-block-post-comments-form input:not([type=submit]):not([type=checkbox]):not([type=radio]),
.jetpack-contact-form .jetpack-field .jetpack-field__input,
.jetpack-contact-form .jetpack-field .jetpack-field__textarea {
    backdrop-filter: saturate(1.075);
    background-color: transparent;
    border-color: currentColor;
    border-style: solid;
    border-radius: 6px;
    border-width: 1px;
    box-shadow: none;
    box-sizing: border-box;
    color: currentColor;
    filter: brightness(1.05);
    font-size: var(--wp--preset--font-size--small);
    font-weight: inherit;
    line-height: 1.5;
    min-height: 42px;
    padding: 0.8rem 1rem;
    width: 100%;
}

textarea:focus,
input:not([type=submit]):focus,
.wp-block-post-comments-form textarea:focus,
.wp-block-post-comments-form input:not([type=submit]):not([type=checkbox]):not([type=radio]):focus {
    outline: 1px solid currentColor;
}

textarea::placeholder,
.input::placeholder,
.wp-block-jetpack-subscriptions__form .components-base-control__field input::placeholder {
    color: color-mix(in srgb, currentColor 60%, transparent);
}

/* Padding adjustment for input fiedls in Woo */
.wc-block-components-form .wc-block-components-text-input input:-webkit-autofill,
.wc-block-components-form .wc-block-components-text-input.is-active input[type=email],
.wc-block-components-form .wc-block-components-text-input.is-active input[type=number],
.wc-block-components-form .wc-block-components-text-input.is-active input[type=password],
.wc-block-components-form .wc-block-components-text-input.is-active input[type=tel],
.wc-block-components-form .wc-block-components-text-input.is-active input[type=text],
.wc-block-components-form .wc-block-components-text-input.is-active input[type=url],
.wc-block-components-text-input input:-webkit-autofill,
.wc-block-components-text-input.is-active input[type=email],
.wc-block-components-text-input.is-active input[type=number],
.wc-block-components-text-input.is-active input[type=password],
.wc-block-components-text-input.is-active input[type=tel],
.wc-block-components-text-input.is-active input[type=text],
.wc-block-components-text-input.is-active input[type=url] {
    padding: 1.5em .5em .5em;
}


/* Jetpack Forms: Clean up errors */

.contact-form__error {
    font-size: 13px;
}

.contact-form__input-error {
    font-size: 13px;
    gap: 8px;
}

.contact-form__input-error .contact-form__warning-icon {
    border-width: 0;
}

/* Jetpack Forms: Animated block style tweaks */

.contact-form .is-style-animated .grunion-field-wrap.grunion-field-select-wrap .animated-label__label label,
.contact-form .is-style-animated .grunion-field-wrap .grunion-field.has-placeholder~.animated-label__label label,
.contact-form .is-style-animated .grunion-field-wrap .grunion-field:focus~.animated-label__label label,
.contact-form .is-style-animated .grunion-field-wrap .grunion-field:not(:placeholder-shown)~.animated-label__label label {
    opacity: 0.7;
    font-size: 11px;
}

/* Styling for hero areas. */
.header-cover .wp-block-template-part {
    max-width: none;
}

.header-cover .wp-block-template-part>.wp-block-group {
    padding-left: 0;
    padding-right: 0;
}

/* Cover block styles */
.wp-block-cover[class*="is-style-section"]:not(.is-style-default) .wp-block-cover__image-background {
    opacity: 0.25;
}

.wp-block-cover[class*="is-style-section"]:not(.is-style-default) .wp-block-cover__background {
    opacity: 0;
}

:root :where(.wp-block-cover.is-light) {
    color: var(--wp--preset--color--theme-5, #000);
}

.wp-block-cover[class*="is-style-section"]:not(.is-style-default) .wp-block-cover__background {
    opacity: 0;
}

/* Make sure footers have no margin. */
footer {
    margin-top: 0 !important;
}

/* Social Links: Better default color. */

.wp-block-social-links.is-style-logos-only li.wp-social-link {
    color: currentcolor;
}

.wp-block-social-links.is-style-logos-only .wp-social-link svg {
    height: 1em;
    width: 1em;
}

.wp-block-social-links.has-small-icon-size {
    font-size: 20px;
}

/* Navigation: Remove row gap to improve wrapping behavior */
.wp-block-navigation__container {
    row-gap: 0;
}

/* Move header core/navigation to the right on mobile. */

.order-0 {
    order: 0;
}

.order-1 {
    order: 1;
}

.grow-0 {
    flex-grow: 0;
}

.grow {
    flex-grow: 1;
}

@media (min-width: 600px) {

    .md\:order-0 {
        order: 0;
    }

    .md\:order-1 {
        order: 1;
    }

    .md\:grow-0 {
        flex-grow: 0;
    }

    .md\:grow {
        flex-grow: 1;
    }

}

.overflow-hidden {
    overflow: hidden;
}

/* Utility class for wide and full images with aspect ratios, as core does not support this yet. */
.aspect-16\/9 {
    aspect-ratio: 16/9;
}

.aspect-16\/9 img,
.aspect-16\/9 .components-placeholder {
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Ensure cropping works. */
.aspect-16\/9 .wp-block-image__crop-area,
.aspect-16\/9 .wp-block-image__crop-area img {
    aspect-ratio: unset;
}

/* WooCommerce Catalog Sorting Styles */
.wc-block-catalog-sorting {
    position: relative;
}

.wc-block-catalog-sorting>div,
.wc-block-catalog-sorting .woocommerce-ordering {
    align-items: center;
    display: flex;
    gap: 8px;
}

.wc-block-catalog-sorting>div>label,
.woocommerce .woocommerce-ordering>label {
    margin: 0;
    text-wrap: nowrap;
}

.wc-block-catalog-sorting select.orderby {
    appearance: none;
    background-color: transparent;
    border: 1px solid color-mix(in srgb, currentColor 50%, transparent);
    font-family: inherit;
    font-size: inherit;
    border-radius: 6px;
    color: currentColor;
    cursor: pointer;
    padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    width: 100%;
}

/* Arrow using CSS triangle for dynamic color */
.wc-block-catalog-sorting::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 0.35em solid transparent;
    border-right: 0.35em solid transparent;
    border-top: 0.4em solid currentColor;
    pointer-events: none;
}

/* Make sure the CSS triangle stays the same when it's hovered or selected */
.is-outline-mode .block-editor-block-list__block.wc-block-catalog-sorting:not(.remove-outline):not(.rich-text):not([contenteditable=true]).is-selected:after,
.is-outline-mode .block-editor-block-list__block.wc-block-catalog-sorting:not(.remove-outline).is-hovered:not(.is-selected):after {
    left: auto;
    outline-color: transparent;
    right: 0.75rem;
    top: 50%;
}

/* Remove an extra border from the qty selector */
.wc-block-components-quantity-selector input.input-text.qty.text,
input:not([type=submit]):not([type=checkbox]):not([type=radio]):not([type=range]).wc-block-components-quantity-selector__input {
    border-style: none;
}

/* Reset padding for the qty selector */
input:not([type=submit]):not([type=checkbox]):not([type=radio]):not([type=range]).qty {
    padding: inherit;
}

/* Remove unwated right margin the qty selector */
.woocommerce div.product form.cart div.quantity .qty {
    margin-right: 0;
}

/* Fix the qty selector height so it matches with the button next to it */
.wp-block-add-to-cart-with-options .wc-block-components-quantity-selector {
    height: 100%;
}

/* Make sure the qty selector's height is the same as the button next to it in the editor */
.wc-block-add-to-cart-with-options__quantity-selector>div,
.wc-block-add-to-cart-with-options__quantity-selector .wc-block-components-quantity-selector {
    height: 100%;
}

/* Remove unnecessary bottom margin from the variation selector labels */
.woocommerce-page label.wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute-name,
.woocommerce-page label.wc-block-add-to-cart-with-options-variation-selector-attribute-options__pill {
    margin-bottom: 0;
}

/* Remove unwanted top margin from the title of the order confirmation page template */
.wc-block-order-confirmation-status h1 {
    margin-top: 0;
}

/* Add top margin to the express checkout */
.wcpay-express-checkout-wrapper {
    margin-top: var(--wp--style--block-gap);
}

/* Remove unwanted margin from the attribute value */
.wp-block-product-specifications-item__value p {
    margin: 0;
}

/* Remove underline from the attribute value */
.wp-block-product-specifications-item__value p a {
    text-decoration: none;
}

.wp-block-woocommerce-product-specifications th,
.wp-block-woocommerce-product-specifications td {
    border-color: color-mix(in srgb, currentColor 30%, transparent);
}

/* Reset unwanted margins */
.wc-block-components-product-summary,
.wc-block-components-product-summary p {
    margin: 0;
}

/* Make sure the paragraph has a line break */
.wc-block-components-product-summary p+p {
    margin-top: var(--wp--style--block-gap);
}

/* Remove underline from the product name inside cart */
.wc-block-cart-item__wrap .wc-block-components-product-name {
    text-decoration: none;
}

/* Utility class for reversing the order of rows */
@media (min-width: 782px) {
    .wp-block-columns.row-reverse {
        flex-direction: row-reverse;
    }
}

/* Reduce the size of the cart badge. */
.theme-assembler .wc-block-mini-cart__badge {
    font-size: .6em;
}

/* Fix Woo input field */
.theme-assembler .woocommerce div.product form.cart div.quantity .qty {
    min-width: 80px;
}

/* ====== Pattern-Specific Styles ====== */

/* Verbum Domini Cards (scoped to post templates) */
.wp-block-post-template .wp-block-group {
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
}

.wp-block-post-template .wp-block-group:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(11, 29, 55, 0.12);
}

/* Service Cards (scoped class — add .service-card to columns) */
.service-card {
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(11, 29, 55, 0.1);
}

/* Ministry / Cover Hero */
.wp-block-cover__inner-container h1 {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    font-family: var(--wp--preset--font-family--cinzel-decorative);
}

/* Sacrament Form Styling */
.sacrament-form input:focus,
.sacrament-form select:focus {
    outline: none;
    border-color: var(--wp--preset--color--theme-3) !important;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* Member Portal Card */
.wp-block-column.has-theme-5-background-color {
    border-radius: 4px;
    overflow: hidden;
}

/* Footer link cleanup */
footer a {
    color: var(--wp--preset--color--theme-4);
    text-decoration: none;
    transition: color 0.4s var(--cr-ease);
}

footer a:hover {
    color: var(--wp--preset--color--theme-3);
}

footer .wp-block-list {
    list-style: none;
    padding-left: 0;
}

footer .wp-block-list li {
    padding: 4px 0;
}

/* =========================================
   Core Enhancements & Accessibility
   ========================================= */

/* 1. Global Focus Styles (Accessibility) */
:focus-visible {
    outline: 2px solid var(--wp--preset--color--theme-3);
    outline-offset: 2px;
}

/* 2. Skip Link */
.skip-link {
    position: absolute;
    top: -9999px;
    left: 1rem;
    z-index: 9999;
    padding: 1rem;
    background-color: var(--wp--preset--color--theme-5);
    color: var(--wp--preset--color--theme-3);
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
    opacity: 0;
}

.skip-link:focus {
    top: 1rem;
    opacity: 1;
}

/* 3. Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal,
    .reveal-mask,
    .reveal-mask--left,
    .reveal-mask--right {
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
    }
}

/* 4. Button Variants (Utility Classes) */
.btn--primary,
.wp-block-button__link.is-style-fill {
    background-color: var(--wp--preset--color--theme-2);
    color: var(--wp--preset--color--theme-1);
    border: 1px solid var(--wp--preset--color--theme-2);
}

.btn--primary:hover,
.wp-block-button__link.is-style-fill:hover {
    background-color: var(--wp--preset--color--theme-5);
    border-color: var(--wp--preset--color--theme-5);
    color: var(--wp--preset--color--theme-3);
}

.btn--secondary,
.wp-block-button__link.is-style-outline {
    background-color: transparent;
    color: var(--wp--preset--color--theme-2);
    border: 1px solid currentColor;
}

.btn--secondary:hover,
.wp-block-button__link.is-style-outline:hover {
    background-color: var(--wp--preset--color--theme-5);
    color: var(--wp--preset--color--theme-4);
    border-color: var(--wp--preset--color--theme-5);
}

.btn--ghost {
    background: transparent;
    color: var(--wp--preset--color--theme-2);
    border: none;
    box-shadow: none;
    text-decoration: underline;
}

.btn--ghost:hover {
    color: var(--wp--preset--color--theme-3);
    transform: none;
    box-shadow: none;
}

/* 5. Glassmorphism Utility */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* 6. Sticky Header State */
.is-sticky-header.scrolled {
    padding-top: var(--wp--preset--spacing--10) !important;
    padding-bottom: var(--wp--preset--spacing--10) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    background-color: rgba(240, 238, 233, 0.92);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

/* 7. Staggered Reveals (8 levels) */
.reveal-delay-1 {
    transition-delay: 80ms;
}

.reveal-delay-2 {
    transition-delay: 160ms;
}

.reveal-delay-3 {
    transition-delay: 240ms;
}

.reveal-delay-4 {
    transition-delay: 320ms;
}

.reveal-delay-5 {
    transition-delay: 400ms;
}

.reveal-delay-6 {
    transition-delay: 480ms;
}

.reveal-delay-7 {
    transition-delay: 560ms;
}

.reveal-delay-8 {
    transition-delay: 640ms;
}

/* =========================================
   Bento Grid 2.0 — Modular Boxes
   ========================================= */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(16px, 2vw, 24px);
    width: 100%;
}

.bento-item {
    border-radius: 16px;
    padding: clamp(24px, 3vw, 40px);
    background: var(--wp--preset--color--theme-4);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow:
        4px 4px 12px rgba(11, 29, 55, 0.06),
        -2px -2px 8px rgba(255, 255, 255, 0.7);
    transition: transform 0.5s var(--cr-ease),
        box-shadow 0.5s var(--cr-ease);
    overflow: hidden;
}

.bento-item:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        8px 8px 24px rgba(11, 29, 55, 0.1),
        -4px -4px 12px rgba(255, 255, 255, 0.8);
}

/* Bento Span Variants */
.bento-item--wide {
    grid-column: span 2;
}

.bento-item--tall {
    grid-row: span 2;
}

@media (max-width: 768px) {

    .bento-item--wide,
    .bento-item--tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* =========================================
   Z-Axis Depth System
   ========================================= */

.depth-container {
    perspective: var(--cr-depth-perspective);
    transform-style: preserve-3d;
}

.depth-layer-1 {
    transform: translateZ(10px);
}

.depth-layer-2 {
    transform: translateZ(25px);
}

.depth-layer-3 {
    transform: translateZ(50px);
}



/* =========================================
   Color-Block Ambient Transitions
   ========================================= */

[data-bg-color] {
    transition: background-color 0.8s var(--cr-ease);
}

/* =========================================
   Performance Optimizations
   ========================================= */

/* content-visibility for below-fold sections */
.wp-block-group.alignfull:nth-child(n+3) {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* GPU acceleration hints for animating elements */
.reveal-mask,
.bento-item,
.cr-cursor {
    will-change: auto;
}

.reveal-mask.active,
.bento-item:hover {
    will-change: transform, opacity;
}