/* ============================================
   Java Stop at ECRC — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background: rgba(212, 160, 23, 0.3);
    color: #F9F0F7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #230B1F;
}
::-webkit-scrollbar-thumb {
    background: #4A1942;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #63254D;
}

/* ============================================
   Scroll Reveal Animations
   (progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(35, 11, 31, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(74, 25, 66, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobileMenu {
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobileMenu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

/* ============================================
   Hero
   ============================================ */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, #230B1F, transparent);
    pointer-events: none;
}

/* ============================================
   Card Hover Effects
   ============================================ */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ============================================
   Button Focus States
   ============================================ */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #D4A017;
    outline-offset: 2px;
}

/* ============================================
   Input Focus States
   ============================================ */
input:focus,
textarea:focus {
    outline: none;
}

/* ============================================
   Smooth image loading
   ============================================ */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ============================================
   Playfair Display italic accent
   ============================================ */
.font-serif em {
    font-style: italic;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 767px) {
    #hero h1 {
        font-size: 2.75rem;
    }

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

@media (min-width: 768px) and (max-width: 1023px) {
    #hero h1 {
        font-size: 4rem;
    }
}

/* ============================================
   Print styles
   ============================================ */
@media print {
    header, footer, #contact, .reveal {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    section {
        page-break-inside: avoid;
    }
}
