/* ============================================
   The Sunshine Diner — Custom Styles
   Premium Dark Luxury · Plum + Amber
   ============================================ */

/* ---------- 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(251, 191, 36, 0.3);
    color: #f5f0f7;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #110c10;
}
::-webkit-scrollbar-thumb {
    background: #4d2748;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #743d6e;
}

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

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

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* ---------- Reveal on Scroll ---------- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .animate-fade-in {
        animation: none;
        opacity: 1;
    }
    .animate-scroll-line {
        animation: none;
        opacity: 0.5;
    }
}

/* ---------- Navbar ---------- */
#navbar {
    background: transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(10, 7, 9, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(148, 53, 129, 0.15), 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #fbbf24, transparent);
    transition: width 0.3s ease, left 0.3s ease;
}

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

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

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

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s 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; }

/* Menu icon animation */
#menu-btn[aria-expanded="true"] span {
    transform: rotate(45deg);
}

#menu-btn[aria-expanded="true"] span::before {
    top: 16px;
    transform: rotate(90deg);
}

#menu-btn span {
    display: block;
    position: absolute;
    transition: all 0.3s ease;
}

#menu-btn span::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    width: 100%;
    height: 100%;
    background: currentColor;
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* ---------- Feature Cards ---------- */
.feature-card {
    position: relative;
}

.feature-card:not(:last-child) {
    border-right: 1px solid rgba(148, 53, 129, 0.2);
}

.feature-card:hover .w-14 {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* ---------- Menu Cards ---------- */
.menu-card {
    position: relative;
    overflow: hidden;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.menu-card:hover::before {
    opacity: 1;
}

.menu-card:hover {
    transform: translateY(-4px);
    transition: transform 0.4s ease, border-color 0.4s ease;
}

/* ---------- Gallery ---------- */
.gallery-item {
    cursor: pointer;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(74, 29, 110, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ---------- Form ---------- */
select option {
    background: #1a1118;
    color: #e8dce9;
}

/* ---------- Button Focus States ---------- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    .feature-card:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid rgba(148, 53, 129, 0.2);
        padding-bottom: 1.5rem;
    }
    .feature-card:last-child {
        border-bottom: none;
    }
}

@media (min-width: 768px) {
    .feature-card:not(:last-child) {
        border-right: 1px solid rgba(148, 53, 129, 0.2);
    }
}
