/* ==========================================================================
   SIGNATURE DISHES — 3D coverflow carousel
   --------------------------------------------------------------------------
   This file is SELF-CONTAINED. To remove the slider entirely:
     1. delete this file
     2. delete js/signatures.js
     3. delete the <link>, <script>, and <section class="sig"> in index.html
     4. (optional) delete assets/dishes/

   Everything is namespaced under .sig-* so it won't collide with the
   rest of the site. CSS variables are scoped INSIDE .sig (not :root)
   so they don't leak to other components.
   ========================================================================== */

.sig {
    /* Scoped design tokens — only apply within .sig and its descendants. */
    --paper-deep: #0c0806;
    --paper-soft: #221508;
    --paper-line: rgba(197, 160, 68, 0.10);
    --ink: #F0E6D2;
    --ink-soft: #C4B8A4;
    --ink-ghost: rgba(240, 230, 210, 0.42);
    --gold: #C5A044;
    --gold-light: #D4B95E;
    --vermilion: #B33A2A;
    --serif-display: 'Cormorant Garamond', Georgia, serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    --cn: 'Noto Serif SC', 'Noto Serif TC', serif;

    /* Section frame */
    position: relative;
    min-height: 100vh;
    background: transparent;
    overflow: hidden;
    padding: 120px 0 100px;
    color: var(--ink);
}

.sig::before {
    content: '';
    position: absolute;
    inset: 0;
    background: none;
    pointer-events: none;
}

/* --- Header (eyebrow / h2 / subtitle) ----------------------------------- */
.sig-head {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 64px;
    padding: 0 48px;
}

.sig-head .eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--ink-ghost);
}

.sig-head h2 {
    margin: 0;
    font-family: var(--serif-display);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(56px, 5.5vw, 96px);
    line-height: 1;
    color: var(--ink);
}

.sig-head h2 .gold { color: var(--gold-light); }

.sig-head .sub {
    margin: 18px auto 0;
    max-width: 600px;
    font-family: var(--serif-display);
    font-style: italic;
    font-size: 18px;
    color: var(--ink-soft);
}

/* --- Stage (the 3D space cards live in) --------------------------------- */
.sig-stage {
    position: relative;
    height: clamp(300px, 70vw, 700px);
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1800px;
}

.sig-card {
    position: absolute;
    width: clamp(360px, 92vw, 820px);
    aspect-ratio: 4 / 3;
    height: auto;
    border-radius: 4px;
    overflow: hidden;
    background: var(--paper-soft);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px var(--paper-line);
    transition: transform 1s cubic-bezier(.16, 1, .3, 1),
                opacity .8s ease,
                filter .8s ease;
    cursor: pointer;

    /* Block the browser's default text-selection / drag highlight
       (the blue overlay that appears on click + drag). */
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;   /* removes mobile tap flash */
}

.sig-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    /* Prevent the image from being draggable —
       dragging an <img> also triggers the same blue selection halo. */
    -webkit-user-drag: none;
    user-drag: none;
}

/* Removed: dark-to-bottom gradient overlay on every card. Was darkening
   the lower 60% of each image to near-black, which the owner read as a
   stray "shade from the bottom" of the carousel since no text overlays
   the cards (caption sits below in .sig-info). The drop-shadow on
   .sig-card above already gives the cards visual depth. */

/* Card position states — set by signatures.js based on current index */
.sig-card.center {
    transform: translateX(0) scale(1) rotateY(0);
    z-index: 5;
    opacity: 1;
    filter: brightness(1);
}
.sig-card.left {
    transform: translateX(-600px) scale(.78) rotateY(20deg);
    z-index: 3;
    opacity: .55;
    filter: brightness(.6);
}
.sig-card.right {
    transform: translateX(600px) scale(.78) rotateY(-20deg);
    z-index: 3;
    opacity: .55;
    filter: brightness(.6);
}
.sig-card.far-left {
    transform: translateX(-940px) scale(.62) rotateY(28deg);
    z-index: 1;
    opacity: .25;
    filter: brightness(.4);
}
.sig-card.far-right {
    transform: translateX(940px) scale(.62) rotateY(-28deg);
    z-index: 1;
    opacity: .25;
    filter: brightness(.4);
}
.sig-card.hidden {
    transform: translateX(0) scale(.4);
    opacity: 0;
    pointer-events: none;
}

/* --- Caption block (cn / de / meta) ------------------------------------ */
.sig-info {
    position: relative;
    z-index: 6;
    text-align: center;
    margin-top: 56px;
    height: 140px;
}

.sig-info-cn {
    margin-bottom: 8px;
    font-family: var(--cn);
    font-size: 28px;
    color: var(--gold);
    letter-spacing: .12em;
}

.sig-info-de {
    margin: 0 auto 14px;
    max-width: 720px;
    font-family: var(--serif-display);
    font-style: italic;
    font-weight: 400;
    font-size: 38px;
    color: var(--ink);
    line-height: 1.15;
}

.sig-info-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--ink-ghost);
}

.sig-info-price { color: var(--gold-light); font-size: 14px; }
.sig-info-spice { color: var(--vermilion); }

/* Allergens are concatenated letters (no " · " separator). Override the
   parent meta line's wide 0.25em letter-spacing with something tight so
   a 10-letter list like "ABCDEFLNOR" stays on one row even on a 375px
   iPhone viewport. */
.sig-info-allergens { letter-spacing: 0.06em; }

/* --- Prev/next arrows -------------------------------------------------- */
.sig-controls {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 48px;
    z-index: 10;
    pointer-events: none;   /* let clicks pass through gaps; arrows re-enable */
}

.sig-arrow {
    pointer-events: auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--paper-line);
    background: rgba(12, 8, 6, .6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    cursor: pointer;
    font: inherit;
    padding: 0;
    transition: all .3s ease;
}

.sig-arrow:hover {
    color: var(--gold);
    border-color: var(--gold);
    transform: scale(1.08);
}

.sig-arrow svg { width: 22px; height: 22px; }

/* --- Counter ----------------------------------------------------------- */
.sig-counter {
    position: absolute;
    top: 60px;
    right: 48px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: .25em;
    color: var(--ink-ghost);
    z-index: 6;
}

.sig-counter .now {
    color: var(--gold-light);
    font-size: 18px;
}

/* ============================================
   MOBILE (≤768px) — tighten the signatures header
   "Die Spezialitäten des Hauses." must fit one line and stay under
   ~10% of the viewport height; the subtitle paragraph is dropped to
   reclaim vertical space; eyebrow/title gaps tighten throughout.
   ============================================ */
@media (max-width: 768px) {
    /* Drop the desktop's min-height: 100vh and thick paddings on .sig
       — on phones the carousel content is way shorter than 100vh so
       the bottom of .sig was leaving a tall empty band before #page3.
       (This rule lives in signatures.css rather than style.css because
       signatures.css loads later and its plain .sig rule would win
       over a media-queried override in the earlier file.) */
    .sig {
        min-height: 0;
        padding: 32px 0 16px;
    }

    .sig-head {
        margin-bottom: 24px;
        padding: 0 16px;
    }

    .sig-head .eyebrow {
        display: none;
    }

    .sig-head h2 {
        /* The " des Hauses." tail is hidden below, so this only needs
           to hold "Die Spezialitäten" on one line. Sized a touch
           larger than before while staying well under 10vh. */
        font-size: clamp(28px, 8vw, 44px);
        line-height: 1.1;
        max-height: 10vh;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Drop the title tail on phones — title becomes just "Die Spezialitäten"
       (and the equivalent in EN / ZH where the tail is the trailing period).
       Class-based now that signatures.js owns header rendering from PB. */
    .sig-head h2 .sig-title-tail {
        display: none;
    }

    /* Drop the long subtitle on phones — eats too much vertical room. */
    .sig-head .sub {
        display: none;
    }

    /* ---------- Dish caption block (below the image) ----------
       Tighten the cn / de / meta stack so it hugs the image instead
       of floating below a 56px gap. The de dish name drops below the
       section title's size, and the cn / meta tighten too. */
    .sig-info {
        margin-top: 14px;
        height: auto;
        padding: 0 16px;
    }
    .sig-info-cn {
        margin-bottom: 4px;
        font-size: 16px;
    }
    .sig-info-de {
        margin: 0 auto 8px;
        font-size: 22px;              /* below the 28px+ header */
        line-height: 1.2;
    }
    .sig-info-meta {
        gap: 10px;
        font-size: 10px;
        flex-wrap: nowrap;            /* keep price / spice / allergens on one row */
        white-space: nowrap;          /* prevent breaks inside individual items */
        max-width: 100%;
    }
    /* Even tighter on mobile so very long allergen lists still fit one row. */
    .sig-info-allergens {
        letter-spacing: 0.04em;
        font-size: 9px;
    }

    /* Stack the chili indicators vertically on phones — one per row,
       1/2/3 emoji column reading top-to-bottom. Each chili is wrapped
       in a <span> by signatures.js so flex-direction can do its work. */
    .sig-info-spice {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        line-height: 1;
        gap: 2px;
        vertical-align: middle;
    }
    .sig-info-spice span {
        display: block;
        font-size: 1.1em;
    }

    /* Counter "03 / 08" — desktop positions it at top:60px right:48px,
       which on the now-tighter mobile header lands ON the title row.
       Move it ABOVE the title on mobile so there's clear separation. */
    .sig-counter {
        top: 10px;
        right: 16px;
    }
    .sig-counter .now {
        font-size: 14px;
    }

    /* ---------- Carousel arrows (mobile) ----------
       Move the arrows to the very edges of the screen so the thumb
       reaches them naturally, drop the circular chip + backdrop-blur
       chrome — just a bare chevron over the dish image. */
    .sig-controls {
        padding: 0 4px;
    }
    .sig-arrow {
        width: 44px;
        height: 72px;
        border: none;
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        color: rgba(244, 234, 210, 0.92);
    }
    .sig-arrow:hover {
        background: transparent;
        border-color: transparent;
        color: var(--gold);
        transform: scale(1.12);
    }
    /* Drop-shadow keeps the chevron readable when the carousel image
       behind it is bright (e.g. white tableware). */
    .sig-arrow svg {
        width: 28px;
        height: 28px;
        filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.75));
    }
}
