/* ─── VARIABLES ─────────────────────────────────────────── */
:root {
  --white:      #f5f5f0;
  --off-white:  #e0e0d8;
  --dim-white:  #b8b8b0;
  --muted:      #787870;
  --dark:       #090909;
  --dark2:      #111110;
  --accent2:    #a0ff80;
  --font:       'Bitcount Single', system-ui, monospace;
  --nav-h:      64px;
  --footer-h:   36px;
}

/* ─── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--dark);
  color: var(--white);
  font-family: var(--font);
  font-optical-sizing: auto;
  font-variation-settings: "slnt" 0, "CRSV" 0.5, "ELSH" 0, "ELXP" 0;
  overflow-x: hidden;
  min-height: 100vh;
  /* custom cursor */
  cursor: url('images/mouse.png') 16 16, crosshair;
}
a { text-decoration: none; color: inherit;
  cursor: url('images/mouse.png') 16 16, crosshair; }
button {
  font-family: var(--font);
  cursor: url('images/mouse.png') 16 16, crosshair;
}

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--muted); }

/* ═══════════════════════════════════════════════════════════
   GLOBAL GLOW HOVER
   Every .glow-hover element gets a white outer glow on hover
═══════════════════════════════════════════════════════════ */
.glow-hover {
  transition: box-shadow 0.3s ease, text-shadow 0.3s ease, filter 0.3s ease;
}
.glow-hover:hover {
  box-shadow:  0 0 18px rgba(255,255,255,0.18),
               0 0 40px rgba(255,255,255,0.08);
  filter: brightness(1.12);
}
/* For text-only elements that don't benefit from box-shadow */
.nav-link.glow-hover:hover,
.nav-logo.glow-hover:hover {
  box-shadow: none;
  text-shadow: 0 0 14px rgba(255,255,255,0.7),
               0 0 30px rgba(255,255,255,0.3);
  filter: brightness(1.2);
}

/* ═══════════════════════════════════════════════════════════
   VHS / FILM OVERLAY
═══════════════════════════════════════════════════════════ */
.vhs-overlay {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.012) 2px,
    rgba(255,255,255,0.012) 4px
  );
}
.scanlines {
  position: fixed; inset: 0; z-index: 9001; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 3px,
    rgba(0,0,0,0.02) 3px,
    rgba(0,0,0,0.02) 4px
  );
  animation: scanlineMove 10s linear infinite;
}
@keyframes scanlineMove {
  from { background-position: 0 0; }
  to   { background-position: 0 100%; }
}
.noise {
  position: fixed; inset: 0; z-index: 9002; pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noiseAnim 0.12s steps(1) infinite;
}
@keyframes noiseAnim {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-2%,1%); }
  50%  { transform: translate(1%,-2%); }
  75%  { transform: translate(2%,1%); }
  100% { transform: translate(0,0); }
}
.vhs-flicker {
  position: fixed; inset: 0; z-index: 9003; pointer-events: none;
  animation: vhsFlicker 7s infinite;
}
@keyframes vhsFlicker {
  0%, 94%, 100% { opacity: 0; }
  95%  { opacity: 0.055; background: rgba(255,255,255,0.055); }
  96%  { opacity: 0; }
  97%  { opacity: 0.03; background: rgba(255,255,255,0.03); }
  98%  { opacity: 0; }
}
.vhs-edge-top {
  position: fixed; top: 0; left: 0; right: 0; height: 5px;
  z-index: 9004; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,0.07), transparent);
}
.vhs-edge-bottom {
  position: fixed; bottom: 0; left: 0; right: 0; height: 5px;
  z-index: 9004; pointer-events: none;
  background: linear-gradient(to top, rgba(255,255,255,0.07), transparent);
}
.vhs-timestamp {
  position: fixed; bottom: calc(var(--footer-h) + 10px); left: 14px;
  z-index: 9005; pointer-events: none;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  letter-spacing: 2px;
  text-shadow: 0 0 6px rgba(255,255,255,0.25);
}

/* ═══════════════════════════════════════════════════════════
   BG VIDEO
═══════════════════════════════════════════════════════════ */
.bg-video-wrap {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
}
.bg-video-wrap video {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(35%) brightness(0.3) contrast(1.1);
  transform: scale(1.02);
}
.bg-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center,
    rgba(9,9,9,0.5) 0%,
    rgba(9,9,9,0.88) 100%);
}

/* ═══════════════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(14px) saturate(0.7);
  background: rgba(9,9,9,0.6);
}
.nav-logo {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 6px;
  cursor: url('images/mouse.png') 16 16, crosshair;
  user-select: none;
}
.nav-logo-bracket { color: var(--muted); }
.nav-logo-text {
  color: var(--white);
  text-shadow: 0 0 18px rgba(255,255,255,0.3);
}
.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-link {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 4px;
  color: var(--muted);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0; height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.nav-link:hover,
.nav-link.active { color: var(--white); }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

.nav-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 3px; color: var(--muted);
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 8px var(--accent2);
  animation: statusPulse 2.2s ease-in-out infinite;
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent2); }
  50%       { opacity: 0.35; box-shadow: 0 0 3px var(--accent2); }
}

/* ═══════════════════════════════════════════════════════════
   PAGES WRAPPER
═══════════════════════════════════════════════════════════ */
.pages-wrapper {
  position: relative; z-index: 10;
  padding-top: var(--nav-h);
  padding-bottom: var(--footer-h);
}
.page {
  display: none;
  min-height: calc(100vh - var(--nav-h) - var(--footer-h));
  animation: pageFadeIn 0.45s ease forwards;
}
.page.active { display: block; }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   HOME PAGE
═══════════════════════════════════════════════════════════ */
#home {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h) - var(--footer-h));
  text-align: center;
  padding: 60px 40px;
  position: relative;
}
#home.active { display: flex; }

.home-pre-title {
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 5px;
  margin-bottom: 18px;
  animation: textFlicker 5s infinite;
}
@keyframes textFlicker {
  0%, 91%, 100% { opacity: 1; }
  92%  { opacity: 0.25; }
  93%  { opacity: 1; }
  95%  { opacity: 0.5; }
  96%  { opacity: 1; }
}
.home-title {
  font-family: var(--font);
  font-size: clamp(96px, 18vw, 210px);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--white);
  line-height: 1;
  position: relative;
  text-shadow:
    0 0 50px rgba(255,255,255,0.12),
    0 0 100px rgba(255,255,255,0.05);
  font-variation-settings: "slnt" 0, "CRSV" 0.5, "ELSH" 0, "ELXP" 0;
}
/* GLITCH */
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute; top: 0; left: 0; right: 0;
  font-family: var(--font);
  font-size: inherit;
  font-weight: 400;
  letter-spacing: inherit;
  font-variation-settings: "slnt" 0, "CRSV" 0.5, "ELSH" 0, "ELXP" 0;
}
.glitch::before {
  color: rgba(255,70,70,0.55);
  animation: glitch1 6s infinite;
  clip-path: polygon(0 28%, 100% 28%, 100% 48%, 0 48%);
}
.glitch::after {
  color: rgba(70,200,255,0.45);
  animation: glitch2 6s infinite;
  clip-path: polygon(0 58%, 100% 58%, 100% 74%, 0 74%);
}
@keyframes glitch1 {
  0%, 87%, 100% { transform: translate(0,0); opacity: 0; }
  88%  { transform: translate(-5px,2px); opacity: 0.85; }
  89%  { transform: translate(3px,-1px); opacity: 0.6; }
  90%  { transform: translate(0,0); opacity: 0; }
  92%  { transform: translate(-3px,2px); opacity: 0.7; }
  93%  { transform: translate(0,0); opacity: 0; }
}
@keyframes glitch2 {
  0%, 87%, 100% { transform: translate(0,0); opacity: 0; }
  88%  { transform: translate(5px,-2px); opacity: 0.75; }
  89%  { transform: translate(-3px,1px); opacity: 0.5; }
  90%  { transform: translate(0,0); opacity: 0; }
  92%  { transform: translate(4px,-3px); opacity: 0.6; }
  93%  { transform: translate(0,0); opacity: 0; }
}

.home-subtitle {
  font-size: 20px;
  font-weight: 400;
  color: var(--dim-white);
  letter-spacing: 7px;
  margin-top: 14px;
}
.type-cursor {
  border-right: 2px solid var(--white);
  padding-right: 4px;
  animation: typeCursor 1s step-end infinite;
}
@keyframes typeCursor {
  0%, 100% { border-color: var(--white); }
  50%      { border-color: transparent; }
}

.home-desc {
  max-width: 480px;
  font-size: 15px;
  line-height: 2;
  color: var(--dim-white);
  margin: 40px 0 44px;
  border-left: 1px solid rgba(255,255,255,0.12);
  padding-left: 20px;
  text-align: left;
  font-weight: 400;
}
.home-desc em { color: var(--white); font-style: normal; }

/* CONTRACT */
.contract-box {
  margin-bottom: 44px;
  border: 1px solid rgba(255,255,255,0.13);
  padding: 20px 28px;
  position: relative;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.025);
  transition: border-color 0.3s;
}
.contract-box::before {
  content: '';
  position: absolute; top: -1px; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.35), transparent);
}
.contract-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 5px;
  margin-bottom: 12px;
}
.contract-address {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.ca-text {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 1.5px;
  word-break: break-all;
  flex: 1;
}
.copy-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 12px;
  letter-spacing: 3px;
  padding: 8px 18px;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.copy-btn:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.5);
}
.copy-feedback {
  font-size: 13px;
  font-weight: 400;
  color: var(--accent2);
  letter-spacing: 4px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.3s;
  height: 18px;
}
.copy-feedback.show { opacity: 1; }

/* STATS */
.home-stats { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.stat-item {
  border: 1px solid rgba(255,255,255,0.09);
  padding: 16px 22px;
  text-align: center;
  backdrop-filter: blur(4px);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.3s, transform 0.3s;
  min-width: 106px;
}
.stat-item:hover {
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-3px);
}
.stat-label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--muted);
  margin-bottom: 6px;
}
.stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 2px;
}
.stat-value.blink { animation: blinkAnim 1.6s step-end infinite; }
@keyframes blinkAnim {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.2; }
}
.scroll-hint {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-size: 20px; color: var(--muted);
  animation: scrollBounce 2.2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(7px); }
}

/* ═══════════════════════════════════════════════════════════
   LORE / FILES PAGE
═══════════════════════════════════════════════════════════ */
#lore { padding: 60px 40px 80px; max-width: 1080px; margin: 0 auto; }

.lore-pre {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 5px;
  margin-bottom: 12px;
}
.lore-title {
  font-size: clamp(26px, 4.5vw, 50px);
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.lore-divider {
  color: rgba(255,255,255,0.1);
  font-size: 11px;
  overflow: hidden;
  margin-bottom: 32px;
  letter-spacing: 1px;
}
.lore-intro {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.09);
  border-left: 2px solid rgba(255,255,255,0.25);
  padding: 22px 26px;
  margin-bottom: 60px;
  font-size: 14px;
  line-height: 2;
  color: var(--dim-white);
  font-weight: 400;
}

/* FRAGMENT / FILE */
.fragment {
  margin-bottom: 70px;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fragment.visible { opacity: 1; transform: translateY(0); }

.fragment-header {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding-bottom: 12px;
}
.frag-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 3px;
}
.frag-tag {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 4px;
}

.fragment-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.fragment-body.reverse { direction: rtl; }
.fragment-body.reverse > * { direction: ltr; }

/* VIDEO — fixed to 4:3 */
.video-wrapper {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--dark2);
  border: 1px solid rgba(255,255,255,0.09);
  overflow: hidden;
  transition: border-color 0.3s;
}
.video-wrapper video {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
  filter: contrast(1.04);
}
.video-vhs-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255,255,255,0.012) 3px,
    rgba(255,255,255,0.012) 4px
  );
  mix-blend-mode: overlay;
}
.video-label {
  position: absolute; top: 9px; right: 10px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,60,60,0.8);
  letter-spacing: 2px;
  text-shadow: 0 0 6px rgba(255,60,60,0.5);
  animation: recBlink 1.3s step-end infinite;
}
@keyframes recBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* TEXT */
.fragment-text h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--white);
  margin-bottom: 14px;
  line-height: 1.5;
}
.fragment-text p {
  font-size: 14px;
  font-weight: 400;
  line-height: 2;
  color: var(--dim-white);
  margin-bottom: 12px;
}
.fragment-text p em { color: var(--white); font-style: normal; }

/* ═══════════════════════════════════════════════════════════
   CHANNELS / LINKS PAGE
═══════════════════════════════════════════════════════════ */
#links {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h) - var(--footer-h));
  padding: 60px 40px;
}
#links.active { display: flex; }

.links-header { text-align: center; margin-bottom: 52px; }
.links-pre {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 5px;
  margin-bottom: 12px;
}
.links-title {
  font-size: clamp(32px, 5.5vw, 68px);
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.1em;
}
.links-sub {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 3px;
  margin-top: 10px;
}

.links-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 620px;
}

.link-card {
  position: relative;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.02);
  display: block;
  transition: border-color 0.3s, background 0.3s, transform 0.25s;
}
.link-card:hover {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.055);
  transform: translateX(5px);
}
.link-card.featured { border-color: rgba(255,255,255,0.2); }

.link-card-inner {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 22px;
  position: relative; z-index: 1;
}
.link-icon {
  width: 50px; height: 50px;
  border: 1px solid rgba(255,255,255,0.13);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  flex-shrink: 0;
  transition: border-color 0.3s, background 0.3s;
}
.link-card:hover .link-icon {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.05);
}
.link-info { flex: 1; }
.link-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 3px;
  margin-bottom: 4px;
}
.link-desc {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 1.5px;
}
.link-arrow {
  font-size: 18px;
  color: var(--muted);
  transition: color 0.25s, transform 0.25s;
}
.link-card:hover .link-arrow {
  color: var(--white);
  transform: translateX(4px);
}
.link-card-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at left center,
    rgba(255,255,255,0.04), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.link-card:hover .link-card-glow { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
.footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--footer-h);
  z-index: 1000;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(9,9,9,0.88);
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.footer-inner {
  display: flex; align-items: center;
  height: 100%; padding: 0 14px; gap: 14px;
}
.footer-left, .footer-right {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.footer-marquee { flex: 1; overflow: hidden; }
.footer-marquee span {
  display: inline-block;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--dim-white);
  animation: marqueeScroll 32s linear infinite;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .nav-links { gap: 22px; }
  .nav-status { display: none; }
  .fragment-body,
  .fragment-body.reverse { grid-template-columns: 1fr; direction: ltr; }
  #home, #lore, #links { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 480px) {
  .nav-link { font-size: 11px; letter-spacing: 2px; }
  .home-title { font-size: 72px; }
  .home-stats { gap: 12px; }
}

/* DESLIGAR TODOS OS EFEITOS VHS PARA TESTE */
.scanlines,
.noise,
.vhs-flicker,
.vhs-overlay,
.vhs-edge-top,
.vhs-edge-bottom,
.vhs-timestamp {
  display: none !important;
}