/* ============================================================
   MYTHWARE — main.css
   identidade: horror premium P&B + verde-ácido + vermelho sinal
   ============================================================ */

/* ---------- fontes ---------- */
@font-face {
  font-family: 'Anton';
  src: url('../assets/fonts/anton-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../assets/fonts/plexmono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../assets/fonts/plexmono-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../assets/fonts/plexmono-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --bg: #050507;
  --bg2: #0a0a0e;
  --ink: #e9e6dc;
  --ink-dim: #8f8c82;
  --acid: #c6ff3e;
  --red: #ff2633;
  --line: rgba(233, 230, 220, 0.14);
  --anton: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --mono: 'Plex Mono', 'Courier New', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-glitch: cubic-bezier(0.9, 0, 0.1, 1);
}

/* ---------- reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); }
html, body { overscroll-behavior: none; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}
body.no-fine-pointer { cursor: auto; }
::selection { background: var(--acid); color: #000; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.mono { font-family: var(--mono); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #26262c; border: 2px solid #000; }
::-webkit-scrollbar-thumb:hover { background: var(--acid); }

.nojs { padding: 20vh 8vw; text-align: center; display: grid; gap: 24px; justify-items: center; }

/* ============================================================
   BOOT / PRELOADER
   ============================================================ */
#boot {
  position: fixed; inset: 0; z-index: 1000;
  background: #030304;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.9s var(--ease-out), visibility 0.9s;
}
#boot.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-inner { width: min(680px, 88vw); }
.boot-log {
  font-family: var(--mono); font-size: 13px; line-height: 1.9;
  color: var(--ink-dim); white-space: pre-wrap; min-height: 13em;
}
.boot-log .ok { color: var(--acid); }
.boot-log .warn { color: var(--red); }
.boot-log .bright { color: var(--ink); }
.boot-bar-row { display: flex; gap: 16px; align-items: baseline; margin-top: 12px; }
.boot-bar { font-family: var(--mono); font-size: 13px; letter-spacing: 1px; color: var(--acid); }
.boot-pct { font-family: var(--mono); font-size: 13px; color: var(--ink-dim); }
.boot-enter {
  margin-top: 34px;
  font-family: var(--mono); font-size: 15px; font-weight: 700; letter-spacing: 0.12em;
  background: none; border: 1px solid var(--line); color: var(--ink);
  padding: 16px 30px; cursor: none;
  opacity: 0.25; transition: all 0.35s var(--ease-out);
  position: relative; overflow: hidden;
}
.boot-enter:not([disabled]) { opacity: 1; border-color: var(--acid); color: var(--acid); }
.boot-enter:not([disabled]):hover { background: var(--acid); color: #000; box-shadow: 0 0 42px rgba(198, 255, 62, 0.35); }
.boot-enter:not([disabled]) .boot-enter-txt { animation: btnblink 1.2s steps(2) infinite; }
@keyframes btnblink { 50% { opacity: 0.55; } }
.boot-hint { margin-top: 14px; font-size: 11px; color: var(--ink-dim); letter-spacing: 0.08em; }

/* ============================================================
   CANVAS + OVERLAYS GLOBAIS
   ============================================================ */
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }

#crt-overlay {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  opacity: 0.5;
}
#crt-overlay::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 105% 90% at 50% 45%, transparent 58%, rgba(0,0,0,0.5) 100%);
}

/* cursor custom (z-index acima do #boot=1000 p/ aparecer já na tela de abertura) */
#cursor { position: fixed; left: 0; top: 0; z-index: 2000; pointer-events: none; mix-blend-mode: difference; }
.cur-dot {
  position: absolute; width: 6px; height: 6px; background: #fff;
  transform: translate(-50%, -50%);
}
.cur-ring {
  position: absolute; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,0.85);
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), border-radius 0.25s;
}
#cursor.hot .cur-ring { width: 56px; height: 56px; border-radius: 50%; }
#cursor.hidden { opacity: 0; }
body.no-fine-pointer #cursor { display: none; }

/* ============================================================
   HUD
   ============================================================ */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px;
  transform: translateY(-110%);
  transition: transform 1s var(--ease-out) 0.15s;
  mix-blend-mode: difference;
}
.hud.on { transform: translateY(0); }
.hud-logo-img { width: 34px; height: 34px; object-fit: cover; mix-blend-mode: screen; }
.hud-nav { display: flex; gap: 30px; }
.hud-nav a {
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em;
  color: var(--ink); position: relative; padding: 4px 0;
}
.hud-nav a i { font-style: normal; color: var(--acid); margin-right: 6px; font-size: 10px; }
.hud-nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--acid); transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.hud-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.hud-audio {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  background: none; border: none; color: var(--ink); cursor: none; padding: 4px;
}
.hud-audio b { color: var(--acid); margin-left: 6px; }

/* ============================================================
   PÁGINA / SEÇÕES
   ============================================================ */
#page { position: fixed; top: 0; left: 0; width: 100%; z-index: 10; will-change: transform; }
body.native-scroll #page { position: relative; }
#scroll-spacer { width: 1px; }

.sec { position: relative; padding: 0 max(28px, 5vw); }

/* ---------- HERO ---------- */
.sec-hero { height: 100vh; display: flex; flex-direction: column; justify-content: flex-end; }
.hero-inner { padding-bottom: 16vh; position: relative; z-index: 2; }
.hero-eyebrow {
  font-size: 12px; letter-spacing: 0.34em; color: var(--acid); margin-bottom: 3.2vh; font-weight: 500;
}
.hero-title {
  font-family: var(--anton);
  font-size: clamp(64px, 14.5vw, 220px);
  line-height: 0.88; letter-spacing: 0.005em;
  text-transform: uppercase; font-weight: 400;
  user-select: none;
}
.hero-tag {
  margin-top: 3.4vh; font-size: clamp(14px, 1.35vw, 19px); color: var(--ink-dim); line-height: 1.75;
}
.hero-tag em { font-style: normal; color: var(--ink); border-bottom: 1px solid var(--acid); }
.hero-foot {
  position: absolute; left: max(28px, 5vw); right: max(28px, 5vw); bottom: 26px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; letter-spacing: 0.18em; color: var(--ink-dim);
}
.hero-scroll { color: var(--ink); }
.hero-scroll .v { display: inline-block; color: var(--acid); animation: sink 1.6s var(--ease-out) infinite; }
@keyframes sink { 0%,100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

/* ---------- MANIFESTO ---------- */
.sec-manifesto { padding-top: 24vh; padding-bottom: 10vh; display: grid; gap: 34vh; }
.mani-block { max-width: 1200px; }
.mani-right { justify-self: end; text-align: right; }
.mani-center { justify-self: center; text-align: center; }
.mani-index { display: block; font-size: 12px; letter-spacing: 0.26em; color: var(--acid); margin-bottom: 3vh; }
.mani-line {
  font-family: var(--anton); font-weight: 400;
  font-size: clamp(40px, 7.2vw, 118px);
  line-height: 0.94; text-transform: uppercase;
}
.mani-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}
.mani-green { color: var(--acid); text-shadow: 0 0 60px rgba(198,255,62,0.25); }
.mani-note { margin-top: 4vh; color: var(--ink-dim); font-size: 13px; letter-spacing: 0.12em; }

/* ---------- NIGHTMARES ---------- */
.sec-nightmares { height: 420vh; padding: 0; }
.nm-pin { position: relative; height: 100vh; overflow: hidden; }
.nm-stage {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 0 max(28px, 5vw); z-index: 2;
}
.nm-label { font-size: 12px; letter-spacing: 0.3em; color: var(--red); margin-bottom: 4vh; }
.blink-slow { animation: blinkslow 2.4s steps(2) infinite; }
@keyframes blinkslow { 50% { opacity: 0.35; } }
.nm-title {
  font-family: var(--anton); font-weight: 400;
  font-size: clamp(58px, 12.5vw, 200px);
  line-height: 0.9; letter-spacing: 0.01em; color: var(--ink);
  position: relative;
}
.nm-sub { margin-top: 3vh; font-size: clamp(14px, 1.3vw, 18px); color: var(--ink-dim); }
.nm-sub b { color: var(--ink); }
.nm-copy { margin-top: 4.5vh; font-size: clamp(13px, 1.1vw, 16px); line-height: 2; color: var(--ink-dim); }
.nm-red { color: var(--red); margin-top: 1.4em; }
.nm-red b { text-decoration: underline; text-underline-offset: 4px; }
.nm-meta {
  margin-top: 5.5vh; list-style: none; display: flex; flex-wrap: wrap; gap: 12px 38px; justify-content: center;
  font-size: 11px; letter-spacing: 0.2em; color: var(--ink-dim);
}
.nm-meta b { color: var(--ink); margin-left: 8px; }
.nm-meta .nm-soon { color: var(--red); animation: blinkslow 1.3s steps(2) infinite; }
.nm-fine { margin-top: 7vh; font-size: 11px; color: #55534b; letter-spacing: 0.2em; }

/* scrim escuro atrás do texto p/ legibilidade sobre a estática da TV */
.nm-stage::before {
  content: ''; position: absolute; inset: -10% -5%; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 56% at 50% 47%, rgba(3,3,6,0.82) 0%, rgba(3,3,6,0.52) 40%, transparent 72%);
}

/* estados por fase (controlados via JS --nm) */
.nm-stage > * { position: relative; z-index: 1; opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); text-shadow: 0 1px 3px rgba(0,0,0,0.95), 0 0 16px rgba(0,0,0,0.8); }
.nm-stage.ph1 .nm-label { opacity: 1; transform: none; }
.nm-stage.ph2 .nm-title, .nm-stage.ph2 .nm-sub { opacity: 1; transform: none; }
.nm-stage.ph3 .nm-copy, .nm-stage.ph3 .nm-meta { opacity: 1; transform: none; }
.nm-stage.ph4 .nm-fine { opacity: 1; transform: none; }

/* glitch */
.glitch { position: relative; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0; overflow: hidden;
  clip-path: inset(50% 0 50% 0);
  opacity: 0;
}
.nm-stage.ph2 .glitch::before, .nm-stage.ph2 .glitch::after { opacity: 1; }
.glitch::before { color: var(--red); animation: glitchA 2.9s infinite steps(1); transform: translateX(-3px); }
.glitch::after { color: var(--acid); animation: glitchB 3.7s infinite steps(1); transform: translateX(3px); }
@keyframes glitchA {
  0%, 91% { clip-path: inset(100% 0 0 0); }
  92% { clip-path: inset(12% 0 76% 0); }
  94% { clip-path: inset(64% 0 8% 0); }
  96% { clip-path: inset(28% 0 52% 0); }
  98% { clip-path: inset(80% 0 4% 0); }
  100% { clip-path: inset(100% 0 0 0); }
}
@keyframes glitchB {
  0%, 88% { clip-path: inset(100% 0 0 0); }
  89% { clip-path: inset(45% 0 40% 0); }
  92% { clip-path: inset(4% 0 88% 0); }
  95% { clip-path: inset(70% 0 16% 0); }
  100% { clip-path: inset(100% 0 0 0); }
}

/* ---------- TMPSOFT ---------- */
.sec-tmpsoft {
  min-height: 130vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
/* brilhos em pseudo com fade vertical nas bordas -> passagem sem "linha"/degrau */
.sec-tmpsoft::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 22%, rgba(0, 128, 128, 0.16), transparent 55%),
    radial-gradient(ellipse 90% 75% at 80% 84%, rgba(255, 92, 240, 0.12), transparent 60%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
}
.tmp-noise {
  position: absolute; inset: 0; opacity: 0.06; pointer-events: none;
  background-image: repeating-conic-gradient(#fff 0% 0.0001%, transparent 0.0002% 0.05%);
}
.tmp-marquee {
  position: absolute; top: 8vh; left: 0; right: 0; overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 12px 0; transform: rotate(-1.6deg) scale(1.02);
}
.tmp-marquee-track { display: flex; white-space: nowrap; width: max-content; animation: marq 22s linear infinite; font-size: 13px; letter-spacing: 0.22em; color: var(--acid); }
@keyframes marq { to { transform: translateX(-50%); } }
.tmp-inner { text-align: center; position: relative; z-index: 2; max-width: 900px; padding: 18vh 0 10vh; }
.tmp-eyebrow { font-size: 12px; letter-spacing: 0.3em; color: var(--ink-dim); margin-bottom: 3vh; }
.tmp-title {
  font-family: var(--anton); font-weight: 400;
  font-size: clamp(64px, 11vw, 180px); line-height: 0.9;
  background: linear-gradient(100deg, #5ef0ff 8%, #ff5cf0 48%, #ffe95e 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 34px rgba(255, 92, 240, 0.25));
}
.tmp-title sup { font-size: 0.22em; vertical-align: super; }
.tmp-copy { margin-top: 4vh; font-size: clamp(14px, 1.25vw, 17px); color: var(--ink-dim); line-height: 1.9; }
.tmp-copy b { color: var(--ink); }
.tmp-specs { margin-top: 4vh; list-style: none; display: flex; gap: 34px; justify-content: center; flex-wrap: wrap; font-size: 12px; letter-spacing: 0.14em; color: #5ef0ff; }
.tmp-cta {
  margin-top: 6.5vh; display: inline-block; position: relative;
  font-family: var(--mono); font-weight: 700; font-size: clamp(15px, 1.4vw, 19px); letter-spacing: 0.12em;
  border: 1px solid var(--ink); padding: 0; overflow: hidden; height: 64px; line-height: 64px;
}
.tmp-cta-face { display: block; padding: 0 44px; height: 64px; transition: transform 0.45s var(--ease-glitch); background: var(--ink); color: #000; }
.tmp-cta-face--alt { position: absolute; inset: 0; transform: translateY(100%); background: #ff5cf0; color: #000; }
.tmp-cta:hover .tmp-cta-face { transform: translateY(-100%); }
.tmp-cta:hover .tmp-cta-face--alt { transform: translateY(0); }
.tmp-warn { margin-top: 3vh; font-size: 11px; color: var(--ink-dim); letter-spacing: 0.18em; }

/* ---------- EQUIPE ---------- */
.sec-equipe { min-height: 140vh; padding-top: 36vh; padding-bottom: 16vh; position: relative; }
.eq-head { text-align: center; margin-bottom: 12vh; position: relative; z-index: 3; }
.eq-title { font-family: var(--anton); font-weight: 400; font-size: clamp(42px, 7vw, 110px); line-height: 0.95; text-transform: uppercase; }
.eq-sub { margin-top: 2.6vh; font-size: 12px; letter-spacing: 0.22em; color: var(--ink-dim); }
.eq-wall {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(18px, 3vw, 42px); max-width: 1280px; margin: 0 auto;
}
.eq-card {
  position: relative; border: 1px solid var(--line); background: #0a0a0d;
  padding: 14px 14px 18px; transform: rotate(var(--tilt, 0deg));
  transition: transform 0.5s var(--ease-out), border-color 0.5s;
}
.eq-card:hover { transform: rotate(0deg) translateY(-6px); border-color: var(--acid); }
.eq-photo { position: relative; aspect-ratio: 3 / 3.6; overflow: hidden; background: #101014; }
.eq-photo img, .eq-photo canvas { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.03) brightness(1.12); }
.eq-card:hover .eq-photo img, .eq-card:hover .eq-photo canvas { filter: grayscale(0.2) contrast(1.0) brightness(1.14); }
.eq-rec {
  position: absolute; top: 8px; left: 10px; font-size: 10px; letter-spacing: 0.2em; color: var(--red);
  animation: blinkslow 1.4s steps(2) infinite; z-index: 2;
}
.eq-name { margin-top: 14px; font-family: var(--anton); font-size: 21px; letter-spacing: 0.03em; text-transform: uppercase; }
.eq-role { margin-top: 4px; font-size: 11px; letter-spacing: 0.18em; color: var(--acid); text-transform: uppercase; }

/* lanterna: escuridão com furo que segue o cursor */
.eq-dark {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: rgba(3, 3, 4, 0.93);
  -webkit-mask-image: radial-gradient(circle 240px at var(--fx, 50%) var(--fy, 40%), transparent 0 45%, #000 100%);
  mask-image: radial-gradient(circle 240px at var(--fx, 50%) var(--fy, 40%), transparent 0 45%, #000 100%);
  transition: opacity 0.6s;
}
body.no-fine-pointer .eq-dark { opacity: 0; }

/* ---------- FOOTER ---------- */
.sec-fim {
  min-height: 92vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5vh; text-align: center;
}
/* linha do topo do rodapé some nas laterais (passagem suave, sem barra dura) */
.sec-fim::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, var(--line) 25%, var(--line) 75%, transparent 100%);
}
.fim-logo { width: min(380px, 60vw); mix-blend-mode: screen; opacity: 0.95; }
.fim-links { display: flex; gap: 34px; flex-wrap: wrap; justify-content: center; font-size: 12px; letter-spacing: 0.2em; }
.fim-links a { position: relative; padding: 6px 2px; color: var(--ink-dim); transition: color 0.3s; }
.fim-links a:hover { color: var(--acid); }
.fim-legal { font-size: 11px; color: #55534b; letter-spacing: 0.08em; line-height: 2.1; }
.fim-joke { color: #3c3b35; }

/* ============================================================
   SPLIT-TEXT REVEALS
   ============================================================ */
[data-split], [data-split-title] { visibility: hidden; }
[data-split].ready, [data-split-title].ready { visibility: visible; }
.w { display: inline-block; overflow: hidden; vertical-align: top; }
.c {
  display: inline-block;
  transform: translateY(115%) rotate(4deg);
  transition: transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i) * 28ms);
  will-change: transform;
}
.in .c { transform: translateY(0) rotate(0deg); }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 760px) {
  .hud { padding: 14px 18px; }
  .hud-nav { display: none; }
  .hero-foot { font-size: 9px; }
  .hero-coord { display: none; }
  .mani-right, .mani-center { justify-self: start; text-align: left; }
  .sec-nightmares { height: 380vh; }
  .nm-meta { gap: 10px 20px; }
  .eq-wall { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .c { transition-duration: 0.01s; transition-delay: 0s; }
  .glitch::before, .glitch::after, .blink-slow, .hero-scroll .v, .tmp-marquee-track { animation: none !important; }
}
