/* Custom styles beyond Tailwind CSS */

/* Hero Section - Normal Scrollable Content */
.hero-section {
    width: 100%;
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 10;
}

/* Scroll Spacer - Creates space for scroll animation */
#scroll-spacer {
    height: 500vh;
    width: 100%;
    position: relative;
}

/* Video Wrapper - Fixed Container */
.video-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Small Video Container - Initial State */
.small-video-container {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 672px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    z-index: 1;
    will-change: transform;
}

.small-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Transition Video Container */
.transition-video-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 2;
}

.transition-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Screen Container - Static CRT Image */
.screen-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 3;
}

.screen-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Typography */
body {
    font-family: 'Inter', sans-serif;
}

/* Hero Section */
.hero-headline {
    font-family: 'Playfair Display', serif;
    font-size: 2.75rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0em;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}

.hero-paragraph {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 400;
    color: #d1d5db;
    letter-spacing: 0.01em;
}

.contact-button {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4), 0 10px 25px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.contact-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.contact-button:hover::before {
    left: 100%;
}

.contact-button:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.6), 0 15px 35px rgba(0, 0, 0, 0.4);
    transform: translateY(-3px);
}

.contact-button:active {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.5rem;
    }

    .hero-paragraph {
        font-size: 1.125rem;
    }

    .contact-button {
        font-size: 1rem;
        padding: 14px 32px;
    }
}

/* Hamburger Menu */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-menu:hover .hamburger-line {
    background-color: #888;
}

/* Logo styles */
.logo-image {
    max-width: 120px;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.5s ease;
}

.logo-glitch {
    position: relative;
    display: inline-block;
}

/* Glitch effect on hover */
.logo-glitch:hover .logo-image {
    opacity: 1;
}

.logo-glitch::before,
.logo-glitch::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 100%;
    background-image: url('images/logo.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    pointer-events: none;
}

.logo-glitch:hover::before {
    animation: glitch-red 1.2s ease-in-out infinite;
    opacity: 0.5;
    filter: brightness(1.5) sepia(1) hue-rotate(-30deg) saturate(6);
    mix-blend-mode: screen;
}

.logo-glitch:hover::after {
    animation: glitch-blue 1.2s ease-in-out infinite;
    opacity: 0.5;
    filter: brightness(1.5) sepia(1) hue-rotate(200deg) saturate(6);
    mix-blend-mode: screen;
}

@keyframes glitch-red {
    0%, 100% {
        transform: translateX(0);
        opacity: 0;
    }
    10% {
        transform: translateX(-2px);
        opacity: 0.5;
    }
    20% {
        transform: translateX(0);
        opacity: 0;
    }
    30% {
        transform: translateX(-1px);
        opacity: 0.5;
    }
    40%, 90% {
        transform: translateX(0);
        opacity: 0;
    }
}

@keyframes glitch-blue {
    0%, 100% {
        transform: translateX(0);
        opacity: 0;
    }
    15% {
        transform: translateX(2px);
        opacity: 0.5;
    }
    25% {
        transform: translateX(0);
        opacity: 0;
    }
    35% {
        transform: translateX(1px);
        opacity: 0.5;
    }
    45%, 95% {
        transform: translateX(0);
        opacity: 0;
    }
}

/* ==================== */
/* Terminal Overlay     */
/* ==================== */

.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 30;
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
}

.terminal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46%;
    height: 58%;
    max-height: 58%;
    background: rgba(0, 0, 0, 0.85);
    font-family: 'Courier New', Courier, monospace;
    color: #33ff33;
    padding: 2.5%;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    pointer-events: auto;
}

/* CRT Scanlines Effect */
.terminal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        transparent 1px,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 3px
    );
    pointer-events: none;
    z-index: 10;
}

/* CRT Flicker Effect */
.terminal-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    pointer-events: none;
    animation: flicker 0.15s infinite;
    z-index: 11;
}

@keyframes flicker {
    0% { opacity: 0.27861; }
    5% { opacity: 0.34769; }
    10% { opacity: 0.23604; }
    15% { opacity: 0.90626; }
    20% { opacity: 0.18128; }
    25% { opacity: 0.83891; }
    30% { opacity: 0.65583; }
    35% { opacity: 0.67807; }
    40% { opacity: 0.26559; }
    45% { opacity: 0.84693; }
    50% { opacity: 0.96019; }
    55% { opacity: 0.08594; }
    60% { opacity: 0.20313; }
    65% { opacity: 0.71988; }
    70% { opacity: 0.53455; }
    75% { opacity: 0.37288; }
    80% { opacity: 0.71428; }
    85% { opacity: 0.70419; }
    90% { opacity: 0.7003; }
    95% { opacity: 0.36108; }
    100% { opacity: 0.24387; }
}

.terminal-output {
    overflow-x: hidden;
    padding-right: 10px;
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    font-size: 14px;
    line-height: 1.5;
    text-shadow: 0 0 5px #33ff33;
    max-width: 100%;
}

/* Custom Scrollbar */
.terminal-container::-webkit-scrollbar {
    width: 8px;
}

.terminal-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

.terminal-container::-webkit-scrollbar-thumb {
    background: #33ff33;
    border-radius: 4px;
}

.terminal-container::-webkit-scrollbar-thumb:hover {
    background: #44ff44;
}

.terminal-input-line {
    margin-top: 10px;
    display: flex;
    align-items: center;
    font-size: 14px;
    line-height: 1.5;
}

.terminal-prompt {
    color: #33ff33;
    text-shadow: 0 0 5px #33ff33;
    white-space: nowrap;
}

.terminal-input-text {
    color: #33ff33;
    text-shadow: 0 0 5px #33ff33;
    flex: 1;
    word-break: break-all;
}

.terminal-cursor {
    color: #33ff33;
    text-shadow: 0 0 8px #33ff33;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-line {
    margin: 4px 0;
    text-shadow: 0 0 5px #33ff33;
}

.terminal-command {
    color: #33ff33;
    text-shadow: 0 0 5px #33ff33;
}

.terminal-error {
    color: #ff3333;
    text-shadow: 0 0 5px #ff3333;
}

/* ASCII Art Styling */
.terminal-ascii {
    color: #33ff33;
    text-shadow: 0 0 8px #33ff33;
    font-weight: bold;
    line-height: 1.2;
}

/* Mobile Input (Hidden) */
.mobile-input {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* Responsive Terminal Positioning */
@media (max-width: 1200px) {
    .terminal-container {
        width: 50%;
        height: 60%;
        max-height: 60%;
        font-size: 12px;
        padding: 2%;
    }

    .terminal-output,
    .terminal-input-line {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .terminal-container {
        width: 56%;
        height: 64%;
        max-height: 64%;
        font-size: 10px;
        padding: 3%;
    }

    .terminal-output,
    .terminal-input-line {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .terminal-container {
        top: 10%;
        left: 18%;
        width: 64%;
        height: 72%;
        font-size: 8px;
        padding: 10px;
    }

    .terminal-output,
    .terminal-input-line {
        font-size: 8px;
    }
}
