html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Instrument Sans', sans-serif;
    background-color: #0a0a0a;
    position: relative;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

h1, h2, h3, h4, h5, h6,
nav a.text-2xl {
    font-family: 'Instrument Serif', serif !important;
    font-weight: 400;
    letter-spacing: 0.01em;
}

footer h3.text-3xl,
footer h3.sm\:text-4xl {
    font-family: 'Instrument Serif', serif !important;
}

footer h3.text-xs,
footer h3.sm\:text-sm {
    font-family: 'Instrument Sans', sans-serif !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
}

#about h4.text-lg,
#about h4.sm\:text-xl {
    font-family: 'Instrument Sans', sans-serif !important;
}

#about h4.text-sm,
#about h4.sm\:text-base {
    font-family: 'Instrument Sans', sans-serif !important;
}

* {
    font-weight: 400 !important;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.05;
    background-size: 150px 150px;
    animation: grain-anim 0.4s steps(1) infinite;
}

body > * {
    position: relative;
    z-index: 2;
}

nav {
    background-color: rgba(0, 0, 0, 0.9) !important;
}

footer {
    background-color: #000000;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

.scroll-arrow {
    animation: bounce 2s ease-in-out infinite;
}

.ticker-wrapper {
    height: 40px;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: flex;
    align-items: center;
    animation: scroll-ticker 60s linear infinite;
    white-space: nowrap;
    will-change: transform;
}

.ticker-item {
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
    padding: 0 3rem;
    display: inline-flex;
    align-items: center;
    height: 40px;
}

@keyframes scroll-ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Custom Checkbox Styling */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

input[type="checkbox"]:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.08);
}

input[type="checkbox"]:checked {
    background-color: #ffffff;
    border-color: #ffffff;
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #0a0a0a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Custom Select Dropdown Styling */
.custom-select-wrapper {
    position: relative;
}

.custom-select {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-select-trigger {
    flex: 1;
    color: rgba(255, 255, 255, 0.5);
}

.custom-select.has-value .custom-select-trigger {
    color: #ffffff;
}

.custom-select-arrow {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.custom-select.active .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select.active .custom-select-arrow path {
    stroke: rgba(255, 255, 255, 0.8);
}

.custom-select:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.custom-select:hover .custom-select-arrow path {
    stroke: rgba(255, 255, 255, 0.8);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 100;
}

.custom-select-wrapper.active .custom-select-options {
    max-height: 300px;
    overflow-y: auto;
    opacity: 1;
}

.custom-select-option {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 400;
}

.custom-select-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.custom-select-option.selected {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

/* Scrollbar styling for custom select */
.custom-select-options::-webkit-scrollbar {
    width: 8px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.custom-select-options::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}