/* ============================================
   83 Diner — Premium Custom Styles
   Animations, pseudo-elements, glass effects,
   and advanced Tailwind-incompatible features.
   ============================================ */

/* Smooth page load */
body {
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

body.loaded {
    opacity: 1;
}

/* ── Scroll Progress ── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #e34a41, #f87171, #e34a41);
    background-size: 200% 100%;
    animation: shimmerBar 2s ease-in-out infinite;
    z-index: 9999;
    width: 0%;
}

@keyframes shimmerBar {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ── Hero gradient overlay ── */
.hero-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.05) 35%,
            rgba(0, 0, 0, 0.15) 65%,
            rgba(0, 0, 0, 0.75) 100%),
        linear-gradient(135deg, rgba(227, 74, 65, 0.2) 0%, transparent 50%);
    z-index: 1;
}

/* Subtle hero vignette */
.hero-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 120px 30px rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
}

/* Hero staggered entrance */
.hero-stagger>* {
    opacity: 0;
    transform: translateY(24px);
    animation: heroUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-stagger>*:nth-child(1) {
    animation-delay: 0.15s;
}

.hero-stagger>*:nth-child(2) {
    animation-delay: 0.3s;
}

.hero-stagger>*:nth-child(3) {
    animation-delay: 0.4s;
}

.hero-stagger>*:nth-child(4) {
    animation-delay: 0.5s;
}

.hero-stagger>*:nth-child(5) {
    animation-delay: 0.6s;
}

@keyframes heroUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll bounce */
@keyframes scrollBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

.scroll-bounce {
    animation: scrollBounce 2.5s ease-in-out infinite;
}

/* ── Status pulse ── */
@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

.status-pulse {
    animation: statusPulse 2s ease-in-out infinite;
}

/* ── Stagger children reveal ── */
.stagger-children>* {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible>*:nth-child(1) {
    transition-delay: 0s;
    opacity: 1;
    transform: none;
}

.stagger-children.visible>*:nth-child(2) {
    transition-delay: 0.1s;
    opacity: 1;
    transform: none;
}

.stagger-children.visible>*:nth-child(3) {
    transition-delay: 0.2s;
    opacity: 1;
    transform: none;
}

.stagger-children.visible>*:nth-child(4) {
    transition-delay: 0.3s;
    opacity: 1;
    transform: none;
}

.stagger-children.visible>*:nth-child(5) {
    transition-delay: 0.4s;
    opacity: 1;
    transform: none;
}

.stagger-children.visible>*:nth-child(6) {
    transition-delay: 0.5s;
    opacity: 1;
    transform: none;
}

/* ── Modal ── */
.modal {
    display: none;
}

.modal.active {
    display: flex;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(24px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-animate {
    animation: modalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Fade-in on scroll ── */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Hide scrollbar ── */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* ── CTA pattern overlay ── */
.cta-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

/* ── Mobile nav drawer — glass effect ── */
.nav-drawer {
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-drawer.active {
    transform: translateX(0);
}

/* Backdrop */
.nav-backdrop {
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.nav-drawer.active~.nav-backdrop,
.nav-drawer.active+.nav-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* ── Hours card top accent ── */
.hours-accent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e34a41, #f87171);
    border-radius: 16px 16px 0 0;
}

/* ── Footer top bar ── */
footer::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #e34a41, #f87171, #e34a41);
}

/* ── Sticky order bar ── */
.sticky-bar {
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.sticky-bar.visible {
    transform: translateY(0);
}

/* ── Category nav ── */
.cat-nav {
    -webkit-overflow-scrolling: touch;
}

/* Category link — pill active state */
.cat-link {
    border-radius: 999px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-link:hover {
    color: #e34a41;
    background: rgba(227, 74, 65, 0.06);
}

.cat-link.active {
    color: white;
    background: #e34a41;
}

/* ── Menu item left accent ── */
.menu-accent {
    border-left: 4px solid #e34a41;
}

/* ── Card image zoom ── */
.card-img-zoom {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.group:hover .card-img-zoom {
    transform: scale(1.06);
}

/* ── Testimonial quote decoration ── */
.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: -8px;
    left: 16px;
    font-size: 4rem;
    font-family: 'Georgia', serif;
    color: rgba(227, 74, 65, 0.12);
    line-height: 1;
    pointer-events: none;
}

/* ── Glass card effect ── */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ── Gradient text ── */
.gradient-text {
    background: linear-gradient(135deg, #e34a41, #f87171);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Social proof glass bar ── */
.proof-bar {
    background: linear-gradient(180deg, rgba(17, 17, 17, 0.95), rgba(17, 17, 17, 0.85));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ── Glow ring for icons ── */
.icon-glow {
    box-shadow: 0 0 0 8px rgba(227, 74, 65, 0.12), 0 0 0 16px rgba(227, 74, 65, 0.04);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Safari & iOS fixes ── */
@supports (padding: max(0px)) {
    .safe-bottom {
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    }

    /* Header notch padding (top + left/right for landscape) */
    #siteHeader {
        padding-top: env(safe-area-inset-top);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    /* Nav drawer: full safe-area coverage for notch + home indicator */
    .nav-drawer {
        padding-top: max(5rem, calc(env(safe-area-inset-top) + 3rem));
        padding-bottom: max(2rem, calc(env(safe-area-inset-bottom) + 1rem));
        padding-right: max(1.5rem, env(safe-area-inset-right));
    }

    /* Sticky order bar: bottom safe area for home indicator */
    .sticky-order-bar {
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    }

    /* Footer: bottom safe area */
    footer {
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    }
}

/* Smooth momentum scrolling on iOS */
.nav-drawer,
.cat-nav>div,
.no-scrollbar {
    -webkit-overflow-scrolling: touch;
}

/* Disable iOS tap highlight globally */
a,
button,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

input,
select,
textarea {
    font-size: 16px !important;
}

/* ============================================
   Menu Page Styles (diner.html, pizza.html)
   ============================================ */

/* Specials Banner */
.specials-banner {
    background: linear-gradient(90deg, #e34a41, #c93b32);
    color: white;
    text-align: center;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
}

.specials-banner i {
    margin-right: 0.4rem;
}

/* Zig-Zag Layout */
.zig-zag {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.zig-zag-content h2 {
    font-family: 'Oswald', system-ui, sans-serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.zig-zag-content p {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.zig-zag-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.03);
}

@media (min-width: 960px) {
    .zig-zag {
        flex-direction: row;
        gap: 3.5rem;
    }

    .zig-zag-content,
    .zig-zag-image {
        flex: 1;
    }

    .zig-zag-image img {
        height: 380px;
    }
}

/* Menu Card Container */
.menu-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

@media (min-width: 640px) {
    .menu-card {
        padding: 2rem;
    }
}

/* Menu Section Title */
.menu-section {
    margin-bottom: 1.5rem;
}

.menu-section:last-child {
    margin-bottom: 0;
}

.menu-section-title {
    font-family: 'Oswald', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #111;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.menu-section-title i {
    color: #e34a41;
    font-size: 1rem;
}

/* Menu Items Grid */
.menu-items-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .menu-items-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }
}

/* Individual Menu Item */
.menu-item-card {
    padding: 0.75rem 1rem;
    border-left: 4px solid #e34a41;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.2s ease;
}

.menu-item-card:hover {
    background: #f3f4f6;
    transform: translateX(2px);
}

.menu-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}

.menu-item-price {
    font-family: 'Oswald', system-ui, sans-serif;
    font-weight: 700;
    color: #e34a41;
    white-space: nowrap;
    font-size: 0.95rem;
}

.menu-item-desc {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.2rem;
    line-height: 1.4;
}

/* Menu Notes */
.menu-note {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 1rem;
    font-style: italic;
}

/* Side / Sauce Tags */
.sides-list,
.sauce-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.side-tag,
.sauce-tag {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    background: #f3f4f6;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s ease;
}

.side-tag:hover,
.sauce-tag:hover {
    background: rgba(227, 74, 65, 0.08);
    color: #e34a41;
}

/* Sticky Order Bar (mobile) */
.sticky-order-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid #e5e7eb;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.sticky-order-bar.visible {
    transform: translateY(0);
}

.bar-label {
    font-family: 'Oswald', system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
}

.sticky-order-bar .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-family: 'Oswald', system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    text-decoration: none;
    min-height: 44px;
    border: none;
    transition: all 0.2s ease;
}

.sticky-order-bar .btn-primary {
    background: #e34a41;
    color: white;
}

.sticky-order-bar .btn-primary:hover {
    background: #c93b32;
}

.sticky-order-bar .btn-secondary {
    background: #111;
    color: white;
}

.sticky-order-bar .btn-secondary:hover {
    background: #333;
}

@media (min-width: 960px) {
    .sticky-order-bar {
        display: none;
    }
}