/* Custom Animations and Overrides */

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background-color: color-mix(in srgb, var(--color-gold) 30%, transparent);
    color: var(--color-charcoal);
}

/* Base Reveal States */
.gs-reveal {
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.gs-reveal.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Specific Transform Initial States */
.gs-slide-up {
    transform: translateY(40px);
}

.gs-slide-left {
    transform: translateX(40px);
}

.gs-slide-right {
    transform: translateX(-40px);
}

/* Animation Delays */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

/* Navbar Scrolled State */
#navbar {
    background-color: transparent;
}
#navbar.scrolled {
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(12px);
    mix-blend-mode: normal;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
#navbar.scrolled a {
    color: var(--color-ivory);
}

/* Dialog Backdrop & Modal Transition Styling */
body:has(dialog[open]) {
    overflow: hidden;
}
dialog {
    border: none;
    background-color: #FFFFFF !important;
    padding: 0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    /* Position fixed centered in viewport - works universally in production */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) scale(0.95);
    margin: 0 !important;
    
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
dialog[open] {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}
dialog::backdrop {
    background-color: rgba(26, 26, 26, 0);
    backdrop-filter: blur(0px);
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}
dialog[open]::backdrop {
    background-color: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(12px);
}
