/**
 * Ruff Robot Website - Main Stylesheet
 * 
 * @description Modern, responsive styling with accessibility focus
 * @author James (Ruff Robot)
 * @version 2.0.0
 * @created 2025-07-03
 * 
 * Architecture:
 * - Mobile-first responsive design
 * - CSS custom properties for maintainability
 * - Accessibility-compliant animations
 * - Performance-optimized selectors
 */

/* ================================
   RESET AND BASE STYLES
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    font-weight: 200;
    position: relative;
}

/* ================================
   BACKGROUND VIDEO SYSTEM
   ================================ */
#bg-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    z-index: 0;
    opacity: 0;
    transition: opacity 3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#bg-video iframe {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-width: 100vw;
    min-height: 100vh;
    border: none;
    background: #000;
    pointer-events: none;
}

/* If the viewport is wider than 16:9, use width-based sizing (overflow top/bottom) */
@media (min-aspect-ratio: 16/9) {
    #bg-video iframe {
        width: 100vw;
        height: 56.25vw;
    }
}
/* If the viewport is taller than 16:9, use height-based sizing (overflow left/right) */
@media (max-aspect-ratio: 16/9) {
    #bg-video iframe {
        width: 177.78vh;
        height: 100vh;
    }
}

/* Background Video Vignette Overlay */
.overlay-oval {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(
        ellipse 60% 45% at 50% 50%,
        rgba(0,0,0,0.0) 60%,
        rgba(0,0,0,0.25) 75%,
        rgba(0,0,0,0.7) 90%,
        rgba(0,0,0,1.0) 100%
    );
    opacity: 1;
    transition: background 0.3s;
}

/* ================================
   LAYOUT CONTAINERS
   ================================ */
.container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ================================
   HERO SECTION
   ================================ */
.hero-fullscreen {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    background: #000;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.main-title {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(3.2rem, 13vw, 9.5rem);
    font-weight: 100;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 3.2s ease-out 0s, transform 1.7s ease-out 0s;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 5px rgba(255,255,255,0.1); }
    50% { text-shadow: 0 0 20px rgba(255,255,255,0.2); }
}

.main-title.fade-in {
    opacity: 1;
    transform: translateY(0);
    animation: glow 4s ease-in-out infinite;
}

.hero-subtitles {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 1.3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.77, 0, 0.175, 1) 0.6s;
}
.hero-subtitles.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

.hero-subtitle {
    font-size: clamp(1.15rem, 2.7vw, 1.6rem);
    font-weight: 200;
    color: #cccccc;
    margin-bottom: 0;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.77, 0, 0.175, 1) 0.7s;
    line-height: 1.3;
}
.hero-subtitles.fade-in .hero-subtitle:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.7s;
}
.hero-subtitles.fade-in .hero-subtitle:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.8s;
}

.hero-subsubtitle {
    font-size: 0.98rem;
    color: #bbbbbb;
    font-weight: 200;
    margin-top: 0.7rem;
    margin-bottom: 2.2rem;
    letter-spacing: 0.01em;
    text-align: center;
    line-height: 1.2;
}
.hero-subsubtitle.fade-in {
    opacity: 0.55;
    transform: translateY(0);
    transition-delay: 1s;
}
.hero-subsubtitle a, .support-link {
    color: inherit;
    text-decoration: underline dotted;
    text-decoration-thickness: auto;
    text-underline-offset: 2px;
    text-decoration-skip-ink: auto;
    transition: color 0.2s;
}
.hero-subsubtitle a:hover,
.hero-subsubtitle a:focus,
.support-link:hover,
.support-link:focus {
    color: #fff;
}

.social-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.7rem;
    margin-top: 0.7rem;
}
.social-buttons.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.2s;
}

.social-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 300;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

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

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

.social-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.scroll-chevron {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    transition: opacity 2s ease-out 0s, transform 1.1s ease-out 0s;
    position: absolute;
    left: 50%;
    bottom: 2.5rem;
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 3;
}
.scroll-chevron.fade-in {
    opacity: 0.7;
    transform: translateX(-50%) translateY(0);
}
.scroll-chevron:hover,
.scroll-chevron:focus {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1.1);
    transition: all 0.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.scroll-chevron svg {
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    opacity: 1;
    color: #fff;
}

/* Projects Section */
.projects-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    padding-bottom: 6rem;
    z-index: 2;
    width: 100vw;
    left: 0;
}

.projects-logo {
    display: block;
    margin: 0 auto 1.1rem auto;
    width: 128px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.12));
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 200;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    color: #ffffff;
}

.projects-subtitle {
    font-size: 1.25rem;
    font-weight: 200;
    color: #aaa;
    margin-top: 0.1em;
    margin-bottom: 0.1em;
    letter-spacing: 0.01em;
    text-align: center;
}

.projects-subsubtitle {
    font-size: 1rem;
    font-weight: 200;
    color: #888;
    margin-bottom: 1.1em;
    text-align: center;
    letter-spacing: 0.03em;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    max-width: 530px;
    width: 100%;
    margin: 0 auto;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-card-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 300;
    margin-bottom: 1.1rem;
    color: #fff;
}

.project-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: #b0b0b0;
    margin: 0;
}

.projects-support-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7em;
    margin-top: 2em;
    margin-bottom: 1.5em;
}

/* Footer */
.footer {
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.08) 10%,
        rgba(0,0,0,0.20) 20%,
        rgba(0,0,0,0.40) 35%,
        rgba(0,0,0,0.65) 60%,
        rgba(0,0,0,0.85) 85%,
        rgba(0,0,0,0.92) 100%
    );
    box-shadow: 0 -2px 16px rgba(0,0,0,0.08);
    border: none;
    padding: 0.7rem 0 1.2rem 0;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100vw;
    z-index: 10;
    text-align: center;
    font-size: 0.95rem;
    color: #cccccc;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 2s ease-out 0s, transform 1.1s ease-out 0s;
}
.footer.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100vw;
    text-align: center;
    color: #cccccc;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    padding: 0 2vw;
    box-sizing: border-box;
}

.footer-left,
.footer-right {
    min-width: 0;
    font-size: 0.95rem;
    white-space: nowrap;
}

.footer-center {
    flex: 1 1 auto;
    text-align: center;
}

.footer a {
    color: #aaa;
    border-bottom: 1px dotted #aaa;
    text-decoration: none;
    transition: border-bottom-color 0.3s, color 0.3s;
}

.footer a:hover,
.footer a:focus {
    color: #fff;
    border-bottom-color: #fff;
}

.social-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0;
}

.social-button span {
    vertical-align: middle;
}

.footer-label {
    color: #888;
    font-weight: 200;
    letter-spacing: 0.01em;
}

/* Responsive Design */
/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 768px) {
    .hero-fullscreen {
        padding: 1.5rem;
    }
    
    .social-buttons {
        gap: 1rem;
    }
    
    .social-button {
        padding: 0.8rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .projects-section {
        padding: 4rem 1rem;
    }
    
    .footer-content {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .hero-fullscreen {
        padding: 1rem;
    }
    
    .social-button {
        padding: 0.7rem 1rem;
        font-size: 0.8rem;
    }
    
    .social-icon {
        width: 16px;
        height: 16px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        padding: 1.5rem;
    }
}

@media (max-width: 800px) {
    .hero-content {
        padding-inline: 6vw;
        padding-top: 8vh;
    }
    .projects-section,
    .luminor-section {
        padding-inline: 6vw;
    }
    .main-title {
        font-size: clamp(2.2rem, 18vw, 6.5rem);
        text-align: center;
        margin-top: -20vh;
    }
    .title-ruff::after {
        content: "\A";
        white-space: pre;
    }
    .title-robot {
        display: block;
    }
}

@media (min-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* Accessibility */
/* ================================
   ACCESSIBILITY & PREFERENCES
   ================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }
}

@media (prefers-contrast: high) {
    .social-button {
        border-color: rgba(255, 255, 255, 0.5);
    }
    
    .main-title {
        background: #ffffff;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

/* Keyboard Navigation */
.keyboard-navigation .social-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.bg-fade {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 1;
    opacity: 1;
    pointer-events: none;
    transition: opacity 2.8s cubic-bezier(0.77, 0, 0.175, 1);
}
.bg-fade.bg-fade-out {
    opacity: 0;
}

.footer-bottom {
    background: none;
    margin-bottom: 2rem;
    width: 100vw;
    text-align: center;
    color: #888;
    font-size: 0.92rem;
    font-weight: 200;
    letter-spacing: 0.01em;
    border: none;
    margin: 0;
    padding: 1.2rem 0 1.2rem 0;
    position: relative;
    z-index: 2;
    box-shadow: none;
}

.footer-spacer {
    height: 2.5rem;
}

main {
    padding-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.luminor-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0;
    padding-top: 5rem;
    width: 100%;
    padding-bottom: 10rem;
}
.luminor-logo {
    width: 100%;
    max-width: 800px;
    height: auto;
    margin-bottom: 2rem;
    margin-top: 0.5rem;
    display: block;
}
.luminor-description {
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    font-weight: 200;
    color: #e0e0e0;
    margin-bottom: 2.2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.luminor-highlight {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 2rem;
    font-weight: 300;
}
.luminor-highlight a {
    color: #fff;
    text-decoration: underline dotted;
    transition: color 0.2s;
}
.luminor-highlight a:hover {
    color: #cccccc;
}
.luminor-video-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 2rem;
    margin-top: 2.2rem;
}
.luminor-video {
    width: 100%;
    max-width: 800px;
    border-radius: 16px;
    background: #111;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 32px rgba(0,0,0,0.25);
}
.luminor-video-caption {
    font-size: 0.95rem;
    color: #b0b0b0;
    font-weight: 200;
    margin-top: 0.2rem;
    margin-bottom: 0.5rem;
}
.luminor-subtitle {
    font-size: 1.05rem;
    font-weight: 200;
    color: #cccccc;
    margin-bottom: 1.2rem;
    margin-top: -0.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.01em;
}
.luminor-play-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-weight: 300;
    font-size: 1.08rem;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    margin-top: 0.7rem;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    cursor: pointer;
    z-index: 2;
    text-align: center;
    justify-content: center;
}
.luminor-play-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}
.luminor-play-button:hover::before {
    left: 100%;
}
.luminor-play-button:hover, .luminor-play-button:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.35);
    z-index: 2;
    pointer-events: none;
}

/* Projects Section Fade-in Animations */
#projects-logo,
#projects-title,
#projects-subtitle,
#projects-subsubtitle,
#projects-card,
#projects-support,
#projects-xbutton {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.1s cubic-bezier(0.33, 1, 0.68, 1), transform 1.1s cubic-bezier(0.33, 1, 0.68, 1);
}
#projects-logo.fade-in,
#projects-title.fade-in,
#projects-subtitle.fade-in,
#projects-subsubtitle.fade-in,
#projects-card.fade-in,
#projects-support.fade-in,
#projects-xbutton.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Luminor Section Fade-in Animations */
#luminor-logo,
#luminor-winner,
#luminor-description,
#luminor-subtitle,
#luminor-video-wrapper,
#luminor-video-caption,
#luminor-play-button,
#luminor-copyright {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.1s cubic-bezier(0.33, 1, 0.68, 1), transform 1.1s cubic-bezier(0.33, 1, 0.68, 1);
}
#luminor-logo.fade-in,
#luminor-winner.fade-in,
#luminor-description.fade-in,
#luminor-subtitle.fade-in,
#luminor-video-wrapper.fade-in,
#luminor-video-caption.fade-in,
#luminor-play-button.fade-in,
#luminor-copyright.fade-in {
    opacity: 1;
    transform: translateY(0);
}

#global-copyright {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.1s cubic-bezier(0.33, 1, 0.68, 1), transform 1.1s cubic-bezier(0.33, 1, 0.68, 1);
}
#global-copyright.fade-in {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .hero-content {
        padding-inline: 5vw;
    }
    .projects-section,
    .luminor-section {
        padding-inline: 5vw;
    }
}

@media (max-width: 600px) {
    .hero-content {
        padding-inline: 6vw;
        padding-top: 8vh;
    }
    .projects-section,
    .luminor-section {
        padding-inline: 6vw;
    }
}

@media (max-width: 600px) {
    .main-title {
        font-size: clamp(2.2rem, 18vw, 6.5rem);
        text-align: center;
    }
    .title-ruff::after {
        content: "\A";
        white-space: pre;
    }
    .title-robot {
        display: block;
    }
} 