/* 
 * Home Putra Interior - Custom CSS
 * Additional styles that complement Tailwind
 */

/* Smooth reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Stagger animation delays */
.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}

.stagger-5 {
    transition-delay: 0.5s;
}

/* Text reveal animation */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    animation: textReveal 0.8s ease forwards;
}

@keyframes textReveal {
    to {
        transform: translateY(0);
    }
}

/* Magnetic effect for buttons */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Split text animation */
.split-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(50px) rotateX(90deg);
    animation: splitReveal 0.6s ease forwards;
}

@keyframes splitReveal {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

/* Cursor follower */
.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid #ffb204;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease;
    z-index: 9999;
    mix-blend-mode: difference;
}

.cursor-follower.active {
    width: 60px;
    height: 60px;
    background: rgba(255, 178, 4, 0.1);
}

/* Image parallax container */
.parallax-container {
    overflow: hidden;
}

.parallax-container img {
    transition: transform 0.5s ease-out;
}

/* Morphing shapes background */
.morph-bg {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
    background: linear-gradient(135deg, rgba(255, 178, 4, 0.1) 0%, rgba(255, 178, 4, 0.05) 100%);
    animation: morph 15s ease-in-out infinite;
    filter: blur(40px);
}

@keyframes morph {

    0%,
    100% {
        border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
        transform: rotate(0deg);
    }

    50% {
        border-radius: 58% 42% 30% 70% / 55% 55% 45% 45%;
        transform: rotate(180deg);
    }
}

/* Gradient noise texture */
.noise-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    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");
    opacity: 0.03;
    pointer-events: none;
}

/* Loading shimmer effect */
.shimmer {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Hover lift effect */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.4s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

/* Border gradient animation */
.border-gradient {
    position: relative;
}

.border-gradient::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #ffb204, transparent 50%, #ffb204);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 4s linear infinite;
}

@keyframes borderRotate {
    to {
        transform: rotate(360deg);
    }
}

/* Glitch effect for text */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.4s infinite;
    color: #ff0000;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
    transform: translate(-2px, 2px);
    opacity: 0.7;
}

.glitch::after {
    animation: glitch-2 0.4s infinite;
    color: #00ffff;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
    transform: translate(2px, -2px);
    opacity: 0.7;
}

@keyframes glitch-1 {

    0%,
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
    }

    50% {
        clip-path: polygon(0 10%, 100% 10%, 100% 45%, 0 45%);
    }
}

@keyframes glitch-2 {

    0%,
    100% {
        clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
    }

    50% {
        clip-path: polygon(0 55%, 100% 55%, 100% 90%, 0 90%);
    }
}

/* Range slider custom styles */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #333;
    border-radius: 4px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #ffb204;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(255, 178, 4, 0.4);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #ffb204;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(255, 178, 4, 0.4);
}

/* Custom selection */
::selection {
    background: rgba(255, 178, 4, 0.3);
    color: #fff;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #ffb204;
    outline-offset: 2px;
}

/* Print styles */
@media print {

    .glass-nav,
    #whatsapp-btn,
    #back-to-top,
    #preloader {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

.text-gold-gradient {
    background-image: linear-gradient(to right, #ffb204, #FFD700);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ============================================
   MOBILE/TABLET: Force all AOS elements visible
   This fixes elements not appearing on smaller screens
   ============================================ */
@media screen and (max-width: 1023px) {

    /* Force all AOS elements to be visible */
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        pointer-events: auto !important;
        visibility: visible !important;
    }

    /* Ensure animated elements are visible */
    [data-aos^="fade"],
    [data-aos^="zoom"],
    [data-aos^="slide"],
    [data-aos^="flip"] {
        opacity: 1 !important;
        transform: translate3d(0, 0, 0) scale(1) !important;
    }

    /* Override any reveal animations */
    .reveal {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    /* Disable heavy effects on mobile for better performance */
    .morph-bg {
        animation: none !important;
    }

    .cursor-follower {
        display: none !important;
    }

    /* Ensure buttons and interactive elements are always visible */
    .hover-lift {
        transform: none !important;
    }
}
