/* ==========================================================================
   GREY BOX — Premium animation layer
   Lightweight CSS + GSAP companion (see greybox-animations.js)
   ========================================================================== */

:root {
    --gb-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --gb-ease-luxury: cubic-bezier(0.16, 1, 0.3, 1);
    --gb-gold-glow: rgba(115, 75, 223, 0.35);
    --gb-header-offset: 100px;
}

html {
    scroll-behavior: smooth;
}

[id] {
    scroll-margin-top: var(--gb-header-offset);
}

/* Page load */
body.greybox-site.gb-is-loading {
    overflow: hidden;
}

body.greybox-site:not(.gb-is-loading) {
    animation: gb-page-in 0.6s var(--gb-ease-luxury) both;
}

@keyframes gb-page-in {
    from { opacity: 0.92; }
    to { opacity: 1; }
}

.preloader .loading {
    animation: gb-spin 0.9s linear infinite;
}

.preloader .greybox-preloader-brand {
    animation: gb-pulse-text 1.6s ease-in-out infinite;
}

@keyframes gb-spin {
    to { transform: rotate(360deg); }
}

@keyframes gb-pulse-text {
    0%, 100% { opacity: 0.65; letter-spacing: 0.08em; }
    50% { opacity: 1; letter-spacing: 0.14em; }
}

/* Hero parallax layer + floating shapes */
.gb-hero {
    position: relative;
    overflow: hidden;
}

.gb-hero-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.gb-hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.gb-hero-video-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(22, 26, 45, 0.82) 0%, rgba(22, 26, 45, 0.55) 45%, rgba(22, 26, 45, 0.78) 100%),
        radial-gradient(ellipse at 20% 80%, rgba(115, 75, 223, 0.18), transparent 55%);
    pointer-events: none;
}

.gb-hero--video .gb-hero-parallax {
    display: none;
}

.gb-hero .container,
.gb-hero .hero-content-metal,
.gb-hero .hero-image-metal {
    position: relative;
    z-index: 2;
}

.gb-float-shapes {
    z-index: 1;
}

.mfp-video-inline {
    max-width: min(960px, 92vw);
    margin: 0 auto;
}

.mfp-video-inline video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    background: #000;
}

.gb-hero-video-card {
    position: relative;
    margin: 0;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.gb-hero-video-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gb-hero-video-card__player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gb-hero-video-card__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 26, 45, 0.25);
    color: #fff;
    font-size: 1.5rem;
    transition: background 0.35s ease;
}

.gb-hero-video-card__play:hover {
    background: rgba(22, 26, 45, 0.4);
    color: #fff;
}

.gb-hero-video-card__play::after {
    content: '';
    position: absolute;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: 2px solid rgba(115, 75, 223, 0.55);
    animation: gb-video-pulse 2s ease-out infinite;
}

.hero-metal.gb-hero--video::before,
.hero-metal.gb-hero--video::after {
    display: none;
}

.hero-metal.gb-hero--video {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.gb-hero-parallax {
    position: absolute;
    inset: -8% 0 0;
    z-index: 0;
    background: inherit;
    background-size: cover;
    background-position: center;
    pointer-events: none;
    will-change: transform;
}

.hero-metal > .container,
.hero-metal > .gb-float-shapes {
    position: relative;
    z-index: 2;
}

.gb-float-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.gb-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(0.5px);
    opacity: 0.45;
    will-change: transform;
}

.gb-shape--1 {
    width: 280px;
    height: 280px;
    top: 12%;
    right: 8%;
    background: radial-gradient(circle, rgba(115, 75, 223, 0.35) 0%, transparent 70%);
    animation: gb-float-1 14s ease-in-out infinite;
}

.gb-shape--2 {
    width: 160px;
    height: 160px;
    bottom: 18%;
    left: 6%;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.28) 0%, transparent 70%);
    animation: gb-float-2 11s ease-in-out infinite;
}

.gb-shape--3 {
    width: 90px;
    height: 90px;
    top: 42%;
    left: 42%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    animation: gb-float-3 9s ease-in-out infinite;
}

@keyframes gb-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-18px, 22px) scale(1.06); }
}

@keyframes gb-float-2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(24px, -16px); }
}

@keyframes gb-float-3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-12px, 14px) rotate(12deg); }
}

/* Scroll reveal helpers (GSAP sets initial state; CSS fallback) */
.gb-reveal-pending {
    opacity: 0;
    transform: translate3d(0, 32px, 0);
}

.gb-reveal-left.gb-reveal-pending {
    transform: translate3d(-40px, 0, 0);
}

.gb-reveal-right.gb-reveal-pending {
    transform: translate3d(40px, 0, 0);
}

/* Sticky header polish */
header.main-header .header-sticky {
    transition: transform 0.45s var(--gb-ease-luxury),
                box-shadow 0.45s var(--gb-ease-luxury),
                background-color 0.45s ease,
                padding 0.35s ease;
}

header.main-header .header-sticky.gb-header-scrolled {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

header.main-header .header-sticky.gb-header-hidden {
    transform: translateY(calc(-100% - 2px));
}

/* Buttons */
.btn-default,
.btn-highlighted,
.btn-border,
.readmore-btn {
    transition: transform 0.35s var(--gb-ease-out),
                box-shadow 0.35s var(--gb-ease-out),
                background-color 0.35s ease,
                border-color 0.35s ease,
                color 0.35s ease;
}

.btn-default:hover,
.btn-highlighted:hover,
.btn-border:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px var(--gb-gold-glow);
}

.btn-default:active,
.btn-highlighted:active {
    transform: translateY(-1px);
}

/* Cards & pricing / feature items */
.pricing-item-metal,
.feature-item-metal,
.testimonial-item-metal,
.event-item-metal,
.post-item,
.feature-item-metal.box-bg-shape {
    transition: transform 0.45s var(--gb-ease-luxury),
                box-shadow 0.45s var(--gb-ease-luxury);
}

.pricing-item-metal:hover,
.feature-item-metal:hover,
.testimonial-item-metal:hover,
.post-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(22, 26, 45, 0.12);
}

.event-item-metal.gb-schedule-visible {
    animation: gb-schedule-in 0.7s var(--gb-ease-luxury) both;
}

@keyframes gb-schedule-in {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Image zoom on hover */
.benefits-image-metal figure,
.hero-image-metal figure,
.about-us-image-metal figure,
.faqs-img-metal figure,
.contact-us-image figure,
.post-featured-image figure,
.event-item-image-metal figure,
.what-we-images-metal figure {
    overflow: hidden;
}

.benefits-image-metal img,
.hero-image-metal img,
.about-us-image-metal img,
.faqs-img-metal img,
.contact-us-image img,
.post-featured-image img,
.event-item-image-metal img,
.what-we-images-metal img,
.image-anime img {
    transition: transform 0.65s var(--gb-ease-luxury);
    will-change: transform;
}

.benefits-image-metal:hover img,
.hero-image-metal:hover img,
.about-us-image-metal:hover img,
.post-featured-image:hover img,
.event-item-image-metal:hover img,
.what-we-images-metal:hover img,
.image-anime:hover img {
    transform: scale(1.08);
}

/* Video play pulse */
.video-play-button-metal a,
.intro-video-circle-metal a {
    position: relative;
}

.video-play-button-metal a::after,
.intro-video-circle-metal a::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(115, 75, 223, 0.55);
    animation: gb-video-pulse 2s ease-out infinite;
    pointer-events: none;
}

@keyframes gb-video-pulse {
    0% { transform: scale(0.92); opacity: 0.85; }
    70% { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

/* Partner / logo marquee enhancement */
.gb-marquee-track .swiper-wrapper {
    transition-timing-function: linear !important;
}

.company-supports-logo-metal {
    transition: transform 0.4s var(--gb-ease-out), opacity 0.4s ease;
}

.company-supports-logo-metal:hover {
    transform: scale(1.08);
    opacity: 1;
}

/* Form focus animation */
.page-contact-us .form-control,
.page-contact-us select.form-control,
.page-contact-us textarea.form-control {
    transition: border-color 0.3s ease,
                box-shadow 0.3s ease,
                transform 0.25s var(--gb-ease-out);
}

.page-contact-us .form-control:focus,
.page-contact-us select.form-control:focus,
.page-contact-us textarea.form-control:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(115, 75, 223, 0.15);
    border-color: rgba(115, 75, 223, 0.55);
    outline: none;
}

/* Icon micro-interactions */
.icon-box img,
.pricing-item-header-metal .icon-box {
    transition: transform 0.35s var(--gb-ease-out);
}

.pricing-item-metal:hover .icon-box,
.feature-item-metal:hover .feature-item-icon-metal img {
    transform: scale(1.1) rotate(-4deg);
}

/* WhatsApp float enhancement */
.whatsapp-float {
    animation: gb-whatsapp-float 4s ease-in-out infinite;
}

@keyframes gb-whatsapp-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.whatsapp-float:hover {
    animation: none;
}

/* Lazy sections — subtle fade when ready */
.gb-lazy-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

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

    .gb-reveal-pending,
    .gb-shape,
    .video-play-button-metal a::after,
    .intro-video-circle-metal a::after {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .pricing-item-metal:hover,
    .feature-item-metal:hover,
    .post-item:hover {
        transform: none;
    }
}

/* Mobile — lighter motion */
@media (max-width: 767px) {
    .gb-shape--1 { width: 180px; height: 180px; }
    .gb-shape--2 { width: 120px; height: 120px; }
    .gb-shape--3 { display: none; }

    .pricing-item-metal:hover,
    .feature-item-metal:hover,
    .post-item:hover {
        transform: translateY(-4px);
    }
}
