/* Responsive */

/* --- Touch devices: stable finger-scrolling (keeps tap-to-section smooth via JS) --- */
@media (hover: none) and (pointer: coarse) {
    /* Avoid native smooth + momentum fighting; nav links use scrollTo(smooth) in JS */
    html {
        scroll-behavior: auto;
    }

    body {
        overflow-x: hidden;
    }

    .showcase-row,
    .testimonials-row {
        touch-action: pan-y;
    }

    .testimonial-body {
        overflow-y: visible;
        overscroll-behavior: auto;
    }
}

/* --- Large tablets & small laptops --- */
@media (max-width: 1100px) {
    .nav {
        gap: 0.85rem;
    }

    .nav a:not(.order-link) {
        font-size: 0.875rem;
    }

    .nav .order-link {
        padding: 0.55rem 0.95rem;
        margin-left: 0.15rem;
        font-size: 0.875rem;
    }

    .hero-inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, min(46vw, 500px));
    }

    .about-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, min(40vw, 400px));
    }

    .menu-board-card img {
        height: min(340px, 42vw);
    }
}

/* --- Tablet: stack major columns --- */
@media (max-width: 1024px) {
    .hero-inner,
    .about-grid,
    .contact-layout {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        justify-items: center;
    }

    .hero-content {
        width: 100%;
        max-width: min(36rem, 100%);
        margin-inline: auto;
        text-align: center;
    }

    .hero-title {
        margin-inline: auto;
    }

    .hero-lede {
        margin-inline: auto;
    }

    .tagline {
        justify-content: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-card {
        width: 100%;
        max-width: min(560px, 100%);
        margin-inline: auto;
    }

    .hero-card-photo img {
        max-height: min(320px, 42vh);
    }

    .about-grid {
        justify-items: center;
    }

    .about-grid > div:first-child {
        width: 100%;
        max-width: min(40rem, 100%);
        margin-inline: auto;
        text-align: center;
    }

    .about-grid > div:first-child .section-label {
        display: block;
        width: fit-content;
        margin-inline: auto;
    }

    .about-grid > div:first-child h2,
    .about-grid > div:first-child p {
        text-wrap: balance;
    }

    .about-grid > div:first-child p {
        margin-inline: auto;
    }

    .about-card {
        width: 100%;
        max-width: min(520px, 100%);
        margin-inline: auto;
        justify-self: center;
        text-align: center;
    }

    .contact-layout {
        gap: 1.5rem;
        justify-items: center;
        width: 100%;
    }

    .contact-aside,
    .contact-form-panel {
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
        justify-self: center;
    }

    .reveal--right,
    .reveal--left {
        transform: translate3d(0, 12px, 0);
    }

    .reveal--right.is-inview,
    .reveal--left.is-inview {
        transform: none;
    }

    .menu-board-grid {
        max-width: 40rem;
        margin-inline: auto;
    }
}

/* --- Mobile navigation --- */
@media (max-width: 900px) {
    :root {
        --header-height: 4.75rem;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav {
        position: fixed;
        top: calc(var(--header-height) + env(safe-area-inset-top, 0px) + 0.35rem);
        left: var(--gutter);
        right: var(--gutter);
        z-index: 180;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        max-height: calc(100dvh - var(--header-height) - env(safe-area-inset-top, 0px) - 1.5rem);
        overflow-y: auto;
        padding: 1rem;
        background: rgba(14, 17, 24, 0.97);
        border: 1px solid rgba(255, 253, 247, 0.1);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-hover);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translate3d(0, -10px, 0) scale(0.97);
        transform-origin: top center;
        transition:
            opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
            visibility 0.38s;
    }

    .nav.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate3d(0, 0, 0) scale(1);
    }

    .nav a:not(.order-link)::after {
        display: none;
    }

    .nav a {
        padding: 0.75rem;
        text-align: center;
        opacity: 0;
        transform: translate3d(0, 10px, 0);
        transition:
            opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
            color 0.18s ease,
            background 0.18s ease;
    }

    .nav.active a {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }

    .nav.active a:nth-child(1) {
        transition-delay: 0.06s;
    }

    .nav.active a:nth-child(2) {
        transition-delay: 0.1s;
    }

    .nav.active a:nth-child(3) {
        transition-delay: 0.14s;
    }

    .nav.active a:nth-child(4) {
        transition-delay: 0.18s;
    }

    .nav.active a:nth-child(5) {
        transition-delay: 0.22s;
    }

    .nav.active a:nth-child(6) {
        transition-delay: 0.26s;
    }

    .nav.active a:nth-child(7) {
        transition-delay: 0.3s;
    }

    .nav:not(.active) a {
        transition-delay: 0s;
    }

    .nav .order-link {
        width: 100%;
        margin-left: 0;
        margin-top: 0.35rem;
    }

    .hero-card {
        transform: none;
    }

    .hero-card:hover {
        transform: none;
    }

    .logo img {
        transform: none;
    }

    .menu-board-grid {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .menu-board-card img {
        height: min(300px, 52vh);
    }

    .testimonials {
        --testimonial-card-height: min(16.5rem, 42vh);
    }

    .testimonial-card {
        width: min(288px, 88vw);
    }

    .testimonials-track::before,
    .testimonials-track::after {
        width: min(72px, 10vw);
    }

    .footer__top {
        flex-direction: column;
        gap: 1rem;
    }

    .footer__brand {
        justify-content: center;
    }
}

/* --- Tablet portrait: info strip 2+1 --- */
@media (max-width: 900px) and (min-width: 601px) {
    .info-strip-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-strip-inner div {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .info-strip-inner div:nth-child(odd) {
        border-right: 1px solid var(--border);
    }

    .info-strip-inner div:last-child {
        grid-column: 1 / -1;
        border-right: 0;
        border-bottom: 0;
    }
}

/* --- Small tablet / large phone --- */
@media (max-width: 768px) {
    :root {
        --gutter: clamp(1rem, 4vw, 1.5rem);
    }

    .section {
        padding: clamp(3.5rem, 9vw, 4.5rem) 0;
    }

    .section-heading {
        margin-bottom: 2rem;
        padding-inline: 0.25rem;
    }

    .section-heading h2,
    .about h2,
    .contact h2 {
        font-size: clamp(1.75rem, 6.5vw, 2.35rem);
    }

    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + env(safe-area-inset-top, 0px) + 1.5rem) 0 3rem;
    }

    .hero-inner {
        gap: 1.75rem;
    }

    .hero-content {
        max-width: min(34rem, 100%);
    }

    .hero-lede {
        font-size: 1.05rem;
        line-height: 1.62;
    }

    .hero-card-photo img {
        max-height: min(280px, 38vh);
    }

    .info-strip-inner {
        grid-template-columns: 1fr;
    }

    .info-strip-inner div {
        padding: 1.15rem 1rem;
        border-right: 0 !important;
        border-bottom: 1px solid var(--border);
    }

    .info-strip-inner div:last-child {
        grid-column: auto;
        border-bottom: 0;
    }

    .showcase-card {
        width: min(280px, 78vw);
        height: min(350px, 105vw);
    }

    .showcase-track::before,
    .showcase-track::after {
        width: min(64px, 12vw);
    }

    .showcase-cta {
        margin-top: 1.5rem;
        padding-inline: var(--gutter);
    }

    .showcase-cta .btn {
        width: 100%;
        max-width: 22rem;
    }

    .testimonials {
        padding: 3.5rem 0 3rem;
    }

    .testimonials-track {
        margin-top: 1.75rem;
    }

    .contact-form-panel {
        padding: 1.25rem;
    }

    .footer__meta {
        flex-direction: column;
        gap: 0.35rem;
    }

    .footer__meta-sep {
        display: none;
    }

    .toast {
        right: var(--gutter);
        left: var(--gutter);
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        max-width: none;
    }
}

/* --- Phone --- */
@media (max-width: 620px) {
    :root {
        --header-height: 4.5rem;
        --gutter: 1.125rem;
    }

    .header.is-scrolled {
        padding-bottom: 0.85rem;
    }

    .logo img {
        width: 42px;
        height: 42px;
        padding: 4px;
    }

    .logo__title {
        font-size: 1.05rem;
    }

    .logo__location {
        font-size: 0.62rem;
        letter-spacing: 0.12em;
    }

    .hero-title {
        font-size: clamp(2.5rem, 11.5vw, 3.75rem);
    }

    .tagline {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .hero-actions,
    .contact-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .hero-card-photo img {
        max-height: min(240px, 34vh);
    }

    .hero-card-body {
        padding: 1.35rem 1.25rem 1.45rem;
    }

    .hero-card-body h2 {
        font-size: clamp(1.45rem, 5.5vw, 1.75rem);
    }

    .menu-board-card img {
        height: min(260px, 48vh);
    }

    .menu-board-card div {
        padding: 1rem;
    }

    .menu-lightbox {
        padding: max(0.5rem, env(safe-area-inset-top, 0px))
            max(0.5rem, env(safe-area-inset-right, 0px))
            max(0.5rem, env(safe-area-inset-bottom, 0px))
            max(0.5rem, env(safe-area-inset-left, 0px));
    }

    .menu-lightbox__dialog {
        width: 100%;
        max-height: 94dvh;
        padding: 0.65rem;
    }

    .menu-lightbox__viewport {
        max-height: min(68dvh, 720px);
    }

    .menu-lightbox__stage {
        position: relative;
        display: block;
    }

    .menu-lightbox__nav {
        position: absolute;
        top: 50%;
        z-index: 2;
        width: 2.85rem;
        height: 2.85rem;
        margin-top: -1.425rem;
        transform: none;
        touch-action: manipulation;
        background: rgba(255, 253, 247, 0.94);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }

    .menu-lightbox__nav:active {
        transform: scale(0.96);
    }

    .menu-lightbox__nav[data-menu-prev] {
        left: 0.35rem;
    }

    .menu-lightbox__nav[data-menu-next] {
        right: 0.35rem;
    }

    .menu-lightbox__hint {
        font-size: 0.75rem;
    }

    .about-card {
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
        justify-self: center;
        padding: 1.25rem;
    }

    .contact-aside,
    .contact-form-panel {
        width: 100%;
        max-width: 100%;
        margin-inline: auto;
        justify-self: center;
    }

    .contact-actions {
        align-items: stretch;
        width: 100%;
    }

    .contact-info-card {
        padding: 1rem;
    }

    .showcase-card {
        width: min(245px, 82vw);
        height: min(310px, 118vw);
    }

    .footer__inner {
        padding: 1.5rem 0 calc(1.25rem + env(safe-area-inset-bottom, 0px));
    }

    .footer__nav {
        gap: 0.45rem 0.75rem;
    }

    .footer__nav a {
        font-size: 0.8125rem;
    }
}

/* --- Narrow phone --- */
@media (max-width: 400px) {
    .logo {
        gap: 0.55rem;
    }

    .logo__title {
        font-size: 0.95rem;
    }

    .hero-title {
        font-size: clamp(2.25rem, 10.5vw, 2.85rem);
    }

    .hero-lede {
        font-size: 1rem;
    }

    .nav {
        left: 0.75rem;
        right: 0.75rem;
    }

    .showcase-card {
        width: min(220px, 80vw);
        height: 290px;
    }

    .testimonial-card {
        width: min(268px, 92vw);
    }
}

/* --- Short viewports (landscape phones) --- */
@media (max-height: 520px) and (max-width: 900px) {
    .hero {
        padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0px) + 0.75rem);
        padding-bottom: 2rem;
    }

    .hero-card-photo img {
        max-height: min(200px, 42vh);
    }

    .nav {
        max-height: calc(100dvh - var(--header-height) - 0.5rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .menu-toggle__line,
    .nav,
    .nav a,
    .nav-backdrop,
    .menu-lightbox,
    .menu-lightbox__dialog {
        transition: none;
    }

    .menu-lightbox__dialog {
        transform: none;
    }

    .nav {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav:not(.active) {
        display: none;
    }

    .nav a {
        opacity: 1;
        transform: none;
    }

    .header,
    .hero-media,
    .hero::after {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-card.reveal.is-inview,
    .hero-card.is-inview .hero-badge,
    .hero-actions.is-inview .btn {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .reveal,
    .reveal.is-inview {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }

    .section-heading.is-inview > span,
    .section-heading.is-inview > h2,
    .contact-intro.is-inview > .section-label {
        animation: none;
    }

    body.is-loaded .hero-media .hero-video {
        transform: none;
        transition: none;
    }

    .showcase-row,
    .testimonials-row {
        animation: none;
    }

    .testimonials-row .testimonial-card[aria-hidden='true'] {
        display: none;
    }

    .testimonials-track {
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(232, 188, 99, 0.35) transparent;
        mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
    }

    .testimonials-track::-webkit-scrollbar {
        height: 6px;
    }

    .testimonials-track::-webkit-scrollbar-thumb {
        background: rgba(232, 188, 99, 0.35);
        border-radius: 999px;
    }

    .testimonials-row {
        padding-inline: max(1rem, calc(50vw - min(170px, 43vw)));
        justify-content: flex-start;
    }

    .testimonial-card {
        scroll-snap-align: center;
    }

    .btn:hover,
    .nav .order-link:hover,
    .menu-board-card:hover,
    .contact-form__submit:hover {
        transform: none;
    }

    .contact-form__submit-spinner {
        animation: none;
    }

    .footer__social-btn:hover {
        transform: none;
    }

    .showcase-card:hover img {
        transform: none;
    }

    .hero-card {
        transition: none;
    }

    .hero-card:hover {
        transform: none;
    }

    .hero-card:hover .hero-card-photo img {
        transform: none;
    }

    .hero-card-photo img {
        transition: none;
    }

    .hero-card-photo-shimmer::before {
        animation: none;
    }

    .hero-video {
        display: none;
    }
}
