/* Chocalho da sorte (bebês e maternidade; o som do bebê).
 *
 * Cores de MARCA como var(--jg-<hex>, #<hex>): rótulo e botões; pastéis (pêssego,
 * menta, lilás, creme) e ouro em hex direto. Nunca azul.
 *
 * Contrato:
 *  - Estado FINAL por classe estática ou @keyframes … forwards.
 *  - Movimento reduzido: cada coisa para num estado VISÍVEL.
 *  - O balanço é JS (atributo no SVG), pelo relógio; aqui a tampa que abre e a
 *    fita de cetim (prêmio) ou as boas-vindas (sem prêmio).
 */

.ho__palco {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 35%, #FFFBF5, #FBE9DC 60%, #F3DCCB);
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .35);
    user-select: none;
    font-family: Arial, sans-serif;
}
.ho__cena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.ho__tampa { transform-box: fill-box; transform-origin: 0% 100%; }
.ho--premiou .ho__tampa { animation: ho-abre .5s ease-out forwards; }
@keyframes ho-abre { to { transform: translate(-2px, -1px) rotate(-28deg); } }

/* ---------------- fita de cetim (só no prêmio) ---------------- */

.ho__fita {
    position: absolute;
    left: 7%; right: 7%; top: 50%;
    height: 34%;
    z-index: 6;
    clip-path: inset(0 100% 0 0);
    filter: drop-shadow(0 6px 8px rgba(120, 70, 40, .25));
}
.ho__fita-corpo {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6%;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 40%, rgba(160, 90, 60, .12) 100%),
        linear-gradient(100deg, #F6CDB3, #FBE3D3 25%, #F2BFA2 50%, #FBE3D3 75%, #F6CDB3);
    clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 5% 50%);
    border-top: 2px solid #D4AF37;
    border-bottom: 2px solid #D4AF37;
    box-sizing: border-box;
}
.ho__fita-titulo {
    font: italic 700 clamp(15px, 4.4vw, 22px)/1 Georgia, 'Times New Roman', serif;
    color: #8A5A10;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
}
.ho__fita-premio { display: flex; align-items: center; gap: 8px; max-width: 80%; }
.ho__fita-premio img { width: 34px; height: 34px; object-fit: cover; border-radius: 50%; border: 2px solid #D4AF37; background: #fff; flex: none; }
.ho__fita-premio small { display: block; font: 700 clamp(7px, 1.9vw, 9px)/1 Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #9A6A40; }
.ho__fita-premio span { display: block; margin-top: 2px; font: 700 clamp(12px, 3.4vw, 16px)/1.1 Arial, sans-serif; color: #5A3A20; overflow-wrap: anywhere; }
.ho--premiou .ho__fita { animation: ho-fita 1s .45s cubic-bezier(.3, .7, .4, 1) forwards; }
@keyframes ho-fita { to { clip-path: inset(0 0 0 0); } }

.ho__faiscas { position: absolute; left: 50%; top: 22%; width: 0; height: 0; z-index: 7; pointer-events: none; }
.ho__faiscas i {
    position: absolute; left: 0; top: 0;
    width: 10px; height: 10px; margin: -5px 0 0 -5px;
    background: #FFE9A8;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    filter: drop-shadow(0 0 3px rgba(212, 175, 55, .9));
    opacity: 0;
}
.ho__faiscas i:nth-child(1) { --dx: -120px; --dy: -30px; }
.ho__faiscas i:nth-child(2) { --dx: 120px;  --dy: -36px; animation-delay: .05s; }
.ho__faiscas i:nth-child(3) { --dx: -150px; --dy: 30px;  animation-delay: .1s; }
.ho__faiscas i:nth-child(4) { --dx: 150px;  --dy: 26px;  animation-delay: .07s; }
.ho__faiscas i:nth-child(5) { --dx: -50px;  --dy: -50px; animation-delay: .12s; }
.ho__faiscas i:nth-child(6) { --dx: 60px;   --dy: -46px; animation-delay: .03s; }
.ho--premiou .ho__faiscas i { animation: ho-faisca 1s .2s ease-out forwards; }
@keyframes ho-faisca {
    0%   { transform: translate(0, 0) scale(.3) rotate(0deg); opacity: 0; }
    20%  { opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(60deg); opacity: .9; }
}

/* ---------------- boas-vindas (só sem prêmio) ---------------- */

.ho__boas {
    position: absolute;
    left: 50%; bottom: 13%;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid #F3C9B0;
    box-shadow: 0 8px 16px -8px rgba(120, 70, 40, .35);
    transform: translate(-50%, 12px);
    opacity: 0;
    z-index: 6;
    white-space: nowrap;
}
.ho__boas b { display: block; font: 700 clamp(12px, 3.4vw, 15px)/1.1 Georgia, serif; color: #8A5A3A; }
.ho__boas span { display: block; margin-top: 3px; font: clamp(9px, 2.4vw, 11px)/1.2 Arial, sans-serif; color: #7A6A5E; }
.ho__coracao { width: 18px; height: 18px; flex: none; background: #F2A7A0; clip-path: path('M9 16 C3 11 0 8 0 5 C0 2 2 0 4.6 0 C6.6 0 8 1.2 9 3 C10 1.2 11.4 0 13.4 0 C16 0 18 2 18 5 C18 8 15 11 9 16 Z'); }
.ho--consolo .ho__boas { animation: ho-boas .6s .15s ease-out forwards; }
@keyframes ho-boas { to { transform: translate(-50%, 0); opacity: 1; } }

.ho__rotulo {
    position: absolute;
    left: 2%; top: 3%;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--jg-14532d, #14532d);
    border: 1px solid #C9A227;
    font: 700 10px/1 Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #FFF3C4;
    white-space: nowrap;
    z-index: 8;
}
.ho__rotulo img { width: 12px; height: 12px; }

/* ---------------- botão e mensagem ---------------- */

.ho__botao {
    display: block;
    width: 100%;
    max-width: 480px;
    margin: 10px auto 0;
    padding: 12px 10px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--jg-2aa152, #2AA152), var(--jg-0a7a00, #0A7A00));
    color: #fff;
    font: 700 15px/1.2 Arial, sans-serif;
    letter-spacing: .02em;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 6px 14px -6px rgba(var(--jg-rgb-0a7a00, 10,122,0), .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.ho__botao:hover:not(:disabled) { filter: brightness(1.06); }
.ho__botao:disabled { opacity: .55; cursor: default; }

.ho__msg {
    max-width: 480px;
    min-height: 56px;
    margin: 10px auto 0;
    padding: 8px 12px;
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    text-align: center;
    font: 700 clamp(11px, 3vw, 14px)/1.35 Arial, sans-serif;
    color: #46564c;
    background: var(--jg-eef4ef, #EEF4EF);
    border: 1px solid var(--jg-dce6de, #DCE6DE);
}
.ho__msg--premiado { background: var(--jg-e3f5e6, #E3F5E6); border-color: var(--jg-9fd8ab, #9FD8AB); color: var(--jg-14532d, #14532d); }
.ho__msg--consolo  { background: #F1F3F1; border-color: #CDD5CE; color: #4F5A52; }
.ho__msg b { color: var(--jg-0a7a00, #0A7A00); }
.ho__msg--consolo b { color: #5C6B60; }

/* ---------------- vitrine ---------------- */

.ho__premios {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
    margin: 14px auto 0; max-width: 640px;
}
.ho__titulo-vitrine {
    width: 100%; text-align: center;
    font: 700 13px/1.3 Arial, sans-serif; color: var(--jg-14532d, #14532d); margin-bottom: 2px;
}
.ho__premio { width: 74px; text-align: center; font: 600 10px/1.2 Arial, sans-serif; color: #46564c; }
.ho__premio img { width: 100%; border-radius: 6px; display: block; margin-bottom: 3px; }

/* ---------------- movimento reduzido ---------------- */
@media (prefers-reduced-motion: reduce) {
    .ho--premiou .ho__tampa { animation: none; transform: translate(-2px, -1px) rotate(-28deg); }
    .ho--premiou .ho__fita { animation: none; clip-path: inset(0 0 0 0); }
    .ho--premiou .ho__faiscas i { animation: none; opacity: .9; transform: translate(var(--dx), var(--dy)) scale(1) rotate(60deg); }
    .ho--consolo .ho__boas { animation: none; transform: translate(-50%, 0); opacity: 1; }
}
