/* ==============================================================================
 * Alaköy Pastanesi — Cinematic Intro & Luxury Curtain Reveal Stylesheet
 * Architecture & Creative Motion: imesen.com (İmesen Creative Tech)
 * License: Proprietary / Enterprise Commercial License
 * Target Standards: GPU Accelerated, 60 FPS Silk Curve, Zero-Jank
 * ============================================================================== */

/* 1. Scroll-Lock State for Html & Body */
html.intro-locked,
body.intro-locked {
    overflow: hidden !important;
    height: 100vh !important;
    touch-action: none !important;
    -webkit-overflow-scrolling: auto !important;
}

/* 2. Main Preloader Overlay Canvas */
#alakoy-preloader.alakoy-preloader {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
    background-color: #1a2017;
}

/* 3. Luxury Silk Split Curtain Panels */
.curtain-panel {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    height: 50.5vh;
    background: #333C2E;
    background-image: 
        radial-gradient(circle at 50% 50%, #444F3D 0%, #2A3226 65%, #181E15 100%);
    will-change: transform;
    transform: translate3d(0, 0, 0);
    z-index: 1;
}

.curtain-panel--top {
    top: 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.curtain-panel--bottom {
    bottom: 0;
    border-top: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

/* Subtle Film Grain Noise Texture */
.preloader-noise {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    pointer-events: none;
    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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    z-index: 2;
}

/* 4. Preloader Choreographed Content Center */
.preloader-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 680px;
    padding: 24px;
    will-change: transform, opacity;
}

/* Emblem Canvas & Gold Stroke Drawing */
.preloader-emblem {
    width: 96px;
    height: 96px;
    margin-bottom: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emblem-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.emblem-path {
    fill: transparent;
    stroke: #D4AF37;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 900;
    stroke-dashoffset: 900;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4));
}

/* Typographic Title with Character Reveal Masks */
.preloader-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preloader-title {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 10px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.2rem, 5.5vw, 4.2rem);
    font-weight: 700;
    letter-spacing: 0.35em;
    text-indent: 0.35em;
    color: #F7F7F3;
    line-height: 1.1;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.char-wrapper {
    display: inline-block;
    overflow: hidden;
}

.char-reveal {
    display: inline-block;
    transform: translate3d(0, 120%, 0);
    will-change: transform;
}

.preloader-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.68rem, 1.8vw, 0.82rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.42em;
    text-indent: 0.42em;
    color: #D4AF37;
    margin-bottom: 16px;
    opacity: 0;
    transform: translate3d(0, 16px, 0);
    will-change: transform, opacity;
}

.preloader-branches {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.64rem, 1.4vw, 0.74rem);
    font-weight: 400;
    letter-spacing: 0.22em;
    color: #9ba895;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    opacity: 0;
    transform: translate3d(0, 12px, 0);
    will-change: transform, opacity;
}

.preloader-branches span {
    transition: color 0.3s ease;
}

.preloader-branches span:hover {
    color: #D4AF37;
}

/* 5. Minimalist Golden Progress Line & Counter */
.preloader-progress-track {
    width: 240px;
    height: 2px;
    background: rgba(247, 247, 243, 0.12);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    margin-bottom: 14px;
    opacity: 0;
}

.preloader-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #D4AF37 0%, #FFF4CC 50%, #D4AF37 100%);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
    will-change: width;
}

.preloader-counter {
    font-family: 'Montserrat', 'Courier New', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: #D4AF37;
    letter-spacing: 0.15em;
    opacity: 0;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.preloader-counter .percent {
    font-size: 0.75rem;
    color: #9ba895;
}

/* 6. Completed State Transitions */
#alakoy-preloader.preloader--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* 7. Respect Accessibility Preferences */
@media (prefers-reduced-motion: reduce) {
    #alakoy-preloader.alakoy-preloader {
        display: none !important;
    }
    html.intro-locked,
    body.intro-locked {
        overflow: auto !important;
        height: auto !important;
    }
}
