/* Abertura: fachada + logo gigante, dia -> por do sol -> noite */
.hero { position: relative; height: 100svh; color: #fff; }
.js .hero { height: 100svh; }
.hero-pin { position: relative; height: 100svh; overflow: hidden; }
.js .hero-pin { position: sticky; top: 0; }

.ceu, .cena { position: absolute; inset: 0; }
.cena { width: 100%; height: 100%; object-fit: cover; }
.cena-dia { object-position: 0% 50%; transform: scale(1.04); transform-origin: 0% 45%; }
@media (max-aspect-ratio: 3/4) { .cena-dia { scale: 1.5; } }
@media (max-height: 700px) { .role { display: none; } }
@media (min-aspect-ratio: 3/4) { .cena-dia { object-position: 25% 30%; } }
.cena-tarde { background: linear-gradient(180deg, rgba(120,40,140,.55) 0%, rgba(255,79,154,.55) 38%, rgba(255,138,61,.5) 70%, rgba(255,210,122,.35) 100%); mix-blend-mode: hard-light; opacity: 0; }
.cena-noite { opacity: 0; background: radial-gradient(120% 80% at 30% 20%, rgba(24,60,180,.55), rgba(7,10,26,.92) 70%); mix-blend-mode: multiply; }
.vinheta { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,10,26,.35) 0%, rgba(7,10,26,0) 30%, rgba(7,10,26,.15) 55%, rgba(7,10,26,.85) 100%); }
.ices { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
/* Gelinhos subindo: blocos de gelo (alguns saborizados), so transform e opacity */
.ices i {
  position: absolute; bottom: -70px; width: var(--w, 22px); aspect-ratio: 1 / 1.7; border-radius: 6px; opacity: .9;
  background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(170,225,255,.4) 60%, rgba(255,255,255,.7));
  box-shadow: inset 0 0 6px rgba(255,255,255,.9), 0 0 16px rgba(46,242,255,.45);
  animation: sobe var(--t, 11s) linear infinite; animation-delay: var(--d, 0s);
}
.ices i:nth-child(1) { left: 6%;  --w: 20px; --t: 12s; }
.ices i:nth-child(2) { left: 22%; --w: 14px; --t: 9s;  --d: -3s; background: linear-gradient(160deg, #FFE27A, rgba(255,216,77,.35)); }
.ices i:nth-child(3) { left: 38%; --w: 26px; --t: 13s; --d: -7s; background: linear-gradient(160deg, #FF9DBF, rgba(255,127,168,.35)); }
.ices i:nth-child(4) { left: 52%; --w: 16px; --t: 10s; --d: -1s; }
.ices i:nth-child(5) { left: 66%; --w: 22px; --t: 12s; --d: -5s; background: linear-gradient(160deg, #B8F59A, rgba(143,227,107,.35)); }
.ices i:nth-child(6) { left: 80%; --w: 18px; --t: 9.5s; --d: -8s; }
.ices i:nth-child(7) { left: 93%; --w: 24px; --t: 14s; --d: -2s; background: linear-gradient(160deg, #9EC9FF, rgba(46,139,255,.35)); }
.ices i:nth-child(8) { left: 14%; --w: 12px; --t: 8s;  --d: -6s; }
.ices i:nth-child(9) { left: 72%; --w: 13px; --t: 8.5s; --d: -4s; background: linear-gradient(160deg, #FFB47A, rgba(255,138,61,.35)); }
/* Brilho de sol cruzando a foto (so de dia) */
.brilho-sol {
  position: absolute; inset: -20% -60%; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(105deg, transparent 40%, rgba(255,240,200,.75) 50%, transparent 60%);
  animation: brilho 7s cubic-bezier(.77,0,.175,1) infinite;
}
.hero.noite .brilho-sol { display: none; }
@keyframes brilho { 0%, 55% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
@keyframes sobe { to { transform: translateY(-115vh) rotate(200deg); } }

.hero-conteudo {
  position: relative; z-index: 2; height: 100%; width: min(1180px, 100% - 32px); margin: 0 auto;
  display: grid; grid-template-rows: auto 1fr; align-items: end; gap: 14px;
  padding: calc(84px + env(safe-area-inset-top)) 0 calc(36px + env(safe-area-inset-bottom));
}

/* A placa com a logo: a marca e a primeira coisa que se ve */
.placa {
  position: relative; justify-self: center; align-self: start; width: min(100%, 880px); padding: clamp(14px, 3vw, 28px) clamp(16px, 4vw, 40px);
  border-radius: clamp(18px, 3vw, 32px); background: rgba(255,255,255,.96);
  box-shadow: 0 24px 60px rgba(7,10,26,.35), inset 0 -6px 0 rgba(24,119,242,.12);
}
.placa-logo { width: 100%; height: auto; }
.logo-noite { position: absolute; inset: clamp(14px, 3vw, 28px) clamp(16px, 4vw, 40px); width: calc(100% - 2 * clamp(16px, 4vw, 40px)); opacity: 0; filter: drop-shadow(0 0 6px #2E8BFF) drop-shadow(0 0 18px #2E8BFF) drop-shadow(0 0 40px rgba(46,242,255,.6)); }

.hero-txt { text-align: center; display: grid; justify-items: center; gap: 14px; }
.titulo { margin: 0; font: 400 clamp(2.8rem, 12vw, 7.2rem)/.9 var(--display); text-transform: uppercase; letter-spacing: .06em; filter: drop-shadow(0 4px 18px rgba(7,10,26,.55)); }
.hero.noite .titulo { filter: drop-shadow(0 0 10px rgba(46,139,255,.95)) drop-shadow(0 0 30px rgba(255,79,154,.45)); }

.hero-sub { margin: 0; font-weight: 600; font-size: clamp(1rem, 2.4vw, 1.2rem); max-width: 34ch; text-shadow: 0 2px 12px rgba(7,10,26,.6); }
.role { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 2; margin: 0; text-align: center; font: 700 .72rem "Inter"; letter-spacing: .25em; text-transform: uppercase; opacity: .8; }

/* Telas largas: texto a esquerda */
@media (min-width: 900px) {
  .hero-txt { text-align: left; justify-items: start; justify-self: start; }
}

/* Estado noite (aplicado pelo motion.js; sem JS, fica o dia) */
.hero.noite .placa { background: rgba(7,10,26,.72); box-shadow: 0 0 0 1.5px rgba(46,139,255,.7), 0 0 60px rgba(46,139,255,.45); backdrop-filter: blur(8px); }
.hero .h-noite { display: none; }
.hero.noite .h-dia { display: none; }
.hero.noite .h-noite { display: inline; }
.hero.noite .titulo .h-noite { display: block; }
.titulo .h-dia { display: block; }
.titulo .h-noite { color: #fff; }

/* Cena da noite: por dentro da loja (foto real), com grade de cor de jogo */
.cena-noite { background: none; mix-blend-mode: normal; }
.cena-noite img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.25) contrast(1.08) brightness(.7); }
.cena-grade { opacity: 0; background: linear-gradient(180deg, rgba(40,20,120,.55), rgba(255,79,154,.18) 50%, rgba(7,10,26,.8)); mix-blend-mode: multiply; }

/* HUD: interface de jogo de mundo aberto, feita do zero */
.hud { position: relative; z-index: 2; align-self: start; display: flex; justify-content: space-between; align-items: start; gap: 12px; width: 100%; }
.hud-missao {
  display: grid; gap: 2px; max-width: 58%; padding: 10px 14px 11px; border-left: 4px solid var(--rosa);
  background: linear-gradient(90deg, rgba(7,10,26,.82), rgba(7,10,26,.45)); border-radius: 0 12px 12px 0;
}
.hud-missao small { font: 800 .62rem "Inter"; letter-spacing: .22em; text-transform: uppercase; color: var(--ouro); }
.hud-missao b { font: 400 clamp(1.05rem, 4.2vw, 1.5rem)/1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.hud-missao span { font: 600 .74rem "Inter"; opacity: .85; }
.hud-status { display: grid; justify-items: end; gap: 2px; text-align: right; }
.hud-relogio { font: 400 clamp(1rem, 3.6vw, 1.3rem)/1 var(--display); letter-spacing: .08em; text-shadow: 0 2px 0 #000, 0 0 12px rgba(0,0,0,.6); }
.hud-grana {
  font: 400 clamp(1.6rem, 7vw, 2.6rem)/1 var(--display); letter-spacing: .02em; color: #6BE38A;
  -webkit-text-stroke: 1.5px #0B3A1A; paint-order: stroke fill; text-shadow: 0 3px 0 #06210F; font-variant-numeric: tabular-nums;
}
.hud-grana.sobe { animation: grana .6s cubic-bezier(.23,1,.32,1); }
@keyframes grana { 30% { transform: scale(1.18); color: #B8FFC9; } }
.hud-estrelas { font-size: clamp(1rem, 4vw, 1.35rem); letter-spacing: .08em; color: #FFD27A; -webkit-text-stroke: 1px #3A2A00; text-shadow: 0 2px 0 #000; }
.hud-ganho { position: fixed; z-index: 90; pointer-events: none; font: 400 1.4rem var(--display); color: #6BE38A; -webkit-text-stroke: 1px #0B3A1A; paint-order: stroke fill; }

/* Minimapa */
.hud-mapa { position: absolute; z-index: 3; right: 16px; bottom: calc(34px + env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 4px; width: clamp(78px, 22vw, 132px); }
.hud-mapa svg { width: 100%; filter: drop-shadow(0 6px 16px rgba(0,0,0,.5)); }
.hud-mapa span { font: 800 .58rem "Inter"; letter-spacing: .16em; text-transform: uppercase; text-shadow: 0 1px 4px #000; white-space: nowrap; }
.mapa-chao { fill: #CFE3C8; transition: fill .6s; }
.mapa-mar { fill: #63B6E8; transition: fill .6s; }
.mapa-areia { fill: #F3E2B3; transition: fill .6s; }
.mapa-rua { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; transition: stroke .6s; }
.mapa-rota { fill: none; stroke: var(--rosa); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 4 4; animation: rota 1s linear infinite; }
@keyframes rota { to { stroke-dashoffset: -8; } }
.mapa-loja circle { fill: var(--azul); stroke: #fff; stroke-width: 2; }
.mapa-loja path { fill: #fff; }
.mapa-eu { fill: #fff; stroke: #0B1026; stroke-width: 1.5; }
.mapa-borda { fill: none; stroke: rgba(7,10,26,.85); stroke-width: 6; }
.mapa-gira { transform-origin: 60px 60px; }
.hero.noite .mapa-chao { fill: #1B2348; }
.hero.noite .mapa-mar { fill: #0D2A52; }
.hero.noite .mapa-areia { fill: #3A3560; }
.hero.noite .mapa-rua { stroke: #5868A8; }

@media (min-width: 900px) {
  .hud-missao { max-width: 380px; }
  .hud-mapa { right: max(16px, calc(50vw - 590px)); bottom: 40px; }
}
@media (max-width: 899px) { .hero-txt { text-align: left; justify-items: start; } }

/* Capa so noite (sem troca com a rolagem) */
.hero .cena-noite, .hero .cena-grade { opacity: 1; }
.placa-logo { filter: drop-shadow(0 0 6px #2E8BFF) drop-shadow(0 0 18px #2E8BFF) drop-shadow(0 0 40px rgba(46,242,255,.6)); }
.hud-nota { font: 800 .72rem "Inter"; letter-spacing: .12em; text-transform: uppercase; text-shadow: 0 1px 4px #000; }
.hero-selo { margin: 0; font: 700 .85rem "Inter"; color: #FFD27A; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
