/* ==========================================================================
   Marketing site polish — loaded last on the home page, /how-it-works and /blogs.
   Calmer entrance animations, a floating phone menu, compact phone layouts
   (restaurants, about, features, steps, contact, footer) and swipe rows.
   ========================================================================== */

/* ── Entrance animations: one calm fade-up everywhere (no spins, flips or blurs) ── */
.reveal[data-anim] { transform: translateY(22px); filter: none; }
.reveal[data-anim="zoom-in"] { transform: scale(.97); }
.reveal.visible, html.no-reveal .reveal { transform: none; }
[dir="rtl"] .reveal[data-anim] { transform: translateY(22px); }
[dir="rtl"] .reveal.visible { transform: none; }

/* ── Phone / tablet menu: a floating panel over the page with a dimmed backdrop ── */
@media (max-width: 1024px) {
    .site-nav .container { position: relative; }
    .nav-mobile {
        position: absolute; top: calc(100% + .5rem); inset-inline: 0; z-index: 210;
        padding: .6rem; border: 1px solid var(--border); border-radius: 1.25rem; background: #fff;
        box-shadow: 0 24px 60px rgba(15, 23, 42, .18); max-height: calc(100dvh - 6rem); overflow-y: auto;
    }
    .nav-mobile a { padding: .78rem .9rem; }
    .nav-mobile a.active { background: var(--brand-light); color: var(--brand); }
    .nav-mobile a.active i { color: var(--brand); }
    .nav-mobile .mob-btn { margin-top: .5rem; }
    body.nav-open::after {
        content: ''; position: fixed; inset: 0; z-index: 190; background: rgba(6, 13, 31, .45);
        backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: mkFade .25s ease;
    }
    body.nav-open .wa-float, body.nav-open .scroll-top { opacity: 0; pointer-events: none; }
}
@media (min-width: 560px) and (max-width: 1024px) {
    /* Tablets: two columns of links */
    .nav-mobile.open { display: grid; grid-template-columns: 1fr 1fr; gap: .15rem .4rem; }
    .nav-mobile .mob-btn { grid-column: 1 / -1; }
}
@keyframes mkFade { from { opacity: 0; } to { opacity: 1; } }

/* ── Swipe rows on phones (features on the home page; tools, growth and roles on How it works) ── */
.mk-swipe-dots { display: none; }
@media (max-width: 640px) {
    .feat-grid-new {
        display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%;
        gap: .8rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
        margin-inline: -1rem; padding: .25rem 1rem 1.1rem; scroll-padding-inline: 1rem; scrollbar-width: none;
    }
    .feat-grid-new::-webkit-scrollbar { display: none; }
    .feat-grid-new > * { scroll-snap-align: start; }
    .feat-grid-new > .reveal { opacity: 1 !important; transform: none !important; }
    .feat-card-new.fx-card:hover { transform: none; }
    .feat-grid-new .fx-list { margin-top: 0; } /* the list follows the text; spare height sits at the bottom */
    .mk-swipe-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: .1rem; }
    .mk-swipe-dots span { width: .45rem; height: .45rem; border-radius: 999px; background: color-mix(in srgb, var(--ink, #0f172a) 18%, transparent); transition: width .2s, background .2s; }
    .mk-swipe-dots span.is-on { width: 1.2rem; background: var(--brand, #2563eb); }
}

/* ── Section rhythm on small screens ── */
@media (max-width: 640px) {
    #restaurants, #about, #features, #how, #contact { padding-block: 3.25rem; }
    .section-head { margin-bottom: 1.75rem; }
    .sec-h2 { font-size: clamp(1.65rem, 7vw, 2rem); }
    .sec-desc { font-size: .95rem; line-height: 1.7; }
    .hero-desc { font-size: .98rem; line-height: 1.7; margin-bottom: 1.75rem; }
    .hero-eyebrow { margin-bottom: 1.1rem; }
    .hero-chips { margin-top: 1.4rem; }
}

/* ── Restaurants ── */
@media (max-width: 640px) {
    /* Three facts side by side instead of a tall list */
    .venues-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: .35rem; border-radius: 1.1rem; width: 100%; }
    .venues-stats li { flex-direction: column; justify-content: flex-start; gap: .35rem; padding: .55rem .3rem; text-align: center; font-size: .74rem; line-height: 1.3; }
    .venues-stats li + li { border-top: 0; border-inline-start: 1px solid var(--border); }
    .venues-stats strong { font-size: .9rem; }
    .venues-search { width: 100%; }

    /* Compact horizontal card: logo beside the name, the button underneath */
    .venue-grid { gap: .9rem; }
    .venue-card {
        flex-basis: 100%; display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); column-gap: 1rem;
        align-items: start; padding: 1rem; border-radius: 1.35rem;
    }
    .venue-card:hover { transform: none; }
    .venue-card__cover { position: absolute; inset: 0 0 auto; height: 4.25rem; z-index: 0; }
    .venue-card__cover::after { mask-image: linear-gradient(180deg, #000, transparent); -webkit-mask-image: linear-gradient(180deg, #000, transparent); }
    .venue-card__cover-img { opacity: .55; }
    .venue-card__qr { display: none; }
    .venue-card__live { top: .7rem; inset-inline-start: auto; inset-inline-end: .7rem; padding: .25rem .6rem .25rem .5rem; font-size: .66rem; }
    .venue-card__logo { width: 4.75rem; height: 4.75rem; margin: .35rem 0 0; border-radius: 1.2rem; border-width: 3px; padding: .15rem; }
    .venue-card__logo img { border-radius: .85rem; }
    .venue-card:hover .venue-card__logo { transform: none; }
    /* The body's children join the card grid: name and text beside the logo, button and languages below */
    .venue-card__body { display: contents; }
    .venue-card__name, .venue-card__desc { grid-column: 2; text-align: start; position: relative; z-index: 1; }
    html[dir="rtl"] .venue-card__name, html[dir="rtl"] .venue-card__desc { text-align: start; }
    .venue-card__name { grid-row: 1; align-self: end; margin: 2.2rem 0 .2rem; font-size: 1.08rem; }
    .venue-card__desc { grid-row: 2; max-width: none; min-height: 0; font-size: .84rem; line-height: 1.5; }
    .venue-card__logo { grid-row: 1 / span 2; grid-column: 1; }
    .venue-card__tags { display: none; }
    .venue-card__btn { grid-column: 1 / -1; margin-top: .9rem; padding: .75rem 1rem; font-size: .9rem; box-shadow: 0 8px 18px rgba(37, 99, 235, .25); }
    .venue-card__langs { grid-column: 1 / -1; margin-top: .55rem; }
}

/* ── Home blogs: keep the three stories in one row on tablets (two columns left one card alone) ── */
@media (min-width: 700px) and (max-width: 1024px) {
    .hb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
    .hb-card__body { padding: .9rem 1rem 1rem; }
    .hb-card__body strong, .hb-card--lead .hb-card__body strong { font-size: 1rem; }
    .hb-card__venue { font-size: .72rem; }
}

/* ── About ── */
@media (max-width: 768px) {
    .about-check { flex-direction: row; align-items: flex-start; gap: .9rem; padding: 1rem 1.05rem; }
    .about-check:hover { transform: none; }
    .about-check-ic { width: 2.4rem; height: 2.4rem; }
    .about-checks { gap: .7rem; }
    .about-intro { margin-bottom: 1.4rem; }
}
@media (max-width: 640px) {
    .about-wrap { gap: 2rem; }
    .about-stats-side { gap: .7rem; }
    .astat { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; align-items: center; padding: 1.1rem 1.2rem; border-radius: 1.15rem; }
    .astat-num { grid-row: span 2; margin: 0; font-size: 2rem; width: 5.6rem; }
    .astat-title { margin: 0; }
    .astat-desc { grid-column: 2; font-size: .8rem; }
    .astat-ic { display: none; }
    .astat::after { width: 6rem; height: 6rem; top: -2.5rem; right: -2rem; }
}

/* ── Home "How it works": a vertical timeline on phones ── */
@media (max-width: 640px) {
    .how-cards { gap: 0; }
    .how-cards::before {
        display: block; top: 1.6rem; bottom: 1.6rem; left: auto; right: auto; inset-inline-start: 1.6rem; width: 2px; height: auto;
        background: linear-gradient(180deg, rgba(37, 99, 235, .35), rgba(99, 102, 241, .15)); animation: none;
    }
    .how-card {
        display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); column-gap: 1rem; align-items: start;
        padding: .6rem 0 1.4rem; text-align: start; background: none; border: 0; box-shadow: none;
    }
    .how-card:hover { transform: none; box-shadow: none; }
    .how-card-icon { grid-row: 1 / span 2; grid-column: 1; width: 3.2rem; height: 3.2rem; margin: 0; font-size: 1.05rem; box-shadow: 0 0 0 5px #fff, 0 8px 20px rgba(37, 99, 235, .3); }
    .how-card-icon::after { display: none; }
    /* The step number becomes a small badge on the icon */
    .how-card-num {
        top: .25rem; inset-inline-end: auto; inset-inline-start: 2.25rem; z-index: 2;
        width: 1.35rem; height: 1.35rem; border-radius: 50%; display: grid; place-items: center;
        background: #fff; color: var(--brand); -webkit-text-stroke: 0; font-size: .7rem;
        box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
    }
    .how-card h3 { grid-row: 1; grid-column: 2; margin: .35rem 0 .3rem; font-size: 1rem; }
    .how-card p { grid-row: 2; grid-column: 2; font-size: .86rem; line-height: 1.6; }
    .how-more { margin-top: .6rem; }
}

/* ── CTA band ── */
.btn-cta-light, .btn-cta-ghost { white-space: nowrap; }
@media (max-width: 640px) {
    .cta-band { border-radius: 1.35rem; padding: 1.6rem 1.3rem; }
    .cta-band-btns { flex-direction: column; }
    .btn-cta-light, .btn-cta-ghost { justify-content: center; width: 100%; }
}

/* ── Contact: no card inside a card inside a card on phones ── */
@media (max-width: 640px) {
    .contact-outer-card { background: none; box-shadow: none; padding: 0; border-radius: 0; }
    .contact-outer-card .section-head { margin-bottom: 1.6rem; }
    .contact-wrap { gap: 1rem; }
    .contact-info-card { border-radius: 1.25rem; padding: 1.25rem; gap: 1rem; }
    .cie-header-icon { display: none; }
    .cie-item { padding: .75rem .85rem; gap: .75rem; }
    .cie-ic { width: 2.4rem; height: 2.4rem; }
    .cf-wrap { border-radius: 1.25rem; padding: 1.3rem 1.15rem; box-shadow: var(--shadow-sm); }
    .cf-wrap-title { font-size: 1.25rem; }
    .cf-inp, .cf-sel, .cf-ta { font-size: 1rem; } /* 16px stops iOS zooming into the field */
}

/* ── Footer ── */
@media (max-width: 640px) {
    footer { padding-top: 2.75rem; }
    .footer-grid { gap: 1.75rem; padding-bottom: 1.75rem; }
    .footer-links { grid-template-columns: 1fr 1fr; gap: .55rem 1rem; }
    .footer-col h4 { margin-bottom: .8rem; }
    .footer-bottom { padding: 1.1rem 0 1.4rem; }
    .footer-copy { font-size: .78rem; }
}

/* ── Floating buttons: smaller on phones so they cover less content ── */
@media (max-width: 640px) {
    .wa-float, .scroll-top { width: 2.9rem; height: 2.9rem; }
    .wa-float { font-size: 1.35rem; bottom: 4.6rem; }
    .scroll-top { bottom: 1rem; font-size: .95rem; }
}

/* ── How it works page ── */
/* "In the portal: Menu → Products" flows as one line of text instead of two squeezed columns */
.hiw-where { display: block; }
.hiw-where i { margin-inline-end: .3rem; }
@media (max-width: 640px) {
    .hiw-grow__card, .hiw-tool, .hiw-role { height: auto; }
}

/* ── Blogs page ── */
@media (max-width: 640px) {
    .mb-blog__body { padding-inline: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
    body.nav-open::after { animation: none; }
}
