/* ===== CSS Variables ===== */
:root {
    --background: 210 60% 95%;
    --foreground: 210 8% 18%;
    --card: 0 0% 100%;
    --card-foreground: 210 8% 18%;
    --primary: 358 99% 32%;
    --primary-foreground: 0 0% 100%;
    --muted-foreground: 210 15% 40%;
    --border: 210 30% 85%;
}

/* ===== Base Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background: hsl(210 60% 95%);
    color: hsl(210 8% 18%);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100%;
    overflow-y: auto;
}

/* ===== Keyframe Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(1deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Animation Classes ===== */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.8s ease-out forwards;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse 4s ease-in-out infinite;
}

.animate-bounce-subtle {
    animation: bounce 3s ease-in-out infinite;
}

.spinner {
    animation: spin 1s linear infinite;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* ===== Scroll Animations ===== */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Layout ===== */
#header-wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 50 !important;
    will-change: transform;
}

.header-scrolled {
    background-color: rgba(26, 40, 71, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

main {
    padding-top: 80px;
}

section[id]:not(#home) {
    scroll-margin-top: 50px;
}

/* ===== Mobile Menu ===== */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-menu.active {
    max-height: 500px;
}

/* ===== Hover Effects ===== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -20px rgba(184, 1, 8, 0.3);
}

.hover-scale {
    transition: transform 0.3s ease;
}

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

/* ===== Lightbox ===== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(15, 26, 42, 0.95);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.lightbox.active {
    display: flex;
}

/* ===== Utility Classes ===== */
.touch-manipulation {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* ===== Mobile Optimizations (< 768px) ===== */
@media (max-width: 767px) {
    body {
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }
}

/* ===== Tablet & Small Desktop (768px - 1023px) ===== */
@media (min-width: 768px) {
    main {
        padding-top: 136px;
    }
}

/* ===== Desktop Below 1080p (1024px - 1919px) ===== */
@media (min-width: 1024px) and (max-width: 1919px) {
    html {
        font-size: 12px;
    }

    .container {
        max-width: 1000px !important;
    }

    .hover-lift:hover {
        transform: none;
        box-shadow: none;
    }

    .hover-scale:hover {
        transform: none;
    }

    .animate-fade-in-up,
    .animate-scale-in {
        animation-duration: 0.5s;
    }
}

/* ===== Full HD 1080p and Above (>= 1920px) ===== */
@media (min-width: 1920px) {
    html {
        font-size: 16px;
    }

    .container {
        max-width: 1400px !important;
    }

    section[id]:not(#home) {
        scroll-margin-top: 70px;
    }
}
