﻿/**
 * FIFA Guest Portal - Login Page Styles
 */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
    /* Colors */
    --color-primary: #304FFE;
    --color-primary-hover: #2137E5;
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-text: #000000;
    --color-skeleton-start: #F0F0F0;
    --color-skeleton-mid: #E0E0E0;
    --shadow-primary-sm: 0 2px 8px rgba(48, 79, 254, 0.2);
    --shadow-primary-md: 0 4px 12px rgba(48, 79, 254, 0.3);
    --shadow-primary-xs: 0 2px 6px rgba(48, 79, 254, 0.3);
    
    /* Typography */
    --font-primary: 'FWC26', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --spacing-xs: clamp(0.5rem, 2vw, 0.75rem);
    --spacing-sm: clamp(0.75rem, 3vw, 1rem);
    --spacing-md: clamp(1rem, 4vw, 1.5rem);
    --spacing-lg: clamp(1.5rem, 5vw, 2rem);
    --spacing-xl: clamp(2rem, 6vw, 3rem);
    
    /* Border Radius */
    --radius-button: 0 50px 50px 50px;
    
    /* Transitions */
    --transition-base: 0.3s ease-in-out;
    
    /* Breakpoints (for reference) */
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
}

/* ==========================================================================
   Base Reset & Global Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: var(--color-white);
    font-family: var(--font-primary);
    color: var(--color-text);
}

body.login-splash-active {
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
   -webkit-touch-callout: none; 
    pointer-events: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
}

/* ==========================================================================
   Splash Screen
   ========================================================================== */

.login-splash {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    background: var(--color-black);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    overflow: hidden;
}

.login-splash--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-splash__video {
    width: 100dvw;
    height: 100dvh;
    max-width: 100%;
    max-height: 100%;
    max-width: 100dvw;
    max-height: 100dvh;
    object-fit: cover;
    object-position: center;
    display: block;
    background: var(--color-black);
}

/* ==========================================================================
   Login Wrapper - Main Container
   ========================================================================== */

.login-wrapper {
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    background-color: var(--color-white);
    max-width: 1440px;
    margin-inline: auto;
    width: 100%;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

body.login-splash-active .login-wrapper {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Center content only on taller screens with extra vertical space */
@media (min-height: 800px) {
    .login-wrapper {
        justify-content: center;  /* Center all content when extra vertical space */
    }
}

/* Desktop: Two-column layout */
@media (min-width: 768px) {
    .login-wrapper {
        flex-direction: row;
        max-height: 100dvh;
        overflow: hidden;
    }
}

/* ==========================================================================
   Login Content - Left Column
   ========================================================================== */

.login-content {
    display: flex;
    flex-direction: column;
    padding-inline: var(--spacing-lg);
    padding-bottom: 0;
    padding-top: 4rem;
}

@media (min-width: 768px) {
    .login-content {
        flex: 0 0 50%;  /* Exactly 50% - equal columns */
        justify-content: center;  /* Center content vertically on desktop */
        padding: var(--spacing-lg) clamp(1.5rem, 3vw, 3rem);  /* Tighter padding */
        min-height: 100dvh;
    }
}

/* ==========================================================================
   Logo Section (Mobile Only)
   ========================================================================== */

.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--spacing-lg);  /* Small gap before heading */
}

.logo-image {
    width: clamp(200px, 60vw, 240px);
    height: auto;
    aspect-ratio: 240 / 96;
    object-fit: contain;
}

/* Hide logo on desktop */
@media (min-width: 768px) {
    .login-logo {
        display: none;
    }
}

/* ==========================================================================
   Main Content Container
   ========================================================================== */

.login-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);  /* 16px - tighter spacing */
    max-width: 400px;
    margin-inline: auto;
    width: 100%;
    padding-block: var(--spacing-sm);  /* Compact vertical padding */
}

@media (min-width: 768px) {
    .login-main {
        gap: clamp(1rem, 2.5vh, 1.5rem);  /* 16-24px - tighter spacing */
        padding-block: var(--spacing-md);  /* Moderate padding on desktop */
        max-width: none;  /* Remove constraint - controlled by wrapper max-width */
    }
}

/* ==========================================================================
   Heading Styles
   ========================================================================== */

.login-heading {
    text-align: center;
    font-family: var(--font-primary);
    font-size: clamp(20px, 5vw, 28px);
    line-height: 1.4;
    letter-spacing: 0;
    margin: 0;
}

/* "Jump In." - Regular */
.heading-line-1 {
    font-weight: 400;
    color: var(--color-black);
}

/* "The Experience" - Bold Primary Color */
.heading-line-2 {
    font-weight: 700;
    color: var(--color-primary);
}

/* "Starts Here." - Regular */
.heading-line-3 {
    display: block;
    font-weight: 400;
    color: var(--color-black);
}

@media (min-width: 768px) {
    .login-heading {
        font-size: clamp(24px, 3vw, 36px);
        white-space: nowrap;  /* Prevent line wrapping on larger screens */
    }
}

/* ==========================================================================
   Login Button
   ========================================================================== */

.login-button {
    width: 100%;
    max-width: 326px;
    height: clamp(50px, 12vw, 53px);
    background-color: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: clamp(16px, 4vw, 18px);
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    border-radius: var(--radius-button);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-primary-sm);
    -webkit-tap-highlight-color: transparent;
}

.login-button:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary-md);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-primary-xs);
}

.login-button:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

/* ==========================================================================
   Terms Text
   ========================================================================== */

.login-terms {
    font-family: var(--font-primary);
    font-weight: 100;
    font-size: clamp(11px, 2.5vw, 12px);
    line-height: 1.5;
    letter-spacing: 0;
    text-align: center;
    color: var(--color-text);
    margin: 0;
    max-width: 90%;
}

.terms-link {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-base);
}

.terms-link:hover {
    color: var(--color-primary);
}

/* ==========================================================================
   Image Section (All Devices)
   ========================================================================== */

/* Mobile: Below content, full width */
.login-image {
    display: flex;
    width: 100%;
    min-height: clamp(264px, 25dvh, 552px);
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.bird-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Desktop: Right column, 50% width */
@media (min-width: 768px) {
    .login-image {
        flex: 0 0 50%;  /* Exactly 50% - equal columns */
        min-height: 100dvh;
    }
    
    .bird-image {
        width: 100%;
        max-width: 681px;  /* Target width */
        height: auto;
        max-height: 552px;  /* Target height */
        object-fit: contain;  /* Preserve aspect ratio */
        object-position: center;
    }
}

/* ==========================================================================
   Loading States & Accessibility
   ========================================================================== */

/* Loading state for images - show shimmer until loaded */
.logo-image,
.bird-image {
    background: linear-gradient(90deg, var(--color-skeleton-start) 25%, var(--color-skeleton-mid) 50%, var(--color-skeleton-start) 75%);
    background-size: 300% 100%;
}

/* Animate shimmer while loading */
.logo-image:not(.loaded),
.bird-image:not(.loaded) {
    animation: loading 1.5s infinite;
}

/* Remove background and animation once loaded */
.logo-image.loaded,
.bird-image.loaded {
    animation: none;
    background: none;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}
