/*
Theme Name: Highvision Studios Theme
Theme URI: https://highvision.studios
Author: Kunal Thakur
Author URI: https://highvision.studios
Description: An interactive, high-performance scroll-driven frame animation showcase theme for Highvision Studios.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: highvision-theme
*/

/* Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #050505;
    color: #ffffff;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading Overlay */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #050505;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.loader-container.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
    width: 80%;
    max-width: 320px;
}

.loader-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.logo-dot {
    width: 8px;
    height: 8px;
    background-color: #3b82f6; /* Premium brand blue */
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
    animation: pulse 2s infinite ease-in-out;
}

.logo-text {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.9);
}

.progress-bar-container {
    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.07);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
    border-radius: 4px;
    transition: width 0.2s cubic-bezier(0.1, 0.8, 0.25, 1);
}

.progress-text {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
}

/* Scroll Container Setup */
.scroll-container {
    height: 550vh; /* Determines the scroll speed/depth */
    position: relative;
}

/* Canvas Sticky Wrapper */
.canvas-sticky-wrapper {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #050505;
}

/* Scroll Canvas */
#scroll-canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    will-change: transform;
}

/* Scroll Prompt Overlay */
.scroll-prompt {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 10;
}

.scroll-prompt.fade-out {
    opacity: 0;
}

.mouse-icon {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    position: relative;
}

.mouse-wheel {
    width: 4px;
    height: 8px;
    background-color: #3b82f6;
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 1.8s infinite ease-in-out;
}

.prompt-text {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

/* Logo Overlay (fades in at the end of the scroll) */
.logo-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000000; /* Match the logo background */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 50; /* Above sticky canvas, below loader overlay */
}

.logo-overlay-container.show {
    opacity: 1;
    pointer-events: auto;
}

.logo-image {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    display: block;
}

/* Quote Overlay (fades in after the logo overlay) */
.quote-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000000; /* Pure black background */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 60; /* Above logo overlay, below loader */
}

.quote-overlay-container.show {
    opacity: 1;
    pointer-events: auto;
}

.quote-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

@media (min-width: 768px) {
    .quote-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 64px;
    }
}

.quote-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    flex: 0 0 auto;
}

.founder-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    transition: box-shadow 0.4s ease;
    display: block;
}

.founder-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 100%);
    transform: skewX(-25deg);
    transition: none;
}

.founder-image-container:hover::after {
    left: 125%;
    transition: left 0.8s ease-in-out;
}

.founder-image-container:hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.75); /* White glow */
}

.founder-image {
    width: 220px; /* Not too big, not too small */
    height: auto;
    display: block;
}

@media (min-width: 768px) {
    .founder-image {
        width: 300px; /* Optimal size on desktop */
    }
}

.founder-info {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #ffffff;
    text-align: center;
    text-transform: uppercase;
}

.quote-right {
    flex: 1 1 auto;
    max-width: 650px;
}

.quote-text {
    font-size: 1.35rem;
    font-weight: 800; /* Extremely bold, like the brand logo style */
    line-height: 1.5;
    color: #ffffff;
    text-align: center;
}

@media (min-width: 768px) {
    .quote-text {
        font-size: 1.85rem;
        text-align: left;
    }
}

/* Socials Overlay (fades in after the quote overlay) */
.socials-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000000; /* Pure black background */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 70; /* Above quote overlay, below loader */
}

.socials-overlay-container.show {
    opacity: 1;
    pointer-events: auto;
}

.socials-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 90%;
    max-width: 800px;
    text-align: center;
}

.socials-heading {
    font-size: 1.6rem;
    font-weight: 800; /* Bold Outfit font matching quote */
    line-height: 1.35;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (min-width: 768px) {
    .socials-heading {
        font-size: 2.2rem;
    }
}

.socials-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 48px;
}

.social-link {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), filter 0.3s ease;
}

.social-link:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.social-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
}

@media (min-width: 768px) {
    .social-icon {
        width: 80px;
        height: 80px;
    }
}

.social-icon.youtube-icon {
    transform: scale(1.15); /* Scale up by 1.15x (one notch) to visually match the instagram icon */
}

/* Navigation Header Styles */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12); /* Sleek white border line */
    z-index: 80;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.header-container.show {
    opacity: 1;
    pointer-events: auto;
}

.header-content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 24px; /* Push items closer to screen edges */
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 16px;
    }
}

.nav-logo-link {
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.nav-logo-link:hover {
    opacity: 0.8;
}

.nav-logo-img {
    height: 46px; /* Increased size to match user specification */
    width: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    .nav-logo-img {
        height: 36px; /* Slightly larger on mobile as well */
    }
}

.nav-tabs {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 36px;
    align-items: center;
}

@media (max-width: 480px) {
    .nav-tabs {
        gap: 24px;
    }
}

.nav-tab {
    font-size: 0.9rem;
    font-weight: 700; /* Bold Outfit font matching the quote */
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    padding: 6px 0;
}

.nav-tab:hover {
    color: #ffffff;
}

/* Slick white underline hover animation */
.nav-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #ffffff;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-tab:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Flying Paper Plane Styles */
.flying-kite {
    position: absolute;
    display: block;
    z-index: 45; /* Above canvas, below navigation header (80) */
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto;
    width: 60px;
    height: 90px;
    transition: opacity 0.5s ease;
}

.plane-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.plane-img {
    width: 48px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(255, 255, 255, 0.2));
}

.plane-text {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #ffffff;
    text-transform: uppercase;
    background-color: rgba(0, 0, 0, 0.85);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-top: 4px;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.flying-kite:hover .plane-text {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

/* Very tiny dots behind the image */
.plane-trail-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    z-index: 40; /* Behind plane */
    animation: fadeTrail 1.0s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fadeTrail {
    0% {
        opacity: 0.8;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) translateY(12px);
    }
}

/* Games Section Overlay */
.games-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000000; /* Pure black background */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 65; /* Above quote overlay, below socials */
}

.games-overlay-container.show {
    opacity: 1;
    pointer-events: auto;
}

.games-content {
    text-align: center;
    width: 90%;
    max-width: 800px;
    padding: 20px;
}

.games-title {
    font-size: 3rem;
    font-weight: 900; /* Bold Outfit font matching the logo style */
    letter-spacing: 0.05em;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .games-title {
        font-size: 5rem;
    }
}

.games-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.05em;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .games-subtitle {
        font-size: 1.4rem;
    }
}

/* Keyframes */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
        box-shadow: 0 0 15px rgba(59, 130, 246, 1);
    }
}

@keyframes scrollWheel {
    0% {
        top: 6px;
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    80% {
        top: 22px;
        opacity: 0;
    }
    100% {
        top: 6px;
        opacity: 0;
    }
}
