/* ========================================
   Tiles Tiles Tiles — Premium Dark Luxury
   Custom Styles
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
    --color-navy-900: #050E1C;
    --color-navy-950: #020610;
    --color-gold-300: #E8D5A3;
    --color-gold-400: #D4AF61;
    --color-gold-500: #C9A84C;
    --color-gold-600: #B08D30;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Montserrat', system-ui, sans-serif;
}

/* --- Base & Reset --- */
*, *::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;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-navy-950);
}
::-webkit-scrollbar-thumb {
    background: var(--color-gold-500);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold-400);
}

/* --- Selection --- */
::selection {
    background: var(--color-gold-500);
    color: var(--color-navy-900);
}

/* --- Hero Background --- */
.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    will-change: transform;
}

.hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(2, 6, 16, 0.55) 0%,
        rgba(2, 6, 16, 0.40) 40%,
        rgba(2, 6, 16, 0.70) 80%,
        rgba(2, 6, 16, 0.95) 100%
    );
}

/* --- Hero Content Animation (progressive enhancement) --- */
.hero-content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s ease, transform 1s ease;
}

.js .hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 1s ease forwards;
    animation-delay: 0.2s;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    backdrop-filter: none;
}

#navbar.scrolled {
    background: rgba(2, 6, 16, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-gold-400);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--color-gold-400) !important;
}

/* --- Mobile Menu --- */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    position: relative;
}

/* --- Collection Cards --- */
.collection-card {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    border: 1px solid rgba(201, 168, 76, 0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.collection-card:hover {
    border-color: rgba(201, 168, 76, 0.4);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(201, 168, 76, 0.05);
}

/* --- Gallery Items --- */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(201, 168, 76, 0.08);
    pointer-events: none;
    transition: border-color 0.3s ease;
}

.gallery-item:hover::after {
    border-color: rgba(201, 168, 76, 0.3);
}

/* --- CTA Background --- */
.cta-bg {
    position: absolute;
    inset: 0;
}

.cta-bg img {
    width: 100%;
    height: 100%;
    object-cover;
}

.cta-overlay {
    background: linear-gradient(
        to right,
        rgba(2, 6, 16, 0.88) 0%,
        rgba(2, 6, 16, 0.75) 50%,
        rgba(2, 6, 16, 0.88) 100%
    );
}

/* --- Stat Items --- */
.stat-item {
    position: relative;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background: rgba(201, 168, 76, 0.2);
}

@media (max-width: 767px) {
    .stat-item:not(:last-child)::after {
        display: none;
    }
}

/* --- Scroll Reveal (progressive enhancement) --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.js .reveal {
    opacity: 0;
    transform: translateY(40px);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

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

    html {
        scroll-behavior: auto;
    }

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

    .js .hero-content {
        opacity: 1;
        transform: translateY(0);
    }

    .collection-card img,
    .gallery-item img {
        transition: none;
    }
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--color-gold-400);
    outline-offset: 2px;
}

/* --- Form Styles --- */
select {
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"%3E%3Cpath fill="%23C9A84C" d="M6 8L1 3h10z"/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* --- Utility --- */
.text-gold-gradient {
    background: linear-gradient(135deg, var(--color-gold-300), var(--color-gold-500), var(--color-gold-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
