/* ========================================
   Marino's Pizza — Custom Styles
   ======================================== */

/* Base */
*, *::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: color-mix(in srgb, #2d4d26 80%, white);
    color: #fefdf8;
}

/* ========================================
   Hero Animations
   ======================================== */
.hero-eyebrow {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.25s;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-underline {
    stroke: #99bf8e;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawLine 1s ease forwards;
    animation-delay: 0.8s;
}

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

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

/* Scroll line animation */
.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);
    }
}

/* ========================================
   Story Animations
   ======================================== */
.story-eyebrow {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
}

.story-title {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.15s;
    opacity: 0;
}

.story-text {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
}

.story-text:nth-child(2) { animation-delay: 0.3s; }
.story-text:nth-child(3) { animation-delay: 0.45s; }
.story-text:nth-child(4) { animation-delay: 0.6s; }

.story-stats {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.75s;
    opacity: 0;
}

/* ========================================
   Menu Animations
   ======================================== */
.menu-eyebrow,
.menu-title {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
}

.menu-title { animation-delay: 0.15s; }

.menu-item {
    animation: fadeUp 0.6s ease forwards;
    opacity: 0;
}

.menu-item:nth-child(1) { animation-delay: 0.2s; }
.menu-item:nth-child(2) { animation-delay: 0.3s; }
.menu-item:nth-child(3) { animation-delay: 0.4s; }
.menu-item:nth-child(4) { animation-delay: 0.5s; }
.menu-item:nth-child(5) { animation-delay: 0.6s; }
.menu-item:nth-child(6) { animation-delay: 0.7s; }
.menu-item:nth-child(8) { animation-delay: 0.8s; }
.menu-item:nth-child(9) { animation-delay: 0.9s; }
.menu-item:nth-child(10) { animation-delay: 1.0s; }
.menu-item:nth-child(11) { animation-delay: 1.1s; }

/* ========================================
   Visit Animations
   ======================================== */
.visit-eyebrow,
.visit-title {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
}

.visit-title { animation-delay: 0.15s; }

/* ========================================
   Contact Animations
   ======================================== */
.contact-eyebrow,
.contact-title {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
}

.contact-title { animation-delay: 0.15s; }

/* ========================================
   Scroll-triggered Animations (JS)
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ========================================
   Form Styles
   ======================================== */
.form-input:focus {
    border-bottom-color: #4d7e3e !important;
}

.form-input::placeholder {
    color: #c5dbbe;
}

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

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(45, 77, 38, 0.08);
}

.nav-link {
    position: relative;
}

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

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

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

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

.menu-line {
    transition: all 0.3s ease;
}

#menu-toggle.active .menu-line:first-child {
    transform: rotate(45deg) translate(2px, 2px);
}

#menu-toggle.active .menu-line:last-child {
    opacity: 0;
    width: 0;
}

.mobile-nav-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* ========================================
   Image hover effects
   ======================================== */
img {
    display: block;
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.75rem !important;
    }
    
    .story-title,
    .visit-title,
    .contact-title {
        font-size: 2.25rem;
    }
    
    .menu-title {
        font-size: 2.25rem;
    }
}

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

/* ========================================
   Print styles
   ======================================== */
@media print {
    #navbar, .scroll-line {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
