/* Fôrma de fábrica (moda, calçados e acessórios).
 *
 * Cores de MARCA como var(--jg-<hex>, #<hex>): rótulo e botões; couro, madeira,
 * latão, papel do envelope 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.
 *  - A fôrma é JS (transform no SVG), pelo relógio; aqui o envelope grande que
 *    se abre e o cartão que sai dele (só no prêmio).
 */

.fr__palco {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
    overflow: hidden;
    background: #EDE5DA;
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45);
    user-select: none;
    font-family: Arial, sans-serif;
}
.fr__cena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.fr__rotulo {
    position: absolute;
    left: 2%; bottom: 2%;
    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;
}
.fr__rotulo img { width: 12px; height: 12px; }

/* ---------------- o envelope que se abre (só no prêmio) ---------------- */

.fr__envelope {
    position: absolute;
    left: 50%; top: 44%;
    width: 40%; aspect-ratio: 1.5;
    border-radius: 4px;
    background: linear-gradient(160deg, #FFFBF1, #F1E6CF);
    border: 1.5px solid #D4AF37;
    box-shadow: 0 16px 26px -12px rgba(0, 0, 0, .5);
    transform: translate(-50%, -50%) scale(.2) rotate(-10deg);
    opacity: 0;
    perspective: 400px;
    z-index: 5;
}
.fr__envelope::after {                                   /* o fundo em V */
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top right, rgba(0, 0, 0, 0) 49.4%, #E4D5B8 50%, rgba(0, 0, 0, 0) 51%), linear-gradient(to top left, rgba(0, 0, 0, 0) 49.4%, #E4D5B8 50%, rgba(0, 0, 0, 0) 51%);
    border-radius: 4px;
    z-index: 2;
}
.fr__aba {
    position: absolute; left: 0; right: 0; top: 0; height: 62%;
    background: linear-gradient(180deg, #F7EEDB, #EADCC0);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: 50% 0;
    z-index: 4;
}
.fr__selo {
    position: absolute; left: 50%; top: 62%;
    width: 18%; aspect-ratio: 1;
    margin: -9% 0 0 -9%;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #FFF3B0, #E0B43A 55%, #9A7414);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(255, 246, 216, .6);
    z-index: 5;
}
.fr--premiou .fr__envelope { animation: fr-envelope .6s ease-out forwards; }
@keyframes fr-envelope { to { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; } }
.fr--premiou .fr__aba { animation: fr-aba .5s .7s ease-in-out forwards; }
@keyframes fr-aba { to { transform: rotateX(180deg); z-index: 1; } }
.fr--premiou .fr__selo { animation: fr-selo .3s .6s ease-in forwards; }
@keyframes fr-selo { to { transform: scale(1.4); opacity: 0; } }

.fr__cartao {
    position: absolute;
    left: 50%; top: 44%;
    width: 36%;
    display: flex; align-items: center; gap: 6%;
    padding: 2% 3%;
    box-sizing: border-box;
    border-radius: 8px;
    background: linear-gradient(135deg, #FFF3B0, #F4C430 50%, #D49A12);
    border: 2px solid #FFF6D8;
    box-shadow: 0 0 0 1.5px #9A7414, 0 12px 20px -8px rgba(0, 0, 0, .5), 0 0 16px 4px rgba(255, 214, 90, .5);
    transform: translate(-50%, -30%) scale(.9);
    opacity: 0;
    z-index: 4;
}
.fr__cartao img { width: 30%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 2px solid #FFFFFF; background: #fff; flex: none; }
.fr__cartao div { min-width: 0; font: 700 clamp(10px, 2.8vw, 14px)/1.2 Georgia, 'Times New Roman', serif; color: var(--jg-14532d, #14532d); }
.fr__cartao small { display: block; font: 700 clamp(7px, 1.9vw, 9px)/1.2 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #6B4E0E; margin-bottom: 2px; }
.fr__cartao span { display: block; overflow-wrap: anywhere; }
.fr--premiou .fr__cartao { animation: fr-cartao .7s 1.05s cubic-bezier(.3, 1.2, .5, 1) forwards; }
@keyframes fr-cartao {
    0%   { transform: translate(-50%, -30%) scale(.9); opacity: 0; z-index: 4; }
    20%  { opacity: 1; }
    100% { transform: translate(-50%, -135%) scale(1.15); opacity: 1; z-index: 7; }
}

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

.fr__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);
}
.fr__botao:hover:not(:disabled) { filter: brightness(1.06); }
.fr__botao:disabled { opacity: .55; cursor: default; }

.fr__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);
}
.fr__msg--premiado { background: var(--jg-e3f5e6, #E3F5E6); border-color: var(--jg-9fd8ab, #9FD8AB); color: var(--jg-14532d, #14532d); }
.fr__msg--consolo  { background: #F1F3F1; border-color: #CDD5CE; color: #4F5A52; }
.fr__msg b { color: var(--jg-0a7a00, #0A7A00); }
.fr__msg--consolo b { color: #5C6B60; }

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

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

/* ---------------- movimento reduzido ---------------- */
@media (prefers-reduced-motion: reduce) {
    .fr--premiou .fr__envelope { animation: none; transform: translate(-50%, -50%) scale(1); opacity: 1; }
    .fr--premiou .fr__aba { animation: none; transform: rotateX(180deg); }
    .fr--premiou .fr__selo { animation: none; opacity: 0; }
    .fr--premiou .fr__cartao { animation: none; transform: translate(-50%, -135%) scale(1.15); opacity: 1; z-index: 7; }
}
