/* ==========================================
   1. VARIABLES & CORE SETTINGS
   ========================================== */
:root {
    --bg-main: #0a0510;
    --bg-card: #29193c;
    --color-primary: #a855f7;
    --dark-color-primary: #530f93;
    --color-accent: #ec4899;
    --text-main: #ffffff;
    --text-secondary: #e2e8f0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: system-ui, sans-serif;
    margin: 0;
    overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* ==========================================
   2. HEADER & NAVIGATION
   ========================================== */
header {
    display: flex;
    justify-content: space-between;
    padding: 2rem;
    align-items: center;
    box-sizing: border-box;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.logo span {
    color: var(--color-accent);
}

/* ==========================================
   3. HERO SECTION & BACKGROUND FIX
   ========================================== */
.hero {
    position: relative;
    text-align: center;
    min-height: calc(100vh - 96px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* We no longer need isolation: isolate because we are using positive layering */
}

.hero-background {
    position: absolute;
    top: -80px;
    left: 0;
    width: 100%;
    height: 120%;
    z-index: 1; /* Move up to layer 1 */
    will-change: transform;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25; /* Subtle backdrop blend */
    
    /* Perfect fade out at the bottom */
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2; /* Force text content to sit cleanly ON TOP of the background layer */
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    box-sizing: border-box;
}

/* ==========================================
   4. ACTIONS & BUTTONS
   ========================================== */
.hero-actions { 
    display: flex; 
    flex-direction: row;
    justify-content: center; 
    gap: 1rem; 
    width: 100%; 
    max-width: 100%;
    box-sizing: border-box;
    margin: 2.5rem auto 0; 
    padding: 0 1.5rem;
}

.btn { 
    flex: 1;
    display: inline-flex;
    align-items: center; 
    justify-content: center; 
    text-align: center;
    padding: 1.1rem 1.5rem; 
    border-radius: 12px; 
    font-weight: 700; 
    cursor: pointer; 
    text-decoration: none; 
    font-size: 1rem;
    border: none;
    outline: none;
    box-sizing: border-box;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary { 
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary)); 
    color: white; 
}

.btn-secondary { 
    background: transparent;
    color: white; 
    border: 2px solid var(--color-primary) !important;
}

/* ==========================================
   5. DRAGGABLE CAROUSEL (PROXIMITY SNAP)
   ========================================== */
.gallery {
    overflow: hidden;
    width: 100%;
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header::before {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    margin: 0 auto 1rem auto;
    border-radius: 2px;
}

.carousel-container {
    padding: 0 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 1rem 0;
    -webkit-overflow-scrolling: touch; 
    cursor: grab;
    scrollbar-width: none; 
    
    /* FIX: Changed from mandatory to proximity for softer alignment behavior */
    scroll-snap-type: x proximity; 
    scroll-padding: 0 1.5rem;
    
    /* FIX: Prevents text highlighting anomalies completely during dragging gestures */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.carousel::-webkit-scrollbar { 
    display: none; 
}

/* Safely turns off snapping parameters while active drag movement occurs */
.carousel.dragging {
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
    cursor: grabbing;
}

/* ==========================================
   6. SPOTLIGHT CARDS
   ========================================== */
.spotlight-card {
    width: 290px;
    height: 440px;
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
    flex-shrink: 0;
    position: relative;
    scroll-snap-align: center;
}

.spotlight-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--x) var(--y), var(--color-primary), transparent 40%);
    opacity: 0.25;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.spotlight-card:hover::before {
    opacity: 0.5;
}

.spotlight-card > * {
    position: relative;
    z-index: 1;
}

.image-slot {
    width: 100%;
    height: 55%;
    background: rgba(0, 0, 0, 0.2); 
    padding: 1.5rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-slot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.spotlight-card:hover .image-slot img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-grow: 1;
}

.card-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.4rem;
    color: var(--text-main);
}

.card-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ==========================================
   7. FOOTER & RESPONSIVE QUERIES
   ========================================== */
footer { 
    text-align: center; 
    padding: 4rem 1rem; 
    border-top: 1px solid rgba(255,255,255,0.1); 
    color: #64748b; 
}

@media (min-width: 768px) {
    .hero-actions {
        max-width: 550px;
    }
    
    .btn {
        padding: 1.4rem 2.5rem; 
        font-size: 1.15rem;
    }

    .spotlight-card {
        width: 380px;
        height: 520px;
    }
}