/* =====================================================================
   TRINCA REAL ESTATE AWARDS - Plataforma de Votacao
   Repaginacao visual: preto absoluto + dourado, Montserrat + Georgia.
   Baseado no visual PRO-AWARDS, aplicado sobre a logica/markup reais.
   ===================================================================== */

/* -------- Reset -------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    font-size: 15px; line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    background: var(--bg); color: var(--text);
    min-width: 320px; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: 0; background: transparent; cursor: pointer; color: inherit; border-radius: 999px; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* -------- Tokens -------- */
:root {
    --black:    #020201;
    --ink-900:  #060605;
    --ink-800:  #0c0c0b;
    --ink-700:  #131312;
    --ink-600:  #1b1b19;

    --gold-deep:   #b8923f;
    --gold:        #e5bd67;   /* dourado principal */
    --gold-soft:   #ffe3a5;   /* dourado claro */
    --gold-bright: #ffe9b5;
    --gold-white:  #fff6e0;

    --green: #3fb57a;
    --red:   #e56b6b;

    --bg: var(--black);
    --line:     rgba(229,189,103,.26);
    --line-soft: rgba(229,189,103,.18);
    --border-strong: rgba(229,189,103,.5);
    --text: #ffffff;
    --text-muted: rgba(255,255,255,.66);
    --text-dim: rgba(255,255,255,.45);

    --font: "Montserrat", "Futura", Arial, sans-serif;
    --serif: Georgia, "Times New Roman", serif;
    --ease: cubic-bezier(.22,1,.36,1);

    --shadow-md: 0 22px 70px rgba(0,0,0,.34);
    --shadow-lg: 0 28px 70px rgba(0,0,0,.5);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --maxw: 1180px;

    /* superficie "liquid glass" reutilizavel nos cards */
    --glass-bg:
        linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.022) 46%, rgba(255,255,255,.055)),
        rgba(18,18,21,.72);
    --glass-shadow:
        inset 0 1px 0 rgba(255,255,255,.14),
        inset 0 -1px 0 rgba(229,189,103,.08),
        0 22px 70px rgba(0,0,0,.34),
        0 0 46px rgba(229,189,103,.055);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::selection { background: rgba(229,189,103,.3); color: var(--gold-white); }

/* =============== BOTOES (genericos do app.js) =============== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-weight: 700; font-size: 14px; padding: 12px 22px; border-radius: 999px;
    transition: transform .15s, background .2s, color .2s, border-color .2s, box-shadow .2s, filter .2s;
    white-space: nowrap; line-height: 1;
}
.btn:active { transform: scale(.97); }
.btn.small { padding: 9px 16px; font-size: 14px; }
.btn.large { padding: 15px 30px; font-size: 15.5px; }
.btn.full { width: 100%; }
.btn-primary {
    border: 0; color: #090705;
    background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep));
    box-shadow: 0 10px 26px rgba(229,189,103,.22);
}
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-outline { border: 1.5px solid var(--border-strong); color: var(--text); background: rgba(0,0,0,.12); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn-ghost { background: rgba(229,189,103,.1); color: var(--gold-soft); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(229,189,103,.16); }

/* =============== HEADER (pill flutuante, liquid glass) =============== */
.app-header {
    position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
    z-index: 80; width: min(1180px, calc(100% - 32px)); height: 62px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px 8px 18px;
    border: 1px solid rgba(253,208,155,.18); border-radius: 999px;
    background: rgba(2,2,1,.82); box-shadow: 0 22px 80px rgba(0,0,0,.38);
    backdrop-filter: blur(22px) saturate(150%);
}
.brand-logo-link { display: inline-flex; align-items: center; }
.brand-logo-img { width: 154px; height: auto; }
.main-nav { display: flex; align-items: center; gap: 10px; font-size: .88rem; font-weight: 700; }
.header-link { color: var(--text-muted); border-radius: 999px; padding: 12px 16px; transition: color .2s; }
.header-link:hover { color: var(--gold-soft); }
.nav-cta {
    border: 1px solid rgba(253,208,155,.5); color: #fff;
    background: rgba(253,208,155,.08); border-radius: 999px; padding: 12px 18px; transition: background .2s;
}
.nav-cta:hover { background: rgba(253,208,155,.16); }

/* =============== HERO (slider de banners) =============== */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; background: #000; }
.hero-slider { position: absolute; inset: 0; user-select: none; cursor: grab; }
.hero-slider.is-dragging { cursor: grabbing; }
.hero-slide {
    position: absolute; inset: 0; opacity: 0; pointer-events: none;
    transition: opacity .98s ease; overflow: hidden;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-bg-picture, .hero-bg-picture img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.hero-bg-picture { z-index: 0; }
.hero-bg-picture img { object-fit: cover; object-position: center; }
.hero-slide::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.36) 35%, rgba(0,0,0,.08) 64%, rgba(0,0,0,.02)),
        linear-gradient(0deg, rgba(0,0,0,.48), rgba(0,0,0,.02) 38%, rgba(0,0,0,.18));
}
.hero-slide-content {
    position: relative; z-index: 2;
    display: flex; flex-direction: column;
    width: min(560px, calc(100vw - 146px));
    padding: 96px 0 92px clamp(72px, 9.15vw, 176px);
}
.hero-awards-logo { display: block; width: min(300px, 32vw); margin: 0 0 40px 60px; filter: drop-shadow(0 18px 42px rgba(0,0,0,.62)); }
.hero-copy {
    margin: 0; color: #fff; font-size: 24px; font-weight: 400; letter-spacing: .048em;
    line-height: 1.18; text-transform: uppercase; text-shadow: 0 10px 34px #000;
}
.hero-copy span { display: block; }
.hero-copy strong { font-weight: 800; }
.hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; margin-top: 56px; }
.primary-button, .hero-ranking-button {
    display: inline-flex; min-height: 52px; align-items: center; justify-content: center;
    border-radius: 999px; padding: 12px 24px; font-weight: 900; letter-spacing: .02em;
    transition: transform .15s, filter .2s, background .2s;
}
.primary-button { border: 0; color: #090705; background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep)); }
.primary-button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.hero-ranking-button { border: 2px solid rgba(229,189,103,.9); color: #fff; background: rgba(0,0,0,.12); }
.hero-ranking-button:hover { background: rgba(229,189,103,.14); }
.powered-logo { display: block; width: min(294px, 32vw); margin: 40px 0 0 110px; filter: drop-shadow(0 12px 28px rgba(0,0,0,.58)); }
.hero-pagination {
    position: absolute; z-index: 5; bottom: 10.5vh;
    left: calc(clamp(72px, 9.15vw, 176px) + 20px); display: flex; gap: 10px;
}
.hero-page-chip { width: 46px; height: 5px; border: 0; padding: 0; border-radius: 0; background: rgba(255,255,255,.48); transition: background .2s; }
.hero-page-chip.is-active { background: #fff; }

/* =============== APP (area de navegacao) =============== */
.app-section {
    min-height: 100vh; padding: 120px clamp(14px,4vw,24px) 0;
    background: radial-gradient(circle at 50% 0%, rgba(229,189,103,.06), transparent 34rem), var(--black);
}
.app-root { width: 95%; margin-left: auto; margin-right: auto; padding-bottom: 70px; }
.app-loading, .app-empty { text-align: center; color: var(--text-dim); padding: 70px 20px; font-size: 14px; }

/* Cabecalho de secao */
.section-head { text-align: center; margin-bottom: clamp(34px,4vw,54px); }
.eyebrow { display: inline-block; margin-bottom: 16px; color: var(--gold); font-size: 0.875rem; font-weight: 900; letter-spacing: .42em; text-transform: uppercase; }
.section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.8rem); line-height: .98; text-shadow: 0 3px 0 rgba(229,189,103,.28); }
.section-sub { color: var(--text-muted); margin: 16px auto 0; max-width: 560px; font-size: 15px; }
.section-head .change-region, .section-head .cat-rank-link { margin-top: 20px; }
.section-head .cat-rank-link { gap: 6px; }
.section-head .cat-rank-link .group-arrow { font-size: 18px; }

/* Barra de navegacao (voltar + trilha) */
.navbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.back-link {
    display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800;
    color: var(--gold-soft); padding: 10px 18px; border: 1px solid rgba(229,189,103,.34);
    border-radius: 999px; background: transparent; transition: border-color .2s, background .2s;
}
.back-link:hover { border-color: var(--gold); background: rgba(229,189,103,.07); }
.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--text-dim); }
.crumb { color: var(--text-muted); transition: color .2s; }
.crumb:hover { color: var(--gold-soft); }
.crumb.current { color: var(--gold-soft); font-weight: 700; }
.crumb-sep { color: var(--text-dim); }

/* Superficie glass compartilhada (grupos / categorias / regioes) */
.group-block, .category-card, .region-card {
    position: relative; overflow: hidden;
    border: 1px solid rgba(253,208,155,.24); background: var(--glass-bg);
    box-shadow: var(--glass-shadow); backdrop-filter: blur(22px) saturate(150%);
    transition: transform .22s var(--ease), border-color .22s;
}
.group-block::before, .category-card::before, .region-card::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .78;
    background:
        radial-gradient(circle at 12% 0%, rgba(255,255,255,.16), transparent 12rem),
        linear-gradient(120deg, rgba(255,255,255,.12), transparent 36%);
}
.group-block > *, .category-card > *, .region-card > * { position: relative; z-index: 1; }
.group-block:hover, .category-card:hover, .region-card:hover { transform: translateY(-3px); border-color: rgba(229,189,103,.62); }

/* ---- HOME do votar: blocos de grupo ---- */
.group-grid { display: grid; gap: 18px; width: min(790px,100%); margin: 0 auto 56px; }
.group-block {
    display: grid; grid-template-columns: 90px 1fr auto auto; align-items: center;
    min-height: 128px; padding: 24px clamp(24px,3vw,38px); border-radius: 20px;
}
.group-index { color: rgba(229,189,103,.6); font-family: var(--serif); font-size: 3.2rem; font-weight: 700; line-height: 1; }
.group-block-body { min-width: 0; }
.group-name { font-size: clamp(1.55rem, 2.25vw, 2rem); font-weight: 600; letter-spacing: -.005em; line-height: 1.05; }
.group-blurb { margin-top: 8px; color: var(--text-muted); font-size: 14px; }
.group-count { color: var(--text-dim); font-size: 0.875rem; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }
.group-arrow { color: var(--gold); font-size: 1.8rem; line-height: 1; transition: transform .2s; }
.group-block:hover .group-arrow { transform: translateX(4px); }

/* ---- REGIONAL: cards de regiao ---- */
.region-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; width: min(920px,100%); margin: 0 auto 56px; }
.region-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 116px; padding: 28px; border-radius: 14px; }
.region-name { font-size: 1.5rem; font-weight: 600; flex: 1; }
.region-count { color: var(--text-dim); font-size: 0.875rem; letter-spacing: .14em; text-transform: uppercase; }
.region-card:hover .group-arrow { transform: translateX(4px); }

/* ---- Cards de categoria ---- */
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; width: min(870px,100%); margin: 0 auto 56px; }
.category-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 138px; padding: 26px; border-radius: 14px; }
.category-card-title {
    font-size: clamp(.96rem, .98vw, 1.08rem); font-weight: 600; line-height: 1.14; letter-spacing: -.005em;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.category-card-sub { margin-top: 8px; color: var(--text-muted); font-size: 14px; }
.category-card-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; color: var(--gold); font-size: 0.875rem; font-weight: 900; text-transform: uppercase; }
.category-card:hover .group-arrow { transform: translateX(4px); }

/* =============== CATEGORIA: indicados (carrossel 3D + grid) =============== */
.category-detail-head { margin-bottom: 30px; }
.candidates-body { width: min(1180px, 100%); margin: 0 auto; }

.nominee-actions { display: flex; justify-content: center; margin-bottom: 18px; }
.secondary-button {
    display: inline-flex; align-items: center; justify-content: center; min-width: 190px; min-height: 42px;
    padding: 10px 22px; border: 1px solid rgba(229,189,103,.55); border-radius: 999px;
    color: #fff; background: rgba(229,189,103,.12); font-size: 0.875rem; font-weight: 600; white-space: nowrap;
    transition: background .2s, border-color .2s;
}
.secondary-button:hover { background: rgba(229,189,103,.2); }

/* alterna carrossel <-> grid */
.nominees-view.is-grid .carousel-shell { display: none; }
.nominees-view.is-grid .nominee-grid { display: grid; }

.carousel-shell { position: relative; min-height: 560px; perspective: 900px; overflow: hidden; }
.carousel-track {
    --drag-x: 0px; position: relative; height: 430px; margin: 0 auto;
    cursor: grab; transform-style: preserve-3d; touch-action: pan-y; user-select: none;
}
.carousel-track.is-dragging { cursor: grabbing; }
.carousel-card {
    position: absolute; top: 18px; left: 50%; width: 236px; height: 374px; margin-left: -118px;
    transform: translate3d(calc(var(--x,0px) + var(--drag-x,0px)), var(--y,0px), var(--z,0px)) rotateY(var(--rotate,0deg)) scale(var(--scale,1));
    z-index: var(--layer,1); opacity: var(--opacity,1); filter: brightness(var(--brightness,1));
    transition: transform .64s var(--ease), opacity .42s, filter .42s; pointer-events: none;
}
.carousel-card.is-visible { pointer-events: auto; }
.carousel-controls { display: flex; justify-content: center; gap: 12px; margin-top: 70px; }
.icon-button { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.7); color: #fff; background: transparent; transition: border-color .2s, color .2s; }
.icon-button:hover { border-color: var(--gold); color: var(--gold-soft); }

/* card do indicado (usado no carrossel e no grid) */
.nominee-card {
    position: relative; display: flex; width: 100%; height: 100%; overflow: hidden;
    border: 1px solid rgba(255,255,255,.16); border-radius: 17px; background: #15110e;
    box-shadow: 0 28px 70px rgba(0,0,0,.48); cursor: pointer; outline: none;
}
.nominee-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.nominee-art { position: absolute; inset: 0; background: linear-gradient(145deg,#25272d,#0e0f12); background-size: cover; background-position: top center; }
.nominee-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 34%, rgba(0,0,0,.38) 58%, rgba(0,0,0,.9) 100%); }
.monogram, .cand-initials { display: grid; height: 100%; place-items: center; color: var(--gold-soft); font-family: var(--serif); font-size: 3rem; }
.nominee-content {
    position: absolute; z-index: 2; right: 0; bottom: 0; left: 0;
    display: flex; min-height: 152px; flex-direction: column; justify-content: flex-end; gap: 7px;
    padding: 0 18px 17px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.86));
}
.nominee-content h3 { margin: 0; font-size: 0.875rem; font-weight: 700; text-transform: uppercase; text-shadow: 0 3px 14px #000; }
.company, .handle { margin: 0; font-size: 0.875rem; font-weight: 800; }
.company { color: var(--text-muted); }
.handle { color: var(--gold-soft); }
.card-actions { display: flex; width: 100%; gap: 8px; margin-top: 8px; }
.vote-button, .share-button {
    flex: 1 1 0; min-height: 31px; display: inline-flex; align-items: center; justify-content: center;
    padding: 7px 9px; border-radius: 999px; font-size: 0.875rem; font-weight: 900; letter-spacing: .02em;
    transition: filter .2s, background .2s;
}
.vote-button { border: 0; color: #090705; background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep)); }
.vote-button:hover:not(:disabled):not(.is-locked) { filter: brightness(1.05); }
.vote-button:disabled { opacity: .65; cursor: default; filter: grayscale(.25); }
/* "is-locked": ja votou na categoria. Parece bloqueado, mas segue clicavel
   para disparar o toast "Voce ja votou nesta categoria". */
.vote-button.is-locked { opacity: .65; filter: grayscale(.25); }
.share-button { border: 2px solid rgba(229,189,103,.9); color: #fff; background: rgba(0,0,0,.12); }
.share-button:hover { background: rgba(229,189,103,.14); }

/* selo "Seu voto" e estado votado */
.cand-voted-badge {
    position: absolute; top: 12px; left: 12px; z-index: 3; display: none;
    align-items: center; gap: 5px; font-size: 14px; font-weight: 800; letter-spacing: .3px;
    color: #14210f; background: linear-gradient(135deg, var(--gold-bright), var(--gold));
    padding: 5px 10px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
.nominee-card.voted { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 28px 70px rgba(0,0,0,.48); }
.nominee-card.voted .cand-voted-badge { display: inline-flex; }

/* grid de indicados (toggle "ver todos") */
.nominee-grid { display: none; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px; width: min(1180px,100%); margin: 24px auto 40px; }
.nominee-grid .nominee-card { min-height: 410px; }

/* =============== VER RANKING (somente leitura) =============== */
.rank-groups, .rank-regions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; margin: 0 auto 22px; }
.rank-regions { margin-top: -4px; }
.rank-chip {
    font-size: 14px; font-weight: 700; letter-spacing: .3px; padding: 11px 22px; border-radius: 999px;
    color: var(--text-muted); background: rgba(229,189,103,.06); border: 1px solid var(--line);
    transition: border-color .2s, color .2s, background .2s, transform .15s;
}
.rank-chip:hover { border-color: var(--border-strong); color: var(--gold-soft); }
.rank-chip:active { transform: scale(.97); }
.rank-chip.active { color: #090705; border-color: transparent; background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep)); box-shadow: 0 6px 20px rgba(229,189,103,.25); }

.rank-select-wrap { position: relative; max-width: 460px; margin: 0 auto 30px; }
.rank-select-wrap::after { content: '\203A'; position: absolute; right: 20px; top: 50%; transform: translateY(-50%) rotate(90deg); color: var(--gold); font-size: 20px; pointer-events: none; }
.rank-select {
    width: 100%; appearance: none; -webkit-appearance: none;
    background: var(--ink-900); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
    padding: 14px 44px 14px 18px; font-size: 15px; font-weight: 500; color: var(--text);
    cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.rank-select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(229,189,103,.15); }
.rank-select option { background: var(--ink-800); color: var(--text); }

.rank-result-head { margin-top: 10px; margin-bottom: 24px; text-align: center; }
.rank-result-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.06; margin-top: 6px; }
.rank-live { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.rank-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(63,181,122,.5); animation: rankPulse 1.8s ease-out infinite; }
@keyframes rankPulse { 0% { box-shadow: 0 0 0 0 rgba(63,181,122,.5); } 70% { box-shadow: 0 0 0 7px rgba(63,181,122,0); } 100% { box-shadow: 0 0 0 0 rgba(63,181,122,0); } }
@media (prefers-reduced-motion: reduce) { .rank-live-dot { animation: none; } }

.rank-list { display: flex; flex-direction: column; gap: 12px; max-width: 720px; margin: 0 auto; }
.rank-row {
    display: flex; align-items: center; gap: 18px; padding: 14px 22px 14px 16px;
    border: 1px solid rgba(253,208,155,.24); border-radius: var(--radius-lg);
    background: var(--glass-bg); box-shadow: var(--glass-shadow); will-change: transform;
}
.rank-pos { flex-shrink: 0; min-width: 52px; text-align: center; font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1; color: var(--text-dim); }
.rank-pos sup { font-size: .5em; margin-left: 1px; vertical-align: super; }
.rank-photo { flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: linear-gradient(135deg,#25272d,#0e0f12); display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); }
.rank-photo img { width: 100%; height: 100%; object-fit: cover; }
.rank-photo .cand-initials { font-size: 22px; }
.rank-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rank-name { font-weight: 700; font-size: 15.5px; line-height: 1.2; }
.rank-company { font-size: 14px; color: var(--text-dim); }
.rank-row.rank-1 { border-color: var(--border-strong); box-shadow: 0 0 0 1px rgba(229,189,103,.28) inset, var(--shadow-md); }
.rank-1 .rank-pos { color: var(--gold-bright); }
.rank-2 .rank-pos { color: var(--gold-soft); }
.rank-3 .rank-pos { color: var(--gold-deep); }

/* =============== MODAL (overlay reutilizavel) =============== */
body.modal-open { overflow: hidden; }
.modal-overlay {
    position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
    padding: clamp(14px,4vw,40px); background: rgba(0,0,0,.72); backdrop-filter: blur(10px);
    opacity: 0; transition: opacity .22s;
}
.modal-overlay.show { opacity: 1; }
.modal {
    position: relative; width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto;
    border: 1px solid var(--line); border-radius: var(--radius-xl);
    background: rgba(16,16,18,.96); box-shadow: var(--shadow-lg);
    transform: translateY(16px) scale(.98); transition: transform .25s;
}
.modal-overlay.show .modal { transform: translateY(0) scale(1); }
.modal-close {
    position: absolute; top: 14px; right: 14px; z-index: 3; width: 36px; height: 36px;
    border-radius: 50%; font-size: 22px; line-height: 1; color: var(--text-muted);
    background: rgba(0,0,0,.35); border: 1px solid var(--line); transition: color .2s, border-color .2s, background .2s;
}
.modal-close:hover { color: var(--gold-soft); border-color: var(--gold); background: rgba(0,0,0,.55); }

/* ---- Pop-up do candidato ---- */
.cand-modal-photo { aspect-ratio: 16/10; background: linear-gradient(135deg,#25272d,#0e0f12); display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
.cand-modal-photo img { width: 100%; height: 100%; object-fit: cover; }
.cand-modal-photo .cand-initials { font-size: 72px; height: auto; }
.cand-modal-body { padding: 24px clamp(20px,4vw,30px) 26px; }
.cand-modal-cat { display: block; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.cand-modal-name { font-family: var(--serif); font-size: clamp(1.5rem, 4vw, 1.9rem); line-height: 1.12; margin-top: 8px; }
.cand-modal-company { color: var(--text-muted); font-size: 14px; margin-top: 6px; }
.cand-modal-ig { color: var(--gold-soft); font-size: 14px; margin-top: 4px; }
.cand-modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.cand-modal-vote:disabled { opacity: .7; cursor: default; }
.cand-modal-note { text-align: center; font-size: 14px; color: var(--text-dim); margin-top: 12px; }
.cand-modal-download { display: block; margin: 12px auto 0; font-size: 14px; font-weight: 700; letter-spacing: .3px; color: var(--text-muted); padding: 6px 10px; border-radius: 999px; transition: color .2s, background .2s; }
.cand-modal-download:hover { color: var(--gold-soft); background: rgba(229,189,103,.08); }

/* ---- Modal de cadastro ---- */
.register-modal { padding: clamp(26px,4vw,34px) clamp(20px,4vw,32px) clamp(24px,4vw,30px); }
.register-head { text-align: center; margin-bottom: 22px; }
.register-title { font-family: var(--serif); font-size: clamp(1.5rem, 4vw, 1.9rem); line-height: 1.12; margin-top: 8px; }
.register-sub { color: var(--text-muted); font-size: 14px; margin-top: 10px; }
.register-sub strong { color: var(--gold-soft); }
.register-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.field-input { background: var(--ink-900); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; font-size: 15px; color: var(--text); transition: border-color .2s, box-shadow .2s; }
.field-input::placeholder { color: var(--text-dim); }
.field-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(229,189,103,.15); }
.field-input.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(229,107,107,.14); }
.field-error { font-size: 14px; color: var(--red); }
.field-error:empty { display: none; }
.register-form .register-submit { margin-top: 8px; }
.register-legal { text-align: center; font-size: 14px; color: var(--text-dim); margin-top: 4px; }

/* =============== CARD PARA DOWNLOAD (html2canvas) =============== */
.dlcard-stage { position: fixed; left: -10000px; top: 0; z-index: -1; pointer-events: none; }
.dlcard { width: 380px; overflow: hidden; border-radius: var(--radius-xl); background: linear-gradient(160deg, var(--ink-700), var(--ink-800)); border: 1px solid var(--border-strong); box-shadow: 0 0 0 1px rgba(229,189,103,.18) inset; }
.dlcard-photo { aspect-ratio: 4/5; background: linear-gradient(135deg,#25272d,#0e0f12); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dlcard-photo img { width: 100%; height: 100%; object-fit: cover; }
.dlcard-initials { font-family: var(--serif); font-size: 96px; color: var(--gold); height: auto; }
.dlcard-body { padding: 26px 28px 30px; text-align: center; }
.dlcard-cat { display: block; font-size: 14px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.dlcard-name { font-family: var(--serif); font-size: 30px; line-height: 1.12; margin-top: 12px; color: var(--text); }
.dlcard-company { color: var(--text-muted); font-size: 14.5px; margin-top: 8px; }
.dlcard-sign { display: block; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold-soft); font-weight: 700; }

/* =============== MOBILE FOCUS CARD =============== */
.mobile-card-modal { position: fixed; inset: 0; z-index: 320; display: grid; place-items: center; padding: 4px; }
.mobile-card-modal .modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(16px); }
.mobile-focus-card { position: relative; z-index: 1; width: min(calc(100vw - 8px), calc((100dvh - 8px) * .8)); height: auto; aspect-ratio: 4/5; min-height: 0; }
.mobile-focus-card .nominee-content { min-height: 160px; padding: 68px 16px 16px; }
.mobile-focus-close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 34px; height: 34px; border: 1px solid rgba(253,208,155,.42); color: var(--gold-soft); background: rgba(12,9,5,.62); backdrop-filter: blur(12px); }

/* =============== FOOTER =============== */
.site-footer {
    display: flex; min-height: 66px; flex-direction: row; align-items: center; justify-content: center;
    gap: 18px; padding: 18px 28px; border-top: 1px solid var(--line-soft); background: #050504;
    color: var(--text-dim); text-align: center; white-space: nowrap; overflow-x: auto; font-size: 0.875rem;
}
.footer-badge { display: inline-flex; align-items: center; }
.footer-logo-img { width: 118px; height: auto; }
.footer-powered { color: var(--gold); text-transform: uppercase; letter-spacing: .03em; }
.footer-copy { letter-spacing: .03em; }
.footer-handle { color: var(--gold-soft); }

/* =============== INDICADOR DE MODO (demo/erro) =============== */
.mode-badge { position: fixed; bottom: 14px; left: 14px; z-index: 250; font-size: 14px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; padding: 6px 11px; border-radius: 999px; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.mode-badge.mode-demo  { color: #090705; background: linear-gradient(135deg, var(--gold-bright), var(--gold)); }
.mode-badge.mode-error { color: #fff; background: var(--red); }

/* =============== TOAST =============== */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 330; background: rgba(20,20,22,.94); border: 1px solid var(--border-strong); color: var(--text); padding: 14px 22px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(63,181,122,.5); }
.toast.error { border-color: rgba(229,107,107,.5); }

/* =============== RESPONSIVO =============== */
@media (max-width: 760px) {
    .app-header { top: 10px; width: calc(100% - 20px); padding: 9px 10px 9px 12px; transform: translateX(-50%); }
    .brand-logo-img { width: 124px; }
    .main-nav a.header-link { display: none; }
    .main-nav .nav-cta { padding: 10px 14px; }

    .hero { height: 100dvh; min-height: 760px; }
    .hero-slide { display: block; padding: 0; }
    .hero-bg-picture img { object-position: center top; }
    .hero-slide::after { background: linear-gradient(0deg, rgba(0,0,0,.54), rgba(0,0,0,0) 58%); }
    .hero-slide-content { position: absolute; right: 5.4vw; bottom: calc(3.4svh + env(safe-area-inset-bottom, 0px)); left: 5.4vw; width: auto; padding: 0; }
    .hero-awards-logo { display: none; }
    .hero-copy { width: 100%; font-size: clamp(16px, 4.08vw, 30px); letter-spacing: .045em; line-height: 1.22; }
    .hero-actions { width: calc(100% - clamp(24px,6vw,64px)); gap: clamp(14px,2.6vw,28px); margin: clamp(30px,5.7vw,60px) auto 0; }
    .hero-actions .primary-button, .hero-actions .hero-ranking-button { min-height: clamp(50px,8vw,72px); padding: 10px 8px; font-size: clamp(14px, 3vw, 18px); white-space: nowrap; }
    .powered-logo { width: clamp(210px,40vw,300px); margin: clamp(34px,6vw,60px) 6vw 0 auto; }
    .hero-pagination { top: auto; bottom: calc(13svh + env(safe-area-inset-bottom, 0px)); left: 7.5vw; }
    .hero-page-chip, .hero-page-chip.is-active { width: clamp(20px,4.8vw,46px); height: clamp(4px,.55vw,5px); }

    .app-section { padding-top: 96px; }
    .section-title { font-size: clamp(2rem, 9vw, 2.6rem); }
    .group-block { grid-template-columns: 62px 1fr auto; align-items: center; padding: 22px 20px; min-height: 138px; }
    .group-index { font-size: 2.7rem; }
    .group-name { font-size: clamp(1.45rem, 7vw, 1.9rem); }
    .group-blurb { font-size: .92rem; }
    .group-count { grid-column: 1 / span 2; margin-top: 8px; }
    .group-block .group-arrow { grid-column: 3; grid-row: 1 / span 2; }
    .category-grid, .region-grid { grid-template-columns: 1fr; }

    .carousel-shell { min-height: 600px; }
    .carousel-track { height: 460px; }
    .carousel-card { width: min(248px,68vw); height: 400px; margin-left: calc(min(248px,68vw) / -2); }
    .nominee-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
    .nominee-grid .nominee-card { min-height: 268px; }
    .nominee-grid .card-actions { display: none; }

    .rank-row { gap: 12px; padding: 12px 16px 12px 12px; }
    .rank-pos { min-width: 40px; font-size: 24px; }
    .rank-photo { width: 46px; height: 46px; }
    .rank-chip { padding: 10px 16px; font-size: 14px; }

    .site-footer { justify-content: flex-start; gap: 12px; padding: 14px 16px; font-size: 0.875rem; }
    .footer-logo-img { width: 92px; }
}
@media (max-width: 390px) {
    .hero { min-height: 720px; }
    .secondary-button { min-width: 0; width: 100%; }
}
