/* ============================================
   The Ice Cream Shoppe — Custom Styles
   Classic & Elegant | Teal + Slate Grey
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f4;
}
::-webkit-scrollbar-thumb {
    background: #0d7377;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #115e5f;
}

/* Selection */
::selection {
    background: #0d7377;
    color: #fff;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    will-change: background-color, padding;
}

.nav-link {
    position: relative;
}

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

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

/* ============================================
   Hero
   ============================================ */
.hero-eyebrow {
    opacity: 0;
    animation: fadeDown 0.8s ease forwards 0.3s;
}

.hero-title {
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.5s;
}

.hero-subtitle {
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.7s;
}

.hero-ctas {
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.9s;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-nav-link {
    position: relative;
    padding-left: 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 12px;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content is visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 0;
        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.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* Reduced motion — ensure everything is visible */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
    
    .hero-eyebrow,
    .hero-title,
    .hero-subtitle,
    .hero-ctas {
        opacity: 1;
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   Button & Link Focus States
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d7377;
    outline-offset: 2px;
}

/* ============================================
   Image Loading
   ============================================ */
img {
    background-color: #e7e5e4;
}

/* ============================================
   Responsive Utilities
   ============================================ */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-title em {
        display: block;
        font-size: 1.1em;
    }
}

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

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    #mobile-menu,
    .animate-bounce {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
    }
}
