﻿/* =================================================================
   WoodCorner — Cinematic Landing Intro
   ================================================================= */

/* ── Intro overlay ──────────────────────────────────────────────── */
#wc-landing {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #f5f3ef;          /* warm off-white to match light video */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: wc-landing-in 0.6s ease both;
}

@keyframes wc-landing-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* JS adds this class to trigger the cinematic exit */
#wc-landing.wc-landing--exit {
    animation: wc-landing-out 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

@keyframes wc-landing-out {
    0%   { opacity: 1; filter: blur(0px)   scale(1);    background: #f5f3ef; }
    60%  { opacity: 0.4; filter: blur(6px) scale(1.01); background: #f5f3ef; }
    100% { opacity: 0; filter: blur(16px)  scale(1.03); background: #f5f3ef; }
}

/* ?? Video ???????????????????????????????????????????????????????? */
#wc-landing__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: wc-video-zoom 30s ease forwards;
    will-change: transform;
}

@keyframes wc-video-zoom {
    from { transform: scale(1.10); }
    to   { transform: scale(1.00); }
}

/* ── Dark cinematic overlay ─────────────────────────────────── */
#wc-landing__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Subtle vignette on a light video — darkens edges, leaves centre clear */
    background:
        radial-gradient(
            ellipse at center,
            rgba(255,255,255,0)   40%,
            rgba(200,190,175,0.35) 100%
        );
}

/* ── Brand centre ───────────────────────────────────────────── */
#wc-landing__brand {
    position: relative;
    z-index: 3;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    animation: wc-brand-in 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s both;
    user-select: none;
    pointer-events: none;
    /* ── Brand pill hidden — set opacity to 1 to re-enable ── */
    opacity: 0;
    pointer-events: none;
    /* More transparent frosted pill — video shows through clearly */
    background: rgba(245, 243, 239, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 1.5rem 3rem;
    border-radius: 12px;
    border: 1px solid rgba(160, 120, 60, 0.12);
}

@keyframes wc-brand-in {
    from { opacity: 0; transform: translateY(24px) scale(0.96); filter: blur(6px); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    filter: blur(0);   }
}

.wc-landing__logo {
    font-size: clamp(2rem, 6.5vw, 4.5rem);
    font-weight: 200;
    letter-spacing: 0.55em;
    color: rgba(26, 21, 16, 0.82);  /* softer dark, readable but not heavy */
    text-transform: uppercase;
    line-height: 1;
}

.wc-landing__logo-ar {
    font-size: clamp(1.4rem, 4vw, 2.8rem);
    font-weight: 300;
    letter-spacing: 0.15em;
    color: rgba(26, 21, 16, 0.65);
    display: block;
    margin-top: 0.3em;
}

.wc-landing__gold-line {
    width: clamp(40px, 6vw, 80px);
    height: 1px;
    background: linear-gradient(to right, transparent, #c8a96e, transparent);
    margin: 0.6rem auto;
    animation: wc-line-expand 1.2s ease 1.2s both;
}

@keyframes wc-line-expand {
    from { width: 0; opacity: 0; }
    to   { width: clamp(40px, 6vw, 80px); opacity: 1; }
}

.wc-landing__tagline {
    font-size: clamp(0.6rem, 1.6vw, 0.82rem);
    letter-spacing: 0.35em;
    color: rgba(160, 120, 60, 0.9); /* deeper gold, readable on light */
    text-transform: uppercase;
    animation: wc-brand-in 1s ease 1.4s both;
}

/* ── Skip button ────────────────────────────────────────────── */
#wc-landing__skip {
    position: absolute;
    top: clamp(18px, 3.5vh, 32px);
    right: clamp(18px, 3vw, 36px);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(26, 21, 16, 0.85);
    border: 1px solid rgba(160, 120, 60, 0.4);
    border-radius: 100px;
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.2s;
    animation: wc-skip-in 0.6s ease 2s both;
}

@keyframes wc-skip-in {
    from { opacity: 0; transform: translateX(14px); }
    to   { opacity: 1; transform: translateX(0); }
}

#wc-landing__skip:hover {
    background: rgba(160, 120, 60, 0.12);
    border-color: rgba(160, 120, 60, 0.75);
    color: #1a1510;
    transform: scale(1.03);
}

#wc-landing__skip svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Progress bar ───────────────────────────────────────────── */
#wc-landing__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(to right, #a07840, #c8a96e, #e8d4a0);
    z-index: 10;
    transition: width 0.4s linear;
    box-shadow: 0 0 12px rgba(200, 169, 110, 0.6);
}

/* ── Loading spinner (briefly shown before video starts) ─────────── */
#wc-landing__loader {
    position: absolute;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#wc-landing__loader.wc-loader--hidden {
    opacity: 0;
    pointer-events: none;
}

.wc-landing__spinner {
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba(26, 21, 16, 0.15);
    border-top-color: #a07840;    /* dark gold on light bg */
    border-radius: 50%;
    animation: wc-spin 1s linear infinite;
}

@keyframes wc-spin {
    to { transform: rotate(360deg); }
}

/* ── Site content reveal ────────────────────────────────────── */
#wc-site-content {
    opacity: 0;
    filter: blur(5px);
    transition: opacity 0.7s ease, filter 0.7s ease;
    will-change: opacity, filter;
    /* Safety net: force-reveal after 3s if JS never fires */
    animation: wc-site-force-show 0s 3s forwards;
}

@keyframes wc-site-force-show {
    to { opacity: 1; filter: blur(0); }
}

#wc-site-content.wc-site--visible {
    opacity: 1;
    filter: blur(0);
    animation: none; /* JS took over, cancel CSS timer */
}

/* ── Mobile adjustments ─────────────────────────────────────── */
@media (max-width: 575px) {
    #wc-landing__skip {
        padding: 8px 16px;
        font-size: 0.68rem;
        gap: 7px;
    }

    .wc-landing__logo {
        letter-spacing: 0.35em;
    }
}

/* ── RTL aware skip button position ─────────────────────────── */
html[dir="rtl"] #wc-landing__skip {
    right: auto;
    left: clamp(18px, 3vw, 36px);
}
