/* =========================================================
   Sessão Macabra: base (tokens, reset, atmosfera, letreiro)
   ========================================================= */

:root {
  /* Paleta: um cinema de bairro amaldiçoado */
  --noir: #0a0507;        /* preto com sangue velho, base de tudo */
  --noir-2: #140a10;      /* superfícies */
  --noir-3: #1f1119;      /* elevado */
  --sangue: #c8102e;      /* vermelho sangue, ação */
  --sangue-vivo: #ff3b57; /* tinta do seu carimbo e brilhos */
  --sangue-fundo: #5a0612;
  --osso: #eadfc8;        /* texto, cor de osso */
  --osso-2: #b3a68f;
  --osso-3: #7d7262;
  --espectro: #8f70ff;    /* tinta do carimbo dela, violeta espectral */
  --espectro-vivo: #b39cff;
  --latao: #d9a441;       /* latão do letreiro e medalhas */
  --latao-vivo: #ffd27a;
  --linha: rgba(234, 223, 200, .12);

  --f-display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --f-body: 'Spectral', 'Georgia', 'Times New Roman', serif;

  --slash-angle: -2deg;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--noir);
  color: var(--osso);
  font: 400 1.0625rem/1.55 var(--f-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
button { font-family: inherit; }
button, input, select, textarea { color: inherit; }
* { -webkit-tap-highlight-color: transparent; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--osso); outline-offset: 2px; }
@media (hover: none) and (pointer: coarse) {
  :focus-visible { outline: none; }
}
button, .chip, .tab, .fab, .ticket__stub { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
::selection { background: var(--sangue); color: var(--osso); }

.ic {
  width: 1.25em; height: 1.25em;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- Atmosfera ---------- */
.ambient {
  position: fixed; inset: 0;
  z-index: 0; pointer-events: none; overflow: hidden;
}
.beam {
  position: absolute; inset: -10% -20% 0;
  background: conic-gradient(from 162deg at 50% -4%,
    transparent 0deg,
    rgba(255, 226, 190, .04) 9deg,
    rgba(255, 226, 190, .085) 18deg,
    rgba(255, 226, 190, .04) 27deg,
    transparent 36deg);
  animation: beam 9s ease-in-out infinite;
}
@keyframes beam {
  0%, 100% { opacity: .9; }
  37% { opacity: 1; }
  52% { opacity: .75; }
  61% { opacity: .95; }
}
.dust { position: absolute; inset: 0; width: 100%; height: 100%; }
.grain {
  position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .085;
  animation: grain .7s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 6%); }
  40% { transform: translate(7%, -3%); }
  60% { transform: translate(-6%, -7%); }
  80% { transform: translate(5%, 4%); }
  100% { transform: translate(-2%, 8%); }
}
.vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, transparent 40%, rgba(5, 2, 4, .62) 100%);
}
.flick { position: absolute; inset: 0; background: #000; opacity: 0; }
.flick.is-on { animation: flick .45s steps(1) forwards; }
@keyframes flick {
  0% { opacity: .55; } 12% { opacity: .08; } 25% { opacity: .5; }
  40% { opacity: 0; } 55% { opacity: .35; } 70% { opacity: .05; } 100% { opacity: 0; }
}

/* ---------- Cortina ---------- */
.curtain { position: fixed; inset: 0; z-index: 100; pointer-events: none; display: none; }
.curtain.is-shown { display: block; }
.curtain__panel {
  position: absolute; top: 0; bottom: 0; width: 52%;
  background:
    repeating-linear-gradient(90deg, #4a0510 0, #8a1024 14px, #5c0814 28px, #3b040d 36px),
    #5c0814;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, .7);
}
.curtain__panel--l { left: 0; }
.curtain__panel--r { right: 0; }
.curtain__rod {
  position: absolute; top: 0; left: 0; right: 0; height: 12px;
  background: linear-gradient(#ffd27a, #a67420 70%, #6b4812);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .7);
}
.curtain.is-open .curtain__panel--l { animation: openL 1.35s cubic-bezier(.7, 0, .3, 1) forwards; }
.curtain.is-open .curtain__panel--r { animation: openR 1.35s cubic-bezier(.7, 0, .3, 1) forwards; }
@keyframes openL { to { transform: translateX(-104%) scaleX(.6); } }
@keyframes openR { to { transform: translateX(104%) scaleX(.6); } }

/* ---------- Letreiro ---------- */
.marquee {
  position: relative; z-index: 1;
  margin: 10px 12px 0;
  padding: 34px 48px 34px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .022) 0 2px, transparent 2px 16px),
    radial-gradient(120% 90% at 50% 0%, #3a0a16 0%, #1b0510 55%, #0f040a 100%);
  border: 1px solid rgba(217, 164, 65, .4);
  box-shadow:
    inset 0 0 0 3px var(--noir),
    inset 0 0 0 4px rgba(217, 164, 65, .3),
    0 12px 50px rgba(200, 16, 46, .16);
  text-align: center;
}
.marquee__inner { position: relative; }

.bulbs {
  position: absolute; left: 12px; right: 12px; height: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.bulbs--top { top: 7px; }
.bulbs--bottom { bottom: 7px; }
.bulb {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--latao-vivo);
  box-shadow: 0 0 6px 1px rgba(255, 210, 122, .85), 0 0 14px 3px rgba(255, 210, 122, .25);
  animation: chaseA 1.1s steps(1) infinite;
}
.bulb:nth-child(even) { animation-name: chaseB; }
.bulb--bad { animation: badBulb 4.3s linear infinite; }
@keyframes chaseA { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .22; } }
@keyframes chaseB { 0%, 49% { opacity: .22; } 50%, 100% { opacity: 1; } }
@keyframes badBulb {
  0%, 7%, 11%, 40%, 44%, 71%, 100% { opacity: 1; }
  8%, 10%, 41%, 43% { opacity: .1; }
  45%, 70% { opacity: .35; }
}

.title {
  position: relative;
  margin: 0 auto;
  max-width: 11ch;
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: clamp(2.5rem, 12vw, 5.6rem);
  line-height: .95;
  color: var(--sangue-vivo);
  text-shadow:
    0 0 10px rgba(255, 59, 87, .55),
    0 0 32px rgba(200, 16, 46, .45),
    0 3px 0 var(--sangue-fundo);
  animation: neon 7s linear infinite;
}
.title__cut { display: block; }
.title__cut--a {
  clip-path: polygon(0 -30%, 100% -30%, 100% 44%, 0 56%);
}
.title__cut--b {
  position: absolute; inset: 0;
  clip-path: polygon(0 56%, 100% 44%, 100% 130%, 0 130%);
}
html.is-ready .title__cut--a { animation: cutA .7s cubic-bezier(.2, .9, .2, 1) .95s both; }
html.is-ready .title__cut--b { animation: cutB .7s cubic-bezier(.2, .9, .2, 1) .95s both; }
html.is-ready .title__slash { animation: slash .6s ease-out .55s both; }
.title__slash {
  position: absolute; left: -4%; right: -4%; top: 50%; height: 2px;
  background: linear-gradient(90deg, transparent, #fff 18%, var(--latao-vivo) 50%, #fff 82%, transparent);
  filter: drop-shadow(0 0 6px #fff);
  transform: rotate(var(--slash-angle)) scaleX(0);
  transform-origin: left center;
  opacity: 0;
}
@keyframes cutA { to { transform: translate(-5px, -3px); } }
@keyframes cutB { to { transform: translate(6px, 4px); } }
@keyframes slash {
  0% { transform: rotate(var(--slash-angle)) scaleX(0); opacity: 1; }
  55% { transform: rotate(var(--slash-angle)) scaleX(1); opacity: 1; }
  100% { transform: rotate(var(--slash-angle)) scaleX(1); opacity: 0; }
}
@keyframes neon {
  0%, 17%, 19.5%, 23%, 24.5%, 58%, 59.5%, 100% { opacity: 1; }
  18%, 24%, 59% { opacity: .5; }
  18.6% { opacity: .85; }
}

.tagline {
  margin: 12px 0 0;
  color: var(--osso-2);
  font-style: italic;
  font-size: 1.05rem;
}

.marquee__settings { position: absolute; top: 18px; right: 16px; z-index: 2; }

.marquee__drips {
  position: absolute; left: 0; right: 0; top: 100%;
  height: 70px; overflow: hidden; pointer-events: none;
}
.drips { display: block; height: 70px; width: 100%; }
.drips__edge { fill: #8f0c22; }
.drip {
  fill: #8f0c22;
  transform: translateX(var(--x)) scaleY(var(--l));
  transform-origin: 0 0;
  animation: dripGrow var(--t) ease-in-out infinite alternate;
}
.drop {
  fill: #b41029;
  transform: translateX(var(--x));
  animation: dropFall var(--t) ease-in infinite;
  animation-delay: var(--d);
}
@keyframes dripGrow { to { transform: translateX(var(--x)) scaleY(calc(var(--l) * 1.35)); } }
@keyframes dropFall {
  0%, 55% { transform: translate(var(--x), 0); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: translate(var(--x), 46px); opacity: 0; }
}

/* ---------- Abas ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex;
  background: linear-gradient(#1a0912, #0d0409);
  border-top: 1px solid rgba(217, 164, 65, .28);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .65);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 4px 9px;
  background: none; border: 0;
  color: var(--osso-3);
  font: 600 .8rem/1 var(--f-body);
  cursor: pointer;
  transition: color .2s;
}
.tab .ic { width: 22px; height: 22px; }
.tab.is-active { color: var(--osso); }
.tab.is-active::after {
  content: ""; position: absolute; top: -1px; left: 22%; right: 22%; height: 2px;
  background: var(--sangue-vivo);
  box-shadow: 0 0 10px var(--sangue-vivo);
}
.tab__count {
  position: absolute; top: 5px; right: calc(50% - 28px);
  min-width: 18px; padding: 2px 5px;
  border-radius: 9px;
  background: var(--sangue); color: var(--osso);
  font: 400 .68rem/1 var(--f-display);
  text-align: center;
}
.tab__count:empty, .tab__count[data-zero] { display: none; }
.ic--eye circle { animation: blink 6s infinite; transform-origin: center; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

/* ---------- Palco (conteúdo) ---------- */
.stage {
  position: relative; z-index: 1;
  max-width: 760px; margin: 0 auto;
  padding: 36px 16px calc(100px + env(safe-area-inset-bottom));
}
.view { display: none; }
.view.is-active { display: block; animation: viewIn .35s ease-out; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }

.view__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 16px;
}
.view__title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: 1.9rem; line-height: 1;
  color: var(--osso);
}
.view__title::after {
  content: ""; display: block;
  width: 52px; height: 3px; margin-top: 8px;
  background: var(--sangue);
  transform-origin: left;
  animation: slashIn .5s ease-out both;
}
@keyframes slashIn { from { transform: scaleX(0); } }
.view__sub { margin: 8px 0 0; color: var(--osso-2); font-style: italic; font-size: .98rem; }
.view__head .view__add { display: none; }

/* ---------- Botão flutuante ---------- */
.fab {
  position: fixed; right: 18px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 31;
  width: 58px; height: 58px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 35% 30%, #ff5c73, #c8102e 55%, #7a0a1a);
  color: var(--osso);
  box-shadow: 0 8px 24px rgba(200, 16, 46, .45), 0 0 0 2px rgba(255, 59, 87, .35);
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform .2s cubic-bezier(.2, 1.4, .4, 1), opacity .2s;
}
.fab .ic { width: 26px; height: 26px; stroke-width: 2.5; }
.fab:active { transform: scale(.92); }
.fab.is-hidden { transform: scale(0); opacity: 0; pointer-events: none; }

/* ---------- Telas maiores ---------- */
@media (min-width: 720px) {
  .title { max-width: none; }
}
@media (min-width: 900px) {
  .marquee { max-width: 1100px; margin: 18px auto 0; width: calc(100% - 48px); padding: 42px 60px 34px; }
  .tabs {
    position: static;
    justify-content: center; gap: 8px;
    max-width: 1100px; margin: 24px auto 0; padding: 0 24px;
    background: none; border: 0; box-shadow: none;
  }
  .tab {
    flex: 0 0 auto; flex-direction: row; gap: 8px;
    padding: 10px 18px;
    font-size: 1rem;
    border: 1px solid transparent; border-radius: 4px;
  }
  .tab.is-active { border-color: rgba(255, 59, 87, .4); background: rgba(200, 16, 46, .12); }
  .tab.is-active::after { display: none; }
  .tab__count { position: static; margin-left: 2px; }
  .stage { max-width: 1100px; padding: 28px 24px 60px; }
  .view__head .view__add { display: inline-flex; }
  .fab { display: none; }
  .view__title { font-size: 2.3rem; }
}

/* ---------- Menos movimento ---------- */
html.lite .grain, html.lite .dust, html.lite .flick { display: none; }
html.lite .beam, html.lite .bulb, html.lite .title, html.lite .drip, html.lite .drop,
html.lite .ic--eye circle { animation: none; }
html.lite .bulb:nth-child(even) { opacity: .35; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .grain, .dust, .flick { display: none; }
  .title__slash { display: none; }
}
