@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Inter:wght@300;400;500;600&display=swap');

/* Base Styles & Grainy Gradient Background */
body {
    background-color: #0b0f19;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(30, 58, 138, 0.15), transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(15, 23, 42, 0.5), transparent 50%);
    background-attachment: fixed;
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: -1;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.04"/%3E%3C/svg%3E');
}

/* Typography */
.font-serif {
    font-family: 'Cormorant Garamond', serif;
}

/* Glassmorphism Cards */
.glass-panel {
    background: rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.glass-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
    position: relative;
}

.glass-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(125deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 40%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    z-index: 1;
}

.glass-card > * {
    position: relative;
    z-index: 2;
}

.glass-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Specific Card Hover Effects */
.card-image-container {
    overflow: hidden;
    position: relative;
}
.glass-card .card-image {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.glass-card:hover .card-image {
    transform: scale(1.05);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggering */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Magnetic Button */
.magnetic-btn-wrapper {
    display: inline-block;
    padding: 1.5rem;
    margin: -1.5rem;
    cursor: pointer;
}

.magnetic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.9);
    color: #0b0f19;
    border-radius: 9999px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05em;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
    pointer-events: none; /* Let wrapper handle events */
}

.magnetic-btn-wrapper:hover .magnetic-btn {
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(255,255,255,0.2);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0b0f19;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Utilities */
.text-balance {
    text-wrap: balance;
}
