/* ============================================
   Tri Pi Pizzeria — Custom Styles
   ============================================ */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #0d9488;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #14b8a6;
}

/* Selection Color */
::selection {
    background-color: rgba(13, 148, 136, 0.3);
    color: #f5f5f4;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    backdrop-filter: blur(0px);
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

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

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0.1s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.2s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.3s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.4s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.5s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.6s; }

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

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2dd4bf;
    transition: width 0.3s ease;
}

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

/* ============================================
   Back to Top Button
   ============================================ */
#back-to-top.visible {
    opacity: 1;
    transform: translatey(0);
    pointer-events: auto;
}

/* ============================================
   Typography Refinements
   ============================================ */
.font-serif {
    font-feature-settings: 'liga' 1, 'calt' 1;
}

.font-serif h1,
.font-serif h2,
.font-serif h3 {
    text-rendering: optimizeLegibility;
}

/* ============================================
   Image Hover Effects
   ============================================ */
img {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: rgba(208, 243, 238, 0.3);
}

/* ============================================
   Card Hover Glow
   ============================================ */
.group:hover .group-hover\\:bg-teal-600\\/30 {
    background-color: rgba(13, 148, 136, 0.3);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    #hero::after {
        height: 100px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    #back-to-top,
    #mobile-menu {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
