/* ============================================
   Java Cherry — Premium Dark Luxury Styles
   ============================================ */

/* ---- 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 {
    background: rgba(212, 168, 83, 0.3);
    color: #f1f5f9;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #060d0f;
}

::-webkit-scrollbar-thumb {
    background: #1e3a44;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2d5a66;
}

/* ---- Hero Background ---- */
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg,
            rgba(6, 13, 15, 0.97) 0%,
            rgba(10, 20, 24, 0.94) 40%,
            rgba(15, 31, 36, 0.90) 100%
        );
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 70% 40%,
            rgba(13, 148, 136, 0.08) 0%,
            transparent 60%
        ),
        radial-gradient(ellipse 50% 40% at 20% 80%,
            rgba(212, 168, 83, 0.06) 0%,
            transparent 50%
        );
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4a853' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

/* ---- Scroll Indicator ---- */
@keyframes scrollDot {
    0% { top: 0; opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

.scroll-dot {
    animation: scrollDot 1.5s ease-out infinite;
}

/* ---- Navbar ---- */
#navbar.scrolled {
    background: rgba(6, 13, 15, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    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: #d4a853;
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #d4a853 !important;
}

/* ---- Mobile Menu ---- */
.mobile-link {
    position: relative;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Hamburger Animation */
#menu-toggle.open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-toggle.open .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-toggle.open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* ---- Reveal Animations ---- */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Default state: visible (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* ---- Button Hover Effects ---- */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ---- Form Styles ---- */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 1px rgba(212, 168, 83, 0.3);
}

/* ---- Image Hover ---- */
img {
    -webkit-user-drag: none;
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 767px) {
    .font-display {
        line-height: 1.15;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ---- Focus Visible ---- */
:focus-visible {
    outline: 2px solid #d4a853;
    outline-offset: 2px;
}

/* ---- Print ---- */
@media print {
    #navbar, #menu-toggle, .scroll-dot {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .hero-bg, .hero-overlay, .hero-pattern {
        display: none;
    }
}
