/* ============================================
   Young and Sons — Custom Styles
   Premium Dark Luxury | Forest Green + Gold
   ============================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

/* ---- Selection ---- */
::selection {
    background: rgba(212, 168, 67, 0.25);
    color: #f5f0e8;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #080808;
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 67, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 67, 0.5);
}

/* ---- Animations (progressive enhancement) ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Hero animations — always visible (not scroll-reveal) */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out both;
}

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

/* ---- Scroll Reveal (progressive enhancement) ---- */
.reveal {
    /* Default: fully visible — works without JS */
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* When JS is enabled AND user prefers motion, add the hidden initial state */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(24px);
}

.js-enabled .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .js-enabled .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .animate-fade-in-up,
    .animate-fade-in {
        animation: none;
        opacity: 1;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ---- Nav scroll state ---- */
#nav.scrolled #nav-bg {
    background: rgba(8, 8, 8, 0.92);
    border-color: rgba(212, 168, 67, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ---- Gold gradient text utility ---- */
.text-gold-gradient {
    background: linear-gradient(135deg, #f0d078, #d4a843, #b8860b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Input autofill override ---- */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0d0d0d inset !important;
    -webkit-text-fill-color: #f5f0e8 !important;
    transition: background-color 0s ease 0s;
}

/* ---- Focus visible ---- */
:focus-visible {
    outline: 2px solid rgba(212, 168, 67, 0.5);
    outline-offset: 2px;
}

/* ---- Image aspect ratio fallback ---- */
img {
    max-width: 100%;
    height: auto;
}
