/* Instant Suppression on Internal Navigation (Zero-flicker skip) */
html.buller-skip-intro #bullerIntroOverlay {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
html.buller-skip-intro.buller-intro-locked,
html.buller-skip-intro body.buller-intro-locked {
    overflow: auto !important;
    height: auto !important;
}
html.buller-skip-intro body.buller-intro-locked > *:not(#bullerIntroOverlay) {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* ==========================================================================
   BULLER BY LEATHERCRAFT — UNIVERSAL CINEMATIC LUXURY INTRO ANIMATION
   Universal cross-platform engine with full iOS WebKit/Safari, Android,
   Windows, macOS, Chrome, Firefox & Edge hardware acceleration.
   ========================================================================== */

/* Prevent scrolling while intro overlay is active */
html.buller-intro-locked,
body.buller-intro-locked {
    overflow: hidden !important;
    height: 100% !important;
    width: 100% !important;
    touch-action: none !important;
    -webkit-overflow-scrolling: auto !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    background-color: #fdfbf7 !important;
}

/* Hide all background website elements while intro is active to guarantee ZERO peeking */
body.buller-intro-locked > *:not(#bullerIntroOverlay) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Master Fixed Overlay — 100% Fullscreen on iOS Safari, Android & Desktop */
#bullerIntroOverlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: -150px !important; /* Extends completely past iOS Safari bottom address bar & home indicator */
    width: 100% !important;
    width: 100vw !important;
    height: calc(100% + 150px) !important;
    min-height: calc(100vh + 150px) !important;
    min-height: calc(100dvh + 150px) !important;
    z-index: 2147483647 !important; /* Highest possible 32-bit z-index */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding-bottom: 150px !important; /* Keeps animation perfectly centered on visible screen */
    box-sizing: border-box !important;
    background: radial-gradient(circle at 50% 50%, #ffffff 0%, #fdfbf7 55%, #f5efe3 100%) !important;
    overflow: hidden !important;
    pointer-events: all !important;
    opacity: 1 !important;
    visibility: visible !important;
    -webkit-transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.45s ease;
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.45s ease;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: opacity;
}

/* Subtle luxury progress hairline at top */
.buller-intro-progress-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, #c5a880, #dfc298, #c5a880);
    box-shadow: 0 0 12px rgba(223, 194, 152, 0.7);
    z-index: 100;
    -webkit-animation: bullerProgressFlow 2.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation: bullerProgressFlow 2.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@-webkit-keyframes bullerProgressFlow {
    0% { width: 0%; }
    100% { width: 100%; }
}
@keyframes bullerProgressFlow {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Luxury hairline golden bottom accent */
#bullerIntroOverlay::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(197, 168, 128, 0.2) 20%, #c5a880 50%, rgba(197, 168, 128, 0.2) 80%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

/* Subtle Radial Vignette */
.buller-intro-vignette {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(99, 52, 27, 0.04) 85%, rgba(18, 11, 6, 0.08) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Top Right Luxury Skip Button */
.buller-intro-skip-btn {
    position: absolute;
    top: max(clamp(14px, 3vh, 26px), env(safe-area-inset-top, 16px));
    right: max(clamp(14px, 4vw, 32px), env(safe-area-inset-right, 16px));
    z-index: 200;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    background: rgba(253, 251, 247, 0.92);
    border: 1px solid rgba(197, 168, 128, 0.5);
    border-radius: 30px;
    color: #8c4a2f;
    font-family: var(--font-sans, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(18, 11, 6, 0.06);
    -webkit-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    -webkit-animation: bullerSkipFadeIn 0.4s ease forwards 0.3s;
    animation: bullerSkipFadeIn 0.4s ease forwards 0.3s;
    touch-action: manipulation;
}

.buller-intro-skip-btn i {
    font-size: 0.7rem;
    color: #9e7d4e;
    -webkit-transition: -webkit-transform 0.25s ease;
    transition: transform 0.25s ease;
}

.buller-intro-skip-btn:hover,
.buller-intro-skip-btn:active {
    background: #120b06;
    border-color: #c5a880;
    color: #fdfbf7;
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(18, 11, 6, 0.14);
}

.buller-intro-skip-btn:hover i,
.buller-intro-skip-btn:active i {
    color: #dfc298;
    -webkit-transform: rotate(90deg);
    transform: rotate(90deg);
}

@-webkit-keyframes bullerSkipFadeIn {
    from { opacity: 0; -webkit-transform: translateY(-6px); transform: translateY(-6px); }
    to { opacity: 0.95; -webkit-transform: translateY(0); transform: translateY(0); }
}
@keyframes bullerSkipFadeIn {
    from { opacity: 0; -webkit-transform: translateY(-6px); transform: translateY(-6px); }
    to { opacity: 0.95; -webkit-transform: translateY(0); transform: translateY(0); }
}

/* Master Stage Canvas (Centered Stack) */
.buller-intro-stage-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 900px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

/* --------------------------------------------------------------------------
   STAGE 1: STANDALONE BULL ICON (Phases 2 & 3: 0.05s – 1.05s)
   -------------------------------------------------------------------------- */
.buller-intro-stage-bull {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    -webkit-transform: scale(0.18);
    transform: scale(0.18);
    filter: drop-shadow(0 18px 38px rgba(99, 52, 27, 0.22));
    -webkit-filter: drop-shadow(0 18px 38px rgba(99, 52, 27, 0.22));
    -webkit-animation: bullerIconCinematic 1.05s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.05s;
    animation: bullerIconCinematic 1.05s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.05s;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform, opacity;
}

.buller-intro-stage-bull img {
    width: clamp(140px, 24vw, 240px);
    height: auto;
    aspect-ratio: 1976 / 1853; /* Crucial for iOS Safari intrinsic ratio calculation */
    max-height: 38vh;
    display: block;
    object-fit: contain;
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
}

@-webkit-keyframes bullerIconCinematic {
    0% {
        opacity: 0;
        -webkit-transform: scale(0.18);
        transform: scale(0.18);
    }
    22% {
        opacity: 1;
    }
    58% {
        opacity: 1;
        -webkit-transform: scale(1.03);
        transform: scale(1.03);
    }
    72% {
        opacity: 1;
        -webkit-transform: scale(1);
        transform: scale(1);
    }
    85% {
        opacity: 0.85;
        -webkit-transform: scale(0.85);
        transform: scale(0.85);
    }
    100% {
        opacity: 0;
        -webkit-transform: scale(0.55);
        transform: scale(0.55);
        visibility: hidden;
    }
}

@keyframes bullerIconCinematic {
    0% {
        opacity: 0;
        -webkit-transform: scale(0.18);
        transform: scale(0.18);
    }
    22% {
        opacity: 1;
    }
    58% {
        opacity: 1;
        -webkit-transform: scale(1.03);
        transform: scale(1.03);
    }
    72% {
        opacity: 1;
        -webkit-transform: scale(1);
        transform: scale(1);
    }
    85% {
        opacity: 0.85;
        -webkit-transform: scale(0.85);
        transform: scale(0.85);
    }
    100% {
        opacity: 0;
        -webkit-transform: scale(0.55);
        transform: scale(0.55);
        visibility: hidden;
    }
}

/* --------------------------------------------------------------------------
   STAGE 2: HARMONIOUS TYPOGRAPHY REVEAL (Phases 4 & 5: 1.05s – 2.05s)
   -------------------------------------------------------------------------- */
.buller-intro-stage-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    -webkit-transform: scale(0.94);
    transform: scale(0.94);
    -webkit-animation: bullerTextSequence 1.05s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.05s;
    animation: bullerTextSequence 1.05s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.05s;
    will-change: transform, opacity;
}

/* "BULLER" Wordmark */
.buller-intro-wordmark {
    font-family: var(--font-brand, 'Cinzel', serif);
    font-size: clamp(2.2rem, 7.5vw, 4.2rem);
    font-weight: 700;
    color: #120b06;
    letter-spacing: 0.32em;
    margin-right: -0.32em;
    line-height: 1;
    text-shadow: 0 4px 18px rgba(18, 11, 6, 0.08);
    opacity: 0;
    -webkit-transform: translateY(10px) scale(0.95);
    transform: translateY(10px) scale(0.95);
    -webkit-animation: bullerWordmarkIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.08s;
    animation: bullerWordmarkIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.08s;
}

@-webkit-keyframes bullerWordmarkIn {
    0% {
        opacity: 0;
        -webkit-transform: translateY(14px) scale(0.93);
        transform: translateY(14px) scale(0.93);
        letter-spacing: 0.20em;
    }
    100% {
        opacity: 1;
        -webkit-transform: translateY(0) scale(1);
        transform: translateY(0) scale(1);
        letter-spacing: 0.32em;
    }
}
@keyframes bullerWordmarkIn {
    0% {
        opacity: 0;
        -webkit-transform: translateY(14px) scale(0.93);
        transform: translateY(14px) scale(0.93);
        letter-spacing: 0.20em;
    }
    100% {
        opacity: 1;
        -webkit-transform: translateY(0) scale(1);
        transform: translateY(0) scale(1);
        letter-spacing: 0.32em;
    }
}

/* "BY LEATHERCRAFT" Tagline with Flanking Golden Rules */
.buller-intro-tagline-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2.5vw, 22px);
    margin-top: clamp(8px, 1.8vw, 16px);
    width: 100%;
    opacity: 0;
    -webkit-animation: bullerTaglineIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.25s;
    animation: bullerTaglineIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.25s;
}

.buller-intro-tagline {
    font-family: var(--font-sans, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: clamp(0.62rem, 1.6vw, 0.92rem);
    font-weight: 600;
    letter-spacing: 0.32em;
    margin-right: -0.32em;
    text-transform: uppercase;
    color: #9e7d4e;
    white-space: nowrap;
}

.buller-intro-line {
    display: inline-block;
    height: 1px;
    width: clamp(24px, 8vw, 60px);
    background: linear-gradient(90deg, rgba(197, 168, 128, 0.1), #c5a880);
    -webkit-transform: scaleX(0);
    transform: scaleX(0);
    -webkit-transform-origin: center right;
    transform-origin: center right;
    -webkit-animation: bullerLineExpand 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.35s;
    animation: bullerLineExpand 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards 1.35s;
}

.buller-intro-line.line-right {
    background: linear-gradient(90deg, #c5a880, rgba(197, 168, 128, 0.1));
    -webkit-transform-origin: center left;
    transform-origin: center left;
}

@-webkit-keyframes bullerTaglineIn {
    0% { opacity: 0; -webkit-transform: translateY(8px); transform: translateY(8px); }
    100% { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}
@keyframes bullerTaglineIn {
    0% { opacity: 0; -webkit-transform: translateY(8px); transform: translateY(8px); }
    100% { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

@-webkit-keyframes bullerLineExpand {
    0% { -webkit-transform: scaleX(0); transform: scaleX(0); }
    100% { -webkit-transform: scaleX(1); transform: scaleX(1); }
}
@keyframes bullerLineExpand {
    0% { -webkit-transform: scaleX(0); transform: scaleX(0); }
    100% { -webkit-transform: scaleX(1); transform: scaleX(1); }
}

@-webkit-keyframes bullerTextSequence {
    0% { opacity: 0; -webkit-transform: scale(0.96); transform: scale(0.96); }
    25% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); }
    100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); }
}
@keyframes bullerTextSequence {
    0% { opacity: 0; -webkit-transform: scale(0.96); transform: scale(0.96); }
    25% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); }
    100% { opacity: 1; -webkit-transform: scale(1); transform: scale(1); }
}

/* --------------------------------------------------------------------------
   PHASE 7: TRANSITION OUT & CLEANUP
   -------------------------------------------------------------------------- */
#bullerIntroOverlay.buller-intro-fading {
    opacity: 0 !important;
    pointer-events: none !important;
}

#bullerIntroOverlay.buller-intro-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

/* --------------------------------------------------------------------------
   MOBILE & RESPONSIVE BREAKPOINT TUNING
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
    .buller-intro-stage-container {
        padding: 0 16px;
    }

    .buller-intro-stage-bull img {
        width: clamp(120px, 42vw, 170px);
        aspect-ratio: 1976 / 1853;
    }

    .buller-intro-wordmark {
        font-size: clamp(2rem, 10vw, 2.7rem);
        letter-spacing: 0.26em;
        margin-right: -0.26em;
    }

    .buller-intro-tagline {
        font-size: 0.62rem;
        letter-spacing: 0.22em;
        margin-right: -0.22em;
    }

    .buller-intro-line {
        width: 22px;
    }

    .buller-intro-skip-btn {
        top: 14px;
        right: 14px;
        padding: 6px 11px;
        font-size: 0.62rem;
    }
}
