/* The phone menu shared by every kk-studio.ch page; built by menu.js from the page's own nav.
   Colours arrive as --km-bg and --km-text from the page; the call-to-action keeps the page's button colours. */

/* The page's toggle, made bare: a 44 pt target whose three lines turn into a close mark */
button.mobile-toggle.km-toggle {
    position: relative; width: 44px; height: 44px; padding: 0; margin: 0 -10px 0 0;
    background: none; border: 0; border-radius: 12px; cursor: pointer;
}
button.mobile-toggle.km-toggle span {
    position: absolute; left: 12px; width: 20px; height: 2px; margin: 0; border-radius: 2px;
    background: currentColor; transform: none; opacity: 1;
    transition: transform 0.3s ease, opacity 0.2s ease;
}
button.mobile-toggle.km-toggle span:nth-child(1) { top: 15px; }
button.mobile-toggle.km-toggle span:nth-child(2) { top: 21px; }
button.mobile-toggle.km-toggle span:nth-child(3) { top: 27px; }
button.mobile-toggle.km-toggle.km-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
button.mobile-toggle.km-toggle.km-open span:nth-child(2) { opacity: 0; }
button.mobile-toggle.km-toggle.km-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
button.mobile-toggle.km-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* The sheet hangs from the bar */
.km-sheet {
    position: fixed; left: 0; right: 0; top: 64px; z-index: 999;
    max-height: calc(100vh - 64px); overflow-y: auto; overscroll-behavior: contain;
    padding: 8px 16px 20px;
    background: var(--km-bg, #fff); color: var(--km-text, #1d1d1f);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}
.km-sheet.open { opacity: 1; visibility: visible; transform: none; transition: opacity 0.22s ease, transform 0.22s ease; }

.km-list {
    list-style: none; margin: 0; padding: 0;
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.km-list li { padding-left: 16px; }
.km-list li + li a { border-top: 1px solid rgba(0, 0, 0, 0.08); }
.km-list a {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 52px; padding-right: 18px;
    font-size: 1.0625rem; font-weight: 500; line-height: 1.3;
    color: var(--km-text, #1d1d1f); text-decoration: none;
}
.km-list a::after {
    content: ""; flex: none; width: 8px; height: 8px; margin-left: 12px;
    border-top: 2px solid rgba(60, 60, 67, 0.3); border-right: 2px solid rgba(60, 60, 67, 0.3);
    transform: rotate(45deg);
}
.km-list a:active { background: rgba(0, 0, 0, 0.04); }

.km-cta {
    display: flex; align-items: center; justify-content: center;
    min-height: 50px; margin-top: 16px; border-radius: 14px;
    font-size: 1.0625rem; font-weight: 700; text-decoration: none;
    box-shadow: none; transform: none;
}
.km-cta:active { filter: brightness(0.94); }
.km-note { margin: 10px 0 0; text-align: center; font-size: 0.82rem; opacity: 0.75; }

/* On a dark page */
.km-sheet.km-dark { border-bottom-color: rgba(255, 255, 255, 0.08); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.km-sheet.km-dark .km-list { background: rgba(255, 255, 255, 0.07); box-shadow: none; }
.km-sheet.km-dark .km-list li + li a { border-top-color: rgba(255, 255, 255, 0.1); }
.km-sheet.km-dark .km-list a::after { border-color: rgba(235, 235, 245, 0.35); }
.km-sheet.km-dark .km-list a:active { background: rgba(255, 255, 255, 0.06); }

.km-scrim {
    position: fixed; left: 0; right: 0; bottom: 0; top: 64px; z-index: 998;
    background: rgba(0, 0, 0, 0.28);
    opacity: 0; visibility: hidden;
    transition: opacity 0.22s ease, visibility 0s linear 0.22s;
}
.km-scrim.open { opacity: 1; visibility: visible; transition: opacity 0.22s ease; }
html.km-locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    .km-sheet, .km-sheet.open { transform: none; }
    button.mobile-toggle.km-toggle span { transition: none; }
}
