/*   CSS FILE HEADER #
 *
 *   File:         [entrada.css]
 *   Author(s):    ['Pedro H.F Matias']
 *   Date:         ['14.10.2026']
 *   Version:      ['0.1.0']
 *   Description:  ['Look of the sign-in shared by the apps (apps/comum/entrada.js): the sealed letter under the candle with "Entrar com Google", the fake Google account chooser (clean, light, sans on purpose) and the account seal (only the avatar; name, role and Sair open under it on hover, click or keyboard). Classes start with en- so they never meet the apps own. Approved in prototipos/mesa-do-mestre (14/10).']
 */

@font-face { font-family: 'Dalingia'; src: url('fontes/dalingia.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'IM Fell English'; src: url('fontes/im-fell-english-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'IM Fell English'; src: url('fontes/im-fell-english-latin-400-italic.woff2') format('woff2'); font-style: italic; font-display: swap; }
@font-face { font-family: 'IM Fell English SC'; src: url('fontes/im-fell-english-sc-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Pirata One'; src: url('fontes/pirata-one-latin-400-normal.woff2') format('woff2'); font-display: swap; }
/* numbers: Cormorant has lining figures (lnum/tnum), IM Fell only old-style ones (its 0 looks like an o) */
@font-face { font-family: 'Cormorant Garamond'; src: url('fontes/cormorant-garamond-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('fontes/cormorant-garamond-latin-500-normal.woff2') format('woff2'); font-weight: 400 500; font-display: swap; }

.en-tela, .en-conta, .en-veu {
    --en-tinta: #3a2414;
    --en-ouro: #d9b25a;
    --en-ouro-claro: #f3d98e;
    --en-luz: #dccba4;
    --en-uncial: 'Dalingia', 'IM Fell English', Georgia, serif;
    --en-texto: 'IM Fell English', 'Palatino Linotype', Georgia, serif;
    --en-sc: 'IM Fell English SC', 'IM Fell English', Georgia, serif;
    --en-nome: 'Pirata One', 'IM Fell English', serif;
    --en-google: Roboto, Arial, 'Helvetica Neue', sans-serif;
    --en-ease: cubic-bezier(.2, .8, .2, 1);
    box-sizing: border-box;
}
.en-tela *, .en-conta *, .en-veu * { box-sizing: border-box; }
.en-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
body.en-esperando { overflow: hidden; }

/* ---------- the entrance: a sealed letter under the candle, over the wood ---------- */
.en-tela {
    position: fixed; inset: 0; z-index: 2147482000; overflow: auto;
    display: grid; place-items: center; padding: 120px 0 60px;
    color: var(--en-tinta); font-family: var(--en-texto); font-size: 17px; line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    background:
        linear-gradient(180deg, rgba(20, 12, 7, .2), rgba(6, 4, 2, .5)),
        url('img/madeira.webp') center top / 1024px 1024px repeat,
        #2a1a10;
}
.en-tela::before {
    content: ''; position: fixed; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 50% 18%, transparent 0, transparent 14%, rgba(10, 6, 3, .4) 40%, rgba(3, 2, 1, .88) 85%);
}
.en-tela::after {
    content: ''; position: fixed; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 50% 14%, rgba(255, 206, 130, .34), rgba(255, 160, 80, .08) 30%, transparent 55%);
    animation: en-tremer 4.3s ease-in-out infinite;
}
@keyframes en-tremer {
    0%, 100% { opacity: 1; } 13% { opacity: .9; } 21% { opacity: .97; } 38% { opacity: .86; }
    52% { opacity: 1; } 67% { opacity: .92; } 81% { opacity: .98; }
}
.en-vela { position: absolute; z-index: 1; left: 50%; top: 2vh; width: 170px; height: 170px; margin-left: -85px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .5)); }
.en-vela > svg, .en-vela-mini > svg { width: 100%; height: 100%; display: block; }
.en-chama {
    position: absolute; left: 50%; top: 50%;
    width: 25%; aspect-ratio: 40 / 92;
    transform: translate(-50%, -88%);
    transform-origin: 50% 92%;
    animation: en-chama 2.3s ease-in-out infinite;
}
.en-chama svg { display: block; width: 100%; height: 100%; }
@keyframes en-chama {
    0%, 100% { transform: translate(-50%, -88%) scale(1, 1) skewX(0deg); opacity: 1; }
    14% { transform: translate(-50%, -88%) scale(.95, 1.07) skewX(2.5deg); opacity: .94; }
    29% { transform: translate(-50%, -88%) scale(1.03, .94) skewX(-1.5deg); }
    47% { transform: translate(-50%, -88%) scale(.97, 1.04) skewX(1deg); opacity: .96; }
    63% { transform: translate(-50%, -88%) scale(1.02, .97) skewX(-2.5deg); }
    82% { transform: translate(-50%, -88%) scale(.96, 1.05) skewX(1.5deg); opacity: .93; }
}
.en-pena { position: absolute; z-index: 1; left: calc(50% + 250px); top: calc(50% + 150px); width: 260px; transform: rotate(-24deg); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .6)); opacity: .9; }
.en-sombra {
    position: absolute; left: 50%; top: 50%; width: 560px; height: 520px; margin: -200px 0 0 -280px;
    background: rgba(0, 0, 0, .55); filter: blur(22px); transform: rotate(-1.2deg) translate(8px, 40px); border-radius: 8px;
}
.en-carta {
    position: relative; z-index: 2;
    width: 560px; max-width: calc(100vw - 32px); padding: 64px 64px 40px;
    text-align: center; color: var(--en-tinta);
    background: radial-gradient(ellipse at 50% 45%, transparent 52%, rgba(96, 58, 22, .32) 100%), url('img/grao.webp') 0 0 / 256px, url('img/papiro.webp') 0 0 / 1200px, #dcc89a;
    clip-path: polygon(0.6% 1.4%, 12% 0.3%, 26% 1.2%, 41% 0.2%, 57% 1.1%, 72% 0.1%, 86% 1%, 99.5% 0.4%, 98.9% 18%, 99.8% 37%, 98.8% 58%, 99.7% 79%, 99.2% 99.4%, 84% 98.6%, 67% 99.8%, 49% 98.7%, 31% 99.7%, 14% 98.6%, 0.4% 99.5%, 1.2% 78%, 0.2% 56%, 1.1% 34%, 0.1% 16%);
    transform: rotate(-1.2deg);
}
.en-selo {
    position: absolute; left: 50%; top: 10px; width: 46px; height: 46px; margin-left: -23px;
    display: grid; place-items: center;
    border-radius: 47% 53% 50% 48% / 52% 46% 54% 48%;
    background: radial-gradient(circle at 38% 32%, #e2574a, #a3261b 55%, #5e120c);
    box-shadow: 0 2px 3px rgba(0, 0, 0, .45), inset 0 0 0 5px rgba(90, 15, 10, .45);
    color: rgba(255, 220, 200, .7); font-family: var(--en-uncial); font-size: 26px;
}
.en-titulo { margin: 6px 0 0; font-family: var(--en-uncial); text-transform: lowercase; font-weight: 400; font-size: 92px; line-height: .95; color: #3a2414; text-shadow: 0 1px 0 rgba(255, 240, 205, .35); letter-spacing: 0; }
.en-floreio { display: block; width: 260px; margin: 8px auto 2px; }
.en-sub { margin: 0 0 22px; font-family: var(--en-uncial); font-size: 30px; color: #6d3a1a; text-transform: lowercase; }
.en-texto { margin: 0 auto 30px; max-width: 34ch; font-size: 19px; font-style: italic; color: #3a2414; }
/* the login buttons (Google, Discord): the same white pill, only the logo changes */
.en-provedores { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.en-entrar {
    display: inline-flex; align-items: center; justify-content: center; gap: 14px;
    width: 280px; max-width: 100%; box-sizing: border-box; padding: 0 24px; height: 50px; cursor: pointer;
    background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 25px; text-decoration: none;
    font-family: var(--en-google); font-size: 16px; font-weight: 500; letter-spacing: .01em;
    box-shadow: 0 2px 6px rgba(40, 20, 5, .35);
    transition: background 150ms, box-shadow 150ms;
}
.en-entrar[hidden] { display: none; }
.en-entrar svg { width: 24px; height: 24px; flex: none; }
.en-entrar:hover { background: #f6f8fc; box-shadow: 0 3px 10px rgba(40, 20, 5, .45); }
.en-entrar:focus-visible, .en-conta-g:focus-visible, .en-sair:focus-visible { outline: 2px solid #e2b955; outline-offset: 2px; }
.en-aviso { margin: 26px 0 0; font-size: 15px; font-style: italic; color: #5c4629; }
.en-aviso .en-carimbo { margin-right: 6px; font-style: normal; }
.en-carimbo {
    display: inline-block; padding: 1px 8px 0;
    border: 1.5px solid rgba(176, 38, 27, .75); border-radius: 3px;
    color: #c9473a; font-family: var(--en-sc); font-size: 12px; letter-spacing: .06em; text-transform: lowercase; font-style: normal;
    transform: rotate(-2.5deg); opacity: .85; white-space: nowrap;
}

/* ---------- the fake Google account chooser ---------- */
.en-veu { position: fixed; inset: 0; z-index: 2147482500; display: grid; place-items: center; background: rgba(5, 3, 1, .62); backdrop-filter: blur(2px); }
.en-caixa {
    width: 460px; max-width: calc(100vw - 32px); padding: 36px 40px 24px;
    background: #fff; color: #1f1f1f; border-radius: 28px;
    font-family: var(--en-google); font-size: 14px; line-height: 1.4; text-align: left;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
    animation: en-subir 260ms var(--en-ease);
}
@keyframes en-subir { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.en-g-topo { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #444746; }
.en-g-topo svg { width: 20px; height: 20px; }
.en-caixa h2 { margin: 22px 0 6px; font-family: var(--en-google); font-size: 30px; font-weight: 400; letter-spacing: 0; color: #1f1f1f; }
.en-g-sub { margin: 0 0 20px; font-size: 16px; color: #1f1f1f; }
.en-g-sub b { color: #0b57d0; font-weight: 500; }
.en-g-lista { list-style: none; margin: 0; padding: 0; border-top: 1px solid #e3e3e3; }
.en-g-lista li { border-bottom: 1px solid #e3e3e3; margin: 0; }
.en-conta-g { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 8px; background: none; border: 0; text-align: left; border-radius: 6px; font-family: inherit; color: inherit; cursor: pointer; }
.en-conta-g:hover:not(:disabled) { background: #f2f2f2; }
.en-conta-g:disabled { cursor: not-allowed; opacity: .55; }
.en-conta-g .en-avatar { box-shadow: none; width: 32px; height: 32px; font-family: var(--en-google); font-size: 15px; font-weight: 500; }
.en-avatar-vazio { background: #e8eaed !important; color: #5f6368 !important; font-size: 20px !important; }
.en-g-texto { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.en-g-texto b { font-weight: 500; font-size: 14px; color: #1f1f1f; }
.en-g-texto span { font-size: 13px; color: #5f6368; overflow: hidden; text-overflow: ellipsis; }
.en-g-papel { font-size: 12px; color: #5f6368; padding: 2px 8px; border: 1px solid #dadce0; border-radius: 10px; white-space: nowrap; }
.en-g-nota { margin: 18px 0 0; font-size: 12.5px; line-height: 1.45; color: #5f6368; background: #fef7e0; border-radius: 8px; padding: 10px 12px; }
.en-g-nota code { font-size: 12px; }
.en-g-pe { display: flex; justify-content: flex-end; margin-top: 14px; }
.en-cancelar { background: none; border: 0; color: #0b57d0; font-weight: 500; font-size: 14px; padding: 8px 14px; border-radius: 18px; font-family: inherit; cursor: pointer; }
.en-cancelar:hover { background: #eef3fd; }

/* ---------- avatar and the account seal (fixed on the apps, or inside a bar) ---------- */
.en-avatar {
    display: inline-grid; place-items: center; flex: none;
    width: 34px; height: 34px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .25), transparent 60%), var(--cor, #5a3a1a);
    color: #f8ecd0; font-family: var(--en-sc); font-size: 18px; line-height: 1;
    box-shadow: 0 0 0 2px #c99a3a, 0 0 0 3px #3a2507, 0 2px 4px rgba(0, 0, 0, .5);
}
.en-conta { position: relative; display: inline-flex; align-items: center; font-family: var(--en-texto); color: var(--en-luz); line-height: 1.2; }
/* only the avatar shows: a small seal that covers nothing; the rest opens under it */
.en-conta-botao { display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.en-conta-botao:focus-visible { outline: 2px solid #e2b955; outline-offset: 3px; }
.en-conta-fixa {
    /* top left, in the margin outside the books (the ribbons hang from the top right and center) */
    position: fixed; top: 10px; left: 12px; z-index: 900;
    padding: 3px;
    background: linear-gradient(160deg, rgba(120, 76, 40, .55), rgba(40, 22, 10, .78)), url('img/couro.webp') 0 0 / 600px, #4a2e18;
    border: 1px solid #1c0f06; border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(243, 217, 142, .18);
    transition: opacity 200ms;
}
.en-conta-fixa .en-avatar { width: 30px; height: 30px; font-size: 16px; }
.en-conta-painel {
    position: absolute; top: calc(100% + 10px); z-index: 901;
    display: flex; align-items: center; gap: 10px; white-space: nowrap;
    padding: 7px 8px 7px 14px;
    background: linear-gradient(160deg, rgba(120, 76, 40, .55), rgba(40, 22, 10, .82)), url('img/couro.webp') 0 0 / 600px, #4a2e18;
    border: 1px solid #1c0f06; border-radius: 22px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(243, 217, 142, .18);
    opacity: 0; visibility: hidden; transform: translateY(-5px);
    transition: opacity 160ms var(--en-ease), transform 160ms var(--en-ease), visibility 0s linear 160ms;
}
/* the gap between the avatar and the panel keeps the hover */
.en-conta-painel::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.en-conta-fixa .en-conta-painel { left: -4px; }
.en-conta:not(.en-conta-fixa) .en-conta-painel { right: 0; }
.en-conta:hover .en-conta-painel, .en-conta.aberta .en-conta-painel {
    opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
}
.en-conta-painel .en-carimbo { font-size: 10.5px; padding: 0 6px; }
.en-conta-texto { display: flex; flex-direction: column; line-height: 1.1; }
.en-conta-texto b { font-weight: 400; font-size: 16px; color: #f3e6c8; }
.en-papel { font-family: var(--en-sc); font-size: 12.5px; letter-spacing: .05em; text-transform: lowercase; }
.en-papel-mestre { color: #e86a55; }
.en-papel-jogador { color: #9fc0de; }
.en-sair {
    margin-left: 4px; padding: 4px 12px; cursor: pointer;
    background: rgba(20, 10, 4, .45); border: 1px solid rgba(217, 178, 90, .45); border-radius: 14px;
    color: var(--en-ouro-claro); font-family: var(--en-sc); font-size: 14px;
}
.en-sair:hover { background: rgba(217, 178, 90, .15); }

/* numbers of the new screens and of the new numbers on the sheet: lining figures, aligned in columns */
.algarismos { font-family: 'Cormorant Garamond', Georgia, serif; font-variant-numeric: lining-nums tabular-nums; font-feature-settings: 'lnum' 1, 'tnum' 1; }

@media (prefers-reduced-motion: reduce) {
    .en-chama, .en-tela::after, .en-caixa { animation: none; }
}
