/* Nav, buttons, footer and the Penumbreal band come from the shared
   Soluneal product styles; this file holds only what Bubbles adds. */

/* Walnut alone is under 4.5:1 on cream for body text. */
.bubbles-page { background: var(--ivory); --text-muted: #70604e; }

.bb-skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--espresso);
    color: var(--ivory);
    font: 600 14px/1 var(--font-ui);
}
.bb-skip:focus { top: 12px; }

.bb-js .bb-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-emphasis);
}
.bb-js .bb-reveal.is-in { opacity: 1; transform: none; }

.bb-hero {
    padding: 84px clamp(12px, 2.4vw, 32px) 0;
}
.bb-stage {
    position: relative;
    max-width: 1320px;
    margin: 0 auto;
    min-height: clamp(560px, 82vh, 780px);
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    border-radius: clamp(22px, 3vw, 36px);
    overflow: hidden;
    background: #6f5a78 url('assets/dusk.webp') center / cover no-repeat;
    box-shadow: var(--shadow-lg);
    isolation: isolate;
}
/* The copy sits on the bright horizon; a soft dusk scrim keeps it readable. */
.bb-stage::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(120% 95% at 0% 100%, rgba(36, 22, 44, 0.66) 0%, rgba(36, 22, 44, 0.45) 35%, rgba(36, 22, 44, 0) 65%);
}
.bb-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(32px, 4vw, 56px);
    color: #fff9f0;
}
.bb-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(36px, 4.2vw, 62px);
    white-space: nowrap;
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin: 0 0 22px;
    color: #fff9f0;
    text-shadow: 0 2px 30px rgba(40, 24, 48, 0.22);
}
.bb-title span { font-weight: 800; color: #fde3bf; }
.bb-lede {
    max-width: 30em;
    margin: 0 0 28px;
    font-size: clamp(16px, 1.35vw, 19px);
    line-height: 1.55;
    color: rgba(255, 249, 240, 0.94);
}
.bb-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.bb-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 50px;
    padding: 0 22px;
    border-radius: 999px;
    font: 600 15px/1 var(--font-ui);
    text-decoration: none;
    transition: transform 0.2s var(--ease-out), background 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.bb-btn:hover { transform: translateY(-1px); }
.bb-btn-light {
    background: #fff9f0;
    color: var(--espresso);
    box-shadow: 0 10px 26px rgba(30, 18, 36, 0.22);
}
.bb-btn-light:hover { background: #fff; color: var(--espresso); }
.bb-tag {
    font-size: 12.5px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(78, 64, 52, 0.1);
}
.bb-btn-glass {
    color: #fff9f0;
    background: rgba(36, 22, 44, 0.3);
    border: 1px solid rgba(255, 249, 240, 0.45);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    backdrop-filter: blur(12px) saturate(1.4);
}
.bb-btn-glass:hover { background: rgba(36, 22, 44, 0.42); color: #fff; }
.bb-keys:focus-visible,
.bb-btn:focus-visible,
.bb-reset:focus-visible {
    outline: 2px solid #2c241f;
    outline-offset: 3px;
    box-shadow: 0 0 0 5px #fff9f0;
}
.bb-mac-only { display: none; margin: 16px 0 0; font-size: 14px; color: rgba(255, 249, 240, 0.9); }
@media (hover: none) and (pointer: coarse) {
    .bb-mac-only { display: block; }
}

.bb-keys {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 34px;
    padding: 0;
    border: 0;
    background: none;
    color: #fff9f0;
    font: 500 13px/1.3 var(--font-ui);
    cursor: pointer;
    border-radius: 10px;
}
.bb-keycaps { display: inline-flex; gap: 6px; }
.bb-keycaps kbd {
    display: inline-grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 9px;
    font: 600 15px/1 var(--font-ui);
    color: #fff9f0;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow: inset 0 -2px 0 rgba(30, 18, 36, 0.14), 0 3px 8px rgba(30, 18, 36, 0.16);
    transition: transform 0.1s var(--ease-out), box-shadow 0.1s var(--ease-out);
}
.bb-keys.is-pressing kbd,
.bb-keys:active kbd {
    transform: translateY(2px);
    box-shadow: inset 0 -1px 0 rgba(30, 18, 36, 0.14), 0 1px 3px rgba(30, 18, 36, 0.14);
}

.bb-field {
    position: relative;
    z-index: 2;
    min-height: 100%;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
.bb-reset {
    position: absolute;
    right: 18px;
    bottom: 16px;
    z-index: 6;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(250, 248, 244, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font: 600 12px/1 var(--font-ui);
    color: var(--text-strong);
    cursor: pointer;
}
.bb-reset:hover { background: rgba(250, 248, 244, 0.95); }

.pg-bubble {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 50%;
    color: #2a2230;
    cursor: grab;
    background:
        radial-gradient(120% 100% at 30% 12%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 55%),
        rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(14px) saturate(1.5);
    backdrop-filter: blur(14px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -8px 18px rgba(255, 255, 255, 0.06),
        0 10px 28px rgba(44, 24, 52, 0.18);
    touch-action: none;
    transition: scale 0.32s var(--ease-emphasis), opacity 0.26s var(--ease-out), box-shadow 0.22s var(--ease-out);
}
.pg-bubble:hover { scale: 1.03; }
.pg-bubble.is-held {
    will-change: transform;
    cursor: grabbing;
    scale: 1.05;
    z-index: 5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 18px 40px rgba(44, 24, 52, 0.26);
}
.pg-bubble.is-held.is-doomed { opacity: 0.6; scale: 0.82; }
.pg-bubble.is-leaving { scale: 0.3; opacity: 0; pointer-events: none; }
.pg-bubble.is-arriving,
.pg-bubble.is-away { scale: 0.82; opacity: 0; pointer-events: none; }

.pg-note-text {
    margin: 0;
    padding: 0 16%;
    font-size: clamp(10.5px, 1vw, 11.5px);
    line-height: 1.3;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pg-icon { display: block; width: 38%; height: 38%; color: #2a2230; }
.pg-icon svg { display: block; width: 100%; height: 100%; }
.pg-link .pg-icon { width: 26%; height: 26%; }
.pg-title {
    max-width: 78%;
    font-size: clamp(10px, 0.95vw, 11px);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.pg-link .pg-title { display: block; white-space: nowrap; text-overflow: ellipsis; }
.pg-image img { width: 74%; height: 74%; object-fit: contain; pointer-events: none; }

.pg-plus { color: rgba(42, 34, 48, 0.72); }
.pg-plus:focus-visible { outline: 2px solid #2c241f; outline-offset: 3px; box-shadow: 0 0 0 5px #fff9f0, 0 10px 28px rgba(44, 24, 52, 0.18); }
.pg-plus svg { position: absolute; width: 34%; height: 34%; transition: opacity 0.16s var(--ease-out), scale 0.16s var(--ease-out); }
.pg-plus .pg-trash-icon { opacity: 0; scale: 0.6; }
.pg-plus.is-armed { z-index: 6; scale: 1.12; box-shadow: inset 0 0 0 1.5px rgba(217, 154, 61, 0.9), 0 10px 28px rgba(44, 24, 52, 0.18); }
.pg-plus.is-armed .pg-plus-icon { opacity: 0; scale: 0.6; }
.pg-plus.is-armed .pg-trash-icon { opacity: 1; scale: 1; animation: bb-wobble 0.18s ease-in-out infinite alternate; }

@keyframes bb-wobble { from { rotate: -7deg; } to { rotate: 7deg; } }

.bb-lost {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    min-height: clamp(460px, 70vh, 640px);
    padding: 40px 20px;
}
.bb-lost-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: min(240px, 62vw);
    aspect-ratio: 1;
    padding: 0 30px;
    border-radius: 50%;
    text-align: center;
    color: #2a2230;
    background:
        radial-gradient(120% 100% at 30% 12%, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 55%),
        rgba(255, 249, 240, 0.55);
    -webkit-backdrop-filter: blur(14px) saturate(1.5);
    backdrop-filter: blur(14px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 14px 34px rgba(44, 24, 52, 0.2);
}
.bb-lost-bubble strong { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.03em; }
.bb-lost-bubble span { font-size: 14px; line-height: 1.4; color: #4a3f4e; }
.bb-lost-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.bb-lost .bb-btn-glass { background: rgba(36, 22, 44, 0.5); }
.bb-lost .bb-btn-glass:hover { background: rgba(36, 22, 44, 0.62); }

.bb-section { padding: clamp(84px, 11vw, 140px) 0; }
/* Soluneal evening cream, echoing the dusk hero. */
.bb-tint { background: linear-gradient(180deg, #f4e7d2, #f9f1e3); }
.bb-head { max-width: 780px; margin: 0 auto clamp(36px, 5vw, 60px); text-align: center; }
.bb-h2 {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(32px, 4.6vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--text-strong);
}
.bb-h2 span { color: var(--walnut); }
.bb-sub {
    max-width: 36em;
    margin: 0 auto;
    font-size: clamp(16px, 1.3vw, 18px);
    line-height: 1.6;
    color: var(--text-muted);
}

.bb-shot { margin: 0; }
.bb-shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: clamp(16px, 2.2vw, 26px);
    box-shadow: var(--shadow-lg);
}
.bb-caption {
    max-width: 40em;
    margin: clamp(22px, 3vw, 32px) auto 0;
    text-align: center;
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--text-muted);
}

.bb-moves {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(28px, 4vw, 56px);
    text-align: center;
}
.bb-move h3 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-strong);
}
.bb-move p { max-width: 22em; margin: 0 auto; font-size: 15.5px; line-height: 1.55; color: var(--text-muted); }
.bb-glyph { position: relative; width: 168px; height: 112px; margin: 0 auto 22px; }
.g-bubble, .g-plus {
    position: absolute;
    border-radius: 50%;
    background:
        radial-gradient(120% 100% at 30% 15%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0.4)),
        #f6efe4;
    border: 1px solid rgba(78, 64, 52, 0.1);
    box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(78, 64, 52, 0.12);
}
.g-bubble { width: 68px; height: 68px; top: 22px; left: 26px; }
.g-bubble::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 23px;
    translate: -50% -50%;
    border-radius: 3px;
    background: #fff;
    border: 1px solid rgba(78, 64, 52, 0.25);
}
.g-doc {
    position: absolute;
    top: 45px;
    left: 51px;
    width: 18px;
    height: 23px;
    border-radius: 3px;
    background: #fff;
    border: 1px solid rgba(78, 64, 52, 0.25);
    box-shadow: 0 4px 10px rgba(78, 64, 52, 0.18);
    animation: g-out 3.2s var(--ease-emphasis) infinite;
}
.g-plus { width: 46px; height: 46px; top: 33px; right: 18px; display: grid; place-items: center; }
.g-plus::before { content: '+'; font: 300 24px/1 var(--font-ui); color: var(--walnut); }
.bb-glyph-move .g-bubble { animation: g-move 4s ease-in-out infinite; }
.bb-glyph-forget .g-bubble { animation: g-forget 3.4s var(--ease-emphasis) infinite; }
.bb-glyph-forget .g-plus { animation: g-plus 3.4s ease-in-out infinite; }

#moves:not(.is-live) .bb-glyph *,
#small:not(.is-live) li { animation-play-state: paused; }

@keyframes g-out {
    0%, 15% { translate: 0 0; opacity: 0; }
    25% { opacity: 1; }
    60% { opacity: 1; }
    70%, 100% { translate: 82px -18px; opacity: 0; }
}
@keyframes g-move {
    0%, 12% { translate: 0 0; }
    45%, 62% { translate: 48px 10px; }
    90%, 100% { translate: 0 0; }
}
@keyframes g-forget {
    0%, 12% { translate: 0 0; scale: 1; opacity: 1; }
    52% { translate: 48px 0; scale: 0.82; opacity: 0.8; }
    62% { translate: 50px 0; scale: 0.3; opacity: 0; }
    86% { translate: 0 0; scale: 0.6; opacity: 0; }
    100% { translate: 0 0; scale: 1; opacity: 1; }
}
@keyframes g-plus {
    0%, 40% { scale: 1; rotate: 0deg; }
    46% { scale: 1.12; rotate: -6deg; }
    52% { scale: 1.12; rotate: 6deg; }
    58% { scale: 1.12; rotate: -4deg; }
    66%, 100% { scale: 1; rotate: 0deg; }
}

.bb-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(14px, 2vw, 26px);
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}
.bb-cloud li {
    --d: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: var(--d);
    aspect-ratio: 1;
    padding: 0 24px;
    border-radius: 50%;
    text-align: center;
    background:
        radial-gradient(120% 100% at 30% 15%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.55) 48%, rgba(255, 255, 255, 0.32) 72%),
        rgba(250, 245, 236, 0.6);
    border: 1px solid rgba(78, 64, 52, 0.08);
    box-shadow: inset 0 1px 0 #fff, inset 0 -12px 26px rgba(217, 154, 61, 0.06), 0 18px 40px rgba(78, 64, 52, 0.1);
}
.bb-cloud li strong { font-size: 15.5px; font-weight: 600; color: var(--text-strong); letter-spacing: -0.01em; }
.bb-cloud li span { font-size: 13px; line-height: 1.4; color: var(--text-muted); }
.bb-cloud li:nth-child(1) { --d: 204px; }
.bb-cloud li:nth-child(2) { --d: 214px; margin-top: 60px; }
.bb-cloud li:nth-child(3) { --d: 186px; }
.bb-cloud li:nth-child(4) { --d: 174px; margin-top: 46px; }
.bb-cloud li:nth-child(5) { --d: 184px; margin-top: -30px; }
.bb-cloud li:nth-child(6) { --d: 166px; margin-top: 30px; }
.bb-cloud li:nth-child(7) { --d: 192px; margin-top: -20px; }
.bb-js .bb-cloud li.is-in { animation: bb-float 7s ease-in-out infinite; }
.bb-cloud li:nth-child(2n) { animation-delay: -2.4s; }
.bb-cloud li:nth-child(3n) { animation-delay: -4.6s; }
@keyframes bb-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }

.bb-quiet { padding: clamp(56px, 8vw, 96px) 0; text-align: center; }
.bb-quiet-line {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text-strong);
}
.bb-quiet-line span { color: var(--walnut); }
.bb-spec { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 4px; margin: 0; font-size: 14.5px; color: var(--text-muted); }
.bb-spec span { white-space: nowrap; }
.bb-spec i { margin: 0 10px; font-style: normal; color: var(--stone); }
@media (max-width: 520px) {
    .bb-spec { column-gap: 18px; }
    .bb-spec i { display: none; }
}

.bb-price {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 20px 28px;
    max-width: 780px;
    margin: 0 auto;
    padding: clamp(28px, 4vw, 44px);
    border-radius: 28px;
    background: var(--paper);
    border: 1px solid var(--greige);
    box-shadow: var(--shadow-md);
}
.bb-price-icon { width: 96px; height: 96px; }
.bb-price-text h2 {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: clamp(24px, 2.6vw, 30px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-strong);
}
.bb-price-text p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--text-muted); }
.bb-price-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; }
.bb-price-note { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--text-muted); }

@media (max-width: 860px) {
    .bb-stage { grid-template-columns: 1fr; min-height: 0; }
    .bb-copy { justify-content: flex-start; padding: 40px 26px 10px; }
    .bb-stage::before { background: linear-gradient(180deg, rgba(36, 22, 44, 0.12), rgba(36, 22, 44, 0.42) 60%, rgba(36, 22, 44, 0)); }
    .bb-title { white-space: normal; font-size: clamp(36px, 10vw, 52px); }
    .bb-keys { margin-top: 24px; }
    .bb-field { height: 460px; min-height: 0; }
    .bb-moves { grid-template-columns: 1fr; }
    .bb-price { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .bb-price-actions { justify-content: center; }
    .bb-cloud li { --d: 158px !important; margin-top: 0 !important; padding: 0 18px; }
    .bb-cloud li strong { font-size: 14px; }
    .bb-cloud li span { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .bb-js .bb-reveal { opacity: 1; transform: none; transition: none; }
    .pg-bubble, .pg-plus svg, .bb-keycaps kbd { transition: none; }
    .pg-plus.is-armed .pg-trash-icon,
    .g-doc, .g-bubble, .g-plus,
    .bb-js .bb-cloud li.is-in { animation: none; }
    .g-doc { translate: 70px -14px; }
}

#main:focus { outline: none; }
