/* ── Lock Overlay ── */
html,
body {
    cursor: url('Image/cursor.svg') 1 0, auto;
}

/* Custom Hover/Click Cursor override */
a,
button,
select,
input[type="submit"],
input[type="button"],
[role="button"],
.lock-close-btn,
.lock-unlock-btn,
.cs-nav-back,
.cs-scroll-wrapper,
.design-card {
    cursor: url('Image/hover-cursor.svg') 7 0, pointer !important;
}

.lock-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center; /* Center on desktop */
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    padding: 24px;
    transition: opacity 0.4s ease;
}

.lock-card {
    position: relative; /* For absolutely positioned drag handle */
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px; /* Original 8px all-around corners */
    padding: 40px 40px 40px 42px;
    max-width: 580px;
    width: 100%;
    margin: 0 auto;
    
    /* Scale animation setup for desktop */
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scale up centered animation when active class is present */
.lock-overlay.active .lock-card {
    transform: scale(1);
}

/* Grab handle decoration - hidden on desktop */
.lock-card::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 2px;
    display: none; /* Hidden on desktop */
}

/* Card header: title + close button side by side */
.lock-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

/* Close button */
.lock-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    padding: 4px;
    flex-shrink: 0;
    transition: color 0.2s;
    line-height: 0;
}

.lock-close-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Heading */
.lock-title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

/* Body */
.lock-body {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.65;
    margin-bottom: 24px;
}

.lock-body a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Input section */
.lock-label {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
    display: block;
}

.lock-input-row {
    display: flex;
    align-items: center;
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 56px;
    height: 56px;
    padding: 0 6px 0 20px;
    gap: 12px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.lock-input-row:focus-within {
    border-color: rgba(255, 255, 255, 0.25);
}

.lock-icon {
    color: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
    line-height: 0;
}

.lock-input-row input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 1rem;
    font-family: 'Nunito Sans', sans-serif;
    min-width: 0;
    padding: 0;
}

.lock-input-row input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.lock-unlock-btn {
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 56px;
    height: 56px;
    padding: 0 26px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    flex-shrink: 0;
    font-family: 'Nunito Sans', sans-serif;
    transition: background 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lock-input-row .lock-unlock-btn {
    height: 44px;
}

.lock-unlock-btn:hover {
    background: #e8e8e8;
}

.lock-unlock-btn:active {
    transform: scale(0.97);
}

/* Error */
.lock-error {
    color: #ff6b6b;
    font-size: 0.82rem;
    font-family: 'Nunito Sans', sans-serif;
    margin-top: 10px;
    display: none;
    padding-left: 4px;
}

/* Mobile */
@media (max-width: 600px) {
    .lock-overlay {
        align-items: flex-end; /* Align at bottom for drawer on mobile */
        padding: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .lock-card {
        border-left: none;
        border-right: none;
        border-bottom: none;
        border-radius: 20px 20px 0 0;
        /* Bottom padding accounts for iOS safe area bar natively */
        padding: 36px 20px calc(24px + env(safe-area-inset-bottom)) 20px;
        width: 100%;
        max-width: 100%;
        /* Sliding animation instead of scale on mobile */
        transform: translateY(100%);
        transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .lock-overlay.active .lock-card {
        transform: translateY(0);
    }

    .lock-card::before {
        display: block; /* Show handle on mobile */
        top: 10px;
        width: 36px;
    }

    .lock-title {
        font-size: 24px;
    }

    .lock-input-row {
        height: 48px;
    }

    .lock-unlock-btn {
        height: 48px;
        padding: 0 18px;
        font-size: 14px;
        font-weight: 600;
        letter-spacing: 1.5px;
        text-transform: uppercase;
    }

    .lock-input-row .lock-unlock-btn {
        height: 36px;
    }
}

/* ─── Case Study Reveal Animations ─── */
.reveal-line {
    display: block;
    overflow: hidden;
}

.reveal-line span {
    display: block;
    transform: translateY(105%);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s ease;
}

.reveal-meta {
    display: block;
    overflow: hidden;
}

.reveal-meta > * {
    transform: translateY(105%);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s ease;
}

/* Activated state */
.cs-intro.active .reveal-line span,
.cs-intro.active .reveal-meta > * {
    transform: translateY(0);
    opacity: 1;
}

/* Stagger delays */
.cs-intro.active .reveal-line:nth-child(1) span {
    transition-delay: 0.15s;
}
.cs-intro.active .reveal-meta:nth-child(2) > * {
    transition-delay: 0.35s;
}

.hero-img-block {
    opacity: 0;
    transform: scale(0.97) translateY(30px);
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.5s ease;
}
.hero-img-block.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* ─── Page Loader ─── */
.page-loader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

.page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-logo {
    width: 60px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-logo svg {
    width: 60px;
    height: 48px;
    animation: loader-spin-one 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes loader-spin-one {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Light mode overrides for inside case studies (including locked pages) */
:root[data-theme="light"] body {
    background: #faf9f6 !important;
    color: #111111 !important;
}

:root[data-theme="light"] .cs-nav {
    background: rgba(250, 249, 246, 0.9) !important;
    border-bottom: 1px solid rgba(17, 17, 17, 0.1) !important;
}

:root[data-theme="light"] .cs-nav-back {
    color: rgba(17, 17, 17, 0.6) !important;
}

:root[data-theme="light"] .cs-nav-back:hover {
    color: #111111 !important;
}

:root[data-theme="light"] .cs-nav-title {
    color: rgba(17, 17, 17, 0.4) !important;
}

:root[data-theme="light"] .cs-subtitle {
    color: rgba(17, 17, 17, 0.6) !important;
}

:root[data-theme="light"] .lock-overlay {
    background: rgba(250, 249, 246, 0.8) !important;
}

:root[data-theme="light"] .lock-card {
    background: #ffffff !important;
    border: 1px solid rgba(17, 17, 17, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

:root[data-theme="light"] .lock-title {
    color: #111111 !important;
}

:root[data-theme="light"] .lock-body {
    color: rgba(17, 17, 17, 0.8) !important;
}

:root[data-theme="light"] .lock-label {
    color: rgba(17, 17, 17, 0.5) !important;
}

:root[data-theme="light"] .lock-input-row {
    border: 1px solid rgba(17, 17, 17, 0.15) !important;
    background: rgba(17, 17, 17, 0.03) !important;
}

:root[data-theme="light"] .lock-input-row input {
    color: #111111 !important;
}

:root[data-theme="light"] .lock-input-row input::placeholder {
    color: rgba(17, 17, 17, 0.3) !important;
}

:root[data-theme="light"] .lock-unlock-btn {
    background: #111111 !important;
    color: #ffffff !important;
}

:root[data-theme="light"] .lock-unlock-btn:hover {
    background: #222222 !important;
}

:root[data-theme="light"] .lock-close-btn {
    color: rgba(17, 17, 17, 0.4) !important;
}

:root[data-theme="light"] .lock-close-btn:hover {
    color: #111111 !important;
}

:root[data-theme="light"] .lock-body a {
    color: #111111 !important;
}

:root[data-theme="light"] .lock-input-row span {
    color: rgba(17, 17, 17, 0.4) !important;
}
