@charset "UTF-8";

/* ============================================================
   PIXEL JELLY BUDDY — shown on every page (js/jelly.js)
   ============================================================ */

.jelly {
    position: fixed;
    left: 0;
    top: 0;
    width: 90px;
    height: 135px;
    z-index: 50;
    pointer-events: none;
    transform-origin: 50% 24%;
    will-change: transform;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.jelly.is-ready {
    opacity: 1;
}

.jelly__canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* quick fade while it pops between the hero and the side dock */
.jelly.is-ready.is-swapping {
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* clickable look + squish when you click the jelly (it squeaks) */
html.over-jelly,
html.over-jelly * {
    cursor: pointer !important;
}

.jelly.is-squeaked .jelly__canvas {
    animation: jellySqueak 0.45s ease;
    transform-origin: 50% 24%;
}

@keyframes jellySqueak {
    0%   { transform: scale(1, 1); }
    30%  { transform: scale(1.18, 0.82); }
    60%  { transform: scale(0.92, 1.1); }
    100% { transform: scale(1, 1); }
}

/* ── OCEAN MUSIC: button + little note, top right under the header (js/music.js) ── */
.music-dock {
    position: fixed;
    top: calc(clamp(80px, 12vw, 150px) + 14px);
    right: 34px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.music-note {
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 999px;
    background-color: #FFFFFF;
    border: 1px solid #DED5C3;
    color: #4D5559;
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 11px;
    line-height: 1.3;
    text-align: right;
    box-shadow: 0 6px 18px -10px rgba(23, 108, 114, 0.45);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.music-dock.note-hidden .music-note {
    opacity: 0;
    transform: translateX(10px);
}

.music-toggle {
    pointer-events: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 11px;
    border: 2px solid #176C72;
    border-radius: 999px;
    background-color: #F7F2E8;
    color: #176C72;
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 18px -8px rgba(23, 108, 114, 0.5);
    transition: background-color 0.3s, color 0.3s, transform 0.2s, padding 0.35s ease, gap 0.35s ease;
}

/* small round icon; the words slide out on hover or keyboard focus */
.music-toggle i {
    width: 16px;
    text-align: center;
}

.music-toggle span {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transition: max-width 0.35s ease, opacity 0.25s ease, margin 0.35s ease;
}

.music-toggle:hover,
.music-toggle:focus-visible {
    gap: 8px;
    padding: 11px 16px;
}

.music-toggle:hover span,
.music-toggle:focus-visible span {
    max-width: 120px;
    opacity: 1;
}

.music-toggle:hover {
    background-color: #F07865;
    border-color: #F07865;
    color: #282D30;
    transform: translateY(-2px);
}

.music-toggle.is-on {
    background-color: #176C72;
    color: #FFFFFF;
}

.music-toggle.is-on i {
    animation: musicPulse 1.6s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.2); }
}

@media (max-width: 560px) {
    .music-dock {
        right: 14px;
    }

    .music-toggle span {
        display: none;
    }

    .music-toggle {
        padding: 11px;
    }

    /* phones: small one-line note tucked under the button so it doesn't cover headings */
    .music-dock {
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }

    .music-note {
        order: 2;
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* spam-click the jelly: rainbow for a moment */
.jelly.is-rainbow {
    animation: jellyRainbow 0.45s linear infinite;
}

@keyframes jellyRainbow {
    from { filter: hue-rotate(0deg) saturate(2.2) brightness(1.1); }
    to   { filter: hue-rotate(360deg) saturate(2.2) brightness(1.1); }
}

/* keep the pixel art crisp while it moves (no smeared lines) */
.jelly,
.jelly__canvas {
    backface-visibility: hidden;
}

/* cream outline so the music button stands out even over the teal water sections */
.music-toggle,
.music-toggle.is-on {
    border-color: #F7F2E8;
    box-shadow:
        0 0 0 2px #176C72,
        0 6px 18px -8px rgba(23, 108, 114, 0.5);
}
