/* components.css — reusable UI primitives (btn, card, form, scroller, menu-item),
   page-chrome (header hamburger, nav backdrop), and cross-cutting polish. */

/* ============================================================
   Section glyph (decorative icon above section headings)
   ============================================================ */

.section-glyph {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    color: var(--ember);
}

/* ============================================================
   Icon utility (for inline SVG icons, sized by class)
   ============================================================ */

.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: currentColor;
    stroke: currentColor;
    flex-shrink: 0;
}

.icon-lg  { width: 1.5em; height: 1.5em; }
.icon-xl  { width: 2em;   height: 2em; }
.icon-2xl { width: 2.5em; height: 2.5em; }
.icon-3xl { width: 3em;   height: 3em; }

/* ============================================================
   Button primitive — additive, new pages opt in via .btn-ib
   Legacy .button / .btn styles untouched for now.
   ============================================================ */

.btn-ib {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-6);
    font-family: var(--font-display);
    font-size: var(--fs-base);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--cream);
    background: var(--ember);
    border: 1px solid var(--ember);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color var(--dur-base) var(--ease-out),
                border-color var(--dur-base) var(--ease-out),
                color var(--dur-base) var(--ease-out),
                transform var(--dur-fast) var(--ease-out);
}

.btn-ib:hover,
.btn-ib:focus-visible {
    background: var(--ember-hover);
    border-color: var(--ember-hover);
    color: var(--cream);
    text-decoration: none;
}

.btn-ib:active { transform: translateY(1px); }

.btn-ib--ghost {
    background: transparent;
    color: var(--ember);
}

.btn-ib--ghost:hover,
.btn-ib--ghost:focus-visible {
    background: var(--ember);
    color: var(--cream);
}

.btn-ib--dark {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--cream);
}

.btn-ib--dark:hover,
.btn-ib--dark:focus-visible {
    background: var(--ember);
    border-color: var(--ember);
}

/* ============================================================
   Card primitive
   ============================================================ */

.card-ib {
    background: var(--cream);
    color: var(--ink);
    padding: var(--sp-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-base) var(--ease-out),
                box-shadow var(--dur-base) var(--ease-out);
}

.card-ib--dark {
    background: color-mix(in oklch, var(--ink) 92%, var(--stone));
    color: var(--cream);
}

.card-ib:hover {
    box-shadow: var(--shadow-md);
}

/* Respect reduced-motion for transform-based hovers across the site */
@media (prefers-reduced-motion: reduce) {
    .card-ib:hover,
    .about-photo:hover,
    .value-card:hover,
    .home-hero .hero-image:hover,
    .home-hero:hover .hero-image,
    #testimonials .testimonial-block:hover,
    .menu-box .menu-details:hover .menu-thumbnail img,
    .social-icons a:hover,
    .footer-privacy a:hover,
    .footer-privacy button:hover,
    .btn-ib:active {
        transform: none;
    }
}

/* ============================================================
   Form field primitive
   ============================================================ */

.field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.field > label {
    font-family: var(--font-display);
    font-size: var(--fs-sm);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.field > input,
.field > textarea,
.field > select {
    padding: var(--sp-3) var(--sp-4);
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--ink);
    background: var(--cream);
    border: 1px solid color-mix(in oklch, var(--ink) 25%, var(--cream));
    border-radius: var(--radius-sm);
    transition: border-color var(--dur-base) var(--ease-out),
                box-shadow var(--dur-base) var(--ease-out);
}

.field > input:focus-visible,
.field > textarea:focus-visible,
.field > select:focus-visible {
    outline: none;
    border-color: var(--ember);
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--ember) 35%, transparent);
}

/* ============================================================
   Typographic helpers — editorial rhythm
   ============================================================ */

.eyebrow {
    font-family: var(--font-display);
    font-size: var(--fs-sm);
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ember);
    display: inline-block;
    margin-bottom: var(--sp-3);
}

.display {
    font-family: var(--font-display);
    font-size: var(--fs-5xl);
    line-height: var(--lh-tight);
    letter-spacing: -0.01em;
    margin: 0 0 var(--sp-5);
}

.measure { max-width: var(--measure); }

.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-6); }

.cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4);
    align-items: center;
}

/* Pills row — small-caps brand feature list with dot separators */
.pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-3) var(--sp-4);
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: 0.03em;
    margin-bottom: var(--sp-5);
}

.pills .pill {
    color: var(--ember);
}

.pills .pill-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: color-mix(in oklch, var(--stone) 70%, transparent);
}

/* ============================================================
   Section lede (editorial section header pattern)
   Eyebrow → heading → supporting copy, centered, capped measure.
   ============================================================ */

.section-lede {
    text-align: center;
    max-width: 60ch;
    margin-inline: auto;
    padding-inline: var(--sp-4);
    margin-bottom: var(--sp-8);
}

.section-lede .eyebrow {
    color: var(--ember);
    letter-spacing: 0.2em;
    font-size: var(--fs-xs);
}

.section-lede h1,
.section-lede h2 {
    margin: var(--sp-3) 0 var(--sp-4);
}

.section-lede p {
    color: color-mix(in oklch, var(--cream) 78%, transparent);
}

/* ============================================================
   Menu item styling (shared by Home Customer Favorites + Menu page)
   Works for both _MenuItemSimple and _MenuItemWithImage partials.
   ============================================================ */

.menu-box .menu-details {
    margin-inline: calc(var(--sp-3) * -1);
    padding-inline: var(--sp-3);
    padding-block: var(--sp-2);
    border-radius: var(--radius-md);
    transition: background-color var(--dur-base) var(--ease-out);
}

.menu-box .menu-details:hover {
    background: color-mix(in oklch, var(--cream) 5%, transparent);
}

.menu-box .menu-item-name {
    transition: color var(--dur-base) var(--ease-out);
}

.menu-box .menu-details:hover .menu-item-name {
    color: var(--ember);
}

/* Thumbnail sizing — legacy markup pairs an unwidthed .menu-thumbnail with
   a sibling carrying Bootstrap's w-100, which starves the image on desktop.
   Give it a real flex basis so the image always has room. */
.menu-box .menu-item .menu-thumbnail {
    overflow: hidden;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.menu-box .menu-item .menu-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform var(--dur-slow) var(--ease-out);
}

@media (min-width: 992px) {
    .menu-box .menu-item .menu-thumbnail {
        width: 140px;
        margin-right: var(--sp-4);
    }

    .menu-box .menu-item > .d-flex {
        min-width: 0;
    }

    .menu-box .menu-item-name {
        min-width: 0;
        word-break: break-word;
    }
}

.menu-box .menu-details:hover .menu-thumbnail img {
    transform: scale(1.04);
}

.menu-sub-category-name {
    position: relative;
    padding-left: var(--sp-4);
}

.menu-sub-category-name::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--ember);
    border-radius: 1px;
    rotate: 45deg;
}

/* ============================================================
   Scroll-snap carousel (replaces Owl Carousel)
   ============================================================ */

/* ============================================================
   Scroll-snap carousel (replaces Owl Carousel)
   ============================================================ */

.scroller {
    display: flex;
    gap: var(--sp-5);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: var(--sp-4);
}

.scroller::-webkit-scrollbar { display: none; }

.scroller > .item {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.scroller-dots {
    display: flex;
    justify-content: center;
    gap: var(--sp-2);
    padding-top: var(--sp-4);
    list-style: none;
    margin: 0;
}

.scroller-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--cream);
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: background-color var(--dur-base) var(--ease-out),
                transform var(--dur-base) var(--ease-out),
                border-color var(--dur-base) var(--ease-out);
}

.scroller-dots button[aria-current="true"] {
    background: var(--ember);
    border-color: var(--ember);
    transform: scale(1.2);
}

/* ============================================================
   Sticky header (replaces mega-menu sticky_header plugin option)
   ============================================================ */

.header {
    transition: background-color var(--dur-base) var(--ease-out);
}

@media (min-width: 993px) {
    .header.is-stuck .menu-list-items {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: var(--z-nav);
        background: #0d0d0d;
        box-shadow: var(--shadow-md);
        padding: 0 10px;
        max-width: 100%;
    }

    .header.is-stuck .menu-logo > li > a img {
        height: 50px;
        margin: 10px 0;
    }
}

/* ============================================================
   Mobile hamburger + slide-in nav drawer
   Visible ≤ 992px — replaces mega-menu mobile collapse behavior.
   ============================================================ */

.nav-hamburger {
    display: none;
    position: absolute;
    top: 18px;
    right: var(--sp-5);
    z-index: calc(var(--z-nav) + 1);
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--cream);
    cursor: pointer;
}

.nav-hamburger svg {
    width: 28px;
    height: 28px;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    fill: none;
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-slow) var(--ease-out);
    z-index: calc(var(--z-nav) - 1);
}

@media (max-width: 992px) {
    .nav-hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .header .menu-links {
        position: fixed !important;
        inset: 0 0 0 auto !important;
        width: min(82vw, 340px);
        padding: var(--sp-10) var(--sp-6) var(--sp-6);
        background: var(--ink);
        transform: translateX(100%);
        transition: transform var(--dur-slow) var(--ease-out);
        z-index: var(--z-nav);
        display: flex !important;
        flex-direction: column;
        gap: var(--sp-2);
        overflow-y: auto;
        margin: 0;
    }

    .header[data-mobile-open="true"] .menu-links {
        transform: translateX(0);
    }

    .header[data-mobile-open="true"] .nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .header .menu-links > li {
        display: block;
        width: 100%;
        float: none;
    }

    .header .menu-links > li > a {
        display: block;
        padding: var(--sp-3) 0;
        font-family: var(--font-display);
        font-size: var(--fs-lg);
        letter-spacing: 0.02em;
        color: var(--cream);
        border-bottom: 1px solid color-mix(in oklch, var(--cream) 15%, transparent);
    }

    .header .menu-links > li > a:hover,
    .header .menu-links > li > a:focus-visible {
        color: var(--ember);
    }

    body:has(.header[data-mobile-open="true"]) {
        overflow: hidden;
    }
}
