:root {
    --texdex-gold: #B4A596;
    --texdex-gold-light: #D2C9C0;
    --texdex-gold-dark: #968677;
    --bg-deep: #050505;
    --glass-border: rgba(180, 165, 150, 0.15);

    --font-header: 'Sora', sans-serif;
    --font-body: 'Lexend', sans-serif;
}

body {
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-header) !important;
}

/* Zero-Latency Security Mask (Prevents FOUC) */
.security-lock, .security-lock body {
    visibility: hidden !important;
    background: #050505 !important;
    overflow: hidden !important;
}

/* Global Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Premium Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #050505;
}

::-webkit-scrollbar-thumb {
    background: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #2a2a2a;
    transition: background 0.3s ease;
}


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

.animate-scroll {
    animation: scroll 40s linear infinite;
    display: flex;
    width: max-content;
    gap: 0;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.mask-fade {
    max-width: 840px; /* viewport for 3 slots at 280px each */
    margin-left: 0;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    overflow: hidden;
    transform: translateZ(0); /* Stabilize mask layer */
}

/* Responsive constraints */
@media (max-width: 900px) { .mask-fade { max-width: 560px; } }
@media (max-width: 600px) { .mask-fade { max-width: 280px; } }

/* Minimalist Logo Style for Homepage */
.partner-minimal-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.5rem;
    filter: grayscale(1) opacity(0.35);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.partner-minimal-logo img {
    height: 32px;
    width: auto;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.partner-minimal-logo span {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.25em;
    color: #57534e; /* stone-600 */
    text-transform: uppercase;
    transition: color 0.4s ease;
}

.partner-minimal-logo:hover {
    filter: grayscale(0) opacity(1);
    transform: translateY(-2px);
}

.partner-minimal-logo:hover img {
    transform: scale(1.15);
}

.partner-minimal-logo:hover span {
    color: #B4A596; /* texdex-gold */
}

::-webkit-scrollbar-thumb:hover {
    background: var(--texdex-gold);
}

/* Firefox Support */
* {
    scrollbar-width: thin;
    scrollbar-color: #1a1a1a #050505;
}

/* Utility Resets */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- Custom Dropdown System --- */
.dropdown-wrapper {
    position: relative;
    width: 200px;
}

.dropdown-trigger {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #a8a29e;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(180, 165, 150, 0.3);
    color: #fff;
}

.dropdown-trigger.active {
    border-color: #B4A596;
    background: rgba(180, 165, 150, 0.05);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: #0f0f0f;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 0.5rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-category {
    padding: 0.75rem 0.75rem 0.25rem;
    font-size: 8px;
    font-weight: 900;
    color: rgba(180, 165, 150, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.dropdown-option {
    padding: 10px 12px;
    border-radius: 0.5rem;
    font-size: 10px;
    font-weight: bold;
    color: #a8a29e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-option:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.dropdown-option.selected {
    background: #B4A596;
    color: #fff;
}

.dropdown-option.selected .check-icon {
    display: block !important;
}

.dropdown-menu::-webkit-scrollbar {
    width: 4px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

/* --- TexDex Premium Toggles --- */
.texdex-toggle {
    width: 42px;
    height: 22px;
    background: #1c1917;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
    flex-shrink: 0;
    outline: none !important;
}

.texdex-toggle .knob {
    width: 14px;
    height: 14px;
    background: #57534e;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 4px;
    transform: translateY(-50%);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.texdex-toggle:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: #292524;
}

.texdex-toggle.active {
    background: rgba(180, 165, 150, 0.15);
    border-color: rgba(180, 165, 150, 0.3);
}

.texdex-toggle.active .knob {
    background: #B4A596;
    left: calc(100% - 18px); /* 14px knob + 4px right padding */
}

.texdex-toggle:focus {
    outline: none;
}

/* --- Stacking Elevation Fix --- */
.elevated-stack {
    z-index: 10000 !important;
    position: relative !important;
}

/* --- Custom Utility Classes (Gold Palette) --- */
.text-texdex-gold { color: #B4A596 !important; }
.bg-texdex-gold { background-color: #B4A596 !important; }
.border-texdex-gold { border-color: #B4A596 !important; }



/* --- Supabase-Inspired Partner Section --- */
.section-label {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.3em;
    color: #57534e; /* stone-600 */
    text-transform: uppercase;
    display: block;
    margin-bottom: 1.5rem;
}

.section-heading {
    font-size: 2.5rem;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #fafaf9; /* stone-50 */
    margin-bottom: 1rem;
}

.section-subtext {
    font-size: 1.125rem;
    color: #a8a29e; /* stone-400 */
    line-height: 1.6;
    max-width: 600px;
}

/* Minimalist Logo Ribbon (Marquee Support) */
.partner-logo-ribbon {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0; /* Uniform layout math */
    width: max-content;
}

.partner-pure-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 280px; /* Fixed slot width for 3-item display */
    flex-shrink: 0;
    filter: grayscale(1) invert(0.1) opacity(0.35);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.partner-logo-ribbon img, .partner-pure-logo {
    max-height: 62px;
    width: auto;
    object-fit: contain;
}

.partner-logo-name {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #a8a29e; /* stone-400 */
    text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.4s ease;
}

.partner-pure-logo-wrapper:hover {
    filter: grayscale(0) invert(0) opacity(1);
    transform: translateY(-2px) scale(1.02);
}

.partner-pure-logo-wrapper:hover .partner-logo-name {
    color: #fff;
}
