/* ============================================
   Castle Coffee — Custom Styles
   Premium Dark Luxury · Teal + Slate + Gold
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 162, 39, 0.3);
    color: #f1f5f9;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1219;
}
::-webkit-scrollbar-thumb {
    background: #1a2d42;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c9a227;
}

/* --- Navigation --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #c9a227;
    transition: width 0.3s ease;
}

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

/* Navbar scrolled state */
.navbar-scrolled {
    background: rgba(10, 18, 25, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 162, 39, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Hamburger animation */
.menu-line {
    transform-origin: center;
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

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

#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 24px;
}

/* --- Hero Animations --- */
.hero-img {
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.15); }
}

.hero-eyebrow {
    animation: slideInLeft 0.8s ease forwards;
    opacity: 0;
    transform: translateX(-30px);
}

.hero-title {
    animation: slideInLeft 0.8s ease 0.2s forwards;
    opacity: 0;
    transform: translateX(-30px);
}

.hero-subtitle {
    animation: slideInLeft 0.8s ease 0.4s forwards;
    opacity: 0;
    transform: translateX(-30px);
}

.hero-ctas {
    animation: slideInLeft 0.8s ease 0.6s forwards;
    opacity: 0;
    transform: translateX(-30px);
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll indicator */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* --- Menu Tabs --- */
.menu-tab {
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-tab:hover {
    color: #c9a227;
    border-color: rgba(201, 162, 39, 0.3);
}

.menu-tab.active {
    background: #c9a227;
    color: #0a1219;
    border-color: #c9a227;
}

.menu-content {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Reveal Animations (below fold only) --- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-up {
    transform: translateY(40px);
}

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

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

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: none;
}

/* Respect reduced motion preference */
@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;
    }
    
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
    
    .hero-img {
        animation: none;
    }
}

/* --- Form Styles --- */
#contact-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
    border-color: #c9a227;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
    outline: none;
}

/* --- Button hover glow --- */
button[type="submit"]:hover {
    box-shadow: 0 0 30px rgba(201, 162, 39, 0.3);
}

/* --- Image hover effects --- */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
    
    #hero h1 {
        font-size: 2.5rem;
    }
    
    #hero h1 span:last-child {
        font-size: 1.25rem;
    }
}
