/*
Theme Name: NASIB
Version: 1.0
Text Domain: nasib
*/

:root {
    --bg-primary: #F0EAD8;
    --bg-secondary: #E6DFCC;
    --bg-tertiary: #EDE7D5;
    --text-primary: #1C3A2A;
    --text-secondary: #8A9A7E;
    --accent-green: #3D7A58;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'IBM Plex Mono', monospace;
    overflow-x: hidden;
    cursor: none;
}

h1,
h2,
h3,
.font-serif {
    font-family: 'Playfair Display', serif;
}

a,
button,
summary {
    cursor: none;
}

::selection {
    background: var(--accent-green);
    color: var(--bg-primary);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus\:not-sr-only:focus {
    position: fixed;
    width: auto;
    height: auto;
    padding: 0.75rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Custom Cursor */
#custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

#custom-cursor svg {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(28, 58, 42, 0.25));
}

#custom-cursor.hovering svg {
    transform: scale(1.25) rotate(-30deg);
}

/* Texture Overlay */
.texture-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0.08;
    z-index: 9998;
    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.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* Scrollbar Utility */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Scroll Animations */
.fade-in-up,
.fade-in-left {
    opacity: 0;
    transition:
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.fade-in-up {
    transform: translateY(32px);
}

.fade-in-left {
    transform: translateX(-32px);
}

.fade-in-up.is-visible,
.fade-in-left.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

.hero-tagline {
    opacity: 0;
    transition: opacity 0.8s ease-out 0.4s;
}

.hero-tagline.is-visible {
    opacity: 1;
}

/* Marquee Animation */
@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    display: inline-block;
    min-width: max-content;
    white-space: nowrap;
    animation: marquee 24s linear infinite;
}

/* Rotating Badge */
@keyframes spinSlow {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spinSlow 18s linear infinite;
}

/* Scroll Indicator */
@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
    }

    50% {
        transform: translateY(150%);
    }

    100% {
        transform: translateY(150%);
    }
}

.animate-scroll-line {
    animation: scrollLine 1.8s ease-in-out infinite;
}

/* Gallery Drag */
.gallery-container {
    cursor: grab;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.gallery-container:active,
.gallery-container.is-dragging {
    cursor: grabbing;
}

.gallery-item {
    scroll-snap-align: center;
}

/* FAQ */
.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary {
    list-style: none;
}

/* Motion Safety */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }

    .fade-in-up,
    .fade-in-left,
    .hero-tagline {
        opacity: 1;
        transform: none;
    }
}

/* Mobile Cursor Fix */
@media (max-width: 767px) {
    body,
    a,
    button,
    summary {
        cursor: auto;
    }
}