/* FDMG Innovation Hub - 80s Retro-Futuristic Landing Page */
/* Custom CSS with animations and sharp-cornered design */

/* CSS Custom Properties for 80s Retro Theme */
:root {
    --color-dark-purple: #221838;
    --color-chestnut: #9F3C23;
    --color-fawn: #F9D7AB;
    --color-dark-purple-2: #0F0B29;
    --color-rose-ebony: #f4bc5a;
    
    /* Animation variables */
    --ufo-float-duration: 6s;
    --logo-float-duration: 8s;
    --star-sparkle-duration: 4s;
    --tractor-beam-opacity: 0.6;
}

/* Global overrides to ensure sharp corners */
* {
    border-radius: 0 !important;
}

/* Text link styles for inline content */
a:not([class]) {
    color: var(--color-rose-ebony);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

a:not([class]):hover {
    color: var(--color-fawn);
    text-decoration-thickness: 2px;
}

/* Links within paragraphs and text content */
p a, 
.text-fawn a:not([class]),
.text-rose-ebony a:not([class]) {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--color-rose-ebony);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: all 0.2s ease;
}

p a:hover,
.text-fawn a:not([class]):hover,
.text-rose-ebony a:not([class]):hover {
    text-decoration-color: var(--color-fawn);
    text-decoration-thickness: 2px;
}

/* Strong emphasis for links in text */
p strong a:not([class]) {
    font-weight: inherit;
}

/* Audience-based content visibility */
/* Default view (techies): hide manager content */
.audience-techies .for-managers {
    display: none !important;
}

/* Managers view: hide techie content */
.audience-managers .for-techies {
    display: none !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero Background Effects - Circular Sun with Horizontal Cutouts */
.sun-background {
    width: min(590px, 84vw);
    border-radius: 50% !important; /* Override global sharp corners rule */
    aspect-ratio: 1/1; /* Ensure perfect circle */
    background: linear-gradient(
        to bottom, /* Top to bottom gradient */
        var(--color-dark-purple) 0%,
        #ba310f 100% /* Chestnut */
    );
    /* Horizontal cutout mask - creates retro striped effect */
    mask-image: repeating-linear-gradient(
        to bottom,
        black 0%,
        black 35%,
        transparent 35%,
        transparent 38%,
        black 38%,
        black 44%,
        transparent 44%,
        transparent 49%,
        black 49%,
        black 55%,
        transparent 55%,
        transparent 61%,
        black 61%,
        black 100%
    );
    -webkit-mask-image: repeating-linear-gradient(
        to bottom,
        black 0%,
        black 35%,
        transparent 35%,
        transparent 38%,
        black 38%,
        black 44%,
        transparent 44%,
        transparent 49%,
        black 49%,
        black 55%,
        transparent 55%,
        transparent 61%,
        black 61%,
        black 100%
    );
    mask-size: 100% 100%;
    -webkit-mask-size: 100% 100%;
}

.hero-title {
    z-index: 1;
}

/* UFO Group Animation (UFO + tractor beam move together) */
.hero-middle {
    margin-top: max(-20vw, -230px);
    margin-bottom: min(13vw, 120px);
}

.ufo-group {
    animation: ufoGroupFloat var(--ufo-float-duration) ease-in-out infinite;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
    z-index: 2;
    position: relative;
}

.ufo-image {
    margin-left: max(-2vw, -18px);
}

@keyframes ufoGroupFloat {
    0%, 100% { 
        transform: translateY(0px);
    }
    50% { 
        transform: translateY(max(-4vw,-20px));
    }
}

/* Tractor Beam Effects */
.tractor-beam-container {
    pointer-events: none;
    margin-top: max(-19vw, -215px);
}

.tractor-beam-hole {
    width: 21%;
    height: min(2vw, 22px);
    background: rgba(77, 255, 255, 0.5); /* #4dffff */
    border: 3px solid rgba(77, 255, 255, 0.7);
    border-radius: 50% !important;
    position: relative;
    box-shadow: 
        0 0 25px rgba(77, 255, 255, 0.8),
        inset 0 0 20px rgba(77, 255, 255, 0.4),
        0 0 40px rgba(77, 255, 255, 0.4);
    animation: beamPulse 3s ease-in-out infinite;
}

.tractor-beam-light {
    width: 100%;
    height: 30vh;
    position: relative;
    background: linear-gradient(
        to bottom,
        rgba(77, 255, 255, 0.5) 0%,
        rgba(77, 255, 255, 0.3) 20%,
        rgba(0, 191, 255, 0.2) 40%,
        rgba(77, 255, 255, 0.15) 60%,
        rgba(77, 255, 255, 0.1) 80%,
        rgba(77, 255, 255, 0.0) 100%
    );
    clip-path: polygon(39.5% 0%, 60.5% 0%, 95% 100%, 5% 100%);
    -webkit-clip-path: polygon(39.5% 0%, 60.5% 0%, 95% 100%, 5% 100%);
    position: absolute;
    top: 1vw;
    left: 0;
    animation: beamPulse 3s ease-in-out infinite;
    filter: blur(3px);
}

@keyframes beamPulse {
    0%, 100% { 
        opacity: 0.6;
    }
    50% { 
        opacity: 1; 
    }
}

/* Independent Logo Floating Animation */
.logos-container {
    pointer-events: none;
}

.floating-logo {
    position: absolute;
    width: 46px;
    height: auto;
    opacity: 0;
    animation: logoFloatIndependent var(--logo-float-duration) linear infinite;
    will-change: transform, opacity;
    backface-visibility: hidden;
    bottom: -30vh;
    z-index: 3;
    filter: drop-shadow(0 0 8px rgba(77, 255, 255, 0.6));
}

.floating-logo-1 { 
    left: 50%; 
    animation-delay: 0s; 
}
.floating-logo-2 { 
    left: 45%; 
    animation-delay: 1.6s; 
}
.floating-logo-3 { 
    left: 48%; 
    animation-delay: 3.2s; 
}
.floating-logo-4 { 
    left: 55%; 
    animation-delay: 4.8s; 
}
.floating-logo-5 { 
    left: 42%; 
    animation-delay: 6.4s; 
}

/* Manager Floating Logos (Cloud-like Animation) */
.manager-logos-container {
    pointer-events: none;
    position: absolute;
    inset: 0;
    margin-top: max(-19vw, -215px);
}

.manager-floating-logo {
    position: absolute;
    width: 50px;
    height: auto;
    opacity: 0.8;
    animation: cloudFloat var(--ufo-float-duration) ease-in-out infinite;
    will-change: transform;
    backface-visibility: hidden;
    z-index: 3;
    filter: drop-shadow(0 0 12px rgba(249, 215, 171, 0.4));
}

.manager-logo-1 { 
    top: -130px;
    left: 30%;
    animation-delay: 0s;
    width: 70px;
}
.manager-logo-2 { 
    top: -130px;
    left: 40%;
    animation-delay: 1.2s; 
}
.manager-logo-3 { 
    top: -130px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 2.4s; 
}
.manager-logo-4 { 
    top: -130px;
    right: 40%;
    animation-delay: 3.6s; 
}
.manager-logo-5 { 
    top: -130px;
    right: 30%;
    animation-delay: 4.8s; 
}

@keyframes logoFloatIndependent {
    0% {
        transform: translateY(0px) scale(0.7) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
        transform: translateY(-3vh) scale(0.9) rotate(5deg);
    }
    30% {
        opacity: 1;
        transform: translateY(-11vh) scale(1) rotate(-3deg);
    }
    70% {
        opacity: 1;
        transform: translateY(-22vh) scale(0.5) rotate(8deg);
    }
    90% {
        opacity: 0.3;
        transform: translateY(-25vh) scale(0.3) rotate(-5deg);
    }
    100% {
        transform: translateY(-27vh) scale(0.1) rotate(0deg);
        opacity: 0;
    }
}

/* FDMG Logo */
.fdmg-logo {
    position: absolute;
    top: 2rem;
    left: 4rem;
    width: 70px;
    height: auto;
    z-index: 20;
}

.fdmg-logo svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(249, 215, 171, 0.6)) 
            drop-shadow(0 0 40px rgba(249, 215, 171, 0.3));
}

/* CTA Buttons */
.hero-cta  {
    z-index: 10;
}

/* Sparkling Stars */
.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--color-fawn);
    animation: sparkle var(--star-sparkle-duration) ease-in-out infinite;
    box-shadow: 
        0 0 6px 2px rgba(236, 177, 120, 0.8),
        0 0 12px 4px rgba(236, 177, 120, 0.4);
    will-change: opacity, transform;
}

.star::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    width: 1px;
    height: 5px;
    background: var(--color-fawn);
    transform: translateX(-50%);
    box-shadow: 0 0 4px rgba(236, 177, 120, 0.8);
}

.star::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -1px;
    width: 5px;
    height: 1px;
    background: var(--color-fawn);
    transform: translateY(-50%);
    box-shadow: 0 0 4px rgba(236, 177, 120, 0.8);
}

.star-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.star-2 {
    top: 25%;
    right: 15%;
    animation-delay: 1.5s;
}

.star-3 {
    top: 70%;
    left: 20%;
    animation-delay: 3s;
}

.star-4 {
    top: 80%;
    right: 25%;
    animation-delay: 4.5s;
}

.star-5 {
    top: 35%;
    left: 80%;
    animation-delay: 2s;
}

.star-6 {
    top: 65%;
    right: 10%;
    animation-delay: 3.5s;
}

@keyframes sparkle {
    0%, 100% { 
        opacity: 0; 
        transform: scale(0); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1); 
    }
}

/* Flip Card Animation */
.flip-card {
    perspective: 1000px;
}

/* Tablet-specific flip card adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .flip-card {
        max-width: 600px;
        margin: 0 auto;
    }
}

.flip-card-inner {
    position: relative;
    transition: transform 0.6s, visibility 0.6s;
    transform-style: preserve-3d;
}

.flip-card-inner.flipped {
    transform: rotateY(180deg);
}

.flip-card-inner.flipped .flip-card-front {
    opacity: 0;
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: opacity 0.6s;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* Flip Card Overlay Styles */
.flip-card-gradient {
    background: linear-gradient(to right, var(--color-dark-purple) 0%, var(--color-dark-purple) 30%, rgba(34, 24, 56, 0.8) 70%, rgba(34, 24, 56, 0.4) 100%);
}
.flip-card-text-shadow {
    text-shadow: 0px 0px 3px var(--color-dark-purple), 0px 0px 6px var(--color-dark-purple), 0px 0px 9px var(--color-dark-purple), 0px 0px 12px var(--color-dark-purple-2), 0 0 16px var(--color-dark-purple-2);
}
.flip-card-clouds {
    animation: cloudFloat var(--ufo-float-duration) ease-in-out infinite;
}
@keyframes cloudFloat {
    0%, 100% { 
        transform: translateY(0px);
    }
    50% { 
        transform: translateY(-10px);
    }
}

/* Special animation for centered logo with transform */
.manager-logo-3 {
    animation: cloudFloatCentered var(--ufo-float-duration) ease-in-out infinite;
    animation-delay: 2.4s;
}

@keyframes cloudFloatCentered {
    0%, 100% { 
        transform: translateX(-50%) translateY(0px);
    }
    50% { 
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Button Styles - Sharp Corners Only */
.btn-primary {
    background: linear-gradient(var(--color-chestnut), var(--color-chestnut)), 
                rgba(15, 11, 41, 0.3);
    background-blend-mode: normal, multiply;
    color: white;
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
}

.btn-primary:hover {
    background-color: #7D2F1A;
    border-color: var(--color-fawn);
    box-shadow: 0 0 10px rgba(159, 60, 35, 0.5);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background-color: rgba(15, 11, 41, 0.5);
    color: var(--color-fawn);
    font-weight: 600;
    border: 2px solid var(--color-fawn);
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: var(--color-fawn);
    color: var(--color-dark-purple-2);
    text-decoration: none;
}

.btn-accent {
    background-color: var(--color-fawn);
    color: var(--color-dark-purple-2);
    font-weight: 700;
    border: 2px solid var(--color-fawn);
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-accent:hover {
    background-color: #D4A364;
    border-color: #D4A364;
    color: var(--color-dark-purple-2);
    text-decoration: none;
    box-shadow: 0 0 15px rgba(212, 163, 100, 0.4);
}

/* Team Card Styles */
.ceo-card-square {
    width: 280px;
    height: 280px;
    aspect-ratio: 1/1;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ceo-card-square:hover {
    transform: scale(1.02);
}

.team-card:hover .team-avatar {
    transform: scale(1.05);
}

.team-avatar {
    transition: transform 0.3s ease;
}

/* 3:2 Aspect Ratio for Hanna's Card */
.aspect-w-3.aspect-h-2 {
    position: relative;
    aspect-ratio: 3/2;
}

.aspect-w-3.aspect-h-2 img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.aspect-w-3.aspect-h-2:hover img,
.aspect-w-3.aspect-h-2:focus img {
    transform: scale(1.05);
}

/* LinkedIn Button Styling - Retro Futuristic */
.linkedin-btn {
    background: linear-gradient(135deg, #4dffff 0%, rgba(77, 255, 255, 0.8) 100%);
    border: 2px solid #4dffff;
    color: var(--color-dark-purple-2);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 10px rgba(77, 255, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.linkedin-btn:hover {
    background: linear-gradient(135deg, #4dffff 0%, #ffffff 100%);
    box-shadow: 
        0 0 20px rgba(77, 255, 255, 0.6),
        0 0 30px rgba(77, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    color: var(--color-dark-purple-2);
    text-decoration: none;
}

.linkedin-btn i {
    font-size: 14px;
}

/* Job Card Hover Effects */
.job-card {
    transition: all 0.3s ease;
}

.job-card:hover {
    transform: translateY(-5px);
}

/* Closed Job Card Styles */
.job-card.closed {
    position: relative;
    pointer-events: none;
}

.job-card.closed:hover {
    transform: none;
    border-color: var(--color-chestnut);
}

.job-card:not(.closed) .closed-overlay {
    display: none;
}

.job-card.closed .closed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(159, 60, 35, 0.9); /* Semi-transparent chestnut */
    color: var(--color-fawn);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    z-index: 20;
}

/* Unlock Card Hover Effects */
.unlock-card {
    transition: all 0.3s ease;
}

.unlock-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(236, 177, 120, 0.15);
}

/* Level Rings */
.ring {
    border-radius: 50% !important;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .fdmg-logo {
        width: 50px;
        top: 1rem;
        left: 1rem;
    }
    
    .hero-title h1 {
        font-size: 3.5rem;
        line-height: 1;
        margin-bottom: 1rem;
    }
    
    .hero-title p {
        font-size: 1.1rem;
        line-height: 1.4;
        padding: 0 1rem;
    }

    .hero-middle {
        width: 140vw;
        margin-left: -24vw !important;
        margin-top: max(-34vw, -230px);
        overflow-x: clip;
    }

    .ufo-image {
        margin-left: 2vw;
    }

    .tractor-beam-container {
        margin-top: max(-28vw, -215px);
        margin-left: 7vw;
    }

    /* Tablet breakpoint for manager logos */
    .manager-logo-1,
    .manager-logo-2, 
    .manager-logo-3,
    .manager-logo-4,
    .manager-logo-5 {
        top: -220px;
    }
    
    .hero-cta {
        bottom: 2rem;
    }
    
    .btn-secondary, .btn-primary {
        min-height: 44px;
        font-size: 0.875rem;
    }
    
    .flip-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .unlocks-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .jobs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title h1 {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-title p {
        font-size: 1rem;
        padding: 0 0.5rem;
    }

    .ufo-image {
        margin-left: -3vw;
    }

    .tractor-beam-container {
        margin-left: 0;
    }

    .floating-logo {
        bottom: -40vh;
    }

    .manager-logos-container {
        margin-top: max(-28vw, -215px);
        margin-left: 7vw;
    }

    .manager-floating-logo {
        width: 35px;
    }

    .manager-logo-1 {
        width: 50px;
    }

    /* Mobile breakpoint for manager logos */
    .manager-logo-1,
    .manager-logo-2, 
    .manager-logo-3,
    .manager-logo-4,
    .manager-logo-5 {
        top: -80px;
    }

    @keyframes logoFloatIndependent {
        0% {
            transform: translateY(0px) scale(0.7) rotate(0deg);
            opacity: 0;
        }
        10% {
            opacity: 0.8;
            transform: translateY(-4vh) scale(0.9) rotate(5deg);
        }
        30% {
            opacity: 1;
            transform: translateY(-12vh) scale(1) rotate(-3deg);
        }
        70% {
            opacity: 1;
            transform: translateY(-28vh) scale(0.6) rotate(8deg);
        }
        90% {
            opacity: 0.3;
            transform: translateY(-35vh) scale(0.3) rotate(-5deg);
        }
        100% {
            transform: translateY(-38vh) scale(0.1) rotate(0deg);
            opacity: 0;
        }
    }
    
    .hero-cta {
        bottom: 1rem;
        padding: 0 0.5rem;
    }
    
    .hero-cta .grid {
        gap: 0.75rem;
        max-width: 20rem;
    }
    
    .unlocks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .ceo-card-square {
        width: 100%;
        height: 100%;
    }
    
    .btn-secondary, .btn-primary {
        font-size: 0.75rem;
        padding: 0.75rem 1rem;
    }
}

/* Large Desktop Adjustments */
@media (max-height: 770px) {
    .hero-middle {
        margin-bottom: min(13vw, 50px);
    }
}

/* Footer Section Styles */
footer#over-fdmg {
    position: relative;
}

footer#over-fdmg h3 {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

footer#over-fdmg .btn-secondary:hover {
    background-color: var(--color-chestnut);
    color: var(--color-fawn);
    border-color: var(--color-fawn);
}

/* Made With Credits Styling */
.made-with {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.made-with:hover {
    opacity: 1;
}

.made-with-item {
    display: inline-block;
    transition: all 0.2s ease;
}

.made-with-item:hover {
    color: var(--color-fawn);
    transform: translateY(-1px);
}

@media (min-width: 1200px) and (min-height: 900px) {
    
    .hero-title h1 {
        font-size: 6rem !important;
    }
    
    .hero-cta {
        bottom: 2rem !important;
    }
}

/* Performance Optimizations */
.animate-element {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Intersection Observer Animation Triggers */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    .ufo-image,
    .floating-logo,
    .star,
    .tractor-beam-hole,
    .tractor-beam-light {
        animation: none;
    }
    
    .flip-card-inner {
        transition: none;
    }
}

/* Focus States for Accessibility */
.btn-primary:focus,
.btn-secondary:focus,
.btn-accent:focus {
    outline: 2px solid var(--color-fawn);
    outline-offset: 2px;
}

.flip-card:focus-within {
    outline: 2px solid var(--color-fawn);
    outline-offset: 2px;
}

/* Ensure no rounded corners anywhere */
button,
.btn,
input,
textarea,
select,
.card,
.border,
img {
    border-radius: 0 !important;
}

/* Loading Performance */
img {
    loading: lazy;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 3px solid white;
    }
    
    .btn-secondary {
        border: 3px solid var(--color-fawn);
    }
    
    .unlock-card,
    .team-card,
    .job-card {
        border-width: 3px;
    }
}