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

:root {
    /* Strong ease-out for snappy UI interactions */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    /* Strong ease-in-out for on-screen movement */
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
    
    /* Warm Sand & Rose Gold Palette */
    --bg-sand: #FAF8F5;
    --text-charcoal: #2D2A26;
    --accent-rosegold: #D4AF37; /* Rose Gold / Muted Gold */
    --accent-light: #F4EBE1;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-sand);
    color: var(--text-charcoal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-serif {
    font-family: 'Cormorant Garamond', serif;
}

/* 
 * UI Component Building Principles (emil-design-eng) 
 * --------------------------------------------------
 * 1. Buttons must feel responsive (scale on active)
 * 2. Don't use transition: all
 * 3. Don't animate from scale(0)
 * 4. Fast UI animations (under 300ms)
 */

.btn-press {
    transition: transform 160ms var(--ease-out), filter 160ms ease, opacity 160ms ease;
    will-change: transform;
}

.btn-press:active {
    transform: scale(0.97);
}

.card-hover {
    transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .card-hover:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 30px -10px rgba(0,0,0,0.08);
    }
}

/* Crossfade transitions with blur (masks imperfect transitions) */
.blur-transition {
    transition: filter 200ms ease, opacity 200ms ease;
}

/* Staggered Entrance Animations */
.stagger-item {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    /* Will be triggered by IntersectionObserver */
}

.stagger-item.in-view {
    animation: slideUpFade 400ms var(--ease-out) forwards;
}

/* CSS starting style pattern */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 
 * Hardware-accelerated Comparison Slider
 * Uses clip-path instead of multiple DOM wrappers
 */
.slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    border-radius: 1.5rem;
    overflow: hidden;
    touch-action: pan-y; /* Crucial for custom touch handling */
    cursor: ew-resize;
    user-select: none;
    -webkit-user-drag: none;
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.1);
}

.slider-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* The top image will be clipped via JS */
.slider-top {
    z-index: 2;
    clip-path: inset(0 50% 0 0); /* Default 50% */
}

/* The divider line */
.slider-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: white;
    z-index: 3;
    pointer-events: none;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* The handle pill */
.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    z-index: 4;
    transform: translate(-50%, -50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    color: var(--text-charcoal);
}

/* Reduce motion accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
