/* ==========================================================================
   HeroOT — kit HeroUI para a web
   As peças do kit HeroUI do client (janela de pedra com o dragão, painéis,
   poços, botões de pedra, checkbox, fita azul) desenhadas em 2x, pixel a
   pixel (--px = 1 pixel da arte). Usado pelo pré-cadastro (heroui.css) e pelo
   tema HeroUI do site (site.css). Arte gerada por tools/heroui-web/build.js.
   Fonte da verdade: heroot/public/assets/heroui — espelhar em public_html (build.js sync).
   ========================================================================== */

@font-face {
    font-family: 'Cinzel HU';
    src: url('fonts/cinzel.woff2') format('woff2');
    font-weight: 400 900;
    font-display: swap;
}

/* Na Cinzel o 1 parece um I e o 0 um O: os algarismos vêm da Inter. */
@font-face {
    font-family: 'HU Num';
    src: url('fonts/inter.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0030-0039;
}

@font-face {
    font-family: 'Inter HU';
    src: url('fonts/inter.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --px: 2px;
    --dpx: 2px;
    /* No client o dragão invade 3 px de arte da janela; aqui a base de rocha pousa
       exatamente na borda de cima (sem vão), o que deixa o título respirar. */
    --dragon-lift: 3;

    --hu-gold: #e8c86a;
    --hu-gold-hi: #f0d070;
    --hu-ok: #6fcf4f;
    --hu-warn: #ffcc66;
    --hu-err: #ec7e70;
    --hu-text: #dfdfdf;
    --hu-text-2: #c0c0c0;
    --hu-caption: #a0a0a0;
    --hu-well: #171717;

    --pc-bg: #0a0812;
    --pc-bg-2: #110c1d;
    --pc-ink: #ece7f5;
    --pc-ink-2: #c4bcd6;
    --pc-muted: #8f86a6;
    --pc-width: 1240px;

    --font-display: 'HU Num', 'Cinzel HU', 'Cinzel', Georgia, serif;
    --font-ui: 'Inter HU', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --gold-grad: linear-gradient(180deg, #fff7d6 0%, #f7cf66 40%, #b97a20 70%, #f3c45a 100%);
    --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ------------------------------------------------------------------ base */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

.hu-body {
    margin: 0;
    min-height: 100vh;
    background: var(--pc-bg);
    color: var(--pc-ink);
    font: 400 15px/1.55 var(--font-ui);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.hu-body a { color: inherit; }
.hu-body img { max-width: 100%; }
.hu-body ::selection { background: rgba(232, 200, 106, 0.4); color: #fff; }
.hu-body :focus-visible { outline: 2px solid var(--hu-gold); outline-offset: 3px; }

.hu-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.hu-body .hu-skip {
    position: fixed;
    z-index: 100;
    left: 16px;
    top: -60px;
    padding: 10px 16px;
    background: #000;
    color: var(--hu-gold);
    font-weight: 700;
    text-decoration: none;
    transition: top 0.2s;
}
.hu-body .hu-skip:focus { top: 12px; }

/* honeypot anti-bot (o app.css do Vite não carrega nesta página) */
.honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ============================================================ KIT HeroUI */

/* ---------------------------------------------------- janela (HeroWindow)
   window_new do client: faixa de título de 16 px e laterais de 4 px. */
.hu-window {
    position: relative;
    border: solid transparent;
    border-width: calc(16 * var(--px)) calc(4 * var(--px)) calc(4 * var(--px));
    border-image: url('img/window_new.png') 16 4 4 4 fill / calc(16 * var(--px)) calc(4 * var(--px)) calc(4 * var(--px)) repeat;
    image-rendering: pixelated;
    color: var(--hu-text);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 28px 70px -12px rgba(0, 0, 0, 0.8);
}

/* calor por trás do conteúdo, para a pedra não ficar chapada */
.hu-window::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(80% 70% at 50% 40%, rgba(255, 196, 120, 0.07), transparent 70%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.26));
    box-shadow: inset 0 0 44px rgba(0, 0, 0, 0.5), inset 0 2px 0 rgba(0, 0, 0, 0.35);
}

.hu-window > * { position: relative; }

.hu-window__title {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(-16 * var(--px));
    height: calc(16 * var(--px));
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font: 700 15px/1 var(--font-display);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--hu-gold);
    text-shadow: 0 1px 0 #000, 0 0 4px rgba(0, 0, 0, 0.9);
    padding-top: 1px;
}

.hu-window__title span { margin-right: -0.22em; }

.hu-window__title i {
    width: 7px;
    height: 7px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, #fff3c4, #d7a03a 55%, #7a4a12);
    box-shadow: 0 0 6px rgba(255, 200, 90, 0.55);
}

/* o dragão da store sobre o título (HeroWindow do client: 192x70, 67 px acima) */
.hu-window__dragon {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: calc(-16 * var(--px) - (67 + var(--dragon-lift)) * var(--dpx));
    width: calc(192 * var(--dpx));
    height: calc(70 * var(--dpx));
    margin-left: calc(-96 * var(--dpx));
    background: url('img/dragon.png') 0 0 / 100% 100% no-repeat;
    filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.6));
    pointer-events: none;
}

.hu-window__eye,
.hu-window__glow {
    position: absolute;
    opacity: 0;
    animation: hu-eye 9s ease-in-out infinite;
    animation-delay: var(--eye-delay, 2.5s);
}

.hu-window__eye {
    left: calc(39 * var(--dpx));
    top: calc(27 * var(--dpx));
    width: calc(12 * var(--dpx));
    height: calc(6 * var(--dpx));
    background: url('img/dragon-eye.png') 0 0 / 100% 100% no-repeat;
}

.hu-window__glow {
    left: calc(26 * var(--dpx));
    top: calc(14 * var(--dpx));
    width: calc(34 * var(--dpx));
    height: calc(32 * var(--dpx));
    border-radius: 50%;
    mix-blend-mode: screen;
    background: radial-gradient(closest-side, rgba(255, 70, 50, 0.95), rgba(255, 40, 30, 0.35) 45%, transparent);
}

@keyframes hu-eye {
    0%, 14%, 100% { opacity: 0; }
    3%, 10% { opacity: 1; }
}

/* ------------------------------------------------- painel (HeroPanel) */
.hu-panel {
    position: relative;
    border: solid transparent;
    border-width: calc(16 * var(--px)) calc(4 * var(--px)) calc(4 * var(--px));
    border-image: url('img/widget-borderimage.png') 16 4 4 4 fill / calc(16 * var(--px)) calc(4 * var(--px)) calc(4 * var(--px)) repeat;
    image-rendering: pixelated;
    color: var(--hu-text);
}

.hu-panel__title {
    position: absolute;
    left: calc(6 * var(--px));
    right: calc(6 * var(--px));
    top: calc(-16 * var(--px));
    height: calc(16 * var(--px));
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font: 700 13.5px/1 var(--font-display);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    color: var(--hu-gold);
    text-shadow: 0 1px 0 #000, 0 0 3px rgba(0, 0, 0, 0.9);
}

/* ---------------------------------------------- poço (HeroInset) e campos */
.hu-inset {
    border: solid transparent;
    border-width: var(--px);
    border-image: url('img/1pixel-down-frame.png') 1 fill / var(--px) stretch;
    background: var(--hu-well);
    image-rendering: pixelated;
}

.hu-input {
    display: block;
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 14px;
    border: solid transparent;
    border-width: var(--px);
    border-image: url('img/1pixel-down-frame.png') 1 fill / var(--px) stretch;
    border-radius: 0;
    background-color: #151515;
    color: #ececec;
    font: 500 15px/1.2 var(--font-ui);
    letter-spacing: 0.01em;
    image-rendering: pixelated;
    outline: 2px solid transparent;
    outline-offset: 1px;
    transition: outline-color 0.15s, background-color 0.15s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.hu-input::placeholder { color: #6b6b6b; opacity: 1; }
.hu-input:hover { background-color: #191919; }
.hu-input:focus { outline-color: rgba(232, 200, 106, 0.8); background-color: #1a1a1a; box-shadow: 0 0 18px rgba(232, 200, 106, 0.18); }
.hu-input:-webkit-autofill,
.hu-input:-webkit-autofill:hover,
.hu-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ececec;
    caret-color: #fff;
    box-shadow: inset 0 0 0 100px #1d2130;
}
.hu-input--code { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.hu-input[readonly] { color: #cfcfcf; cursor: text; }

.hu-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

.hu-field__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.hu-field__head label {
    font: 600 13px/1.2 var(--font-ui);
    letter-spacing: 0.01em;
    color: #d6cdb8;
    white-space: nowrap;
}

.hu-field__head small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    font: 500 11.5px/1.2 var(--font-ui);
    color: #a39c88;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hu-field__head small img { width: 8px; height: 12px; image-rendering: pixelated; flex: none; }

.hu-field__msg {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font: 500 12.5px/1.4 var(--font-ui);
    color: var(--hu-err);
}

.hu-field__msg:empty { display: none; }
.hu-field__msg::before {
    content: '';
    flex: none;
    width: 12px;
    height: 9px;
    margin-top: 4px;
    background: url('img/icon-no.png') 0 0 / 100% 100% no-repeat;
    image-rendering: pixelated;
}
.hu-field__msg.is-ok { color: var(--hu-ok); }
.hu-field__msg.is-ok::before { background-image: url('img/icon-yes.png'); }

.hu-field.is-invalid .hu-input { outline-color: rgba(236, 126, 112, 0.85); background-color: #1d1413; }
.hu-field.is-valid .hu-input:not(:focus) {
    padding-right: 42px;
    background-image: url('img/icon-yes.png');
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px 14px;
}

.hu-field.is-shake { animation: hu-shake 0.42s ease; }

@keyframes hu-shake {
    20% { transform: translateX(-6px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}

.hu-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* olho da senha */
.hu-pass { position: relative; }
.hu-pass .hu-input { padding-right: 46px; }
.hu-field.is-valid .hu-pass .hu-input:not(:focus) { padding-right: 72px; background-position: right 46px center; }

.hu-pass__eye {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 34px;
    height: 34px;
    margin-top: -17px;
    border: 0;
    border-radius: 4px;
    background: none;
    cursor: pointer;
    color: #8a8a8a;
    transition: color 0.15s, background-color 0.15s;
}

.hu-pass__eye:hover { color: var(--hu-gold); background: rgba(255, 255, 255, 0.04); }

.hu-pass__eye i {
    display: block;
    width: 20px;
    height: 20px;
    margin: auto;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5C6.5 5 2.4 9.1 1 12c1.4 2.9 5.5 7 11 7s9.6-4.1 11-7c-1.4-2.9-5.5-7-11-7Zm0 11.5A4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 0 1 0 9Zm0-2.2a2.3 2.3 0 1 0 0-4.6 2.3 2.3 0 0 0 0 4.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5C6.5 5 2.4 9.1 1 12c1.4 2.9 5.5 7 11 7s9.6-4.1 11-7c-1.4-2.9-5.5-7-11-7Zm0 11.5A4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 0 1 0 9Zm0-2.2a2.3 2.3 0 1 0 0-4.6 2.3 2.3 0 0 0 0 4.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hu-pass__eye[aria-pressed='true'] { color: var(--hu-gold); }
.hu-pass__eye[aria-pressed='true'] i {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.3 3.7 3.7 2.3l18 18-1.4 1.4-3.5-3.5A11.6 11.6 0 0 1 12 19c-5.5 0-9.6-4.1-11-7a14.5 14.5 0 0 1 4.3-5.2L2.3 3.7Zm5.3 5.3A4.5 4.5 0 0 0 15 15.4l-1.7-1.7a2.3 2.3 0 0 1-3-3L7.6 9ZM12 5c5.5 0 9.6 4.1 11 7a14 14 0 0 1-3.6 4.6l-3-3a4.5 4.5 0 0 0-6-6L8.2 5.6C9.4 5.2 10.7 5 12 5Z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.3 3.7 3.7 2.3l18 18-1.4 1.4-3.5-3.5A11.6 11.6 0 0 1 12 19c-5.5 0-9.6-4.1-11-7a14.5 14.5 0 0 1 4.3-5.2L2.3 3.7Zm5.3 5.3A4.5 4.5 0 0 0 15 15.4l-1.7-1.7a2.3 2.3 0 0 1-3-3L7.6 9ZM12 5c5.5 0 9.6 4.1 11 7a14 14 0 0 1-3.6 4.6l-3-3a4.5 4.5 0 0 0-6-6L8.2 5.6C9.4 5.2 10.7 5 12 5Z'/%3E%3C/svg%3E");
}

/* ------------------------------------------------ checkbox (HeroCheckBox) */
.hu-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font: 500 13px/1.5 var(--font-ui);
    color: #bdb6a6;
}

.hu-check input {
    flex: none;
    width: 24px;
    height: 24px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: url('img/checkbox-unchecked.png') 0 0 / 100% 100% no-repeat;
    image-rendering: pixelated;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: filter 0.15s;
}

.hu-check input:checked { background-image: url('img/checkbox-checked.png'); }
.hu-check:hover input { filter: brightness(1.25); }
.hu-check input:focus-visible { outline: 2px solid var(--hu-gold); outline-offset: 3px; }
.hu-field.is-invalid .hu-check input { outline: 2px solid rgba(236, 126, 112, 0.85); outline-offset: 2px; }

/* ---------------------------------------------- botões de pedra (HeroButton*) */
.hu-btn {
    --b: url('img/button-grey-up.png');
    --bd: url('img/button-grey-down.png');
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 44px;
    padding: 0 22px;
    border: solid transparent;
    border-width: calc(2 * var(--px));
    border-image: var(--b) 2 fill / calc(2 * var(--px)) repeat;
    border-radius: 0;
    background: none;
    overflow: hidden;
    color: #f2f2f2;
    font: 700 14px/1 var(--font-display);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.9), 0 0 3px rgba(0, 0, 0, 0.6);
    image-rendering: pixelated;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7), 0 8px 18px -6px rgba(0, 0, 0, 0.6);
    transition: filter 0.15s ease, transform 0.12s ease, box-shadow 0.2s ease;
}

.hu-btn > span,
.hu-btn > svg { position: relative; z-index: 1; }
.hu-btn:hover { filter: brightness(1.14) saturate(1.06); }
.hu-btn:active,
.hu-btn.is-pressed { border-image-source: var(--bd); transform: translateY(1px); filter: brightness(0.97); }
.hu-btn:active > span { transform: translate(1px, 1px); }
.hu-btn[disabled],
.hu-btn.is-busy { cursor: progress; filter: saturate(0.6) brightness(0.85); }

.hu-btn--red { --b: url('img/button-red-up.png'); --bd: url('img/button-red-down.png'); color: #fff2ee; }
.hu-btn--gold { --b: url('img/button-gold-up.png'); --bd: url('img/button-gold-down.png'); color: #1f1500; font-weight: 800; text-shadow: 0 1px 0 rgba(255, 246, 200, 0.75); }
.hu-btn--green { --b: url('img/button-green-up.png'); --bd: url('img/button-green-down.png'); color: #effae9; }
.hu-btn--grey { --b: url('img/button-grey-up.png'); --bd: url('img/button-grey-down.png'); }
.hu-btn--dark { --b: url('img/button-darkgrey-up.png'); --bd: url('img/button-darkgrey-down.png'); color: #e6dcc4; }

.hu-btn--sm { height: 36px; padding: 0 15px; font-size: 12px; letter-spacing: 0.09em; }
.hu-btn--lg { height: 52px; padding: 0 28px; font-size: 15px; }
.hu-btn--xl { height: 60px; padding: 0 30px; font-size: 17px; letter-spacing: 0.13em; }

.hu-btn--red.hu-btn--xl,
.hu-btn--red.hu-btn--lg {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8), 0 12px 28px -8px rgba(140, 16, 16, 0.65), 0 0 30px rgba(230, 60, 40, 0.18);
}

.hu-btn--red.hu-btn--xl:hover,
.hu-btn--red.hu-btn--lg:hover {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8), 0 14px 30px -8px rgba(160, 20, 20, 0.75), 0 0 38px rgba(255, 80, 50, 0.35);
}

/* brilho que atravessa o botão principal de tempos em tempos */
.hu-btn__shine {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 38%, rgba(255, 240, 220, 0.38) 50%, transparent 62%) no-repeat;
    background-size: 300% 100%;
    background-position: 100% 0;
    animation: hu-shine 6s ease-in-out infinite;
    animation-delay: 2.2s;
}

@keyframes hu-shine {
    0% { background-position: 100% 0; }
    16%, 100% { background-position: 0% 0; }
}

/* ------------------------------------------------------ fita (name-ribbon) */
.hu-ribbon {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    height: calc(32 * var(--px));
    min-width: calc(150 * var(--px));
    padding: 0 calc(10 * var(--px));
    border: solid transparent;
    border-width: 0 calc(26 * var(--px));
    border-image: url('img/name-ribbon.png') 0 26 0 26 fill / 0 calc(26 * var(--px)) stretch;
    image-rendering: pixelated;
    font: 800 calc(9.5 * var(--px)) / calc(27 * var(--px)) var(--font-display);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #f8e6a8;
    text-shadow: 0 1px 0 #0b0d2a, 0 0 3px rgba(10, 10, 40, 0.9);
}

.hu-ribbon span { margin-right: -0.24em; }

/* ---------------------------------------------------------------- aviso */
.hu-alert {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border: solid transparent;
    border-width: var(--px);
    border-image: url('img/1pixel-down-frame.png') 1 fill / var(--px) stretch;
    background: linear-gradient(180deg, rgba(120, 22, 18, 0.55), rgba(70, 12, 10, 0.55));
    color: #f6dad5;
    font: 500 13px/1.45 var(--font-ui);
    image-rendering: pixelated;
}

.hu-alert img { flex: none; width: 8px; height: 18px; margin: 2px 4px 0; image-rendering: pixelated; }
.hu-alert b { display: block; margin-bottom: 4px; color: #ffd2c8; }
.hu-alert ul { margin: 0; padding-left: 18px; }

.hu-captcha { display: flex; justify-content: center; min-height: 78px; }

/* -------------------------------------------- personagens (sprites HD do client)
   9 quadros por tira: 8 passos andando para o leste + 1 parado de frente.
   Tamanho do quadro e imagens em party/party.css (gerado pelo build). */
.hu-hero {
    display: block;
    flex: none;
    width: var(--hu-party-w, 97px);
    height: var(--hu-party-h, 95px);
    background-repeat: no-repeat;
    background-size: calc(var(--hu-party-w, 97px) * 9) var(--hu-party-h, 95px);
    background-position: calc(var(--hu-party-w, 97px) * -8) 0;
    image-rendering: pixelated;
}

.hu-hero.is-walking { animation: hu-walk 0.72s steps(8) infinite; }

@keyframes hu-walk {
    from { background-position: 0 0; }
    to { background-position: calc(var(--hu-party-w, 97px) * -8) 0; }
}
