/* Brushed metal effect for splash screen and passe-partout frame */

.brushed-metal-bg {
    position: absolute;
    inset: 0;
    background:
        /* Primary brush strokes - angled at ~45 degrees */
        repeating-linear-gradient(
            135deg,
            var(--metal-base-color) 0px,
            color-mix(in srgb, var(--metal-light-color) calc(var(--brush-contrast) * 100%), var(--metal-base-color)) 0.5px,
            color-mix(in srgb, var(--metal-base-color) 70%, black) 1px,
            color-mix(in srgb, var(--metal-light-color) calc(var(--brush-contrast) * 85%), var(--metal-base-color)) 1.5px,
            var(--metal-base-color) var(--brush-line-spacing)
        ),
        /* Secondary highlights for depth - also angled */
        repeating-linear-gradient(
            135deg,
            transparent 0px,
            rgba(255, 255, 255, calc(var(--brush-highlight) * 0.4)) 3px,
            transparent 6px,
            rgba(255, 255, 255, calc(var(--brush-highlight) * 0.3)) 9px,
            transparent 20px
        ),
        /* Fine texture overlay for grain */
        repeating-linear-gradient(
            135deg,
            transparent 0px,
            rgba(255, 255, 255, calc(var(--brush-intensity) * 0.08)) 0.5px,
            transparent 1px,
            rgba(0, 0, 0, calc(var(--brush-intensity) * 0.05)) 1.5px,
            transparent 2px
        ),
        /* Base gradient for overall tone variation */
        linear-gradient(
            135deg,
            var(--metal-base-color) 0%,
            color-mix(in srgb, var(--metal-light-color) 40%, var(--metal-base-color)) 25%,
            var(--metal-base-color) 50%,
            color-mix(in srgb, var(--metal-light-color) 40%, var(--metal-base-color)) 75%,
            var(--metal-base-color) 100%
        );
    background-size:
        calc(var(--brush-line-spacing) * 1.414) calc(var(--brush-line-spacing) * 1.414),
        28px 28px,
        2px 2px,
        100% 100%;
    background-blend-mode: normal, overlay, overlay, multiply;
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.9),
        inset 3px 3px 8px rgba(0, 0, 0, 0.8),
        inset -3px -3px 8px rgba(80, 80, 80, calc(var(--brush-intensity) * 0.4));
    opacity: 1;
}

/* Subtle shimmer animation */
@keyframes shimmer {
    0% {
        background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%;
    }
    100% {
        background-position: 100% 100%, 100% 100%, 100% 100%, 0% 0%;
    }
}

.brushed-metal-bg {
    animation: shimmer 20s linear infinite;
}

/* Light reflection effect on metal */
.metal-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        135deg,
        transparent 40%,
        rgba(255, 255, 255, calc(var(--brush-highlight) * 0.2)) 45%,
        rgba(255, 255, 255, calc(var(--brush-highlight) * 0.35)) 50%,
        rgba(255, 255, 255, calc(var(--brush-highlight) * 0.2)) 55%,
        transparent 60%
    );
    pointer-events: none;
    opacity: calc(var(--brush-intensity) * 0.6);
}

/* Splash Screen Specific Styles */
.splash-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease-in-out;
}

.splash-screen.fade-out {
    opacity: 0;
}

.splash-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.logo-container {
    width: 100%;
    max-width: 180px;
    margin-bottom: 10px;
}

.company-logo {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.company-name {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--color-text-light);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    margin: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.contact-link {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-subtle);
    text-decoration: none;
    line-height: 1.8;
    transition: color 0.2s ease;
}

.contact-link:hover,
.contact-link:active {
    color: var(--color-text-light);
}

.loading-indicator {
    width: 200px;
    height: 2px;
    background: var(--color-medium-gray);
    border-radius: 1px;
    overflow: hidden;
    margin-top: 20px;
}

.loading-bar {
    height: 100%;
    background: color-mix(in srgb, var(--metal-light-color) 80%, white);
    width: 0%;
    animation: loadingProgress 2s ease-in-out infinite;
}

@keyframes loadingProgress {
    0% {
        width: 0%;
        margin-left: 0%;
    }
    50% {
        width: 50%;
        margin-left: 25%;
    }
    100% {
        width: 0%;
        margin-left: 100%;
    }
}

/* Passe-partout Frame Styles */
.passe-partout {
    position: absolute;
    inset: 0;
    background:
        /* Primary brush strokes - angled at ~45 degrees */
        repeating-linear-gradient(
            135deg,
            var(--metal-base-color) 0px,
            color-mix(in srgb, var(--metal-light-color) calc(var(--brush-contrast) * 100%), var(--metal-base-color)) 0.5px,
            color-mix(in srgb, var(--metal-base-color) 70%, black) 1px,
            color-mix(in srgb, var(--metal-light-color) calc(var(--brush-contrast) * 85%), var(--metal-base-color)) 1.5px,
            var(--metal-base-color) var(--brush-line-spacing)
        ),
        /* Secondary highlights for depth - also angled */
        repeating-linear-gradient(
            135deg,
            transparent 0px,
            rgba(255, 255, 255, calc(var(--brush-highlight) * 0.4)) 3px,
            transparent 6px,
            rgba(255, 255, 255, calc(var(--brush-highlight) * 0.3)) 9px,
            transparent 20px
        ),
        /* Fine texture overlay for grain */
        repeating-linear-gradient(
            135deg,
            transparent 0px,
            rgba(255, 255, 255, calc(var(--brush-intensity) * 0.08)) 0.5px,
            transparent 1px,
            rgba(0, 0, 0, calc(var(--brush-intensity) * 0.05)) 1.5px,
            transparent 2px
        ),
        /* Base gradient for overall tone variation */
        linear-gradient(
            135deg,
            var(--metal-base-color) 0%,
            color-mix(in srgb, var(--metal-light-color) 40%, var(--metal-base-color)) 25%,
            var(--metal-base-color) 50%,
            color-mix(in srgb, var(--metal-light-color) 40%, var(--metal-base-color)) 75%,
            var(--metal-base-color) 100%
        );
    background-size:
        calc(var(--brush-line-spacing) * 1.414) calc(var(--brush-line-spacing) * 1.414),
        28px 28px,
        2px 2px,
        100% 100%;
    background-blend-mode: normal, overlay, overlay, multiply;
    padding: var(--frame-width);
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.9),
        inset 3px 3px 8px rgba(0, 0, 0, 0.8),
        inset -3px -3px 8px rgba(80, 80, 80, calc(var(--brush-intensity) * 0.4));
    display: flex;
    flex-direction: column;
    opacity: 1;
}

/* Inner frame with subtle highlight */
.passe-partout::before {
    content: '';
    position: absolute;
    inset: calc(var(--frame-width) - 5px);
    border: 1px solid rgba(120, 120, 120, calc(var(--brush-intensity) * 0.4));
    border-radius: 2px;
    pointer-events: none;
    box-shadow:
        0 0 10px rgba(0, 0, 0, 0.8) inset,
        0 1px 0 rgba(255, 255, 255, calc(var(--brush-highlight) * 0.3));
}

/* Brushed texture overlay - perpendicular fine lines */
.passe-partout::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            45deg,
            transparent 0px,
            rgba(255, 255, 255, calc(var(--brush-intensity) * 0.06)) 0.5px,
            transparent 1px,
            rgba(0, 0, 0, calc(var(--brush-intensity) * 0.04)) 1.5px,
            transparent 2px
        );
    pointer-events: none;
    opacity: 0.5;
    mix-blend-mode: overlay;
}

/* Author text at bottom of frame */
.author-text {
    position: absolute;
    bottom: 12px;
    left: var(--frame-width);
    right: var(--frame-width);
    text-align: center;
    color: var(--color-text-subtle);
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    z-index: 10;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: color 0.3s ease;
    pointer-events: none;
}
