/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Gradient background */
.gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.6;
    z-index: -10;
}

/* Blur effect */
.blur-effect {
    height: 0;
    width: 40rem;
    position: absolute;
    top: 20%;
    right: 5%;
    box-shadow: 0 0 900px 20px #e99b63;
    transform: rotate(-30deg);
    z-index: -10;
}

/* Header styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    position: relative;
    z-index: 50;
}

@media (min-width: 640px) {
    .header {
        padding: 1rem 1.5rem;
    }
}

@media (min-width: 768px) {
    .header {
        padding: 1rem 2rem;
    }
}

@media (min-width: 1024px) {
    .header {
        padding: 1rem 5rem;
    }
}

@media (min-width: 1280px) {
    .header {
        padding: 1.5rem 6rem;
    }
}

.logo {
    font-size: 1.5rem;
    font-weight: 300;
    margin: 0;
}

@media (min-width: 480px) {
    .logo {
        font-size: 1.875rem;
    }
}

@media (min-width: 768px) {
    .logo {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) {
    .logo {
        font-size: 3rem;
    }
}

@media (min-width: 1280px) {
    .logo {
        font-size: 3.5rem;
    }
}

/* Desktop navigation */
.nav-desktop {
    display: none;
    align-items: center;
    gap: 3rem;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-link {
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    z-index: 50;
}

.nav-link:hover {
    color: #d1d5db;
}

/* Sign in button */
.btn-signin {
    display: none;
    background-color: #a7a7a7;
    color: #000;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    border: none;
    font-weight: 500;
    transition: all 0.5s ease;
    cursor: pointer;
    z-index: 50;
}

@media (min-width: 768px) {
    .btn-signin {
        display: block;
    }
}

.btn-signin:hover {
    background-color: #fff;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: block;
    font-size: 1.875rem;
    padding: 0.5rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    z-index: 50;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 4rem;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 1.25rem;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 40;
}

.mobile-menu.show {
    display: block;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.mobile-nav-link {
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    z-index: 50;
}

.mobile-nav-link:hover {
    color: #d1d5db;
}

/* Hero section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: calc(100vh - 4rem);
    position: relative;
    padding: 2rem 1rem;
}

@media (min-width: 640px) {
    .hero {
        min-height: calc(90vh - 4rem);
        padding: 3rem 1.5rem;
    }
}

@media (min-width: 768px) {
    .hero {
        padding: 4rem 2rem;
    }
}

@media (min-width: 1024px) {
    .hero {
        flex-direction: row;
        align-items: flex-start;
        padding: 5rem 5rem 2rem;
        min-height: calc(90vh - 6rem);
    }
}

@media (min-width: 1280px) {
    .hero {
        padding: 6rem 6rem 3rem;
    }
}

.hero-content {
    max-width: 100%;
    width: 100%;
    z-index: 10;
    text-align: center;
    margin-top: 2rem;
}

@media (min-width: 480px) {
    .hero-content {
        max-width: 28rem;
        margin: 0 auto;
        margin-top: 3rem;
    }
}

@media (min-width: 640px) {
    .hero-content {
        max-width: 32rem;
        margin-top: 4rem;
    }
}

@media (min-width: 768px) {
    .hero-content {
        max-width: 36rem;
        margin-top: 5rem;
    }
}

@media (min-width: 1024px) {
    .hero-content {
        max-width: 36rem;
        margin-left: 5%;
        margin-top: 0;
        text-align: left;
    }
}

@media (min-width: 1280px) {
    .hero-content {
        max-width: 42rem;
    }
}

/* Tag box */
.tag-box {
    position: relative;
    width: 100%;
    max-width: 16rem;
    height: 2.5rem;
    background: linear-gradient(to right, #656565, #e99b63);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    border-radius: 9999px;
    margin: 0 auto 2rem;
}

@media (min-width: 480px) {
    .tag-box {
        width: 14rem;
    }
}

@media (min-width: 640px) {
    .tag-box {
        width: 12rem;
    }
}

@media (min-width: 1024px) {
    .tag-box {
        margin: 0 0 2rem 0;
    }
}

.tag-content {
    position: absolute;
    inset: 3px;
    background-color: #000;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Hero title */
.hero-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin: 1.5rem 0;
    line-height: 1.2;
}

@media (min-width: 480px) {
    .hero-title {
        font-size: 1.875rem;
        margin: 2rem 0;
    }
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 2.25rem;
    }
}

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

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

@media (min-width: 1280px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

/* Hero description */
.hero-description {
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    color: #9ca3af;
    max-width: 100%;
    line-height: 1.5;
    margin-bottom: 2rem;
}

@media (min-width: 480px) {
    .hero-description {
        font-size: 1rem;
        max-width: 25rem;
        margin: 0 auto 2.5rem;
    }
}

@media (min-width: 640px) {
    .hero-description {
        font-size: 1.125rem;
        margin-bottom: 3rem;
    }
}

@media (min-width: 768px) {
    .hero-description {
        max-width: 28rem;
    }
}

@media (min-width: 1024px) {
    .hero-description {
        max-width: 30rem;
        margin: 0 0 3rem 0;
    }
}

@media (min-width: 1280px) {
    .hero-description {
        max-width: 35rem;
    }
}

/* Hero buttons */
.hero-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 1024px) {
    .hero-buttons {
        justify-content: flex-start;
    }
}

.btn-secondary {
    border: 1px solid #2a2a2a;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    color: #fff;
    flex: 1;
    justify-content: center;
    min-width: 120px;
}

@media (min-width: 480px) {
    .btn-secondary {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        gap: 0.5rem;
        flex: none;
    }
}

@media (min-width: 640px) {
    .btn-secondary {
        padding: 0.75rem 1.25rem;
        font-size: 1.125rem;
    }
}

.btn-secondary:hover {
    background-color: #1a1a1a;
}

.btn-primary {
    border: 1px solid #2a2a2a;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    background-color: #d1d5db;
    color: #000;
    flex: 1;
    justify-content: center;
    min-width: 120px;
}

@media (min-width: 480px) {
    .btn-primary {
        padding: 0.5rem 1.5rem;
        font-size: 0.875rem;
        gap: 0.5rem;
        flex: none;
    }
}

@media (min-width: 640px) {
    .btn-primary {
        padding: 0.75rem 2rem;
        font-size: 1.125rem;
    }
}

@media (min-width: 768px) {
    .btn-primary {
        padding: 0.75rem 2.5rem;
    }
}

.btn-primary:hover {
    background-color: #1a1a1a;
    color: #fff;
}

/* Spline container - positioning optimized for mobile and desktop */
.spline-container {
    position: absolute;
    bottom: -10%;
    left: 0;
    right: 0;
    height: 50vh;
    width: 100%;
    margin-left: 10%;
    z-index: 1;
}

@media (min-width: 480px) {
    .spline-container {
        height: 60vh;
    }
}

@media (min-width: 640px) {
    .spline-container {
        height: 70vh;
        left: -5%;
        width: 110%;
        bottom: -15%;
    }
}

@media (min-width: 768px) {
    .spline-container {
        height: 80vh;
        left: -10%;
        width: 120%;
        bottom: -20%;
        margin-top: 0;
        margin-left: 0;
    }
}

@media (min-width: 1024px) {
    .spline-container {
        top: 10%;
        bottom: -10%;
        left: 35%;
        right: 0;
        height: 100%;
        width: 65%;
    }
}

@media (min-width: 1280px) {
    .spline-container {
        left: 30%;
        width: 70%;
    }
}

spline-viewer {
    width: 100%;
    height: 100%;
    display: block;
    animation: robotEntrance 2s ease-out forwards;
    opacity: 0;
    transform: scale(0.8) translateY(50px);
}

/* Animation d'arrivée du robot */
@keyframes robotEntrance {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(50px) rotateX(15deg);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.9) translateY(20px) rotateX(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotateX(0deg);
    }
}

/* Animation de flottement continue */
@keyframes robotFloat {
    0%, 100% {
        transform: translateY(0px) rotateY(0deg);
    }
    25% {
        transform: translateY(-10px) rotateY(2deg);
    }
    50% {
        transform: translateY(-5px) rotateY(0deg);
    }
    75% {
        transform: translateY(-15px) rotateY(-2deg);
    }
}

/* Appliquer l'animation de flottement après l'entrée */
spline-viewer.loaded {
    animation: robotFloat 6s ease-in-out infinite;
}

/* Animation des particules */
@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-30px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(0.5);
    }
}

/* AOS animations */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Mobile optimizations */
@media (max-width: 479px) {
    .hero {
        padding: 1rem 0.75rem;
        min-height: calc(100vh - 3rem);
    }
    
    .hero-content {
        margin-top: 1rem;
    }
    
    .hero-title {
        font-size: 1.25rem;
        margin: 1rem 0;
    }
    
    .hero-description {
        font-size: 0.8rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        gap: 0.5rem;
    }
    
    .btn-secondary,
    .btn-primary {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        min-width: 100px;
    }
    
    .spline-container {
        height: 45vh;
        bottom: -5%;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn-secondary:hover,
    .btn-primary:hover {
        transform: none;
        box-shadow: none;
    }
    
    .nav-link:hover,
    .mobile-nav-link:hover {
        color: #fff;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .gradient-bg {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}
