/* Custom CSS */

:root {
    --primary-color: #c36a51;
    /* Clay 500 */
    --secondary-color: #7a3426;
    /* Clay 800 */
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Canvas Background Pattern */
.canvas-area {
    background-color: #f9fafb;
    /* Gray 50 */
    background-image: radial-gradient(#d1d5db 1px, transparent 1px);
    background-size: 24px 24px;
}

.sidebar-scroll {
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background-color: #e5e7eb;
    border-radius: 20px;
}

/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

/* HD Notification Animation - Center Big to Corner Small */
@keyframes hd-notification-enter {
    0% {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
        filter: blur(8px);
    }

    30% {
        opacity: 1;
        filter: blur(0px);
        transform: translate(-50%, -50%) scale(1.8);
    }

    100% {
        position: fixed;
        top: auto;
        left: auto;
        right: 1rem;
        bottom: 1rem;
        transform: translate(0, 0) scale(1);
        opacity: 1;
        filter: blur(0px);
    }
}

/* Wrapper needed because we can't animate position changes directly */
.hd-notification-animated {
    animation: hd-notification-swoosh 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes hd-notification-swoosh {
    0% {
        opacity: 0;
        transform: scale(2.5) translateY(-200px);
        filter: blur(4px);
    }

    20% {
        opacity: 1;
        transform: scale(2) translateY(-100px);
        filter: blur(2px);
    }

    50% {
        transform: scale(1.5) translateY(-30px);
        filter: blur(0px);
    }

    75% {
        transform: scale(1.1) translateY(5px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0px);
    }
}

/* Glow pulse effect for HD badge */
@keyframes hd-glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(147, 51, 234, 0.5), 0 0 40px rgba(147, 51, 234, 0.3), 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }

    50% {
        box-shadow: 0 0 30px rgba(147, 51, 234, 0.7), 0 0 60px rgba(147, 51, 234, 0.4), 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }
}

.hd-notification-glow {
    animation: hd-glow-pulse 2s ease-in-out infinite;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Comparison Slider */
#comparison-slider {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#comparison-slider-handle {
    touch-action: none;
    transition: opacity 0.2s ease;
}

#comparison-slider-handle:hover {
    opacity: 0.9;
}

#comparison-slider-handle:active {
    cursor: grabbing;
}

#comparison-after-container {
    transition: clip-path 0s linear;
}

/* Prevent text selection while dragging */
.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* ========================================
   Hero Section - "The Focused Gateway"
   ======================================== */

/* Feature List Items */
.hero-feature-item {
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 1;
}

.hero-feature-item:hover {
    background: rgba(255, 255, 255, 0.5);
}

.hero-feature-item.active {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.hero-feature-item.active .hero-feature-indicator {
    background-color: #b05039 !important;
    /* brand-600 */
}

.hero-feature-item:not(.active) .hero-feature-indicator {
    background-color: #6b7280 !important;
    /* gray-500 - visible indicator */
}

.hero-feature-item.active h3 {
    color: #111827;
    /* gray-900 */
}

.hero-feature-item:not(.active) h3 {
    color: #1f2937;
    /* gray-800 - very dark, fully readable */
}

/* Carousel Wrapper */
.hero-carousel-wrapper {
    /* Clean, borderless container */
}

/* Carousel Stack - All slides stacked vertically */
.hero-carousel-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Individual Carousel Slides */
.hero-carousel-slide {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 85%;
    max-width: 600px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.35;
    transform: translate(-50%, -50%) scale(0.75);
    filter: blur(2px);
    pointer-events: none;
}

/* Position slides in stack */
.hero-carousel-slide:nth-child(1) {
    --slide-index: 0;
}

.hero-carousel-slide:nth-child(2) {
    --slide-index: 1;
}

.hero-carousel-slide:nth-child(3) {
    --slide-index: 2;
}

.hero-carousel-slide:nth-child(4) {
    --slide-index: 3;
}

/* Active slide - centered */
.hero-carousel-slide.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(0);
    pointer-events: auto;
    z-index: 10;
}

/* Slides above active */
.hero-carousel-slide.above {
    opacity: 0.4;
    transform: translate(-50%, -170%) scale(0.75);
    z-index: 5;
}

.hero-carousel-slide.above-2 {
    opacity: 0.15;
    transform: translate(-50%, -240%) scale(0.6);
    z-index: 4;
}

/* Slides below active */
.hero-carousel-slide.below {
    opacity: 0.4;
    transform: translate(-50%, 70%) scale(0.75);
    z-index: 5;
}

.hero-carousel-slide.below-2 {
    opacity: 0.15;
    transform: translate(-50%, 140%) scale(0.6);
    z-index: 4;
}

/* Hidden slides (too far from active) */
.hero-carousel-slide.hidden {
    opacity: 0;
    transform: translate(-50%, 200%) scale(0.5);
    pointer-events: none;
}

/* Comparison slider inside carousel slides */
.hero-carousel-slide .hero-comparison-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    cursor: ew-resize;
}

.hero-carousel-slide .hero-comparison-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

.hero-carousel-slide .hero-comparison-before {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-carousel-slide .hero-comparison-after {
    position: absolute;
    inset: 0;
    clip-path: inset(0 0 0 50%);
}

.hero-carousel-slide .hero-slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: white;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.hero-carousel-slide .hero-slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-carousel-slide .hero-slider-handle svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    color: #b05039;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 1023px) {
    .hero-carousel-slide {
        width: 90%;
    }

    .hero-carousel-slide.above,
    .hero-carousel-slide.below {
        transform: scale(0.85) translateY(-90%);
    }

    .hero-carousel-slide.below {
        transform: scale(0.85) translateY(90%);
    }
}

@media (max-width: 640px) {
    .hero-carousel-wrapper {
        height: 350px;
    }

    .hero-carousel-slide {
        width: 95%;
    }

    .hero-carousel-slide.above,
    .hero-carousel-slide.below {
        opacity: 0.25;
        transform: scale(0.8) translateY(-80%);
    }

    .hero-carousel-slide.below {
        transform: scale(0.8) translateY(80%);
    }
}