/* ==========================================================================
   Music Man main-site sections shared by the home and instrument pages
   (mm/pages/partials): legacy www's outlined buttons, the Factory Tour band,
   the "Buy Your Instrument / Join the Family" close, and the zoom dialog.
   ========================================================================== */

/* Legacy www's button: outlined, uppercase, tracked. Light variant for dark
   backgrounds. 44px tall for the target-size minimum. */
.mm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.625rem 1.5rem;
    border: 2px solid #17171c;
    border-radius: 0;
    background: transparent;
    color: #17171c;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
}

.mm-btn:hover,
.mm-btn:focus-visible {
    background: #17171c;
    color: #ffffff;
}

.mm-btn:focus-visible {
    outline: 2px solid #17171c;
    outline-offset: 3px;
}

.mm-btn[hidden] {
    display: none;
}

.mm-btn--light {
    border-color: #ffffff;
    color: #ffffff;
}

.mm-btn--light:hover,
.mm-btn--light:focus-visible {
    background: #ffffff;
    color: #17171c;
    outline-color: #ffffff;
}

/* -- The Factory Tour ------------------------------------------------------ */

.mm-tour {
    position: relative;
    display: grid;
    place-items: center;
    min-height: clamp(22rem, 48vw, 40rem);
    padding: 3rem 18px;
    overflow: hidden;
    background: #6f6f72;
    color: #ffffff;
    text-align: center;
}

.mm-tour__media,
.mm-tour__poster,
.mm-tour__loop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.mm-tour__poster,
.mm-tour__loop {
    object-fit: cover;
}

.mm-tour__loop {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.mm-tour__loop.is-playing {
    opacity: 1;
}

/* The ADA box: the copy's own translucent plate, not a scrim over the whole
   photo. rgba(17,17,17,.72) over pure white composites to rgb(87,87,87),
   on which white text is 7.0:1. */
.mm-tour__box {
    position: relative;
    max-width: 44rem;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-radius: 4px;
    background: rgba(17, 17, 17, 0.72);
}

.mm-tour__heading {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3.25rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.mm-tour__text {
    margin: 0 0 1.5rem;
    font-size: 1.0625rem;
    line-height: 1.6;
}

.mm-tour__dialog {
    width: min(92vw, 1100px);
    padding: 0;
    border: 0;
    background: #000000;
}

.mm-tour__dialog::backdrop {
    background: rgba(0, 0, 0, 0.85);
}

.mm-tour__frame {
    aspect-ratio: 16 / 9;
}

.mm-tour__frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* -- Buy Your Instrument / Join the Family ---------------------------------- */

.mm-join {
    display: grid;
}

@media (min-width: 768px) {
    .mm-join {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.mm-join__cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(2.5rem, 5vw, 3.75rem) 18px;
    background: #e8e8e8;
    color: #17171c;
    text-align: center;
}

.mm-join__cell--dark {
    background: #252525;
    color: #ffffff;
}

.mm-join__heading {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
    font-weight: 700;
}

.mm-join__text {
    margin: 0 0 1.5rem;
    font-size: 1.0625rem;
}

/* -- Zoom dialog: the large photo, dragged around --------------------------- */

.mm-zoom {
    width: calc(100vw - 24px);
    max-width: none;
    height: calc(100vh - 24px);
    max-height: none;
    padding: 0;
    border: 0;
    background: #ececec;
}

.mm-zoom::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

.mm-zoom__viewport {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

.mm-zoom__viewport.is-dragging {
    cursor: grabbing;
}

.mm-zoom__viewport:focus-visible {
    outline: 3px solid #17171c;
    outline-offset: -3px;
}

.mm-zoom__image {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    user-select: none;
    will-change: transform;
}

.mm-zoom__close {
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #17171c;
    font-size: 2rem;
    line-height: 1;
}

.mm-zoom__close:focus-visible {
    outline: 2px solid #17171c;
    outline-offset: 2px;
}

.mm-zoom__hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    background: rgba(17, 17, 17, 0.8);
    color: #ffffff;
    font-size: 0.875rem;
    pointer-events: none;
}
