@import url('orbit.css');
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Inter:wght@300;400;700;900&family=Space+Mono&display=swap');

/* Boot lock – prevent first paint of the dashboard */
body:not(.curtain-mounted) #root {
    visibility: hidden;
}

:root {
    --bg-deep: #050b1a;
    --gold: #d4af37;
    --crimson: #8b0000;
    --transition-main: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --grain-opacity: 0.06;
    --global-filter: none;
    --panel-blue: #0b1f3a;
}

/* Noir Mode Overrides */
.noir-mode {
    --bg-deep: #000000;
    --gold: #ffffff;
    --crimson: #222222;
    --grain-opacity: 0.15;
    --global-filter: grayscale(100%) contrast(110%) brightness(105%);
}

#root-container {
    transition: filter 1s ease;
}

/* Apply noir filter to the full html so modals are included and fixed positioned elements are not broken */
html {
    filter: var(--global-filter);
    transition: filter 1s ease;
}

#root {
    position: relative;
    z-index: 20;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-deep);
    color: #f4f4f5;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.font-serif {
    font-family: 'Cinzel', serif;
}

.font-mono {
    font-family: 'Space Mono', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 10px;
}

.custom-scrollbar {
    -webkit-overflow-scrolling: touch;
}

/* Smooth Entrances & Transitions */
.page-transition {
    transition: opacity 0.5s ease-in-out, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.5s ease;
}

.season-transition {
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, filter, transform;
}

.season-enter {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(6px) scale(0.99);
}

.page-enter {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    filter: blur(5px);
}

.page-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.img-fade {
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.skeleton {
    background: linear-gradient(90deg, #0a1229 25%, #0f1a3a 50%, #0a1229 75%);
    background-size: 200% 100%;
    animation: skeleton-load 2s infinite linear;
}

@keyframes skeleton-load {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}




.cn-copyright {
    position: fixed;
    bottom: 16px;
    right: 20px;
    font-size: 10px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.6);
    z-index: 9999;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cn-copyright:hover {
    color: #d4af37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

.curtain-container {
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
    display: flex;
}

.curtain-left,
.curtain-right {
    height: 100vh;
    width: 50vw;
    /* Curtains slide open with less delay */
    transition: transform 2s cubic-bezier(0.85, 0, 0.15, 1) 0.3s, border-color 0.6s ease;
    background: linear-gradient(to bottom, #8b0000 0%, #050b1a 50%, #8b0000 100%);
    pointer-events: auto;
    will-change: transform;
}

.curtain-left {
    border-right: 4px solid transparent;
}

.curtain-right {
    border-left: 4px solid transparent;
}

.auth-success .curtain-left {
    border-right-color: var(--gold);
}

.auth-success .curtain-right {
    border-left-color: var(--gold);
}

.curtain-open .curtain-left {
    transform: translateX(-100%);
}

.curtain-open .curtain-right {
    transform: translateX(100%);
}

.curtain-text {
    position: absolute;
    inset: 0;
    z-index: 2100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    opacity: 1;
    transform: scale(1) translateY(0px);
    clip-path: polygon(0% 0%, 0% 100%, 50% 100%, 50% 0%, 50% 0%, 50% 100%, 100% 100%, 100% 0%);
    /* Matches exactly the transform transition on .curtain-left/right */
    transition: clip-path 2s cubic-bezier(0.85, 0, 0.15, 1) 0.3s;
    will-change: clip-path;
}

/* When auth succeeds: stay fully visible, do not move */
.auth-success .curtain-text {
    opacity: 1;
    transform: scale(1) translateY(0px);
}

/* When curtains split: the polygon opens a hole in the middle that swallows the text */
.curtain-open .curtain-text {
    clip-path: polygon(0% 0%, 0% 100%, 0% 100%, 0% 0%, 100% 0%, 100% 100%, 100% 100%, 100% 0%);
}

.curtain-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(3rem, 6vw, 5rem);
    font-style: italic;
    color: #d4af37;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.6),
        0 0 25px rgba(212, 175, 55, 0.4),
        0 0 60px rgba(212, 175, 55, 0.25);
    /* Smooth entrance when curtain first shows */
    animation: curtain-title-in 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.curtain-subtitle {
    margin-top: 1rem;
    font-size: 10px;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: #7dd3fc;
    animation: curtain-title-in 1.4s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes curtain-title-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
        filter: blur(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.curtain-overview-shift {
    display: inline-block;
    transform: translateX(22px);
}

.sidebar-item {
    transition: var(--transition-main);
    position: relative;
    cursor: pointer;
    border-radius: 0.75rem;
    /* rounded-xl */
}

.sidebar-item:hover {
    color: var(--gold);
}

.sidebar-item.active {
    color: var(--gold);
    background-color: rgba(212, 175, 55, 0.05);
}

.sidebar-item.active::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: var(--gold);
    border-radius: 4px;
}

.modal-backdrop {
    background: rgba(0, 0, 0, 0.08);
    opacity: 1;
    transition: opacity 0.35s ease;
}

.modal-active .modal-backdrop {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

.btn-gold {
    transition: var(--transition-main);
    background: var(--gold);
    color: black;
}

.btn-gold:hover {
    background: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-outline {
    transition: var(--transition-main);
    border: 2px solid rgba(212, 175, 55, 0.2);
    color: var(--gold);
}

.btn-outline:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
    transform: translateY(-2px);
}

#bg-canvas-container {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#bgCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.film-grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    opacity: 0.06;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3%3Ffilter id='noiseFilter'%3E%3FfeTurbulence 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");
}

.vignette {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, transparent 30%, rgba(10, 5, 0, 0.5) 100%);
    pointer-events: none;
    z-index: 5;
}



.glass-panel,
.card,
.panel {
    background: rgba(11, 31, 58, 0.4) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(212, 175, 55, 0.1) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37) !important;
}



@keyframes slide-up {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-slide-up {
    animation: slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-exiting .modal-backdrop {
    opacity: 0;
    transition: opacity 0.35s ease;
}

@keyframes slide-down {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(30px);
        opacity: 0;
    }
}

.modal-exiting .animate-slide-up {
    animation: slide-down 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-exiting {
    pointer-events: none;
}

.bio-text strong {
    display: block;
    font-weight: 800;
    margin-bottom: 8px;
    color: rgba(212, 175, 55, 0.95);
}

.bio-text p {
    margin: 0 0 10px 0;
}

.bio-text {
    line-height: 1.55;
}

/* Lucide and other utils */
.cursor-blink {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: currentColor;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    from,
    to {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.6);
}