/*
 * Dia especial (11.11, 12.12…): a página de espera, o encerramento e o topo
 * da vitrine do dia.
 *
 * Arquivo à parte do Tailwind: a página de espera é um documento próprio, sem
 * cabeçalho nem rodapé, e só precisa disto. A vitrine do dia carrega este
 * arquivo além do tailwind.css.
 *
 * A peça inteira (número, pedestal, placa, brilho e anéis) escala por uma
 * variável só, --vme-w, a largura da arte. Dentro dela, 1em = 1/10 da largura.
 *
 * Referência: a arte do 11.11 enviada pelo marketing. Amarelo-limão, não o
 * âmbar da marca; câmera um pouco acima, então o volume preto dos números
 * aparece no topo e à esquerda.
 */

:root {
    --vme-limao: #ffe738;
    --vme-limao-claro: #fff27a;
    --vme-limao-fundo: #f2d21c;
    --vme-amarelo: #fdc300;
    --vme-preto: #000;
    --vme-tinta: #111;
    --vme-vermelho: #e3191f;
    --vme-numero: 'Anton', 'Archivo', Impact, sans-serif;
    --vme-letra: 'Archivo', 'Plus Jakarta Sans', system-ui, sans-serif;
}

.vme-pagina *,
.vme-pagina *::before,
.vme-pagina *::after,
.vme-arte,
.vme-arte * {
    box-sizing: border-box;
}

/* ─────────────────────────────────────────────────────────── a peça ── */

.vme-arte {
    --vme-w: min(72vw, 440px);
    position: relative;
    z-index: 1;
    width: var(--vme-w);
    font-size: calc(var(--vme-w) / 10);
    isolation: isolate;
}

/* O brilho e os dois anéis finos, centrados no topo do pedestal. */
/* A largura define a composição; o enquadramento ajusta a escala à altura disponível. */
.vme-arte--cheia {
    --vme-w: min(76vw, 440px);
}

.vme-arte__luz,
.vme-arte__anel {
    position: absolute;
    left: 50%;
    top: 7.4em;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

.vme-arte__luz {
    width: 19em;
    height: 17em;
    background: radial-gradient(ellipse at 50% 50%,
        rgba(255, 245, 140, 1) 0%,
        rgba(255, 231, 56, .95) 22%,
        rgba(255, 220, 40, .6) 40%,
        rgba(230, 190, 20, .22) 58%,
        rgba(230, 190, 20, 0) 72%);
}

.vme-arte__anel {
    top: 6.2em;
    border: 1px solid rgba(240, 196, 40, .7);
}

.vme-arte__anel--1 { width: 15.6em; height: 15.6em; }
.vme-arte__anel--2 { width: 18.4em; height: 18.4em; border-color: rgba(240, 196, 40, .5); }

/* O número. Anton: o "1" da arte é um bloco condensado, com bandeira e sem pé.
   A extrusão sobe para a esquerda (sombras empilhadas) e a face é uma
   segunda camada (::after), porque o degradê recortado no texto apagaria as
   sombras. */
.vme-numero {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-family: var(--vme-numero);
    font-weight: 400;
    font-size: 6.5em;
    line-height: .86;
    padding-top: .08em;
}

.vme-dig {
    position: relative;
    z-index: 2;
    /* A fonte só tem algarismos tabulares, e o "1" viria com a largura do
       "0". Cada dígito ganha uma caixa justa e o desenho fica centrado nela. */
    display: flex;
    justify-content: center;
    width: .4em;
    margin: 0 .04em;
    color: #121212;
    text-shadow:
        -.005em -.003em 0 #161616,
        -.010em -.006em 0 #151515,
        -.015em -.009em 0 #141414,
        -.020em -.012em 0 #131313,
        -.025em -.015em 0 #121212,
        -.030em -.018em 0 #111,
        -.035em -.021em 0 #101010,
        -.040em -.024em 0 #0f0f0f,
        -.045em -.027em 0 #0e0e0e,
        -.050em -.030em 0 #0d0d0d,
        -.055em -.033em 0 #0c0c0c,
        -.060em -.036em 0 #4a4a4a;
}

/* O 1 da campanha é uma peça reta, sem depender do desenho da fonte. */
.vme-dig[data-c="1"] {
    width: .29em;
    height: .84em;
    margin-inline: .025em;
    color: transparent;
    text-shadow: none;
    background: linear-gradient(100deg, #66696a, #292b2c 30%, #090a0b 75%);
    clip-path: polygon(0 0, 100% 2%, 100% 100%, 28% 100%, 28% 24%, 0 24%);
}

.vme-dig[data-c="1"]::after {
    content: '';
    -webkit-background-clip: border-box;
    background-clip: border-box;
    inset: .022em .012em .018em .065em;
    background: linear-gradient(100deg, #fff78a 0%, #ffe83b 12%, #ffe529 78%, #edc715 100%);
    clip-path: polygon(0 0, 100% 1%, 100% 100%, 27% 100%, 27% 22%, 0 22%);
    border-radius: .012em;
    box-shadow: inset .008em .008em .008em #fff7a0;
}

.vme-dig::after {
    content: attr(data-c);
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    background:
        linear-gradient(90deg, transparent 20%, rgba(255, 255, 255, .22) 32%, transparent 44%),
        linear-gradient(180deg,
        var(--vme-limao-claro) 0%,
        var(--vme-limao) 16%,
        var(--vme-limao) 72%,
        var(--vme-limao-fundo) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* Herdaria a extrusão do dígito, e ela apareceria através da face. */
    text-shadow: none;
    -webkit-text-stroke: .008em #0a0a0a;
}

/* O ponto: um cilindro baixo, preto, de face amarela, entre os pares. */
.vme-ponto {
    position: relative;
    z-index: 1;
    flex: none;
    width: .155em;
    height: .155em;
    margin: 0 .02em .004em .045em;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, var(--vme-limao-claro) 0%, var(--vme-limao) 45%, var(--vme-limao-fundo) 100%);
    box-shadow:
        -.006em -.004em 0 #161616,
        -.012em -.008em 0 #131313,
        -.018em -.012em 0 #101010,
        -.024em -.016em 0 #0d0d0d,
        -.030em -.020em 0 #2e2e2e;
}

/* O pedestal: tampa elíptica brilhante, corpo cilíndrico preto. */
.vme-pedestal {
    position: relative;
    z-index: 1;
    width: 10.1em;
    height: 2.1em;
    margin: -.20em auto 0;
}

.vme-pedestal__topo {
    position: absolute;
    inset: 0 0 auto;
    z-index: 2;
    height: .85em;
    overflow: hidden;
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, .14), transparent 55%),
        radial-gradient(ellipse at 50% 50%, #1d1d1d 0%, #080808 70%, #000 100%);
    box-shadow:
        inset 0 .045em 0 rgba(255, 255, 255, .4),
        inset 0 -.06em .12em rgba(0, 0, 0, .9);
}

/* O reflexo do número na tampa: faixas amarelas borradas sob cada dígito. */
.vme-pedestal__reflexo {
    position: absolute;
    left: 10%;
    right: 10%;
    top: 30%;
    height: 55%;
    display: flex;
    justify-content: space-around;
    filter: blur(.05em);
    opacity: .45;
}

.vme-pedestal__reflexo i {
    display: block;
    width: 1.1em;
    background: linear-gradient(180deg, rgba(255, 231, 56, .9), rgba(255, 231, 56, 0));
}

.vme-pedestal__corpo {
    position: absolute;
    left: 0;
    right: 0;
    top: .43em;
    bottom: 0;
    border-radius: 0 0 50% 50% / 0 0 .6em .6em;
    /* O cilindro: brilho especular numa faixa horizontal no meio da lateral
       e reflexos verticais nas bordas. */
    background:
        linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, .07) 38%,
            rgba(255, 255, 255, .16) 50%, rgba(255, 255, 255, .05) 62%, transparent 100%),
        linear-gradient(90deg,
            #000 0%, #2e2e2e 8%, #0c0c0c 24%, #141414 55%,
            #3d3d3d 84%, #0a0a0a 95%, #000 100%);
    box-shadow: inset 0 -.05em 0 rgba(255, 255, 255, .25);
}

/* A placa branca. Começa por baixo do pedestal: a borda de cima fica
   escondida pelo fundo curvo do cilindro, como na arte. */
.vme-placa {
    position: relative;
    z-index: 0;
    width: 10em;
    margin: -.95em auto 0;
    padding: 1.5em .65em .65em;
    border: .12em solid #252a2e;
    border-radius: .8em;
    background: #fff;
    box-shadow:
        0 0 0 .28em #fff,
        0 0 0 .34em #fff36b,
        0 0 .7em .25em rgba(255, 236, 70, .95),
        0 0 2.4em .7em rgba(255, 225, 50, .55);
    text-align: center;
}

.vme-placa__texto {
    margin: 0;
    font-family: var(--vme-letra);
    font-weight: 900;
    font-stretch: 82%;
    font-size: 1.02em;
    line-height: 1.04;
    letter-spacing: -.005em;
    text-transform: uppercase;
    text-wrap: balance;
    overflow-wrap: anywhere;
    color: var(--vme-tinta);
}

.vme-placa__texto > span { display: block; }

/* Versão do topo da vitrine. Sem anéis: ao lado do texto eles cortariam o
   título e a contagem. O brilho é menor e acaba antes do título. */
.vme-arte--compacta .vme-arte__anel { display: none; }
.vme-arte--compacta .vme-arte__luz { width: 15em; height: 13em; top: 6.6em; }
.vme-arte--compacta {
    --vme-w: min(46vw, 280px);
}

.vme-arte--compacta .vme-placa { padding: 1.4em .6em .85em; }
.vme-arte--compacta .vme-placa__texto { font-size: 1.4em; }

@media (min-width: 1024px) {
    .vme-arte--compacta { --vme-w: 300px; }
}

/* ───────────────────────────────────────────────────────── o palco ── */

.vme-pagina {
    margin: 0;
    background: var(--vme-preto);
    color: #fff;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.vme-palco {
    position: relative;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: var(--vme-preto);
}

/* Mede o espaço real, inclusive quando a barra do navegador muda de altura.
   O cartaz inteiro é redimensionado, sem cortar logo, frases ou contagem. */
.vme-enquadramento {
    position: relative;
    /* Acima dos %, inclusive com o stacking context criado pela escala. */
    z-index: 2;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.vme-cartaz {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(100%, 560px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 0 4px;
    transform: translate(-50%, -50%) scale(var(--vme-escala, 1));
    transform-origin: center;
}

.vme-cartaz > * { flex-shrink: 0; }

/* Os % flutuantes ficam presos a uma coluna central, para não se espalharem
   pelas bordas de uma tela larga. */
.vme-quadro {
    position: absolute;
    inset: 0;
    width: min(100%, 780px);
    margin: 0 auto;
    pointer-events: none;
    z-index: 1;
}

.vme-pct {
    position: absolute;
    display: block;
    font-family: var(--vme-letra);
    font-weight: 900;
    font-stretch: 100%;
    line-height: 1;
    color: #e08a00;
    -webkit-text-stroke: .045em #d98a00;
    text-shadow:
        -.012em .012em 0 #eb9800,
        -.024em .024em 0 #e08a00,
        -.036em .036em 0 #d27c00,
        -.048em .048em 0 #c06e00;
}

.vme-pct::after {
    content: '%';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #fff6a0 0%, #ffe03a 38%, #ffc21a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    /* O traço engrossa o glifo: na arte os % são peças infladas. */
    -webkit-text-stroke: .045em #ffd21a;
}

.vme-pct--1 { left: 6%;  top: 23%; font-size: clamp(34px, 11vw, 74px); --vme-inclinacao: -20deg; transform: rotate(var(--vme-inclinacao)); }
.vme-pct--2 { right: 7%; top: 10%; font-size: clamp(34px, 11vw, 74px); --vme-inclinacao: 25deg; transform: rotate(var(--vme-inclinacao)); }
.vme-pct--3 { left: -9%; top: 66%; font-size: clamp(120px, 36vw, 230px); --vme-inclinacao: -22deg; transform: rotate(var(--vme-inclinacao)); filter: blur(5px); }
.vme-pct--4 { right: -11%; bottom: 3%; font-size: clamp(110px, 32vw, 210px); --vme-inclinacao: 18deg; transform: rotate(var(--vme-inclinacao)); filter: blur(6px); }

@media (min-width: 1024px) {
    .vme-pct--3 { left: -16%; }
    .vme-pct--4 { right: -16%; }
}

.vme-cena {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 560px;
    text-align: center;
}

/* A faixa de luz sob a placa: na arte, as frases são pretas, escritas no
   próprio brilho amarelo que vaza da placa. */
.vme-faixa {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 0;
    width: min(100vw, 620px);
    /* Sobe por trás da placa: o brilho da frase é continuação do halo dela,
       e não um disco à parte. */
    margin-top: -34px;
    padding: 62px clamp(24px, 8vw, 68px) 36px;
    /* closest-side: a elipse cabe na caixa e some antes da borda, sem
       deixar a faixa com cara de retângulo. */
    background: radial-gradient(closest-side,
        rgba(255, 244, 130, .96) 0%,
        rgba(255, 233, 64, .9) 52%,
        rgba(240, 205, 35, .42) 78%,
        rgba(240, 205, 35, 0) 100%);
}

.vme-faixa .vme-chamada--grande {
    font-size: clamp(22px, 6vw, 30px);
    font-weight: 900;
}

.vme-faixa .vme-chamada--sub {
    margin-top: 6px;
    font-weight: 700;
    font-size: clamp(14px, 3.8vw, 17px);
}

.vme-chamada {
    margin: 0;
    font-family: var(--vme-letra);
    font-weight: 800;
    font-stretch: 82%;
    font-size: clamp(16px, 3.9vw, 22px);
    line-height: 1.2;
    color: var(--vme-tinta);
}

/* A dica riscada: o texto existe e se lê pela metade, a laçada vai por cima. */
.vme-riscado {
    position: relative;
    display: inline-block;
    margin: 2px 0 0;
    font-family: var(--vme-letra);
    font-weight: 800;
    font-stretch: 82%;
    font-size: clamp(16px, 3.9vw, 22px);
    line-height: 1.2;
    color: var(--vme-tinta);
}

.vme-riscado svg {
    position: absolute;
    left: -14%;
    top: -12%;
    width: 128%;
    height: 124%;
    overflow: visible;
    transform: rotate(-2deg);
}

.vme-riscado path {
    fill: none;
    stroke: var(--vme-vermelho);
    stroke-width: 2.6;
    opacity: .86;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

/* Fora da faixa (encerramento), o texto volta a ser claro sobre o preto. */
.vme-texto {
    margin: 8px 0 0;
    max-width: 30rem;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .75);
}

/* A contagem. */
.vme-relogio {
    position: relative;
    z-index: 2;
    margin: 10px 0 0;
    max-width: 100%;
}

.vme-relogio__rotulo {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, .72);
}

.vme-relogio__caixas {
    display: flex;
    justify-content: center;
    gap: clamp(6px, 2vw, 12px);
}

.vme-relogio__caixa {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    width: clamp(56px, 16vw, 78px);
    padding: 8px 6px 7px;
    border: 1px solid rgba(255, 231, 56, .45);
    border-radius: 10px;
    background: linear-gradient(145deg, #191919, #090909);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 8%);
}

.vme-relogio__num {
    display: block;
    font-family: var(--vme-numero);
    font-size: 30px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    color: var(--vme-limao);
}

.vme-relogio__un {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, .65);
}

@media (min-width: 1024px) {
    .vme-palco .vme-relogio__caixa { width: 78px; padding: 10px 8px 9px; }
    .vme-palco .vme-relogio__num { font-size: 36px; }
    .vme-palco .vme-relogio__un { font-size: 12px; }
}

.vme-acao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 26px;
    padding: 12px 26px;
    border-radius: 999px;
    background: var(--vme-limao);
    color: #1f2557;
    font-weight: 800;
    font-size: 16px;
    text-decoration: none;
    box-shadow: 0 0 0 3px rgba(255, 231, 56, .25), 0 0 28px rgba(255, 231, 56, .45);
}

.vme-acao:focus-visible,
.vme-logo a:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.vme-logo {
    position: relative;
    z-index: 4;
    margin-top: auto;
    padding-top: 28px;
}

/* A logo azul some no preto: na arte ela vem num selo amarelo. */
.vme-logo a {
    display: inline-flex;
    padding: 7px 14px;
    border-radius: 9px;
    background: var(--vme-amarelo);
}

.vme-logo img {
    display: block;
    height: 34px;
    width: auto;
}

/* Faixa só da equipe, quando a fase está sendo forçada por ?fase=. */
.vme-previa {
    position: relative;
    flex-shrink: 0;
    z-index: 50;
    margin: 8px 0 0;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font: 700 12px/1.2 'Plus Jakarta Sans', system-ui, sans-serif;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
    width: max-content;
    max-width: calc(100% - 24px);
    text-align: center;
}

.vme-logo .vme-acao { margin: 0; min-height: 34px; padding: 0; box-shadow: none; background: transparent; }

/* Apenas transform é animado: sem recalcular layout ou animar o blur.
   Movimentos pequenos e desencontrados preservam a leitura do cartaz. */
@media (prefers-reduced-motion: no-preference) {
    .vme-arte__luz { animation: vme-respira 1.2s ease-out both; }
    .vme-pct { animation: vme-flutua 9s ease-in-out infinite; }
    .vme-pct--2 { animation-duration: 11s; animation-delay: -4s; }
    .vme-pct--3 { animation-duration: 13s; animation-delay: -7s; }
    .vme-pct--4 { animation-duration: 12s; animation-delay: -2s; }
}

@keyframes vme-flutua {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--vme-inclinacao)); }
    50% { transform: translate3d(4px, -12px, 0) rotate(calc(var(--vme-inclinacao) + 4deg)); }
}

@keyframes vme-respira {
    from { opacity: .4; transform: translate(-50%, -50%) scale(.94); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

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

/* ─────────────────────────────────────── topo da vitrine do dia ── */

.vme-hero {
    position: relative;
    overflow: hidden;
    background: var(--vme-preto);
    color: #fff;
}

.vme-hero__grade {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 22px;
    padding-top: 28px;
    padding-bottom: 28px;
    text-align: center;
}

.vme-hero__titulo {
    margin: 0;
    font-family: var(--vme-letra);
    font-weight: 900;
    font-stretch: 80%;
    font-size: clamp(30px, 8vw, 56px);
    line-height: 1;
    text-transform: uppercase;
    text-wrap: balance;
    color: #fff;
}

.vme-hero__sub {
    margin: 12px auto 0;
    max-width: 34rem;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .78);
}

.vme-hero__info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.vme-hero .vme-relogio { margin: 22px 0 0; }

@media (min-width: 1024px) {
    /* A extrusão sai para a esquerda do número: a margem a devolve ao
       alinhamento do container. */
    .vme-arte--compacta { margin-left: .55em; }

    .vme-hero__grade {
        grid-template-columns: auto minmax(0, 38rem);
        justify-content: center;
        align-items: center;
        justify-items: start;
        gap: 72px;
        padding-top: 56px;
        padding-bottom: 56px;
        text-align: left;
    }

    .vme-hero__sub { margin-left: 0; }

    .vme-hero__info,
    .vme-hero .vme-relogio__caixas { justify-content: flex-start; }
}
